@creaditor/newsletter-starterkit 1.0.16 → 1.0.17

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.
@@ -31,15 +31,15 @@
31
31
  </style>
32
32
 
33
33
  <slot></slot>
34
- `,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&(0,r.vz)(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||(0,r.vz)(this.parentNode).removeChild(this)},_onTransitionend:function(t){t&&t.target===this&&this.complete()},_openedChanged:function(t){if(t)this.prepare();else{var e=window.getComputedStyle(this);"0s"!==e.transitionDuration&&0!=e.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var f=n(33972),m=n(98348);const g=new class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,m.NH(document.documentElement,"tap",(function(){})),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for(t&&t instanceof Element!=!1||(t=document.body);t.root&&(0,r.vz)(t.root).activeElement;)t=(0,r.vz)(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var e=this._overlays[t];if(e){var n=this._overlays.length-1,r=this._overlays[n];if(r&&this._shouldBeBehindOverlay(e,r)&&n--,!(t>=n)){var i=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(e)<=i&&this._applyOverlayZ(e,i);t<n;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[n]=e}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var e=this._overlays.indexOf(t);if(e>=0)return this._bringOverlayAtIndexToFront(e),void this.trackBackdrop();var n=this._overlays.length,r=this._overlays[n-1],i=Math.max(this._getZ(r),this._minimumZ),o=this._getZ(t);if(r&&this._shouldBeBehindOverlay(t,r)){this._applyOverlayZ(r,i),n--;var s=this._overlays[n-1];i=Math.max(this._getZ(s),this._minimumZ)}o<=i&&this._applyOverlayZ(t,i),this._overlays.splice(n,0,t),this.trackBackdrop()}removeOverlay(t){var e=this._overlays.indexOf(t);-1!==e&&(this._overlays.splice(e,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();(t||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],e=0;e<this._overlays.length;e++)this._overlays[e].withBackdrop&&t.push(this._overlays[e]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var e=this._minimumZ;if(t){var n=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);n==n&&(e=n)}return e}_setZ(t,e){t.style.zIndex=e}_applyOverlayZ(t,e){this._setZ(t,e+2)}_overlayInPath(t){t=t||[];for(var e=0;e<t.length;e++)if(t[e]._manager===this)return t[e]}_onCaptureClick(t){var e=this._overlays.length-1;if(-1!==e)for(var n,i=(0,r.vz)(t).path;(n=this._overlays[e])&&this._overlayInPath(i)!==n&&(n._onCaptureClick(t),n.allowClickThrough);)e--}_onCaptureFocus(t){var e=this.currentOverlay();e&&e._onCaptureFocus(t)}_onCaptureKeyDown(t){var e=this.currentOverlay();e&&(f.G.keyboardEventMatchesKeys(t,"esc")?e._onCaptureEsc(t):f.G.keyboardEventMatchesKeys(t,"tab")&&e._onCaptureTab(t))}_shouldBeBehindOverlay(t,e){return!t.alwaysOnTop&&e.alwaysOnTop}};var b,y,A={pageX:0,pageY:0},w=null,v=[],x=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];function _(t){C.indexOf(t)>=0||(0===C.length&&function(){b=b||B.bind(void 0);for(var t=0,e=x.length;t<e;t++)document.addEventListener(x[t],b,{capture:!0,passive:!1})}(),C.push(t),y=C[C.length-1],E=[],S=[])}function k(t){var e=C.indexOf(t);-1!==e&&(C.splice(e,1),y=C[C.length-1],E=[],S=[],0===C.length&&function(){for(var t=0,e=x.length;t<e;t++)document.removeEventListener(x[t],b,{capture:!0,passive:!1})}())}const C=[];let E=null,S=null;function B(t){if(t.cancelable&&function(t){var e=(0,r.vz)(t).rootTarget;"touchmove"!==t.type&&w!==e&&(w=e,v=function(t){for(var e=[],n=t.indexOf(y),r=0;r<=n;r++)if(t[r].nodeType===Node.ELEMENT_NODE){var i=t[r],o=i.style;"scroll"!==o.overflow&&"auto"!==o.overflow&&(o=window.getComputedStyle(i)),"scroll"!==o.overflow&&"auto"!==o.overflow||e.push(i)}return e}((0,r.vz)(t).path));if(!v.length)return!0;if("touchstart"===t.type)return!1;var n=function(t){var e={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t&&"wheelDeltaY"in t)e.deltaX=-t.wheelDeltaX,e.deltaY=-t.wheelDeltaY;else if("wheelDelta"in t)e.deltaX=0,e.deltaY=-t.wheelDelta;else if("axis"in t)e.deltaX=1===t.axis?t.detail:0,e.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var n=t.targetTouches[0];e.deltaX=A.pageX-n.pageX,e.deltaY=A.pageY-n.pageY}return e}(t);return!function(t,e,n){if(!e&&!n)return;for(var r=Math.abs(n)>=Math.abs(e),i=0;i<t.length;i++){var o=t[i];if(r?n<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:e<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth)return o}}(v,n.deltaX,n.deltaY)}(t)&&t.preventDefault(),t.targetTouches){var e=t.targetTouches[0];A.pageX=e.pageX,A.pageY=e.pageY}}const O={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:g},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||(0,r.vz)(this).querySelector("[autofocus]")||this},get _focusableNodes(){return p.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=(0,r.vz)(this).observeNodes(this._onNodesChange)},detached:function(){for(var t in this._observer&&(0,r.vz)(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[t]&&cancelAnimationFrame(this.__rafs[t]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(t){this.fire("iron-overlay-canceled",t,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(t){t?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._manager.deepActiveElement;(t===document.body||M(this,t))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(t){this.noCancelOnOutsideClick||this.cancel(t)},_onCaptureFocus:function(t){if(this.withBackdrop){var e=(0,r.vz)(t).path;-1===e.indexOf(this)?(t.stopPropagation(),this._applyFocus()):this._focusedChild=e[0]}},_onCaptureEsc:function(t){this.noCancelOnEscKey||this.cancel(t)},_onCaptureTab:function(t){if(this.withBackdrop){this.__ensureFirstLastFocusables();var e=t.shiftKey,n=e?this.__firstFocusableNode:this.__lastFocusableNode,r=e?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(n===r)i=!0;else{var o=this._manager.deepActiveElement;i=o===n||o===this}i&&(t.preventDefault(),this._focusedChild=r,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var t=this._focusableNodes;this.__firstFocusableNode=t[0],this.__lastFocusableNode=t[t.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(t,e){var n=this.__rafs;null!==n[t]&&cancelAnimationFrame(n[t]),n[t]=requestAnimationFrame(function(){n[t]=null,e.call(this)}.bind(this))},__updateScrollObservers:function(t,e,n){t&&e&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),_(this)),this.__addScrollListeners()):(k(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],s.my)for(var t=this;t;)t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host&&this.__rootNodes.push(t),t=t.host||t.assignedSlot||t.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach((function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach((function(t){t.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(t){return"lock"===t||"refit"===t||"cancel"===t},__onCaptureScroll:function(t){if(!(this.__isAnimating||(0,r.vz)(t).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(t)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},M=(t,e)=>{for(let r=e;r;r=(n=r).assignedSlot||n.parentNode||n.host)if(r===t)return!0;var n;return!1},I=[o,l,O]},13517:(t,e,n)=>{"use strict";n.d(e,{t:()=>c});n(38371);var r=n(87812),i=n(14326);let o={},s={};function a(t,e){o[t]=s[t.toLowerCase()]=e}function l(t){return o[t]||s[t.toLowerCase()]}class c extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let n=l(t);return n&&e?n.querySelector(e):n}return null}attributeChangedCallback(t,e,n,r){e!==n&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=(0,r.Kk)(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=(0,r.iY)(e)}return this.__assetpath}register(t){if(t=t||this.id){if(i.XN&&void 0!==l(t))throw a(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,a(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}c.prototype.modules=o,customElements.define("dom-module",c)},82523:(t,e,n)=>{"use strict";n.d(e,{x:()=>Ct});var r=n(85794);class i{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function o(t){return s(function(t){let e=new i;e.start=0,e.end=t.length;let n=e;for(let r=0,o=t.length;r<o;r++)if(t[r]===c){n.rules||(n.rules=[]);let t=n,e=t.rules[t.rules.length-1]||null;n=new i,n.start=r+1,n.parent=t,n.previous=e,t.rules.push(n)}else t[r]===d&&(n.end=r+1,n=n.parent||e);return e}(t=t.replace(p.comments,"").replace(p.port,"")),t)}function s(t,e){let n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent){let r=t.previous?t.previous.end:t.parent.start;n=e.substring(r,t.start-1),n=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let t=arguments[1],e=6-t.length;for(;e--;)t="0"+t;return"\\"+t}))}(n),n=n.replace(p.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);let i=t.parsedSelector=t.selector=n.trim();t.atRule=0===i.indexOf(f),t.atRule?0===i.indexOf(u)?t.type=l.MEDIA_RULE:i.match(p.keyframesRule)&&(t.type=l.KEYFRAMES_RULE,t.keyframesName=t.selector.split(p.multipleSpaces).pop()):0===i.indexOf(h)?t.type=l.MIXIN_RULE:t.type=l.STYLE_RULE}let r=t.rules;if(r)for(let t,n=0,i=r.length;n<i&&(t=r[n]);n++)s(t,e);return t}function a(t,e,n=""){let r="";if(t.cssText||t.rules){let n=t.rules;if(n&&!function(t){let e=t[0];return Boolean(e)&&Boolean(e.selector)&&0===e.selector.indexOf(h)}(n))for(let t,i=0,o=n.length;i<o&&(t=n[i]);i++)r=a(t,e,r);else r=e?t.cssText:function(t){return t=function(t){return t.replace(p.customProp,"").replace(p.mixinProp,"")}(t),function(t){return t.replace(p.mixinApply,"").replace(p.varApply,"")}(t)}(t.cssText),r=r.trim(),r&&(r=" "+r+"\n")}return r&&(t.selector&&(n+=t.selector+" "+c+"\n"),n+=r,t.selector&&(n+=d+"\n\n")),n}const l={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},c="{",d="}",p={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},h="--",u="@media",f="@";var m=n(62398);const g=new Set,b="shady-unscoped";function y(t){const e=t.textContent;if(!g.has(e)){g.add(e);const t=document.createElement("style");t.setAttribute("shady-unscoped",""),t.textContent=e,document.head.appendChild(t)}}function A(t){return t.hasAttribute(b)}function w(t,e){return t?("string"==typeof t&&(t=o(t)),e&&x(t,e),a(t,r.rd)):""}function v(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=o(t.textContent)),t.__cssRules||null}function x(t,e,n,r){if(!t)return;let i=!1,o=t.type;if(r&&o===l.MEDIA_RULE){let e=t.selector.match(m.mA);e&&(window.matchMedia(e[1]).matches||(i=!0))}o===l.STYLE_RULE?e(t):n&&o===l.KEYFRAMES_RULE?n(t):o===l.MIXIN_RULE&&(i=!0);let s=t.rules;if(s&&!i)for(let t,i=0,o=s.length;i<o&&(t=s[i]);i++)x(t,e,n,r)}function _(t,e){let n=0;for(let r=e,i=t.length;r<i;r++)if("("===t[r])n++;else if(")"===t[r]&&0==--n)return r;return-1}function k(t,e){let n=t.indexOf("var(");if(-1===n)return e(t,"","","");let r=_(t,n+3),i=t.substring(n+4,r),o=t.substring(0,n),s=k(t.substring(r+1),e),a=i.indexOf(",");return-1===a?e(o,i.trim(),"",s):e(o,i.substring(0,a).trim(),i.substring(a+1).trim(),s)}window.ShadyDOM&&window.ShadyDOM.wrap;const C="css-build";function E(t){if(void 0!==r.Cp)return r.Cp;if(void 0===t.__cssBuild){const e=t.getAttribute(C);if(e)t.__cssBuild=e;else{const e=function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;if(e instanceof Comment){const t=e.textContent.trim().split(":");if(t[0]===C)return t[1]}return""}(t);""!==e&&function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;e.parentNode.removeChild(e)}(t),t.__cssBuild=e}}return t.__cssBuild||""}function S(t){return""!==E(t)}var B=n(95);const O=/;\s*/m,M=/^\s*(initial)|(inherit)\s*$/,I=/\s*!important/,$="_-_";class T{constructor(){this._map={}}set(t,e){t=t.trim(),this._map[t]={properties:e,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}}let L=null;class N{constructor(){this._currentElement=null,this._measureElement=null,this._map=new T}detectMixin(t){return(0,B.OH)(t)}gatherStyles(t){const e=function(t){const e=[],n=t.querySelectorAll("style");for(let t=0;t<n.length;t++){const i=n[t];A(i)?r.WA||(y(i),i.parentNode.removeChild(i)):(e.push(i.textContent),i.parentNode.removeChild(i))}return e.join("").trim()}(t.content);if(e){const n=document.createElement("style");return n.textContent=e,t.content.insertBefore(n,t.content.firstChild),n}return null}transformTemplate(t,e){void 0===t._gatheredStyle&&(t._gatheredStyle=this.gatherStyles(t));const n=t._gatheredStyle;return n?this.transformStyle(n,e):null}transformStyle(t,e=""){let n=v(t);return this.transformRules(n,e),t.textContent=w(n),n}transformCustomStyle(t){let e=v(t);return x(e,(t=>{":root"===t.selector&&(t.selector="html"),this.transformRule(t)})),t.textContent=w(e),e}transformRules(t,e){this._currentElement=e,x(t,(t=>{this.transformRule(t)})),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),":root"===t.selector&&(t.selector=":host > *")}transformCssText(t,e){return t=t.replace(m.CN,((t,n,r,i)=>this._produceCssProperties(t,n,r,i,e))),this._consumeCssProperties(t,e)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let e=t;for(;e.parent;)e=e.parent;const n={};let r=!1;return x(e,(e=>{r=r||e===t,r||e.selector===t.selector&&Object.assign(n,this._cssTextToMap(e.parsedCssText))})),n}_consumeCssProperties(t,e){let n=null;for(;n=m.$T.exec(t);){let r=n[0],i=n[1],o=n.index,s=o+r.indexOf("@apply"),a=o+r.length,l=t.slice(0,s),c=t.slice(a),d=e?this._fallbacksFromPreviousRules(e):{};Object.assign(d,this._cssTextToMap(l));let p=this._atApplyToCssProperties(i,d);t=`${l}${p}${c}`,m.$T.lastIndex=o+p.length}return t}_atApplyToCssProperties(t,e){t=t.replace(O,"");let n=[],r=this._map.get(t);if(r||(this._map.set(t,{}),r=this._map.get(t)),r){let i,o,s;this._currentElement&&(r.dependants[this._currentElement]=!0);const a=r.properties;for(i in a)s=e&&e[i],o=[i,": var(",t,$,i],s&&o.push(",",s.replace(I,"")),o.push(")"),I.test(a[i])&&o.push(" !important"),n.push(o.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,e){let n=M.exec(e);return n&&(e=n[1]?this._getInitialValueForProperty(t):"apply-shim-inherit"),e}_cssTextToMap(t,e=!1){let n,r,i=t.split(";"),o={};for(let t,s,a=0;a<i.length;a++)t=i[a],t&&(s=t.split(":"),s.length>1&&(n=s[0].trim(),r=s.slice(1).join(":"),e&&(r=this._replaceInitialOrInherit(n,r)),o[n]=r));return o}_invalidateMixinEntry(t){if(L)for(let e in t.dependants)e!==this._currentElement&&L(e)}_produceCssProperties(t,e,n,r,i){if(n&&k(n,((t,e)=>{e&&this._map.get(e)&&(r=`@apply ${e};`)})),!r)return t;let o=this._consumeCssProperties(""+r,i),s=t.slice(0,t.indexOf("--")),a=this._cssTextToMap(o,!0),l=a,c=this._map.get(e),d=c&&c.properties;d?l=Object.assign(Object.create(d),a):this._map.set(e,l);let p,h,u=[],f=!1;for(p in l)h=a[p],void 0===h&&(h="initial"),d&&!(p in d)&&(f=!0),u.push(`${e}${$}${p}: ${h}`);return f&&this._invalidateMixinEntry(c),c&&(c.properties=l),n&&(s=`${t};${s}`),`${s}${u.join("; ")};`}}N.prototype.detectMixin=N.prototype.detectMixin,N.prototype.transformStyle=N.prototype.transformStyle,N.prototype.transformCustomStyle=N.prototype.transformCustomStyle,N.prototype.transformRules=N.prototype.transformRules,N.prototype.transformRule=N.prototype.transformRule,N.prototype.transformTemplate=N.prototype.transformTemplate,N.prototype._separator=$,Object.defineProperty(N.prototype,"invalidCallback",{get:()=>L,set(t){L=t}});const R=N,P={},D="_applyShimCurrentVersion",z="_applyShimNextVersion",H="_applyShimValidatingVersion",j=Promise.resolve();function U(t){let e=P[t];e&&function(t){t[D]=t[D]||0,t[H]=t[H]||0,t[z]=(t[z]||0)+1}(e)}function Z(t){return t[D]===t[z]}function F(t){return!Z(t)&&t[H]===t[z]}function V(t){t[H]=t[z],t._validating||(t._validating=!0,j.then((function(){t[D]=t[z],t._validating=!1})))}n(22859);const Y=new R;class W{constructor(){this.customStyleInterface=null,Y.invalidCallback=U}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{Y.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(t,e){if(this.ensure(),S(t))return;P[e]=t;let n=Y.transformTemplate(t,e);t._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let e=0;e<t.length;e++){let n=t[e],r=this.customStyleInterface.getStyleForCustomStyle(n);r&&Y.transformCustomStyle(r)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,e){if(this.ensure(),e&&(0,B.wW)(t,e),t.shadowRoot){this.styleElement(t);let e=t.shadowRoot.children||t.shadowRoot.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}else{let e=t.children||t.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}}styleElement(t){this.ensure();let{is:e}=function(t){let e=t.localName,n="",r="";return e?e.indexOf("-")>-1?n=e:(r=e,n=t.getAttribute&&t.getAttribute("is")||""):(n=t.is,r=t.extends),{is:n,typeExtension:r}}(t),n=P[e];if((!n||!S(n))&&n&&!Z(n)){F(n)||(this.prepareTemplate(n,e),V(n));let r=t.shadowRoot;if(r){let t=r.querySelector("style");t&&(t.__cssRules=n._styleAst,t.textContent=w(n._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new W;let e=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,n,r){t.flushCustomStyles(),t.prepareTemplate(e,n)},prepareTemplateStyles(t,e,n){window.ShadyCSS.prepareTemplate(t,e,n)},prepareTemplateDom(t,e){},styleSubtree(e,n){t.flushCustomStyles(),t.styleSubtree(e,n)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(t,e)=>(0,B.B7)(t,e),flushCustomStyles(){t.flushCustomStyles()},nativeCss:r.rd,nativeShadow:r.WA,cssBuild:r.Cp,disableRuntime:r.jF},e&&(window.ShadyCSS.CustomStyleInterface=e)}window.ShadyCSS.ApplyShim=Y;var q=n(2414),X=n(98956),G=n(25608),K=n(28091);const J=/:host\(:dir\((ltr|rtl)\)\)/g,Q=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,tt=/:dir\((?:ltr|rtl)\)/,et=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),nt=[];let rt=null,it="";function ot(){it=document.documentElement.getAttribute("dir")}function st(t){if(!t.__autoDirOptOut){t.setAttribute("dir",it)}}function at(){ot(),it=document.documentElement.getAttribute("dir");for(let t=0;t<nt.length;t++)st(nt[t])}const lt=(0,K.o)((t=>{et||rt||(ot(),rt=new MutationObserver(at),rt.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const e=(0,G.Q)(t);class n extends e{static _processStyleText(t,n){return t=e._processStyleText.call(this,t,n),!et&&tt.test(t)&&(t=this._replaceDirInCssText(t),this.__activateDir=!0),t}static _replaceDirInCssText(t){let e=t;return e=e.replace(J,':host([dir="$1"])'),e=e.replace(Q,':host([dir="$2"]) $1'),e}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){e.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(rt&&rt.takeRecords().length&&at(),nt.push(this),st(this))}disconnectedCallback(){if(e.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const t=nt.indexOf(this);t>-1&&nt.splice(t,1)}}}return n.__activateDir=!1,n}));n(87893);function ct(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?ct():window.addEventListener("DOMContentLoaded",ct);var dt=n(3572),pt=n(98348),ht=n(90992),ut=n(64005),ft=n(30623),mt=n(46969);n(38371);const gt=window.ShadyDOM,bt=window.ShadyCSS;function yt(t,e){return(0,mt.r)(t).getRootNode()===e}var At=n(14326);const wt="disable-upgrade",vt=t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]};(0,K.o)((t=>{const e=(0,q.SH)(t);let n=vt(e);return class extends e{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return n.call(this).concat(wt)}_initializeProperties(){this.hasAttribute(wt)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,n,r){t==wt?this.__isUpgradeDisabled&&null==n&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,n,r)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));var xt=n(73058);const _t="disable-upgrade";let kt=window.ShadyCSS;const Ct=(0,K.o)((t=>{const e=(0,X._)((0,q.SH)(t)),n=q.PP?e:lt(e),r=vt(n),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class o extends n{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(t,e,n){(this.__dataAttributes&&this.__dataAttributes[t]||t===_t)&&this.attributeChangedCallback(t,e,n,null)}setAttribute(t,e){if(At.j8&&!this._legacyForceObservedAttributes){const n=this.getAttribute(t);super.setAttribute(t,e),this.__attributeReaction(t,n,String(e))}else super.setAttribute(t,e)}removeAttribute(t){if(At.j8&&!this._legacyForceObservedAttributes){const e=this.getAttribute(t);super.removeAttribute(t),this.__attributeReaction(t,e,null)}else super.removeAttribute(t)}static get observedAttributes(){return At.j8&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],(0,xt.z2)(this.prototype)),this.__observedAttributes):r.call(this).concat(_t)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(t,e,n,r){e!==n&&(t==_t?this.__isUpgradeDisabled&&null==n&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(t,e,n,r),this.attributeChanged(t,e,n)))}attributeChanged(t,e,n){}_initializeProperties(){if(At.nL&&this.hasAttribute(_t))this.__isUpgradeDisabled=!0;else{let t=Object.getPrototypeOf(this);t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))||(this._registered(),t.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),At.j8&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const t=this.attributes;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.__attributeReaction(n.name,null,n.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(t){return this._serializeValue(t)}deserialize(t,e){return this._deserializeValue(t,e)}reflectPropertyToAttribute(t,e,n){this._propertyToAttribute(t,e,n)}serializeValueToAttribute(t,e,n){this._valueToNodeAttribute(n||this,t,e)}extend(t,e){if(!t||!e)return t||e;let n=Object.getOwnPropertyNames(e);for(let r,i=0;i<n.length&&(r=n[i]);i++){let n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n)}return t}mixin(t,e){for(let n in e)t[n]=e[n];return t}chainObject(t,e){return t&&e&&t!==e&&(t.__proto__=e),t}instanceTemplate(t){let e=this.constructor._contentForTemplate(t);return document.importNode(e,!0)}fire(t,e,n){n=n||{},e=null==e?{}:e;let r=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});r.detail=e;let i=n.node||this;return(0,mt.r)(i).dispatchEvent(r),r}listen(t,e,n){t=t||this;let r=this.__boundListeners||(this.__boundListeners=new WeakMap),i=r.get(t);i||(i={},r.set(t,i));let o=e+n;i[o]||(i[o]=this._addMethodEventListenerToNode(t,e,n,this))}unlisten(t,e,n){t=t||this;let r=this.__boundListeners&&this.__boundListeners.get(t),i=e+n,o=r&&r[i];o&&(this._removeEventListenerFromNode(t,e,o),r[i]=null)}setScrollDirection(t,e){(0,pt.BP)(e||this,i[t]||"auto")}$$(t){return this.root.querySelector(t)}get domHost(){let t=(0,mt.r)(this).getRootNode();return t instanceof DocumentFragment?t.host:t}distributeContent(){const t=(0,dt.vz)(this);window.ShadyDOM&&t.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return(0,dt.vz)(this).getEffectiveChildNodes()}queryDistributedElements(t){return(0,dt.vz)(this).queryDistributedElements(t)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let t=this.getEffectiveChildNodes(),e=[];for(let n,r=0;n=t[r];r++)n.nodeType!==Node.COMMENT_NODE&&e.push(n.textContent);return e.join("")}queryEffectiveChildren(t){let e=this.queryDistributedElements(t);return e&&e[0]}queryAllEffectiveChildren(t){return this.queryDistributedElements(t)}getContentChildNodes(t){let e=this.root.querySelector(t||"slot");return e?(0,dt.vz)(e).getDistributedNodes():[]}getContentChildren(t){return this.getContentChildNodes(t).filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(t){const e=this;return e!==t&&(0,mt.r)(e).contains(t)&&(0,mt.r)(e).getRootNode()===(0,mt.r)(t).getRootNode()}isLocalDescendant(t){return this.root===(0,mt.r)(t).getRootNode()}scopeSubtree(t,e=!1){return function(t,e=!1){if(!gt||!bt)return null;if(!gt.handlesDynamicScoping)return null;const n=bt.ScopingShim;if(!n)return null;const r=n.scopeForNode(t),i=(0,mt.r)(t).getRootNode(),o=t=>{if(!yt(t,i))return;const e=Array.from(gt.nativeMethods.querySelectorAll.call(t,"*"));e.push(t);for(let t=0;t<e.length;t++){const o=e[t];if(!yt(o,i))continue;const s=n.currentScopeForNode(o);s!==r&&(""!==s&&n.unscopeNode(o,s),n.scopeNode(o,r))}};if(o(t),e){const e=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];for(let t=0;t<n.addedNodes.length;t++){const e=n.addedNodes[t];e.nodeType===Node.ELEMENT_NODE&&o(e)}}}));return e.observe(t,{childList:!0,subtree:!0}),e}return null}(t,e)}getComputedStyleValue(t){return kt.getComputedStyleValue(this,t)}debounce(t,e,n){return this._debouncers=this._debouncers||{},this._debouncers[t]=ht.dx.debounce(this._debouncers[t],n>0?ut.Wc.after(n):ut.YA,e.bind(this))}isDebouncerActive(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];return!(!e||!e.isActive())}flushDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.flush()}cancelDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.cancel()}async(t,e){return e>0?ut.Wc.run(t.bind(this),e):~ut.YA.run(t.bind(this))}cancelAsync(t){t<0?ut.YA.cancel(~t):ut.Wc.cancel(t)}create(t,e){let n=document.createElement(t);if(e)if(n.setProperties)n.setProperties(e);else for(let t in e)n[t]=e[t];return n}elementMatches(t,e){return(0,dt.Ku)(e||this,t)}toggleAttribute(t,e){let n=this;return 3===arguments.length&&(n=arguments[2]),1==arguments.length&&(e=!n.hasAttribute(t)),e?((0,mt.r)(n).setAttribute(t,""),!0):((0,mt.r)(n).removeAttribute(t),!1)}toggleClass(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?n.classList.add(t):n.classList.remove(t)}transform(t,e){(e=e||this).style.webkitTransform=t,e.style.transform=t}translate3d(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)}arrayDelete(t,e){let n;if(Array.isArray(t)){if(n=t.indexOf(e),n>=0)return t.splice(n,1)}else{if(n=(0,ft.U2)(this,t).indexOf(e),n>=0)return this.splice(t,n,1)}return null}_logger(t,e){switch(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":console[t](...e)}}_log(...t){this._logger("log",t)}_warn(...t){this._logger("warn",t)}_error(...t){this._logger("error",t)}_logf(t,...e){return["[%s::%s]",this.is,t,...e]}}return o.prototype.is="",o}))},50696:(t,e,n)=>{"use strict";n.d(e,{k:()=>u});var r=n(82523),i=n(14326);const o={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},s={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},a=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},s);function l(t,e,n,r){!function(t,e,n){const r=t._noAccessors,i=Object.getOwnPropertyNames(t);for(let o=0;o<i.length;o++){let s=i[o];if(!(s in n))if(r)e[s]=t[s];else{let n=Object.getOwnPropertyDescriptor(t,s);n&&(n.configurable=!0,Object.defineProperty(e,s,n))}}}(e,t,r);for(let t in o)e[t]&&(n[t]=n[t]||[],n[t].push(e[t]))}function c(t,e,n){e=e||[];for(let r=t.length-1;r>=0;r--){let i=t[r];i?Array.isArray(i)?c(i,e):e.indexOf(i)<0&&(!n||n.indexOf(i)<0)&&e.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return e}function d(t,e){for(const n in e){const r=t[n],i=e[n];t[n]=!("value"in i)&&r&&"value"in r?Object.assign({value:r.value},i):i}}const p=(0,r.x)(HTMLElement);function h(t,e,n){let r;const o={};class p extends e{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(r)for(let t,e=0;e<r.length;e++)t=r[e],t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties);t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties),this._prepareTemplate()}else e._finalizeClass.call(this)}static get properties(){const e={};if(r)for(let t=0;t<r.length;t++)d(e,r[t].properties);return d(e,t.properties),e}static get observers(){let e=[];if(r)for(let t,n=0;n<r.length;n++)t=r[n],t.observers&&(e=e.concat(t.observers));return t.observers&&(e=e.concat(t.observers)),e}created(){super.created();const t=o.created;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}_registered(){const t=p.prototype;if(!t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))){t.__hasRegisterFinished=!0,super._registered(),i.nL&&h(t);const e=Object.getPrototypeOf(this);let n=o.beforeRegister;if(n)for(let t=0;t<n.length;t++)n[t].call(e);if(n=o.registered,n)for(let t=0;t<n.length;t++)n[t].call(e)}}_applyListeners(){super._applyListeners();const t=o.listeners;if(t)for(let e=0;e<t.length;e++){const n=t[e];if(n)for(let t in n)this._addMethodEventListenerToNode(this,t,n[t])}}_ensureAttributes(){const t=o.hostAttributes;if(t)for(let e=t.length-1;e>=0;e--){const n=t[e];for(let t in n)this._ensureAttribute(t,n[t])}super._ensureAttributes()}ready(){super.ready();let t=o.ready;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attached(){super.attached();let t=o.attached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}detached(){super.detached();let t=o.detached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attributeChanged(t,e,n){super.attributeChanged();let r=o.attributeChanged;if(r)for(let i=0;i<r.length;i++)r[i].call(this,t,e,n)}}if(n){Array.isArray(n)||(n=[n]);let t=e.prototype.behaviors;r=c(n,null,t),p.prototype.behaviors=t?t.concat(n):r}const h=e=>{r&&function(t,e,n){for(let r=0;r<e.length;r++)l(t,e[r],n,a)}(e,r,o),l(e,t,o,s)};return i.nL||h(p.prototype),p.generatedFrom=t,p}n(38371);const u=function(t){let e;return e="function"==typeof t?t:u.Class(t),t._legacyForceObservedAttributes&&(e.prototype._legacyForceObservedAttributes=t._legacyForceObservedAttributes),customElements.define(e.is,e),e};u.Class=function(t,e){t||console.warn("Polymer.Class requires `info` argument");let n=e?e(p):p;return n=h(t,n,t.behaviors),n.is=n.prototype.is=t.is,n}},3572:(t,e,n)=>{"use strict";n.d(e,{vz:()=>m,Ku:()=>d});n(38371);var r=n(46969),i=(n(14326),n(64575)),o=n(64005);function s(t){return"slot"===t.localName}let a=class{static getFlattenedNodes(t){const e=(0,r.r)(t);return s(t)?e.assignedNodes({flatten:!0}):Array.from(e.childNodes).map((t=>s(t)?(0,r.r)(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){s(this._target)?this._listenSlots([this._target]):(0,r.r)(this._target).children&&(this._listenSlots((0,r.r)(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){s(this._target)?this._unlistenSlots([this._target]):(0,r.r)(this._target).children&&(this._unlistenSlots((0,r.r)(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,o.YA.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let n=t[e];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),n=(0,i.c)(e,this._effectiveNodes);for(let e,r=0;r<n.length&&(e=n[r]);r++)for(let n,r=0;r<e.removed.length&&(n=e.removed[r]);r++)t.removedNodes.push(n);for(let r,i=0;i<n.length&&(r=n[i]);i++)for(let n=r.index;n<r.index+r.addedCount;n++)t.addedNodes.push(e[n]);this._effectiveNodes=e;let r=!1;return(t.addedNodes.length||t.removedNodes.length)&&(r=!0,this.callback.call(this._target,t)),r}_listenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];s(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];s(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};n(91704),n(90992);const l=Element.prototype,c=l.matches||l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector,d=function(t,e){return c.call(t,e)};class p{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new a(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if((0,r.r)(this.node).contains(t))return!0;let e=t,n=t.ownerDocument;for(;e&&e!==n&&e!==this.node;)e=(0,r.r)(e).parentNode||(0,r.r)(e).host;return e===this.node}getOwnerRoot(){return(0,r.r)(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?(0,r.r)(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],e=(0,r.r)(this.node).assignedSlot;for(;e;)t.push(e),e=(0,r.r)(e).assignedSlot;return t}importNode(t,e){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return(0,r.r)(n).importNode(t,e)}getEffectiveChildNodes(){return a.getFlattenedNodes(this.node)}queryDistributedElements(t){let e=this.getEffectiveChildNodes(),n=[];for(let r,i=0,o=e.length;i<o&&(r=e[i]);i++)r.nodeType===Node.ELEMENT_NODE&&d(r,t)&&n.push(r);return n}get activeElement(){let t=this.node;return void 0!==t._activeElement?t._activeElement:t.activeElement}}function h(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},configurable:!0})}}class u{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}p.prototype.cloneNode,p.prototype.appendChild,p.prototype.insertBefore,p.prototype.removeChild,p.prototype.replaceChild,p.prototype.setAttribute,p.prototype.removeAttribute,p.prototype.querySelector,p.prototype.querySelectorAll,p.prototype.parentNode,p.prototype.firstChild,p.prototype.lastChild,p.prototype.nextSibling,p.prototype.previousSibling,p.prototype.firstElementChild,p.prototype.lastElementChild,p.prototype.nextElementSibling,p.prototype.previousElementSibling,p.prototype.childNodes,p.prototype.children,p.prototype.classList,p.prototype.textContent,p.prototype.innerHTML;let f=p;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class t extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(p.prototype).forEach((e=>{"activeElement"!=e&&(t.prototype[e]=p.prototype[e])})),h(t.prototype,["classList"]),f=t,Object.defineProperties(u.prototype,{localTarget:{get(){const t=this.event.currentTarget,e=t&&m(t).getOwnerRoot(),n=this.path;for(let t=0;t<n.length;t++){const r=n[t];if(m(r).getOwnerRoot()===e)return r}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(t,e){for(let n=0;n<e.length;n++){let r=e[n];t[r]=function(){return this.node[r].apply(this.node,arguments)}}}(p.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll","attachShadow"]),h(p.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList","shadowRoot"]),function(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},set:function(t){this.node[r]=t},configurable:!0})}}(p.prototype,["textContent","innerHTML","className"]);const m=function(t){if((t=t||document)instanceof f)return t;if(t instanceof u)return t;let e=t.__domApi;return e||(e=t instanceof Event?new u(t):new f(t),t.__domApi=e),e}},2414:(t,e,n)=>{"use strict";n.d(e,{SH:()=>f,PP:()=>u});n(38371);var r=n(14326),i=n(28091),o=n(74546),s=n(87812),a=n(13517),l=n(51349),c=n(73058),d=n(49922);const p=(0,i.o)((t=>{const e=(0,d.e)(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){(0,c.z2)(this.prototype);const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){(0,c.Gd)(),this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i}));var h=n(46969);const u=window.ShadyCSS&&window.ShadyCSS.cssBuild,f=(0,i.o)((t=>{const e=p((0,l.q)(t));return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((n=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",n))||(n.__ownObservers=n.hasOwnProperty(JSCompiler_renameProperty("observers",n))?n.observers:null),n.__ownObservers);var n;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):r.nL||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let o in t)e=this.prototype,n=o,r=t[o],i=t,r.computed&&(r.readOnly=!0),r.computed&&(e._hasReadOnlyEffect(n)?console.warn(`Cannot redefine computed property '${n}'.`):e._createComputedProperty(n,r.computed,i)),r.readOnly&&!e._hasReadOnlyEffect(n)?e._createReadOnlyProperty(n,!r.computed):!1===r.readOnly&&e._hasReadOnlyEffect(n)&&console.warn(`Cannot make readOnly property '${n}' non-readOnly.`),r.reflectToAttribute&&!e._hasReflectEffect(n)?e._createReflectedProperty(n):!1===r.reflectToAttribute&&e._hasReflectEffect(n)&&console.warn(`Cannot make reflected property '${n}' non-reflected.`),r.notify&&!e._hasNotifyEffect(n)?e._createNotifyingProperty(n):!1===r.notify&&e._hasNotifyEffect(n)&&console.warn(`Cannot make notify property '${n}' non-notify.`),r.observer&&e._createPropertyObserver(n,r.observer,i[r.observer]),e._addPropertyToAttributeMap(n);var e,n,r,i}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!r.XN||r.ZN)&&(e=a.t.import(t,"template"),r.XN&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=(0,s.iY)(t.url);else{const t=a.t.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=r.sM,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return(0,s.Rq)(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;!function(t,e,n,i){if(!u){const r=e.content.querySelectorAll("style"),s=(0,o.uT)(e),a=(0,o.lx)(n),l=e.content.firstElementChild;for(let n=0;n<a.length;n++){let r=a[n];r.textContent=t._processStyleText(r.textContent,i),e.content.insertBefore(r,l)}let c=0;for(let e=0;e<s.length;e++){let n=s[e],o=r[c];o!==n?(n=n.cloneNode(!0),o.parentNode.insertBefore(n,o)):c++,n.textContent=t._processStyleText(n.textContent,i)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,n),r.md&&u&&r.FV){const n=e.content.querySelectorAll("style");if(n){let e="";Array.from(n).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}(this,e,t,n?(0,s.Kk)(n):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=(0,h.r)(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),r.Hr&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=(0,s.Kk)(this.importPath)),(0,s.Kk)(t,e)}static _parseTemplateContent(t,n,r){return n.dynamicFns=n.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,n,r)}static _addTemplatePropertyEffect(t,n,i){return!r.a2||n in this._properties||i.info.part.signature&&i.info.part.signature.static||i.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,n,i)}}}))},98956:(t,e,n)=>{"use strict";n.d(e,{_:()=>o});n(38371);var r=n(28091),i=n(98348);const o=(0,r.o)((t=>class extends t{_addEventListenerToNode(t,e,n){(0,i.NH)(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){(0,i.ys)(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}))},49922:(t,e,n)=>{"use strict";n.d(e,{e:()=>a});n(38371);var r=n(28091),i=n(64005),o=n(46969);const s=i.YA,a=(0,r.o)((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],i=this._shouldPropertyChange(t,e,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),i}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,s.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[t]||t;this[i]=this._deserializeValue(e,n||this.constructor.typeForProperty(i))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=(0,o.r)(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}}))},25608:(t,e,n)=>{"use strict";n.d(e,{Q:()=>c});n(38371);var r=n(28091),i=n(23025),o=n(49922);const s={};let a=HTMLElement.prototype;for(;a;){let t=Object.getOwnPropertyNames(a);for(let e=0;e<t.length;e++)s[t[e]]=!0;a=Object.getPrototypeOf(a)}const l=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const c=(0,r.o)((t=>{const e=(0,o.e)(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor((0,i.z)(t[e]))}static attributeNameForProperty(t){return(0,i.n)(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(l(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!s[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}}))},51349:(t,e,n)=>{"use strict";n.d(e,{q:()=>et});n(38371);var r=n(46969),i=n(28091),o=n(30623),s=n(23025),a=n(25608);const l={"dom-if":!0,"dom-repeat":!0};let c=!1,d=!1;function p(t){(function(){if(!c){c=!0;const t=document.createElement("textarea");t.placeholder="a",d=t.placeholder===t.textContent}return d})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}const h=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,n,r)=>{const i=n.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(i,r)):e.setAttribute(r,i)}})();function u(t){let e=t.getAttribute("is");if(e&&l[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;){const{name:e}=n.attributes[0];h(t,n,e),n.removeAttribute(e)}}return t}function f(t,e){let n=e.parentInfo&&f(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function m(t,e,n,r){r.id&&(e[r.id]=n)}function g(t,e,n){if(n.events&&n.events.length)for(let r,i=0,o=n.events;i<o.length&&(r=o[i]);i++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function b(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const y=(0,i.o)((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,i=t;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,e,n)||r,p(i),i.firstChild&&this._parseTemplateChildNodes(i,e,n),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,i=t.firstChild,o=0;i;i=r){if("template"==i.localName&&(i=u(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)i.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!i.textContent.trim()){t.removeChild(i);continue}}let s={parentIndex:o,parentInfo:n};this._parseTemplateNode(i,e,s)&&(s.infoIndex=e.nodeInfoList.push(s)-1),i.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,i=this._parseTemplate(r,e);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=i,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,i=Array.from(t.attributes);for(let o,s=i.length-1;o=i[s];s--)r=this._parseTemplateNodeAttribute(t,e,n,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,i){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,i=document.importNode(r,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let o=i.nodeList=new Array(n.length);i.$={};for(let t,r=0,s=n.length;r<s&&(t=n[r]);r++){let n=o[r]=f(i,t);m(0,i.$,n,t),b(0,n,t,e),g(this,n,t)}return i}_addMethodEventListenerToNode(t,e,n,r){let i=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,i),i}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));var A=n(14326);let w=0;const v=[],x={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},_="__computeInfo",k=/[A-Z]/;function C(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function E(t,e,n,r,i,s){if(e){let a=!1;const l=w++;for(let c in n){let d=e[i?(0,o.Jz)(c):c];if(d)for(let e,o=0,p=d.length;o<p&&(e=d[o]);o++)e.info&&e.info.lastRun===l||i&&!B(c,e.trigger)||(e.info&&(e.info.lastRun=l),e.fn(t,c,n,r,e.info,i,s),a=!0)}return a}return!1}function S(t,e,n,r,i,s,a,l){let c=!1,d=e[a?(0,o.Jz)(r):r];if(d)for(let e,o=0,p=d.length;o<p&&(e=d[o]);o++)e.info&&e.info.lastRun===n||a&&!B(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,i,s,e.info,a,l),c=!0);return c}function B(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!(0,o.jg)(n,t))||!(!e.wildcard||!(0,o.SG)(n,t))}return!0}function O(t,e,n,r,i){let o="string"==typeof i.method?t[i.method]:i.method,s=i.property;o?o.call(t,t.__data[s],r[s]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function M(t,e,n){let r=(0,o.Jz)(e);if(r!==e){return I(t,(0,s.n)(r)+"-changed",n[e],e),!0}return!1}function I(t,e,n,i){let o={value:n,queueProperty:!0};i&&(o.path=i),(0,r.r)(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function $(t,e,n,r,i,s){let a=(s?(0,o.Jz)(e):e)!=e?e:null,l=a?(0,o.U2)(t,a):t.__data[e];a&&void 0===l&&(l=n[e]),I(t,i.eventName,l,a)}function T(t,e,n,r,i){let o=t.__data[e];A.v1&&(o=(0,A.v1)(o,i.attrName,"attribute",t)),t._propertyToAttribute(e,i.attrName,o)}function L(t,e,n,r){let i=t[x.COMPUTE];if(i)if(A.ls){w++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[x.COMPUTE];let r,{counts:i,ready:o,total:s}=function(t){const e=t[_],n={},r=t[x.COMPUTE],i=[];let o=0;for(let t in e){const r=e[t];o+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||i.push(t);return{counts:n,ready:i,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--s,0==--i[e]&&o.push(e)}))}if(0!==s){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),s=[];for(let t in e)R(t,i,s,o,r);let a;for(;a=s.shift();)P(t,"",e,n,a)&&R(a.methodInfo,i,s,o,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;E(t,i,o,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}const N=(t,e,n)=>{let r=0,i=e.length-1,o=-1;for(;r<=i;){const s=r+i>>1,a=n.get(e[s].methodInfo)-n.get(t.methodInfo);if(a<0)r=s+1;else{if(!(a>0)){o=s;break}i=s-1}}o<0&&(o=i+1),e.splice(o,0,t)},R=(t,e,n,r,i)=>{const s=e[i?(0,o.Jz)(t):t];if(s)for(let e=0;e<s.length;e++){const o=s[e];o.info.lastRun===w||i&&!B(t,o.trigger)||(o.info.lastRun=w,N(o.info,n,r))}};function P(t,e,n,r,i){let o=F(t,e,n,r,i);if(o===v)return!1;let s=i.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[s]?t._setPendingProperty(s,o,!0):(t[s]=o,!1)}function D(t,e,n,r,i,o,a){n.bindings=n.bindings||[];let l={kind:r,target:i,parts:o,literal:a,isCompound:1!==o.length};if(n.bindings.push(l),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(l)){let{event:t,negate:e}=l.parts[0];l.listenerEvent=t||(0,s.n)(i)+"-changed",l.listenerNegate=e}let c=e.nodeInfoList.length;for(let n=0;n<l.parts.length;n++){let r=l.parts[n];r.compoundIndex=n,z(t,e,l,r,c)}}function z(t,e,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,s={index:i,binding:n,part:r,evaluator:t};for(let n=0;n<o.length;n++){let r=o[n];"string"==typeof r&&(r=K(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:H,info:s,trigger:r})}}}function H(t,e,n,r,i,s,a){let l=a[i.index],c=i.binding,d=i.part;if(s&&d.source&&e.length>d.source.length&&"property"==c.kind&&!c.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[c.target]){let r=n[e];e=(0,o.Iu)(d.source,c.target,e),l._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(l)}else{let o=i.evaluator._evaluateBinding(t,d,e,n,r,s);o!==v&&function(t,e,n,r,i){i=function(t,e,n,r){if(n.isCompound){let i=t.__dataCompoundStorage[n.target];i[r.compoundIndex]=e,e=i.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,i,n,r),A.v1&&(i=(0,A.v1)(i,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,i,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[x.READ_ONLY]&&e[x.READ_ONLY][r]||e._setPendingProperty(r,i)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,i)}}(t,l,c,d,o)}}function j(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,o=new Array(i.length);for(let t=0;t<i.length;t++)o[t]=i[t].literal;let s=e.target;n[s]=o,e.literal&&"property"==e.kind&&("className"===s&&(t=(0,r.r)(t)),t[s]=e.literal)}}function U(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,i){let s,a=t.detail,l=a&&a.path;l?(r=(0,o.Iu)(n,r,l),s=a&&a.value):s=t.currentTarget[n],s=i?!s:s,e[x.READ_ONLY]&&e[x.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,s,!0,Boolean(l))||a&&a.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function Z(t,e,n,r,i,o){o=e.static||o&&("object"!=typeof o||o[e.methodName]);let s={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:o};for(let i,o=0;o<e.args.length&&(i=e.args[o]);o++)i.literal||t._addPropertyEffect(i.rootProperty,n,{fn:r,info:s,trigger:i});return o&&t._addPropertyEffect(e.methodName,n,{fn:r,info:s}),s}function F(t,e,n,r,i){let o=t._methodHost||t,s=o[i.methodName];if(s){let r=t._marshalArgs(i.args,e,n);return r===v?v:s.apply(o,r)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const V=[],Y="(?:[a-zA-Z_$][\\w.:$\\-*]*)",W="(?:("+Y+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",q=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?"+("("+Y+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+W+"(?:,\\s*"+W+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function X(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function G(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:V};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=K(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t)}return t}return null}function K(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=(0,o.Jz)(e),n.structured=(0,o.AZ)(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function J(t,e,n){let r=(0,o.U2)(t,n);return void 0===r&&(r=e[n]),r}function Q(t,e,n,r){const i={indexSplices:r};A.HY&&!t._overrideLegacyUndefined&&(e.splices=i),t.notifyPath(n+".splices",i),t.notifyPath(n+".length",e.length),A.HY&&!t._overrideLegacyUndefined&&(i.indexSplices=[])}function tt(t,e,n,r,i,o){Q(t,e,n,[{index:r,addedCount:i,removed:o,object:e,type:"splice"}])}const et=(0,i.o)((t=>{const e=y((0,a.Q)(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return x}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(nt.length){let t=nt[nt.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[x.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==x.READ_ONLY);let r=C(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=C(this,e,!0)[t],i=r.indexOf(n);i>=0&&r.splice(i,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,x.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,x.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,x.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,x.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||(0,o.Jz)(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=(0,o.U2)(this,t);if(!(t=(0,o.t8)(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let i;for(let s in r){let a=r[s];(0,o.SG)(s,e)?(i=(0,o.Iu)(s,a,e),t._setPendingPropertyOrPath(i,n,!0,!0)):(0,o.SG)(a,e)&&(i=(0,o.Iu)(a,s,e),t._setPendingPropertyOrPath(i,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=(0,r.r)(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&(0,o.AZ)(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[x.NOTIFY]&&this[x.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[x.READ_ONLY]&&this[x.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,i=this.__dataHasPaths;this.__dataHasPaths=!1,L(this,e,n,i),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,i),this._flushClients(),E(this,this[x.REFLECT],e,n,i),E(this,this[x.OBSERVE],e,n,i),r&&function(t,e,n,r,i){let o,s,a=t[x.NOTIFY],l=w++;for(let s in e)e[s]&&(a&&S(t,a,l,s,n,r,i)||i&&M(t,s,n))&&(o=!0);o&&(s=t.__dataHost)&&s._invalidateProperties&&s._invalidateProperties()}(this,r,e,n,i),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[x.PROPAGATE]&&E(this,this[x.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const i=(e,r)=>{E(this,t.propertyEffects,e,n,r,t.nodeList);for(let i=t.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,e,n,r)};t.runEffects?t.runEffects(i,e,r):i(e,r)}linkPaths(t,e){t=(0,o.Fv)(t),e=(0,o.Fv)(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=(0,o.Fv)(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};Q(this,(0,o.U2)(this,t,n),n.path,e)}get(t,e){return(0,o.U2)(e||this,t)}set(t,e,n){n?(0,o.t8)(n,t,e):this[x.READ_ONLY]&&this[x.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=(0,o.U2)(this,t,n),i=r.length,s=r.push(...e);return e.length&&tt(this,r,n.path,i,e.length,[]),s}pop(t){let e={path:""},n=(0,o.U2)(this,t,e),r=Boolean(n.length),i=n.pop();return r&&tt(this,n,e.path,n.length,0,[i]),i}splice(t,e,n,...r){let i,s={path:""},a=(0,o.U2)(this,t,s);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),i=2===arguments.length?a.splice(e):a.splice(e,n,...r),(r.length||i.length)&&tt(this,a,s.path,e,r.length,i),i}shift(t){let e={path:""},n=(0,o.U2)(this,t,e),r=Boolean(n.length),i=n.shift();return r&&tt(this,n,e.path,0,0,[i]),i}unshift(t,...e){let n={path:""},r=(0,o.U2)(this,t,n),i=r.unshift(...e);return e.length&&tt(this,r,n.path,0,e.length,[]),i}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=(0,o.U2)(this,t,r),n=r.path}else n=Array.isArray(t)?(0,o.Fv)(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,x.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,x.OBSERVE,{fn:O,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,x.OBSERVE,{fn:O,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=G(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");Z(this,n,x.OBSERVE,F,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,x.NOTIFY,{fn:$,info:{eventName:(0,s.n)(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,x.REFLECT,{fn:T,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=G(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const i=Z(this,r,x.COMPUTE,P,t,n);C(this,_)[t]=i}_marshalArgs(t,e,n){const r=this.__data,i=[];for(let s=0,a=t.length;s<a;s++){let{name:a,structured:l,wildcard:c,value:d,literal:p}=t[s];if(!p)if(c){const t=(0,o.SG)(a,e),i=J(r,n,t?e:a);d={path:t?e:a,value:i,base:t?(0,o.U2)(r,a):i}}else d=l?J(r,n,a):r[a];if(A.HY&&!this._overrideLegacyUndefined&&void 0===d&&t.length>1)return v;i[s]=d}return i}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),nt.push(this);let n=super._stampTemplate(t,e);if(nt.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let i=r[e],o=n[e],s=i.bindings;if(s)for(let e=0;e<s.length;e++){let n=s[e];j(o,n),U(o,t,n)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:i,parent:o}=e;n?n.nextSibling=i:o&&(o.firstChild=i),i?i.previousSibling=n:o&&(o.lastChild=n),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];(0,r.r)((0,r.r)(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let i=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=X(e)||" ",D(this,n,r,"text","textContent",e),i=!0)}return i}static _parseTemplateNodeAttribute(t,n,r,i,o){let a=this._parseBindings(o,n);if(a){let e=i,o="property";k.test(i)?o="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),o="attribute");let l=X(a);return l&&"attribute"==o&&("class"==i&&t.hasAttribute("class")&&(l+=" "+t.getAttribute(i)),t.setAttribute(i,l)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(i,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(i=(0,s.z)(i)),D(this,n,r,o,i,a,l),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,i,o)}static _parseTemplateNestedTemplate(t,n,r){let i=e._parseTemplateNestedTemplate.call(this,t,n,r);const o=t.parentNode,s=r.templateInfo,a="dom-if"===o.localName,l="dom-repeat"===o.localName;A.gx&&(a||l)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=s,r.noted=!0,i=!1);let c=s.hostProps;if(A.ew&&a)c&&(n.hostProps=Object.assign(n.hostProps||{},c),A.gx||(r.parentInfo.noted=!0));else{let t="{";for(let e in c){D(this,n,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return i}static _parseBindings(t,e){let n,r=[],i=0;for(;null!==(n=q.exec(t));){n.index>i&&r.push({literal:t.slice(i,n.index)});let o=n[1][0],s=Boolean(n[2]),a=n[3].trim(),l=!1,c="",d=-1;"{"==o&&(d=a.indexOf("::"))>0&&(c=a.substring(d+2),a=a.substring(0,d),l=!0);let p=G(a),h=[];if(p){let{args:t,methodName:n}=p;for(let e=0;e<t.length;e++){let n=t[e];n.literal||h.push(n)}let r=e.dynamicFns;(r&&r[n]||p.static)&&(h.push(n),p.dynamicFn=!0)}else h.push(a);r.push({source:a,mode:o,negate:s,customEvent:l,signature:p,dependencies:h,event:c}),i=q.lastIndex}if(i&&i<t.length){let e=t.substring(i);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,i,s){let a;return a=e.signature?F(t,n,r,0,e.signature):n!=e.source?(0,o.U2)(t,e.source):s&&(0,o.AZ)(n)?(0,o.U2)(t,n):t.__data[n],e.negate&&(a=!a),a}}})),nt=[]},64575:(t,e,n)=>{"use strict";n.d(e,{c:()=>c});n(38371);function r(t,e,n){return{index:t,removed:e,addedCount:n}}const i=0,o=1,s=2,a=3;function l(t,e,n,l,c,p){let h,u=0,f=0,m=Math.min(n-e,p-c);if(0==e&&0==c&&(u=function(t,e,n){for(let r=0;r<n;r++)if(!d(t[r],e[r]))return r;return n}(t,l,m)),n==t.length&&p==l.length&&(f=function(t,e,n){let r=t.length,i=e.length,o=0;for(;o<n&&d(t[--r],e[--i]);)o++;return o}(t,l,m-u)),c+=u,p-=f,(n-=f)-(e+=u)==0&&p-c==0)return[];if(e==n){for(h=r(e,[],0);c<p;)h.removed.push(l[c++]);return[h]}if(c==p)return[r(e,[],n-e)];let g=function(t){let e=t.length-1,n=t[0].length-1,r=t[e][n],l=[];for(;e>0||n>0;){if(0==e){l.push(s),n--;continue}if(0==n){l.push(a),e--;continue}let c,d=t[e-1][n-1],p=t[e-1][n],h=t[e][n-1];c=p<h?p<d?p:d:h<d?h:d,c==d?(d==r?l.push(i):(l.push(o),r=d),e--,n--):c==p?(l.push(a),e--,r=p):(l.push(s),n--,r=h)}return l.reverse(),l}(function(t,e,n,r,i,o){let s=o-i+1,a=n-e+1,l=new Array(s);for(let t=0;t<s;t++)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;t++)l[0][t]=t;for(let n=1;n<s;n++)for(let o=1;o<a;o++)if(d(t[e+o-1],r[i+n-1]))l[n][o]=l[n-1][o-1];else{let t=l[n-1][o]+1,e=l[n][o-1]+1;l[n][o]=t<e?t:e}return l}(t,e,n,l,c,p));h=void 0;let b=[],y=e,A=c;for(let t=0;t<g.length;t++)switch(g[t]){case i:h&&(b.push(h),h=void 0),y++,A++;break;case o:h||(h=r(y,[],0)),h.addedCount++,y++,h.removed.push(l[A]),A++;break;case s:h||(h=r(y,[],0)),h.addedCount++,y++;break;case a:h||(h=r(y,[],0)),h.removed.push(l[A]),A++}return h&&b.push(h),b}function c(t,e){return l(t,0,t.length,e,0,e.length)}function d(t,e){return t===e}},64005:(t,e,n)=>{"use strict";n.d(e,{Wc:()=>c,YA:()=>d});n(38371);let r=0,i=0,o=[],s=0,a=!1,l=document.createTextNode("");new window.MutationObserver((function(){a=!1;const t=o.length;for(let e=0;e<t;e++){let t=o[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}o.splice(0,t),i+=t})).observe(l,{characterData:!0});const c={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},d={run:t=>(a||(a=!0,l.textContent=s++),o.push(t),r++),cancel(t){const e=t-i;if(e>=0){if(!o[e])throw new Error("invalid async handle: "+t);o[e]=null}}}},38371:()=>{"use strict";window.JSCompiler_renameProperty=function(t,e){return t}},23025:(t,e,n)=>{"use strict";n.d(e,{n:()=>a,z:()=>s});n(38371);const r={},i=/-[a-z]/g,o=/([A-Z])/g;function s(t){return r[t]||(r[t]=t.indexOf("-")<0?t:t.replace(i,(t=>t[1].toUpperCase())))}function a(t){return r[t]||(r[t]=t.replace(o,"-$1").toLowerCase())}},90992:(t,e,n)=>{"use strict";n.d(e,{Ex:()=>o,Jk:()=>s,dx:()=>r});n(38371),n(28091),n(64005);class r{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,i.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),i.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,n){return t instanceof r?t._cancelAsync():t=new r,t.setConfig(e,n),t}}let i=new Set;const o=function(t){i.add(t)},s=function(){const t=Boolean(i.size);return i.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}},91704:(t,e,n)=>{"use strict";n.d(e,{E:()=>r.Ex,y:()=>i});n(38371);var r=n(90992);const i=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=(0,r.Jk)()}while(t||e)}},98348:(t,e,n)=>{"use strict";n.d(e,{BP:()=>z,NH:()=>R,nJ:()=>Y,ys:()=>P});n(38371);var r=n(64005),i=n(90992),o=n(14326),s=n(46969);let a="string"==typeof document.head.style.touchAction,l="__polymerGestures",c="__polymerGesturesHandled",d="__polymerGesturesTouchAction",p=25,h=5,u=2500,f=["mousedown","mousemove","mouseup","click"],m=[0,1,4,2],g=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function b(t){return f.indexOf(t)>-1}let y=!1;function A(t){if(!b(t)&&"touchend"!==t)return a&&y&&o.f6?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){y=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let w=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const v=[],x={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},_={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function k(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];try{let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = '${t.id}']`);for(let t=0;t<r.length;t++)e.push(r[t])}}catch(t){}}return e}let C=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[c]={skip:!0},"click"===t.type)){let e=!1,r=I(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)v.push(r[t]);else if(n=r[t],x[n.localName]){let n=k(r[t]);for(let t=0;t<n.length;t++)e=e||v.indexOf(n[t])>-1}if(r[t]===B.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function E(t){let e=w?["click"]:f;for(let n,r=0;r<e.length;r++)n=e[r],t?(v.length=0,document.addEventListener(n,C,!0)):document.removeEventListener(n,C,!0)}function S(t){let e=t.type;if(!b(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!g&&(e=m[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let B={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function O(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function M(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}o.z2&&document.addEventListener("touchend",(function(t){if(!o.z2)return;B.mouse.mouseIgnoreJob||E(!0),B.mouse.target=I(t)[0],B.mouse.mouseIgnoreJob=i.dx.debounce(B.mouse.mouseIgnoreJob,r.Wc.after(u),(function(){E(),B.mouse.target=null,B.mouse.mouseIgnoreJob=null}))}),!!y&&{passive:!0});const I=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],$={},T=[];function L(t){const e=I(t);return e.length>0?e[0]:t.target}function N(t){let e,n=t.type,r=t.currentTarget[l];if(!r)return;let i=r[n];if(i){if(!t[c]&&(t[c]={},"touch"===n.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(B.touch.id=e.identifier),B.touch.id!==e.identifier)return;a||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)B.touch.x=e.clientX,B.touch.y=e.clientY,B.touch.scrollDecided=!1;else if("touchmove"===n){if(B.touch.scrollDecided)return;B.touch.scrollDecided=!0;let n=function(t){let e="auto",n=I(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[d]){e=t[d];break}return e}(t),r=!1,i=Math.abs(B.touch.x-e.clientX),o=Math.abs(B.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=o>i:"pan-y"===n&&(r=i>o)),r?t.preventDefault():j("track")}}(t)}if(e=t[c],!e.skip){for(let n,r=0;r<T.length;r++)n=T[r],i[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,o=0;o<T.length;o++)r=T[o],i[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function R(t,e,n){return!!$[e]&&(function(t,e,n){let r=$[e],i=r.deps,o=r.name,s=t[l];s||(t[l]=s={});for(let e,n,r=0;r<i.length;r++)e=i[r],w&&b(e)&&"click"!==e||(n=s[e],n||(s[e]=n={_count:0}),0===n._count&&t.addEventListener(e,N,A(e)),n[o]=(n[o]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&&z(t,r.touchAction)}(t,e,n),!0)}function P(t,e,n){return!!$[e]&&(function(t,e,n){let r=$[e],i=r.deps,o=r.name,s=t[l];if(s)for(let e,n,r=0;r<i.length;r++)e=i[r],n=s[e],n&&n[o]&&(n[o]=(n[o]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,N,A(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function D(t){T.push(t);for(let e=0;e<t.emits.length;e++)$[t.emits[e]]=t}function z(t,e){a&&t instanceof HTMLElement&&r.YA.run((()=>{t.style.touchAction=e})),t[d]=e}function H(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,(0,s.r)(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function j(t){let e=function(t){for(let e,n=0;n<T.length;n++){e=T[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function U(t,e,n,r){e&&H(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return j(t)}})}function Z(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),i=Math.abs(t.y-n);return r>=h||i>=h}function F(t,e,n){if(!e)return;let r,i=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1],s=o.x-t.x,a=o.y-t.y,l=0;i&&(r=o.x-i.x,l=o.y-i.y),H(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:s,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return function(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(t,e),i===r)break;r&&(n=r)}return n}(n.clientX,n.clientY)}})}function V(t,e,n){let r=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),o=L(n||e);!o||_[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=p&&i<=p||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=L(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,i=t.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||H(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}D({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){M(this.info)},mousedown:function(t){if(!S(t))return;let e=L(t),n=this;O(this.info,(function(t){S(t)||(U("up",e,t),M(n.info))}),(function(t){S(t)&&U("up",e,t),M(n.info)})),U("down",e,t)},touchstart:function(t){U("down",L(t),t.changedTouches[0],t)},touchend:function(t){U("up",L(t),t.changedTouches[0],t)}}),D({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,M(this.info)},mousedown:function(t){if(!S(t))return;let e=L(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;Z(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&j("tap"),n.info.addMove({x:r,y:i}),S(t)||(n.info.state="end",M(n.info)),e&&F(n.info,e,t),n.info.started=!0)};O(this.info,r,(function(t){n.info.started&&r(t),M(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=L(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;Z(this.info,r,i)&&("start"===this.info.state&&j("tap"),this.info.addMove({x:r,y:i}),F(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=L(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),F(this.info,e,n))}}),D({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){S(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){S(t)&&V(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){V(this.info,t.changedTouches[0],t)}});const Y=L},24931:(t,e,n)=>{"use strict";n.d(e,{d:()=>s});n(38371);const r=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class i{constructor(t,e){a(t,e);const n=e.reduce(((e,n,r)=>e+o(n)+t[r+1]),t[0]);this.value=n.toString()}toString(){return this.value}}function o(t){if(t instanceof i)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const s=function(t,...e){a(t,e);const n=document.createElement("template");let s=e.reduce(((e,n,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof i)return o(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(n)+t[r+1]),t[0]);return r&&(s=r.createHTML(s)),n.innerHTML=s,n},a=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")}},28091:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});n(38371);let r=0;function i(){}i.prototype.__mixinApplications,i.prototype.__mixinSet;const o=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=r++;return function(r){let i=r.__mixinSet;if(i&&i[n])return r;let o=e,s=o.get(r);if(!s){s=t(r),o.set(r,s);let e=Object.create(s.__mixinSet||i||null);e[n]=!0,s.__mixinSet=e}return s}}},30623:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>r,Fv:()=>c,Iu:()=>a,Jz:()=>i,SG:()=>s,U2:()=>p,jg:()=>o,t8:()=>h,wB:()=>l});n(38371);function r(t){return t.indexOf(".")>=0}function i(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function o(t,e){return 0===t.indexOf(e+".")}function s(t,e){return 0===e.indexOf(t+".")}function a(t,e,n){return e+n.slice(t.length)}function l(t,e){return t===e||o(t,e)||s(t,e)}function c(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function d(t){return Array.isArray(t)?c(t).split("."):t.toString().split(".")}function p(t,e,n){let r=t,i=d(e);for(let t=0;t<i.length;t++){if(!r)return;r=r[i[t]]}return n&&(n.path=i.join(".")),r}function h(t,e,n){let r=t,i=d(e),o=i[i.length-1];if(i.length>1){for(let t=0;t<i.length-1;t++){if(r=r[i[t]],!r)return}r[o]=n}else r[e]=n;return i.join(".")}},87893:(t,e,n)=>{"use strict";n.d(e,{T8:()=>c});n(38371);let r=!1,i=[],o=[];function s(){r=!0,requestAnimationFrame((function(){r=!1,a(i),setTimeout((function(){!function(t){for(let e=0,n=t.length;e<n;e++)l(t.shift())}(o)}))}))}function a(t){for(;t.length;)l(t.shift())}function l(t){const e=t[0],n=t[1],r=t[2];try{n.apply(e,r)}catch(t){setTimeout((()=>{throw t}))}}function c(t,e,n){r||s(),o.push([t,e,n])}},87812:(t,e,n)=>{"use strict";n.d(e,{Kk:()=>a,Rq:()=>l,iY:()=>c});n(38371);let r,i,o=/(url\()([^)]*)(\))/g,s=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function a(t,e){if(t&&s.test(t))return t;if("//"===t)return t;if(void 0===r){r=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",r="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),r)try{return new URL(t,e).href}catch(e){return t}return i||(i=document.implementation.createHTMLDocument("temp"),i.base=i.createElement("base"),i.head.appendChild(i.base),i.anchor=i.createElement("a"),i.body.appendChild(i.anchor)),i.base.href=e,i.anchor.href=t,i.anchor.href||t}function l(t,e){return t.replace(o,(function(t,n,r,i){return n+"'"+a(r.replace(/["']/g,""),e)+"'"+i}))}function c(t){return t.substring(0,t.lastIndexOf("/")+1)}},14326:(t,e,n)=>{"use strict";n.d(e,{FV:()=>o,HY:()=>f,Hr:()=>u,XN:()=>c,ZN:()=>d,a2:()=>h,dJ:()=>A,ew:()=>y,f6:()=>l,gx:()=>b,j8:()=>w,ls:()=>m,md:()=>v,my:()=>i,nL:()=>p,sM:()=>s,v1:()=>a,z2:()=>g});n(38371);var r=n(87812);const i=!window.ShadyDOM||!window.ShadyDOM.inUse,o=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),window.customElements.polyfillWrapFlushCallback,i&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})());let s=window.Polymer&&window.Polymer.rootPath||(0,r.iY)(document.baseURI||window.location.href);let a=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let l=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;let c=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;let d=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;let p=window.Polymer&&window.Polymer.legacyOptimizations||!1;let h=window.Polymer&&window.Polymer.legacyWarnings||!1;let u=window.Polymer&&window.Polymer.syncInitialRender||!1;let f=window.Polymer&&window.Polymer.legacyUndefined||!1;let m=window.Polymer&&window.Polymer.orderedComputed||!1;let g=!0;let b=window.Polymer&&window.Polymer.removeNestedTemplates||!1;let y=window.Polymer&&window.Polymer.fastDomIf||!1;let A=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let w=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;let v=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1},74546:(t,e,n)=>{"use strict";n.d(e,{jv:()=>m,lx:()=>u,uT:()=>h});var r=n(13517),i=n(87812);const o="link[rel=import][type~=css]",s="include",a="shady-unscoped";function l(t){return r.t.import(t)}function c(t){let e=t.body?t.body:t;const n=(0,i.Rq)(e.textContent,t.baseURI),r=document.createElement("style");return r.textContent=n,r}function d(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...p(e[t]));return n}function p(t){const e=l(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...f(e));const n=e.querySelector("template");n&&t.push(...h(n,e.assetpath)),e._styles=t}return e._styles}function h(t,e){if(!t._styles){const n=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let o=r[t],a=o.getAttribute(s);a&&n.push(...d(a).filter((function(t,e,n){return n.indexOf(t)===e}))),e&&(o.textContent=(0,i.Rq)(o.textContent,e)),n.push(o)}t._styles=n}return t._styles}function u(t){let e=l(t);return e?f(e):[]}function f(t){const e=[],n=t.querySelectorAll(o);for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute(a);if(n&&!t._unscopedStyle){const e=c(t);e.setAttribute(a,""),t._unscopedStyle=e}else t._style||(t._style=c(t));e.push(n?t._unscopedStyle:t._style)}}return e}function m(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=g(e[t]);return n}function g(t){let e=l(t);if(e&&void 0===e._cssText){let t=b(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=h(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}function b(t){let e="",n=f(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}},73058:(t,e,n)=>{"use strict";n.d(e,{Gd:()=>r,z2:()=>o});function r(){0}const i=[];function o(t){i.push(t)}},46969:(t,e,n)=>{"use strict";n.d(e,{r:()=>r});const r=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t},51014:(t,e,n)=>{"use strict";n.d(e,{H3:()=>i});var r=n(2414);n(24931);const i=(0,r.SH)(HTMLElement)},94002:(t,e,n)=>{"use strict";n.d(e,{XY:()=>Q,dy:()=>J.d});var r=n(82523),i=(n(50696),n(38371),n(51349)),o=n(28091);function s(t,e,n,r,i){let o;i&&(o="object"==typeof n&&null!==n,o&&(r=t.__dataTemp[e]));let s=r!==n&&(r==r||n==n);return o&&s&&(t.__dataTemp[e]=n),s}const a=(0,o.o)((t=>class extends t{_shouldPropertyChange(t,e,n){return s(this,t,e,n,!0)}})),l=(0,o.o)((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,n){return s(this,t,e,n,this.mutableData)}}));a._mutablePropertyChange=s;var c=n(14326),d=n(46969);let p=null;function h(){return p}h.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:h,writable:!0}});const u=(0,i.q)(h),f=a(u);const m=(0,i.q)(class{});function g(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(Boolean(t)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(t)r.__polymerReplaced__=document.createComment("hidden-slot"),(0,d.r)((0,d.r)(r).parentNode).replaceChild(r.__polymerReplaced__,r);else{const t=r.__polymerReplaced__;t&&(0,d.r)((0,d.r)(t).parentNode).replaceChild(r,t)}else r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=t,r._showHideChildren&&r._showHideChildren(t)}}class b extends m{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let n=this.__templatizeOptions;(t&&n.instanceProps||!n.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,n){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,n(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,n)}}_showHideChildren(t){g(t,this.children)}_setUnmanagedPropertyToNode(t,e,n){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=n:super._setUnmanagedPropertyToNode(t,e,n)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}b.prototype.__dataHost,b.prototype.__templatizeOptions,b.prototype._methodHost,b.prototype.__templatizeOwner,b.prototype.__hostProps;const y=a(b);function A(t){let e=t.__dataHost;return e&&e._methodHost||e}function w(t,e,n){let r=n.mutableData?y:b;k.mixin&&(r=k.mixin(r));let i=class extends r{};return i.prototype.__templatizeOptions=n,i.prototype._bindTemplate(t),function(t,e,n,r){let i=n.hostProps||{};for(let e in r.instanceProps){delete i[e];let n=r.notifyInstanceProp;n&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:_(e,n)})}if(r.forwardHostProp&&e.__dataHost)for(let e in i)n.hasHostProps||(n.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,n){t.__dataHost._setPendingPropertyOrPath("_host_"+e,n[e],!0,!0)}})}(i,t,e,n),i}function v(t,e,n,r){let i=n.forwardHostProp;if(i&&e.hasHostProps){const a="template"==t.localName;let l=e.templatizeTemplateClass;if(!l){if(a){let t=n.mutableData?f:u;class r extends t{}l=e.templatizeTemplateClass=r}else{const n=t.constructor;class r extends n{}l=e.templatizeTemplateClass=r}let o=e.hostProps;for(let t in o)l.prototype._addPropertyEffect("_host_"+t,l.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:x(t,i)}),l.prototype._createNotifyingProperty("_host_"+t);c.a2&&r&&function(t,e,n){const r=n.constructor._properties,{propertyEffects:i}=t,{instanceProps:o}=e;for(let t in i)if(!(r[t]||o&&o[t])){const e=i[t];for(let n=0;n<e.length;n++){const{part:r}=e[n].info;if(!r.signature||!r.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,n,r)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),a)s=l,p=o=t,Object.setPrototypeOf(o,s.prototype),new s,p=null,t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,l.prototype);const n=e.hostProps;for(let e in n)if(e="_host_"+e,e in t){const n=t[e];delete t[e],t.__data[e]=n}}}var o,s}function x(t,e){return function(t,n,r){e.call(t.__templatizeOwner,n.substring("_host_".length),r[n])}}function _(t,e){return function(t,n,r){e.call(t.__templatizeOwner,t,n,r[n])}}function k(t,e,n){if(c.XN&&!A(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(n=n||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:b)._parseTemplate(t),i=r.templatizeInstanceClass;i||(i=w(t,r,n),r.templatizeInstanceClass=i);const o=A(t);v(t,r,n,o);let s=class extends i{};return s.prototype._methodHost=o,s.prototype.__dataHost=t,s.prototype.__templatizeOwner=e,s.prototype.__hostProps=r.hostProps,s}function C(t,e){let n;for(;e;)if(n=e.__dataHost?e:e.__templatizeInstance){if(n.__dataHost==t)return n;e=n.__dataHost}else e=(0,d.r)(e).parentNode;return null}var E=n(98956);let S=!1;function B(){if(c.nL&&!c.my){if(!S){S=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}const O=(0,E._)(l((0,i.q)(HTMLElement)));customElements.define("dom-bind",class extends O{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),c.XN)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,e,n,r){this.mutableData=!0}connectedCallback(){B()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){(0,d.r)((0,d.r)(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let e=new MutationObserver((()=>{if(t=this.querySelector("template"),!t)throw new Error("dom-bind requires a <template> child");e.disconnect(),this.render()}));return void e.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let t=this.root.firstChild;t;t=t.nextSibling)this.__children[this.__children.length]=t;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});var M=n(51014),I=n(90992),$=n(91704),T=n(30623),L=n(64005);const N=l(M.H3);class R extends N{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!c.dJ,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),B()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=(0,d.r)((0,d.r)(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let n={};n[this.as]=!0,n[this.indexAs]=!0,n[this.itemsIndexAs]=!0,this.__ctor=k(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:n,forwardHostProp:function(t,e){let n=this.__instances;for(let r,i=0;i<n.length&&(r=n[i]);i++)r.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,n){if((0,T.wB)(this.as,e)){let r=t[this.itemsIndexAs];e==this.as&&(this.items[r]=n);let i=(0,T.Iu)(this.as,`${JSCompiler_renameProperty("items",this)}.${r}`,e);this.notifyPath(i,n)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,n=this.__getMethodHost();return function(){return n[e].apply(n,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let n=0;n<e.length;n++)0===t.indexOf(e[n])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=I.dx.debounce(this.__renderDebouncer,e>0?L.Wc.after(e):L.YA,t.bind(this)),(0,$.E)(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),(0,$.y)()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),n=this.__calculateLimit(e.length);this.__updateInstances(t,n,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),c.dJ&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=n;return this.__filterFn&&(e=e.filter(((e,n,r)=>this.__filterFn(t[e],n,r)))),this.__sortFn&&e.sort(((e,n)=>this.__sortFn(t[e],t[n]))),e}__calculateLimit(t){let e=t;const n=this.__instances.length;if(this.initialCount){let r;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),r=Math.max(e-n,0),this.__chunkCount=r||1):(r=Math.min(Math.max(t-n,0),this.__chunkCount),e=Math.min(n+r,t)),this.__shouldMeasureChunk=r===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,n){const r=this.__itemsIdxToInstIdx={};let i;for(i=0;i<e;i++){let e=this.__instances[i],o=n[i],s=t[o];r[o]=i,e?(e._setPendingProperty(this.as,s),e._setPendingProperty(this.indexAs,i),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(s,i,o)}for(let t=this.__instances.length-1;t>=i;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const n=(0,d.r)(e.root);for(let t=0;t<e.children.length;t++){let r=e.children[t];n.appendChild(r)}return e}__attachInstance(t,e){let n=this.__instances[t];e.insertBefore(n.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,n){let r={};return r[this.as]=t,r[this.indexAs]=e,r[this.itemsIndexAs]=n,new this.__ctor(r)}__insertInstance(t,e,n){const r=this.__stampInstance(t,e,n);let i=this.__instances[e+1],o=i?i.children[0]:this;return(0,d.r)((0,d.r)(this).parentNode).insertBefore(r.root,o),this.__instances[e]=r,r}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let n=t.slice(6),r=n.indexOf("."),i=r<0?n:n.substring(0,r);if(i==parseInt(i,10)){let t=r<0?"":n.substring(r+1);this.__handleObservedPaths(t);let o=this.__itemsIdxToInstIdx[i],s=this.__instances[o];if(s){let n=this.as+(t?"."+t:"");s._setPendingPropertyOrPath(n,e,!1,!0),s._flushProperties()}return!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return C(this.template,t)}}customElements.define(R.is,R);class P extends M.H3{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=I.dx.debounce(this.__renderDebouncer,L.YA,(()=>this.__render())),(0,$.E)(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const t=(0,d.r)(this).parentNode;t&&(t.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||(0,d.r)(t).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),B()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const t=this;let e=t._templateInfo?t:(0,d.r)(t).querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!(0,d.r)(this).querySelector("template"))throw new Error("dom-if requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}this.__template=e}return!0}__ensureInstance(){let t=(0,d.r)(this).parentNode;if(this.__hasInstance()){let e=this.__getInstanceNodes();if(e&&e.length){if((0,d.r)(this).previousSibling!==e[e.length-1])for(let n,r=0;r<e.length&&(n=e[r]);r++)(0,d.r)(t).insertBefore(n,this)}}else{if(!t)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){(0,$.y)()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),c.dJ&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}}const D=c.ew?class extends P{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(t){const e=this.__dataHost||this;if(c.XN&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const n=e._bindTemplate(this.__template,!0);n.runEffects=(t,e,n)=>{let r=this.__syncInfo;if(this.if)r&&(this.__syncInfo=null,this._showHideChildren(),e=Object.assign(r.changedProps,e)),t(e,n);else if(this.__instance)if(r||(r=this.__syncInfo={runEffects:t,changedProps:{}}),n)for(const t in e){const e=(0,T.Jz)(t);r.changedProps[e]=this.__dataHost[e]}else Object.assign(r.changedProps,e)},this.__instance=e._stampTemplate(this.__template,n),(0,d.r)(t).insertBefore(this.__instance,this)}__syncHostProperties(){const t=this.__syncInfo;t&&(this.__syncInfo=null,t.runEffects(t.changedProps,!1))}__teardownInstance(){const t=this.__dataHost||this;this.__instance&&(t._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,g(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}}:class extends P{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=k(this.__template,this,{mutableData:!0,forwardHostProp:function(t,e){this.__instance&&(this.if?this.__instance.forwardHostProp(t,e):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[(0,T.Jz)(t)]=!0))}})),this.__instance=new this.__ctor,(0,d.r)(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let e=(0,d.r)(t[0]).parentNode;if(e){e=(0,d.r)(e);for(let n,r=0;r<t.length&&(n=t[r]);r++)e.removeChild(n)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let e in t)this.__instance._setPendingProperty(e,this.__dataHost[e]);this.__instance._flushProperties()}}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}};customElements.define(D.is,D);var z=n(64575),H=n(2414);let j=(0,o.o)((t=>{let e=(0,H.SH)(t);return class extends e{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(t,e){let n=e.path;if(n==JSCompiler_renameProperty("items",this)){let n=e.base||[],r=this.__lastItems;if(t!==this.__lastMulti&&this.clearSelection(),r){let t=(0,z.c)(n,r);this.__applySplices(t)}this.__lastItems=n,this.__lastMulti=t}else if(e.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(e.value.indexSplices);else{let t=n.slice(`${JSCompiler_renameProperty("items",this)}.`.length),e=parseInt(t,10);t.indexOf(".")<0&&t==e&&this.__deselectChangedIdx(e)}}__applySplices(t){let e=this.__selectedMap;for(let n=0;n<t.length;n++){let r=t[n];e.forEach(((t,n)=>{t<r.index||(t>=r.index+r.removed.length?e.set(n,t+r.addedCount-r.removed.length):e.set(n,-1))}));for(let t=0;t<r.addedCount;t++){let n=r.index+t;e.has(this.items[n])&&e.set(this.items[n],n)}}this.__updateLinks();let n=0;e.forEach(((t,r)=>{t<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null,e.delete(r)):n++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let t=0;this.__selectedMap.forEach((e=>{e>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${e}`,`${JSCompiler_renameProperty("selected",this)}.${t++}`)}))}else this.__selectedMap.forEach((t=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${t}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${t}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(t){return this.__selectedMap.has(t)}isIndexSelected(t){return this.isSelected(this.items[t])}__deselectChangedIdx(t){let e=this.__selectedIndexForItemIndex(t);if(e>=0){let t=0;this.__selectedMap.forEach(((n,r)=>{e==t++&&this.deselect(r)}))}}__selectedIndexForItemIndex(t){let e=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${t}`];if(e)return parseInt(e.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(t){let e=this.__selectedMap.get(t);if(e>=0){let n;this.__selectedMap.delete(t),this.multi&&(n=this.__selectedIndexForItemIndex(e)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null}}deselectIndex(t){this.deselect(this.items[t])}select(t){this.selectIndex(this.items.indexOf(t))}selectIndex(t){let e=this.items[t];this.isSelected(e)?this.toggle&&this.deselectIndex(t):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(e,t),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),e):this.selected=this.selectedItem=e)}}}))(M.H3);class U extends j{static get is(){return"array-selector"}static get template(){return null}}customElements.define(U.is,U);var Z=n(22859),F=n(95),V=n(85794);const Y=new Z.ZP;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,n){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,n){},styleSubtree(t,e){Y.processStyles(),(0,F.wW)(t,e)},styleElement(t){Y.processStyles()},styleDocument(t){Y.processStyles(),(0,F.wW)(document.body,t)},getComputedStyleValue:(t,e)=>(0,F.B7)(t,e),flushCustomStyles(){},nativeCss:V.rd,nativeShadow:V.WA,cssBuild:V.Cp,disableRuntime:V.jF}),window.ShadyCSS.CustomStyleInterface=Y;var W=n(74546);const q="include",X=window.ShadyCSS.CustomStyleInterface;class G extends HTMLElement{constructor(){super(),this._style=null,X.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(q);return e&&(t.removeAttribute(q),t.textContent=(0,W.jv)(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}let K;window.customElements.define("custom-style",G),K=a._mutablePropertyChange;Boolean;var J=n(24931);const Q=(0,r.x)(HTMLElement).prototype},62398:(t,e,n)=>{"use strict";n.d(e,{$T:()=>i,CN:()=>r,mA:()=>o});const r=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,i=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,o=/@media\s(.*)/},95:(t,e,n)=>{"use strict";n.d(e,{B7:()=>o,OH:()=>s,wW:()=>i});var r=n(62398);function i(t,e){for(let n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function o(t,e){const n=window.getComputedStyle(t).getPropertyValue(e);return n?n.trim():""}function s(t){const e=r.$T.test(t)||r.CN.test(t);return r.$T.lastIndex=0,r.CN.lastIndex=0,e}},22859:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>p});let r,i=null,o=window.HTMLImports&&window.HTMLImports.whenReady||null;function s(t){requestAnimationFrame((function(){o?o(t):(i||(i=new Promise((t=>{r=t})),"complete"===document.readyState?r():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&r()}))),i.then((function(){t&&t()})))}))}const a="__seenByShadyCSS",l="__shadyCSSCachedStyle";let c=null,d=null;class p{constructor(){this.customStyles=[],this.enqueued=!1,s((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&d&&(this.enqueued=!0,s(d))}addCustomStyle(t){t[a]||(t[a]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[l])return t[l];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const n=t[e];if(n[l])continue;const r=this.getStyleForCustomStyle(n);if(r){const t=r.__appliedElement||r;c&&c(t),n[l]=t}}return t}}p.prototype.addCustomStyle=p.prototype.addCustomStyle,p.prototype.getStyleForCustomStyle=p.prototype.getStyleForCustomStyle,p.prototype.processStyles=p.prototype.processStyles,Object.defineProperties(p.prototype,{transformCallback:{get:()=>c,set(t){c=t}},validateCallback:{get:()=>d,set(t){let e=!1;d||(e=!0),d=t,e&&this.enqueueDocumentValidation()}}})},85794:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>o,WA:()=>r,jF:()=>a,rd:()=>l});const r=!(window.ShadyDOM&&window.ShadyDOM.inUse);let i,o;function s(t){i=(!t||!t.shimcssproperties)&&(r||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(o=window.ShadyCSS.cssBuild);const a=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?i=window.ShadyCSS.nativeCss:window.ShadyCSS?(s(window.ShadyCSS),window.ShadyCSS=void 0):s(window.WebComponents&&window.WebComponents.flags);const l=i},44139:(t,e,n)=>{"use strict";var r=n(62680)("ArrayBuffer.prototype.byteLength",!0),i=n(72226);t.exports=function(t){return i(t)?r?r(t):t.byteLength:NaN}},76828:(t,e,n)=>{"use strict";function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}n.d(e,{W7:()=>l,ZP:()=>r,_j:()=>a}),window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1;let i=r()?"http://localhost:3000":"https://api.creaditor.ai",o=r()?"ws://127.0.0.1:9999":"wss://gateway.creaditor.ai";const s=i+"/static/scripts",a={history:"history",fonts:"fonts",site:"sites",components:"components",skeletons:"skeletons",colors:"colors",generateCode:"sites/generateCode",log:"logs",openAi:"gpt"},l={endPoint:i,ws_url:o,render_url:r()?"http://localhost:3003/r/":"https://render.creaditor.ai/r/",agent_url:r()?"http://localhost:8000/api/v1/":"https://agent.creaditor.ai/api/v1/",static_path:s,api_url:i+"/v1/",domain:i,access_db:"access_v1"}},35210:(t,e,n)=>{"use strict";n.d(e,{R:()=>i});const r=n(80184);function i(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;const i=r(e).getLuminance(),o=function(t,e){const n=r(e),i=r(t),o=n.getLuminance(),s=i.getLuminance();return(Math.max(o,s)+.05)/(Math.min(o,s)+.05)}(t,e);return o<n?i>.5?"#000000":"#FFFFFF":t}},40949:(t,e,n)=>{"use strict";function r(t){const e=document.createDocumentFragment();return t.forEach((function t(n){if(n instanceof HTMLElement||n instanceof SVGElement||n instanceof Comment||n instanceof DocumentFragment)e.appendChild(n);else if("string"==typeof n||"number"==typeof n){const t=document.createTextNode(n);e.appendChild(t)}else n instanceof Array&&n.forEach(t)})),e}n.d(e,{Z:()=>c});var i=n(80287);class o extends HTMLElement{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),t&&(this.props=t||{})}connectedCallback(){if(!this.isConnected)return null;const{props:t}=this;t.children instanceof HTMLElement&&this.appendChild(t.children),"string"==typeof t.children&&(this.innerHTML=t.children),"function"==typeof t.children&&this.appendChild(t.children()),"function"==typeof t.onUpdate&&t.onUpdate(this),"function"!=typeof t.onMount||this.isLoaded||(this.isLoaded=!0,t.onMount(this))}disconnectedCallback(){const{props:t}=this;"function"==typeof t.onUnMount&&t.onUnMount(this)}}customElements.get("hook-jsxelement")||customElements.define("hook-jsxelement",o);const s=o,a=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];function l(t,e,n){const o=function(t){const e=new RegExp(`^${t}$`,"i");return["path","svg","use","g"].some((t=>e.test(t)))}(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t),l=r(n);return o.appendChild(l),o._data={},Object.keys(e||{}).forEach((t=>{if("style"===t)"object"==typeof e[t]?o.style=(0,i.H)(e[t]):"string"==typeof e[t]&&o.setAttribute(t,e[t]);else if("ref"===t){if("object"==typeof e[t]&&(null===e[t].element&&(e[t].element=o),"function"==typeof e[t].onCreate&&e[t].onCreate(o),"function"==typeof e[t].onMount&&!a.find((t=>t===o.tagName.toLowerCase())))){const n=new s({onUnMount:n=>{"function"==typeof e[t].onUnMount&&e[t].onUnMount(o)},onMount:n=>{"function"!=typeof e[t].onUnMount&&n.remove(),e[t].onMount(o)}});o.appendChild(n)}}else if(e[t]&&"className"===t)o.setAttribute("class",e[t]),delete e[t];else if("htmlFor"===t)o.setAttribute("for",e[t]);else if("xlinkHref"===t)o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e[t]);else if(function(t){if(new RegExp("^on").test(t)){let e=t.replace("on","");return/[A-Z]/.test(e)}}(t)){const n=t.replace(/^on/,"").toLowerCase();"function"!=typeof e[t]||o[t.toLowerCase()]||o.addEventListener(n,e[t])}else if("dangerouslySetInnerHTML"===t&&"object"==typeof e[t]){if("string"==typeof e[t].__html)o.innerHTML=e[t].__html;else if("object"==typeof e[t].__html){const n=document.createElement("div");n.appendChild(e[t].__html),Array.from(n.childNodes).forEach((t=>{const e=t.cloneNode(!0);o.appendChild(e)}))}}else"object"==typeof e[t]&&-1!==window.location.href.indexOf("debug=1")&&-1!==window.location.href.indexOf("localhost")&&(o._data[t]=e[t]);"string"!=typeof e[t]&&"boolean"!=typeof e[t]&&"number"!=typeof e[t]||"children"===t||o.setAttribute(t,e[t])})),o}const c=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return"function"==typeof t?function(t,e,n){const i=Object.assign({},t.defaultProps||{},e,{children:n});let o;if(t?.prototype?.render){const e=new t(i);o=e.render,o=o.bind(e)}else o=t;const s=o(i);return"FRAGMENT"===s?r(n):s}(t,e,i):"string"==typeof t?l(t,e,i):void console.error("jsx-render does not handle "+typeof tag)}},80287:(t,e,n)=>{"use strict";function r(t){let e=[];for(const r in t)if(t.hasOwnProperty(r)){const i=t[r];e.push(`${n=r,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${i}`)}var n;return e.join(";")}n.d(e,{H:()=>r})},66331:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var r=n(7896),i=n(40949),o=n(46062),s=n.n(o),a=n(32877),l=n.n(a),c=n(96793),d=n.n(c),p=n(17892),h=n.n(p),u=n(11173),f=n.n(u),m=n(31335),g={};g.setAttributes=h(),g.insert=d().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=f();s()(m.Z,g);const b=m.Z&&m.Z.locals?m.Z.locals:void 0;var y=n(35965),A=n(9571);const w=t=>{const{children:e,className:n="",fullWidth:o,id:s,tagName:a="button"}=t;let{color:l="#f7f7f7",textColor:c="inherit",rasied:d=!1}=t;const p=s||`btn-${(0,A.Z)()}`,h=`#${p}{\n background: ${l};\n color:${c};\n }\n #${p}:hover{\n box-shadow:${d?"rgba(0, 0, 0, 0.24) 0px 3px 8px;":"none"}\n }`,u=(0,y.Z)(n,b.btn,o?b.fullWidth:""),f=`${a}`;return(0,i.Z)(f,(0,r.Z)({},t,{className:u,id:p}),e,(0,i.Z)("style",null,h))}},11961:(t,e,n)=>{"use strict";n.d(e,{x:()=>r});const r=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}]},32173:(t,e,n)=>{"use strict";n.d(e,{a:()=>f});var r=n(57701),i=n.n(r),o=n(45607),s=n(81487);class a extends HTMLElement{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),t&&(this.props=t||{})}connectedCallback(){if(!this.isConnected)return null;const{props:t}=this;t.children instanceof HTMLElement&&this.appendChild(t.children),"string"==typeof t.children&&(this.innerHTML=t.children),"function"==typeof t.children&&this.appendChild(t.children()),"function"==typeof t.onUpdate&&t.onUpdate(this),"function"!=typeof t.onMount||this.isLoaded||(this.isLoaded=!0,t.onMount(this))}disconnectedCallback(){const{props:t}=this;"function"==typeof t.onUnMount&&t.onUnMount(this)}}customElements.define("cdtr-life-cycle-dom-element",a);const l=a;var c=n(14200),d=n(70538),p=n(70235),h=n(67237),u=n(65329);const f=t=>{let{name:e,id:n,onSelect:r,focus:a,onDeselect:f,atomElement:m,droppable:g,draggable:b,allowSortable:y,childrenHolder:A,render:w,onChanges:v,resize:x,remove:_,handleBar:k,destroy:C,template:E,schema:S,createEditor:B,getRenderedHTML:O,elementProps:M,resizeable:I,commands:$={},defaultProps:T={},globalCommands:L={},validator:N}=t;if(!N)throw new Error("validator is required");if(!e)throw new Error("name is required");if(L&&"object"==typeof L&&(o.Z.globalCommands={...o.Z.globalCommands,...L}),T&&"object"==typeof T)for(const t in T)if(Object.hasOwnProperty.call(T,t)){const e=T[t];if(void 0===M.props[t])M.props[t]=e;else if(M.props[t]&&"object"==typeof M.props[t]&&T[t]&&"object"==typeof T[t]){for(const e in T[t])if(Object.hasOwnProperty.call(T[t],e)){const n=T[t][e];void 0===M.props[t][e]&&(M.props[t][e]=n)}if("style"===t&&M.props[t]){const e=M.props[t];!e.padding||void 0===e.paddingTop&&void 0===e.paddingBottom&&void 0===e.paddingLeft&&void 0===e.paddingRight||delete e.padding,!e.margin||void 0===e.marginTop&&void 0===e.marginBottom&&void 0===e.marginLeft&&void 0===e.marginRight||delete e.margin}}}if("function"==typeof m&&(m=m({props:M.props,data:M})),m&&"boolean"==typeof I&&!0===I)m.setAttribute("cdtr-resizable","true");else if("function"==typeof I){const t=I();t&&t.setAttribute("cdtr-resizable","true")}if("function"==typeof E&&(E=E({props:M.props})),!E)throw new Error("template is required");if(b&&"object"==typeof b&&b.group&&(E.setAttribute("draggable-element",b.group),b.direction&&E.setAttribute("draggable-direction",b.direction)),g&&"object"==typeof g&&g.group&&E.setAttribute("droppable-element",g.group),"boolean"==typeof k&&k){const t=document.createElement("cdtr-move-handle-bar");t.for=n,E.appendChild(t)}E.setAttribute("data-type",e),n?E.setAttribute("data-id",n):console.warn("There is no id on this element",e),m||(m=E),E.classList.add(`${e}-component`),m.dataset.id=n;const R=(0,s.Z)(E,M,N);if(R.editor=o.Z,R.commands=$||{},R.onSelect=r,R.childrenHolder=A||E,R.allowSortable=y,R.onDeselect=f,R.remove=_,R.destroy=C,R.focus=a,R.atomElement=m,R.type=e,R.schema=S,R.getRenderedHTML=O,R.commands.execCommand=(t,e)=>o.Z.store().execCommand2({transactions:[{key:t,value:e}],update:[R]}),R.commands.remove=()=>{const t=[],e=p.h.get("components",R.id),n=e.closest("block"),r=e.parent(),i=r.children.findIndex((t=>t===e.id));t.push(new c.Z({componentId:e.id,parentId:r.id,index:i})),o.Z.removeComponent({componentId:e.id});if((0,u.X)(r).forEach((e=>t.push(e))),n){(0,d.c)(n).forEach((e=>t.push(e)))}const s=document.querySelector(`.block-component[data-id="${n.id}"]`)?.dataset.id||document.querySelector(".block-component[data-id]")?.dataset.id;s&&o.Z.clean().selectComponent(p.h.get("components",s)),t.length>0&&(0,h.Z)({steps:t,force:!0,update:!0})},R.render=w,R.resize=x,"function"==typeof w){const t=new l({onMount:()=>{t.remove(),w()}});E.appendChild(t)}return"function"==typeof v&&o.Z.on("change",v),"function"==typeof B&&(R.createEditor=t=>B({component:R,props:R.props,commands:$,tools:{textEditor:i()},...t}),R.editor={render:()=>{const t=B({component:R,props:R.props,commands:$});if(t)return t.layout?t.layout:t}}),R}},1434:(t,e,n)=>{"use strict";n.d(e,{s:()=>Vt,u:()=>Wt});var r=n(7896),i=n(40949),o=(n(93339),n(35965)),s=n(33776),a=n(59320),l=n(70235),c=n(46062),d=n.n(c),p=n(32877),h=n.n(p),u=n(96793),f=n.n(u),m=n(17892),g=n.n(m),b=n(11173),y=n.n(b),A=n(35647),w={};w.setAttributes=g(),w.insert=f().bind(null,"head"),w.domAPI=h(),w.insertStyleElement=y();d()(A.Z,w);const v=A.Z&&A.Z.locals?A.Z.locals:void 0;var x=n(36546),_=n(54774),k=n.n(_),C=n(84817),E=n(78529),S=n(51921),B=n(45607),O=n(8441),M=n(58860),I=n(32173),$="undefined"!=typeof window?window:null,T=null===$,L=T?void 0:$.document,N="addEventListener",R="removeEventListener",P="getBoundingClientRect",D="_a",z="_b",H="_c",j="horizontal",U=function(){return!1},Z=T?"calc":["","-webkit-","-moz-","-o-"].filter((function(t){var e=L.createElement("div");return e.style.cssText="width:"+t+"calc(9px)",!!e.style.length})).shift()+"calc",F=function(t){return"string"==typeof t||t instanceof String},V=function(t){if(F(t)){var e=L.querySelector(t);if(!e)throw new Error("Selector "+t+" did not match a DOM element");return e}return t},Y=function(t,e,n){var r=t[e];return void 0!==r?r:n},W=function(t,e,n,r){if(e){if("end"===r)return 0;if("center"===r)return t/2}else if(n){if("start"===r)return 0;if("center"===r)return t/2}return t},q=function(t,e){var n=L.createElement("div");return n.className="gutter gutter-"+e,n},X=function(t,e,n){var r={};return F(e)?r[t]=e:r[t]=Z+"("+e+"% - "+n+"px)",r},G=function(t,e){var n;return(n={})[t]=e+"px",n};const K=function(t,e){if(void 0===e&&(e={}),T)return{};var n,r,i,o,s,a,l=t;Array.from&&(l=Array.from(l));var c=V(l[0]).parentNode,d=getComputedStyle?getComputedStyle(c):null,p=d?d.flexDirection:null,h=Y(e,"sizes")||l.map((function(){return 100/l.length})),u=Y(e,"minSize",100),f=Array.isArray(u)?u:l.map((function(){return u})),m=Y(e,"maxSize",1/0),g=Array.isArray(m)?m:l.map((function(){return m})),b=Y(e,"expandToMin",!1),y=Y(e,"gutterSize",10),A=Y(e,"gutterAlign","center"),w=Y(e,"snapOffset",30),v=Array.isArray(w)?w:l.map((function(){return w})),x=Y(e,"dragInterval",1),_=Y(e,"direction",j),k=Y(e,"cursor",_===j?"col-resize":"row-resize"),C=Y(e,"gutter",q),E=Y(e,"elementStyle",X),S=Y(e,"gutterStyle",G);function B(t,e,r,i){var o=E(n,e,r,i);Object.keys(o).forEach((function(e){t.style[e]=o[e]}))}function O(){return a.map((function(t){return t.size}))}function M(t){return"touches"in t?t.touches[0][r]:t[r]}function I(t){var e=a[this.a],n=a[this.b],r=e.size+n.size;e.size=t/this.size*r,n.size=r-t/this.size*r,B(e.element,e.size,this[z],e.i),B(n.element,n.size,this[H],n.i)}function Z(t){var n,r=a[this.a],i=a[this.b];this.dragging&&(n=M(t)-this.start+(this[z]-this.dragOffset),x>1&&(n=Math.round(n/x)*x),n<=r.minSize+r.snapOffset+this[z]?n=r.minSize+this[z]:n>=this.size-(i.minSize+i.snapOffset+this[H])&&(n=this.size-(i.minSize+this[H])),n>=r.maxSize-r.snapOffset+this[z]?n=r.maxSize+this[z]:n<=this.size-(i.maxSize-i.snapOffset+this[H])&&(n=this.size-(i.maxSize+this[H])),I.call(this,n),Y(e,"onDrag",U)(O()))}function F(){var t=a[this.a].element,e=a[this.b].element,r=t[P](),s=e[P]();this.size=r[n]+s[n]+this[z]+this[H],this.start=r[i],this.end=r[o]}function K(t){var e=function(t){if(!getComputedStyle)return null;var e=getComputedStyle(t);if(!e)return null;var n=t[s];return 0===n?null:n-=_===j?parseFloat(e.paddingLeft)+parseFloat(e.paddingRight):parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)}(c);if(null===e)return t;if(f.reduce((function(t,e){return t+e}),0)>e)return t;var n=0,r=[],i=t.map((function(i,o){var s=e*i/100,a=W(y,0===o,o===t.length-1,A),l=f[o]+a;return s<l?(n+=l-s,r.push(0),l):(r.push(s-l),s)}));return 0===n?t:i.map((function(t,i){var o=t;if(n>0&&r[i]-n>0){var s=Math.min(n,r[i]-n);n-=s,o=t-s}return o/e*100}))}function J(){var t=this,n=a[t.a].element,r=a[t.b].element;t.dragging&&Y(e,"onDragEnd",U)(O()),t.dragging=!1,$[R]("mouseup",t.stop),$[R]("touchend",t.stop),$[R]("touchcancel",t.stop),$[R]("mousemove",t.move),$[R]("touchmove",t.move),t.stop=null,t.move=null,n[R]("selectstart",U),n[R]("dragstart",U),r[R]("selectstart",U),r[R]("dragstart",U),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor="",L.body.style.cursor=""}function Q(t){if(!("button"in t)||0===t.button){var n=this,r=a[n.a].element,i=a[n.b].element;n.dragging||Y(e,"onDragStart",U)(O()),t.preventDefault(),n.dragging=!0,n.move=Z.bind(n),n.stop=J.bind(n),$[N]("mouseup",n.stop),$[N]("touchend",n.stop),$[N]("touchcancel",n.stop),$[N]("mousemove",n.move),$[N]("touchmove",n.move),r[N]("selectstart",U),r[N]("dragstart",U),i[N]("selectstart",U),i[N]("dragstart",U),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",i.style.userSelect="none",i.style.webkitUserSelect="none",i.style.MozUserSelect="none",i.style.pointerEvents="none",n.gutter.style.cursor=k,n.parent.style.cursor=k,L.body.style.cursor=k,F.call(n),n.dragOffset=M(t)-n.end}}_===j?(n="width",r="clientX",i="left",o="right",s="clientWidth"):"vertical"===_&&(n="height",r="clientY",i="top",o="bottom",s="clientHeight"),h=K(h);var tt=[];function et(t){var e=t.i===tt.length,n=e?tt[t.i-1]:tt[t.i];F.call(n);var r=e?n.size-t.minSize-n[H]:t.minSize+n[z];I.call(n,r)}return(a=l.map((function(t,e){var r,i={element:V(t),size:h[e],minSize:f[e],maxSize:g[e],snapOffset:v[e],i:e};if(e>0&&((r={a:e-1,b:e,dragging:!1,direction:_,parent:c})[z]=W(y,e-1==0,!1,A),r[H]=W(y,!1,e===l.length-1,A),"row-reverse"===p||"column-reverse"===p)){var o=r.a;r.a=r.b,r.b=o}if(e>0){var s=C(e,_,i.element);!function(t,e,r){var i=S(n,e,r);Object.keys(i).forEach((function(e){t.style[e]=i[e]}))}(s,y,e),r[D]=Q.bind(r),s[N]("mousedown",r[D]),s[N]("touchstart",r[D]),c.insertBefore(s,i.element),r.gutter=s}return B(i.element,i.size,W(y,0===e,e===l.length-1,A),e),e>0&&tt.push(r),i}))).forEach((function(t){var e=t.element[P]()[n];e<t.minSize&&(b?et(t):t.minSize=e)})),{setSizes:function(t){var e=K(t);e.forEach((function(t,n){if(n>0){var r=tt[n-1],i=a[r.a],o=a[r.b];i.size=e[n-1],o.size=t,B(i.element,i.size,r[z],i.i),B(o.element,o.size,r[H],o.i)}}))},getSizes:O,collapse:function(t){et(a[t])},destroy:function(t,e){tt.forEach((function(r){if(!0!==e?r.parent.removeChild(r.gutter):(r.gutter[R]("mousedown",r[D]),r.gutter[R]("touchstart",r[D])),!0!==t){var i=E(n,r.a.size,r[z]);Object.keys(i).forEach((function(t){a[r.a].element.style[t]="",a[r.b].element.style[t]=""}))}}))},parent:c,pairs:tt}};let J;const Q="is_resize_on_proggress",tt=t=>{const e=l.h.get(Q);if(e)return;J&&!e&&(J.destroy(),J=null);let n=l.h.get("components",t.id).children.map((t=>l.h.get("components",t))).filter((t=>"col"===t.type));if(n=n.map((t=>t.element)),n.length<2)return;let r=0,i=[],o=[];for(let t=0;t<n.length;t++){const e=n[t];r+=parseInt(e.getAttribute("lg"))}if(r>12)return;const s=t.element.getBoundingClientRect().width;Array.from(n).forEach((t=>{const e=t.getBoundingClientRect();i.push(e.width)})),i=i.map((t=>Math.floor(function(t,e,n){const r=Math.abs((e-t)/e*100-100);return n?Math.round(r):r}(t,s))));if(i.reduce(((t,e)=>t+e),0)>100){const t=100/n.length;i=i.map((e=>t))}return J=new K(n,{sizes:i,minSize:100,gutterSize:0,dragInterval:2,snapOffset:10,onDrag:(t,e)=>{if((t=t.map((t=>Math.round(t/8)))).reduce(((t,e)=>t+e),0)>12){let e=t[0],n=0;for(var r=0;r<t.length;r++)n<t[r]&&(e=r,n=t[r]);t[e]=t[e]-1}n.forEach(((e,n)=>{e.setAttribute("lg",t[n])})),o=t},onDragStart:function(){l.h.set({[Q]:!0})},onDragEnd:function(t){if(l.h.set({[Q]:!1}),J&&(J.destroy(),J=null),!o)return;const e=[];Array.from(n).forEach((t=>{const n=l.h.get("components",t.dataset.id);n&&e.push(n)}));if(e.length!==n.length)return void console.error("cant find all the components,..");const r=[];B.Z.clean(),e.forEach(((t,e)=>{var n=o[e];r.push(new O.Z({componentId:t.id,key:"lg",value:n}))})),B.Z.store().execCommands(r)}}),{split:J,destroy:()=>{J&&(J.destroy(),J=null)}}};let et;const nt=t=>{const e=new a.Z;t.props.justify||(t.props.justify="center"),t?.props?.style?.backgroundImage&&delete t.props.style.backgroundImage,t?.props?.lg?.style&&(t.props.style={...t.props.style,...t.props.lg.style}),t.props.style.margin="0 auto";const c={element:()=>t.props.style};C.ZP.use((0,E.Z)());let d=C.ZP.createStyleSheet(c,{link:!0}).attach();d.update();const p=(0,o.Z)("block-component",t.classList,d.classes.element,v.main),h={type:t.type,"data-type":t.type,"data-id":t.id},u=(0,i.Z)("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:"100%",overflow:"hidden",opacity:t.opacity||1,zIndex:-1}}),f=(0,i.Z)("div",{"data-for":t.id,"data-type":t.type,className:(0,o.Z)(v.container),style:{width:"100%",justifyContent:t.props.justify}},t.children);function m(t){const e=()=>{const e=document.createElement(t.component);u.appendChild(e),(0,s.Z)(e,t.properties)};for(;u.firstChild;)u.firstChild.remove();t&&(t.installed?e():t.component&&("cdtr-media-player"===t.component&&(t.component="cdtr-background-video"),n(26831)(`./${t.component}`).then((t=>{e()}))))}t.background?m(t.background):t.background={};const g=()=>{f.classList.add(v.dragging)};M.Z.subscribe("elements:draggable:start",g),M.Z.subscribe("elements:draggable:end",(()=>{f.classList.remove(v.dragging)}));const b=(0,i.Z)("div",(0,r.Z)({},h,{"droppable-element":t.type,"droppable-direction":"top,bottom",className:p,"data-type":t.type,"data-id":t.id}),f,t.elements,u);if("menu"===t.as){const e=(0,i.Z)("div",{className:v.draggableHeightTitle},(0,i.Z)("span",null,t.style.marginBottom||0)),n=(0,i.Z)("div",{className:v.draggableHolder},e);b.appendChild(n),b.classList.add(v.menu),t.style.marginBottom&&(n.style.height=t.style.marginBottom)}const y=new S.ZP(f,{handle:".col-handle",draggable:".col-component",animation:300,onChoose:()=>{et&&(et.destroy(),et=null),l.h.set({isResizeBlockOn:!0}),B.Z.getEditor().filter((t=>"text"===t.type)).forEach((t=>"function"==typeof t.editor.setEditable&&t.editor.setEditable(!1)))},onEnd:t=>{const e=t.item,n=e.dataset.id,r=t.to.dataset.for,i=t.from.dataset.for,o=t.oldIndex,s=t.newIndex;l.h.set({isResizeBlockOn:!1}),B.Z.getEditor().filter((t=>"text"===t.type)).forEach((t=>"function"==typeof t.editor.setEditable&&t.editor.setEditable(!0)));const a={componentId:n,newParentId:r,oldParentId:i,newAfterElId:e.nextSibling?.dataset.id,newPreviousElId:e.previousSibling?.dataset.id,oldIndex:o,newIndex:s,type:x.W.MOVE};B.Z.moveComponent(a)}}),A=()=>{try{et=tt(_)}catch(t){console.error(t)}};b.addEventListener("mouseover",A);b.addEventListener("mouseleave",(()=>{l.h.get("isResizeBlockOn")||et&&et.destroy()}));const w={set:(t,e,n)=>{switch(e){case"expand_image_for_outlook":case"noResponsive":return t[e]=n,!0;case"background":return t[e]=n,m(n),!0;case"style":return t[e]=k()(t[e],n),d.update(t[e]),!0;default:return!1}}},_=(0,I.a)({id:t.id,name:t.type,globalCommands:{},schema:t.schema,validator:w,allowSortable:!0,childrenHolder:f,template:b,elementProps:t,defaultProps:{justify:"center"},commands:{compareCols:()=>{e.run((()=>{}))},fixCols:()=>{const t=[],e=[];Array.from(_.childrenHolder.children).forEach((e=>{e.classList.contains("col-component")&&t.push(e)}));const n=Math.floor(12/t.length);return t.forEach(((t,r)=>{const i=l.h.get("components",t.dataset.id);i&&e.push(new O.Z({componentId:i.id,key:"lg",value:n}))})),et&&(et.destroy(),et=null,A()),{sizes:e}}},destroy:()=>{y&&y.destroy(),M.Z.unSubscribe("elements:draggable:start",g),b.removeEventListener("mouseover",A)},remove:()=>{b.remove()},onSelect:t=>{b.classList.add(t)},onDeselect:t=>{b.classList.remove(t)},onChanges:()=>{_.isInDom()&&function t(){const e=_.get().props;if(e.expand_image_for_outlook)if(e.background&&e.background.properties&&e.background.properties.src){const n=document.createElement("img"),r=b.getBoundingClientRect();n.width=r.width,n.style.height="auto",n.src=e.background.properties.src,document.body.appendChild(n),n.addEventListener("load",(()=>{if(0===n.height)return t();const e=n.height;b.style.minHeight=e+"px",n.remove()}))}else b.style.minHeight="auto"}()},render:()=>{if((0,s.Z)(b,{style:_.props.style}),_.props.expand_image_for_outlook){const t=document.createElement("img");t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.width=_.props.style.width,t.style.height="auto",t.src=_.props.background.properties.src,document.body.appendChild(t),t.onload=()=>{const e=window.getComputedStyle(t);b.style.minHeight=e.height,t.remove()}}else b.style.minHeight="auto"}});return _};n(64721);var rt=n(73501),it={};it.setAttributes=g(),it.insert=f().bind(null,"head"),it.domAPI=h(),it.insertStyleElement=y();d()(rt.Z,it);rt.Z&&rt.Z.locals&&rt.Z.locals;n(23602);var ot=n(941),st={};st.setAttributes=g(),st.insert=f().bind(null,"head"),st.domAPI=h(),st.insertStyleElement=y();d()(ot.Z,st);ot.Z&&ot.Z.locals&&ot.Z.locals;var at=n(21009),lt=n(81487);var ct=n(46807),dt={};dt.setAttributes=g(),dt.insert=f().bind(null,"head"),dt.domAPI=h(),dt.insertStyleElement=y();d()(ct.Z,dt);const pt=ct.Z&&ct.Z.locals?ct.Z.locals:void 0,ht=t=>{new a.Z;const e=(0,o.Z)("iframe-component",t.classList,pt.main);t.style.display||(t.style.display="block"),t.style.margin||(t.style.margin="auto");const n=()=>(0,i.Z)("div",{className:(0,o.Z)(pt.emptyIframeHolder,"placeholder")},(0,i.Z)("cdtr-col",{lg:"12",md:"12",sm:"12"},(0,i.Z)("h1",{align:"center"},(0,i.Z)("lang-text",{text:"this_is_empty_iframe_start_add_url_link"}))),(0,i.Z)("cdtr-col",{sm:"12",lg:"12",md:"12"},(0,i.Z)("cdtr-input",{onChange:t=>B.Z.store().execCommand("src",t.target.value),style:"text-align:left;direction:ltr;width:290px;",placeholder:"https://",autoFocus:"true"}))),r=(0,i.Z)("iframe",{src:t.src,style:t.style},c),l=(0,i.Z)("cdtr-row",{style:{height:"100%"},alignItems:t.props.alignItems,justify:t.justify||"center"},(0,i.Z)("div",{style:{position:"relative",maxWidth:"100%",height:"100%",width:"100%"}},r,(0,i.Z)("cdtr-move-handle-bar",{for:t.id}))),c=(0,i.Z)("cdtr-col",{"data-id":t.id,"draggable-element":"element","droppable-element":"element",className:e},l,t.props.src?null:n()),d={set:(t,e,i)=>{switch(e){case"src":return t[e]=i,(0,s.Z)(r,{src:i}),r.onload=()=>{const t=c.querySelector(".placeholder"),e=r.getBoundingClientRect();i&&!t&&e.width>500?c.appendChild(n()):i&&t?t.remove():!i&&t||!i&&!t&&e.width>500&&c.appendChild(n())},r.onerror=()=>{(0,s.Z)(r,{src:""})},!0;case"style":return t[e]=k()(t[e],i),(0,s.Z)(r,{style:t[e]}),!0;default:return!1}}},p=(0,lt.Z)(c,t,d);return p.onSelect=t=>{c.classList.add(t)},p.remove=()=>{c.remove()},p.onDeselect=t=>{c.classList.remove(t)},p};var ut=n(56666),ft=n(21293);const mt=t=>new Proxy(t,{}),gt=t=>{const e=new a.Z,n=(0,i.Z)("cdtr-background-element",(0,r.Z)({onDelete:()=>{(0,at.rZ)(t.id,"backgrounds").then((e=>{if(e&&e.data&&e.data.id){const r=n.closest(`[_id='${e.data.id}']`);r&&(0,at.v7)(t.id,r.id,"backgrounds")}}))}},t));return{element:n,props:mt(t,{set:(r,i,o)=>{switch(i){case"backgroundVideo":return r[i]=o,(0,s.Z)(n,{backgroundVideo:o}),e.run((()=>{(0,at.KL)(t.id,"backgroundVideo",o)})),!0;case"is_removed":return(0,s.Z)(n,{is_removed:o}),!0;case"style":return r[i]=k()(r[i],o),(0,s.Z)(n,{style:r[i]}),e.run((()=>{(0,at.KL)(t.id,"style",r[i])})),!0;default:return!1}}})}};class bt extends ft.oi{constructor(){super(),this.items=[{text:l.h.get("lang","edit_background")},{text:l.h.get("lang","delete_bcakground"),value:"delete"}]}render(){return ft.dy`<vaadin-context-menu
34
+ `,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&(0,r.vz)(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||(0,r.vz)(this.parentNode).removeChild(this)},_onTransitionend:function(t){t&&t.target===this&&this.complete()},_openedChanged:function(t){if(t)this.prepare();else{var e=window.getComputedStyle(this);"0s"!==e.transitionDuration&&0!=e.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var f=n(33972),m=n(98348);const g=new class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,m.NH(document.documentElement,"tap",(function(){})),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for(t&&t instanceof Element!=!1||(t=document.body);t.root&&(0,r.vz)(t.root).activeElement;)t=(0,r.vz)(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var e=this._overlays[t];if(e){var n=this._overlays.length-1,r=this._overlays[n];if(r&&this._shouldBeBehindOverlay(e,r)&&n--,!(t>=n)){var i=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(e)<=i&&this._applyOverlayZ(e,i);t<n;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[n]=e}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var e=this._overlays.indexOf(t);if(e>=0)return this._bringOverlayAtIndexToFront(e),void this.trackBackdrop();var n=this._overlays.length,r=this._overlays[n-1],i=Math.max(this._getZ(r),this._minimumZ),o=this._getZ(t);if(r&&this._shouldBeBehindOverlay(t,r)){this._applyOverlayZ(r,i),n--;var s=this._overlays[n-1];i=Math.max(this._getZ(s),this._minimumZ)}o<=i&&this._applyOverlayZ(t,i),this._overlays.splice(n,0,t),this.trackBackdrop()}removeOverlay(t){var e=this._overlays.indexOf(t);-1!==e&&(this._overlays.splice(e,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();(t||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],e=0;e<this._overlays.length;e++)this._overlays[e].withBackdrop&&t.push(this._overlays[e]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var e=this._minimumZ;if(t){var n=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);n==n&&(e=n)}return e}_setZ(t,e){t.style.zIndex=e}_applyOverlayZ(t,e){this._setZ(t,e+2)}_overlayInPath(t){t=t||[];for(var e=0;e<t.length;e++)if(t[e]._manager===this)return t[e]}_onCaptureClick(t){var e=this._overlays.length-1;if(-1!==e)for(var n,i=(0,r.vz)(t).path;(n=this._overlays[e])&&this._overlayInPath(i)!==n&&(n._onCaptureClick(t),n.allowClickThrough);)e--}_onCaptureFocus(t){var e=this.currentOverlay();e&&e._onCaptureFocus(t)}_onCaptureKeyDown(t){var e=this.currentOverlay();e&&(f.G.keyboardEventMatchesKeys(t,"esc")?e._onCaptureEsc(t):f.G.keyboardEventMatchesKeys(t,"tab")&&e._onCaptureTab(t))}_shouldBeBehindOverlay(t,e){return!t.alwaysOnTop&&e.alwaysOnTop}};var b,y,A={pageX:0,pageY:0},w=null,v=[],x=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];function _(t){C.indexOf(t)>=0||(0===C.length&&function(){b=b||B.bind(void 0);for(var t=0,e=x.length;t<e;t++)document.addEventListener(x[t],b,{capture:!0,passive:!1})}(),C.push(t),y=C[C.length-1],E=[],S=[])}function k(t){var e=C.indexOf(t);-1!==e&&(C.splice(e,1),y=C[C.length-1],E=[],S=[],0===C.length&&function(){for(var t=0,e=x.length;t<e;t++)document.removeEventListener(x[t],b,{capture:!0,passive:!1})}())}const C=[];let E=null,S=null;function B(t){if(t.cancelable&&function(t){var e=(0,r.vz)(t).rootTarget;"touchmove"!==t.type&&w!==e&&(w=e,v=function(t){for(var e=[],n=t.indexOf(y),r=0;r<=n;r++)if(t[r].nodeType===Node.ELEMENT_NODE){var i=t[r],o=i.style;"scroll"!==o.overflow&&"auto"!==o.overflow&&(o=window.getComputedStyle(i)),"scroll"!==o.overflow&&"auto"!==o.overflow||e.push(i)}return e}((0,r.vz)(t).path));if(!v.length)return!0;if("touchstart"===t.type)return!1;var n=function(t){var e={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t&&"wheelDeltaY"in t)e.deltaX=-t.wheelDeltaX,e.deltaY=-t.wheelDeltaY;else if("wheelDelta"in t)e.deltaX=0,e.deltaY=-t.wheelDelta;else if("axis"in t)e.deltaX=1===t.axis?t.detail:0,e.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var n=t.targetTouches[0];e.deltaX=A.pageX-n.pageX,e.deltaY=A.pageY-n.pageY}return e}(t);return!function(t,e,n){if(!e&&!n)return;for(var r=Math.abs(n)>=Math.abs(e),i=0;i<t.length;i++){var o=t[i];if(r?n<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:e<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth)return o}}(v,n.deltaX,n.deltaY)}(t)&&t.preventDefault(),t.targetTouches){var e=t.targetTouches[0];A.pageX=e.pageX,A.pageY=e.pageY}}const O={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:g},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||(0,r.vz)(this).querySelector("[autofocus]")||this},get _focusableNodes(){return p.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=(0,r.vz)(this).observeNodes(this._onNodesChange)},detached:function(){for(var t in this._observer&&(0,r.vz)(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[t]&&cancelAnimationFrame(this.__rafs[t]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(t){this.fire("iron-overlay-canceled",t,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(t){t?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var t=this._manager.deepActiveElement;(t===document.body||M(this,t))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(t){this.noCancelOnOutsideClick||this.cancel(t)},_onCaptureFocus:function(t){if(this.withBackdrop){var e=(0,r.vz)(t).path;-1===e.indexOf(this)?(t.stopPropagation(),this._applyFocus()):this._focusedChild=e[0]}},_onCaptureEsc:function(t){this.noCancelOnEscKey||this.cancel(t)},_onCaptureTab:function(t){if(this.withBackdrop){this.__ensureFirstLastFocusables();var e=t.shiftKey,n=e?this.__firstFocusableNode:this.__lastFocusableNode,r=e?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(n===r)i=!0;else{var o=this._manager.deepActiveElement;i=o===n||o===this}i&&(t.preventDefault(),this._focusedChild=r,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var t=this._focusableNodes;this.__firstFocusableNode=t[0],this.__lastFocusableNode=t[t.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(t,e){var n=this.__rafs;null!==n[t]&&cancelAnimationFrame(n[t]),n[t]=requestAnimationFrame(function(){n[t]=null,e.call(this)}.bind(this))},__updateScrollObservers:function(t,e,n){t&&e&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),_(this)),this.__addScrollListeners()):(k(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],s.my)for(var t=this;t;)t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host&&this.__rootNodes.push(t),t=t.host||t.assignedSlot||t.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach((function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach((function(t){t.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})}),this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(t){return"lock"===t||"refit"===t||"cancel"===t},__onCaptureScroll:function(t){if(!(this.__isAnimating||(0,r.vz)(t).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(t)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},M=(t,e)=>{for(let r=e;r;r=(n=r).assignedSlot||n.parentNode||n.host)if(r===t)return!0;var n;return!1},I=[o,l,O]},13517:(t,e,n)=>{"use strict";n.d(e,{t:()=>c});n(38371);var r=n(87812),i=n(14326);let o={},s={};function a(t,e){o[t]=s[t.toLowerCase()]=e}function l(t){return o[t]||s[t.toLowerCase()]}class c extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let n=l(t);return n&&e?n.querySelector(e):n}return null}attributeChangedCallback(t,e,n,r){e!==n&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=(0,r.Kk)(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=(0,r.iY)(e)}return this.__assetpath}register(t){if(t=t||this.id){if(i.XN&&void 0!==l(t))throw a(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,a(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}c.prototype.modules=o,customElements.define("dom-module",c)},82523:(t,e,n)=>{"use strict";n.d(e,{x:()=>Ct});var r=n(85794);class i{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function o(t){return s(function(t){let e=new i;e.start=0,e.end=t.length;let n=e;for(let r=0,o=t.length;r<o;r++)if(t[r]===c){n.rules||(n.rules=[]);let t=n,e=t.rules[t.rules.length-1]||null;n=new i,n.start=r+1,n.parent=t,n.previous=e,t.rules.push(n)}else t[r]===d&&(n.end=r+1,n=n.parent||e);return e}(t=t.replace(p.comments,"").replace(p.port,"")),t)}function s(t,e){let n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent){let r=t.previous?t.previous.end:t.parent.start;n=e.substring(r,t.start-1),n=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let t=arguments[1],e=6-t.length;for(;e--;)t="0"+t;return"\\"+t}))}(n),n=n.replace(p.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);let i=t.parsedSelector=t.selector=n.trim();t.atRule=0===i.indexOf(f),t.atRule?0===i.indexOf(u)?t.type=l.MEDIA_RULE:i.match(p.keyframesRule)&&(t.type=l.KEYFRAMES_RULE,t.keyframesName=t.selector.split(p.multipleSpaces).pop()):0===i.indexOf(h)?t.type=l.MIXIN_RULE:t.type=l.STYLE_RULE}let r=t.rules;if(r)for(let t,n=0,i=r.length;n<i&&(t=r[n]);n++)s(t,e);return t}function a(t,e,n=""){let r="";if(t.cssText||t.rules){let n=t.rules;if(n&&!function(t){let e=t[0];return Boolean(e)&&Boolean(e.selector)&&0===e.selector.indexOf(h)}(n))for(let t,i=0,o=n.length;i<o&&(t=n[i]);i++)r=a(t,e,r);else r=e?t.cssText:function(t){return t=function(t){return t.replace(p.customProp,"").replace(p.mixinProp,"")}(t),function(t){return t.replace(p.mixinApply,"").replace(p.varApply,"")}(t)}(t.cssText),r=r.trim(),r&&(r=" "+r+"\n")}return r&&(t.selector&&(n+=t.selector+" "+c+"\n"),n+=r,t.selector&&(n+=d+"\n\n")),n}const l={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},c="{",d="}",p={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},h="--",u="@media",f="@";var m=n(62398);const g=new Set,b="shady-unscoped";function y(t){const e=t.textContent;if(!g.has(e)){g.add(e);const t=document.createElement("style");t.setAttribute("shady-unscoped",""),t.textContent=e,document.head.appendChild(t)}}function A(t){return t.hasAttribute(b)}function w(t,e){return t?("string"==typeof t&&(t=o(t)),e&&x(t,e),a(t,r.rd)):""}function v(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=o(t.textContent)),t.__cssRules||null}function x(t,e,n,r){if(!t)return;let i=!1,o=t.type;if(r&&o===l.MEDIA_RULE){let e=t.selector.match(m.mA);e&&(window.matchMedia(e[1]).matches||(i=!0))}o===l.STYLE_RULE?e(t):n&&o===l.KEYFRAMES_RULE?n(t):o===l.MIXIN_RULE&&(i=!0);let s=t.rules;if(s&&!i)for(let t,i=0,o=s.length;i<o&&(t=s[i]);i++)x(t,e,n,r)}function _(t,e){let n=0;for(let r=e,i=t.length;r<i;r++)if("("===t[r])n++;else if(")"===t[r]&&0==--n)return r;return-1}function k(t,e){let n=t.indexOf("var(");if(-1===n)return e(t,"","","");let r=_(t,n+3),i=t.substring(n+4,r),o=t.substring(0,n),s=k(t.substring(r+1),e),a=i.indexOf(",");return-1===a?e(o,i.trim(),"",s):e(o,i.substring(0,a).trim(),i.substring(a+1).trim(),s)}window.ShadyDOM&&window.ShadyDOM.wrap;const C="css-build";function E(t){if(void 0!==r.Cp)return r.Cp;if(void 0===t.__cssBuild){const e=t.getAttribute(C);if(e)t.__cssBuild=e;else{const e=function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;if(e instanceof Comment){const t=e.textContent.trim().split(":");if(t[0]===C)return t[1]}return""}(t);""!==e&&function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;e.parentNode.removeChild(e)}(t),t.__cssBuild=e}}return t.__cssBuild||""}function S(t){return""!==E(t)}var B=n(95);const O=/;\s*/m,M=/^\s*(initial)|(inherit)\s*$/,I=/\s*!important/,$="_-_";class T{constructor(){this._map={}}set(t,e){t=t.trim(),this._map[t]={properties:e,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}}let L=null;class N{constructor(){this._currentElement=null,this._measureElement=null,this._map=new T}detectMixin(t){return(0,B.OH)(t)}gatherStyles(t){const e=function(t){const e=[],n=t.querySelectorAll("style");for(let t=0;t<n.length;t++){const i=n[t];A(i)?r.WA||(y(i),i.parentNode.removeChild(i)):(e.push(i.textContent),i.parentNode.removeChild(i))}return e.join("").trim()}(t.content);if(e){const n=document.createElement("style");return n.textContent=e,t.content.insertBefore(n,t.content.firstChild),n}return null}transformTemplate(t,e){void 0===t._gatheredStyle&&(t._gatheredStyle=this.gatherStyles(t));const n=t._gatheredStyle;return n?this.transformStyle(n,e):null}transformStyle(t,e=""){let n=v(t);return this.transformRules(n,e),t.textContent=w(n),n}transformCustomStyle(t){let e=v(t);return x(e,(t=>{":root"===t.selector&&(t.selector="html"),this.transformRule(t)})),t.textContent=w(e),e}transformRules(t,e){this._currentElement=e,x(t,(t=>{this.transformRule(t)})),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),":root"===t.selector&&(t.selector=":host > *")}transformCssText(t,e){return t=t.replace(m.CN,((t,n,r,i)=>this._produceCssProperties(t,n,r,i,e))),this._consumeCssProperties(t,e)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let e=t;for(;e.parent;)e=e.parent;const n={};let r=!1;return x(e,(e=>{r=r||e===t,r||e.selector===t.selector&&Object.assign(n,this._cssTextToMap(e.parsedCssText))})),n}_consumeCssProperties(t,e){let n=null;for(;n=m.$T.exec(t);){let r=n[0],i=n[1],o=n.index,s=o+r.indexOf("@apply"),a=o+r.length,l=t.slice(0,s),c=t.slice(a),d=e?this._fallbacksFromPreviousRules(e):{};Object.assign(d,this._cssTextToMap(l));let p=this._atApplyToCssProperties(i,d);t=`${l}${p}${c}`,m.$T.lastIndex=o+p.length}return t}_atApplyToCssProperties(t,e){t=t.replace(O,"");let n=[],r=this._map.get(t);if(r||(this._map.set(t,{}),r=this._map.get(t)),r){let i,o,s;this._currentElement&&(r.dependants[this._currentElement]=!0);const a=r.properties;for(i in a)s=e&&e[i],o=[i,": var(",t,$,i],s&&o.push(",",s.replace(I,"")),o.push(")"),I.test(a[i])&&o.push(" !important"),n.push(o.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,e){let n=M.exec(e);return n&&(e=n[1]?this._getInitialValueForProperty(t):"apply-shim-inherit"),e}_cssTextToMap(t,e=!1){let n,r,i=t.split(";"),o={};for(let t,s,a=0;a<i.length;a++)t=i[a],t&&(s=t.split(":"),s.length>1&&(n=s[0].trim(),r=s.slice(1).join(":"),e&&(r=this._replaceInitialOrInherit(n,r)),o[n]=r));return o}_invalidateMixinEntry(t){if(L)for(let e in t.dependants)e!==this._currentElement&&L(e)}_produceCssProperties(t,e,n,r,i){if(n&&k(n,((t,e)=>{e&&this._map.get(e)&&(r=`@apply ${e};`)})),!r)return t;let o=this._consumeCssProperties(""+r,i),s=t.slice(0,t.indexOf("--")),a=this._cssTextToMap(o,!0),l=a,c=this._map.get(e),d=c&&c.properties;d?l=Object.assign(Object.create(d),a):this._map.set(e,l);let p,h,u=[],f=!1;for(p in l)h=a[p],void 0===h&&(h="initial"),d&&!(p in d)&&(f=!0),u.push(`${e}${$}${p}: ${h}`);return f&&this._invalidateMixinEntry(c),c&&(c.properties=l),n&&(s=`${t};${s}`),`${s}${u.join("; ")};`}}N.prototype.detectMixin=N.prototype.detectMixin,N.prototype.transformStyle=N.prototype.transformStyle,N.prototype.transformCustomStyle=N.prototype.transformCustomStyle,N.prototype.transformRules=N.prototype.transformRules,N.prototype.transformRule=N.prototype.transformRule,N.prototype.transformTemplate=N.prototype.transformTemplate,N.prototype._separator=$,Object.defineProperty(N.prototype,"invalidCallback",{get:()=>L,set(t){L=t}});const R=N,P={},D="_applyShimCurrentVersion",z="_applyShimNextVersion",H="_applyShimValidatingVersion",j=Promise.resolve();function U(t){let e=P[t];e&&function(t){t[D]=t[D]||0,t[H]=t[H]||0,t[z]=(t[z]||0)+1}(e)}function Z(t){return t[D]===t[z]}function F(t){return!Z(t)&&t[H]===t[z]}function V(t){t[H]=t[z],t._validating||(t._validating=!0,j.then((function(){t[D]=t[z],t._validating=!1})))}n(22859);const Y=new R;class W{constructor(){this.customStyleInterface=null,Y.invalidCallback=U}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{Y.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(t,e){if(this.ensure(),S(t))return;P[e]=t;let n=Y.transformTemplate(t,e);t._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let e=0;e<t.length;e++){let n=t[e],r=this.customStyleInterface.getStyleForCustomStyle(n);r&&Y.transformCustomStyle(r)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,e){if(this.ensure(),e&&(0,B.wW)(t,e),t.shadowRoot){this.styleElement(t);let e=t.shadowRoot.children||t.shadowRoot.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}else{let e=t.children||t.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}}styleElement(t){this.ensure();let{is:e}=function(t){let e=t.localName,n="",r="";return e?e.indexOf("-")>-1?n=e:(r=e,n=t.getAttribute&&t.getAttribute("is")||""):(n=t.is,r=t.extends),{is:n,typeExtension:r}}(t),n=P[e];if((!n||!S(n))&&n&&!Z(n)){F(n)||(this.prepareTemplate(n,e),V(n));let r=t.shadowRoot;if(r){let t=r.querySelector("style");t&&(t.__cssRules=n._styleAst,t.textContent=w(n._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new W;let e=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,n,r){t.flushCustomStyles(),t.prepareTemplate(e,n)},prepareTemplateStyles(t,e,n){window.ShadyCSS.prepareTemplate(t,e,n)},prepareTemplateDom(t,e){},styleSubtree(e,n){t.flushCustomStyles(),t.styleSubtree(e,n)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(t,e)=>(0,B.B7)(t,e),flushCustomStyles(){t.flushCustomStyles()},nativeCss:r.rd,nativeShadow:r.WA,cssBuild:r.Cp,disableRuntime:r.jF},e&&(window.ShadyCSS.CustomStyleInterface=e)}window.ShadyCSS.ApplyShim=Y;var q=n(2414),X=n(98956),G=n(25608),K=n(28091);const J=/:host\(:dir\((ltr|rtl)\)\)/g,Q=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,tt=/:dir\((?:ltr|rtl)\)/,et=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),nt=[];let rt=null,it="";function ot(){it=document.documentElement.getAttribute("dir")}function st(t){if(!t.__autoDirOptOut){t.setAttribute("dir",it)}}function at(){ot(),it=document.documentElement.getAttribute("dir");for(let t=0;t<nt.length;t++)st(nt[t])}const lt=(0,K.o)((t=>{et||rt||(ot(),rt=new MutationObserver(at),rt.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const e=(0,G.Q)(t);class n extends e{static _processStyleText(t,n){return t=e._processStyleText.call(this,t,n),!et&&tt.test(t)&&(t=this._replaceDirInCssText(t),this.__activateDir=!0),t}static _replaceDirInCssText(t){let e=t;return e=e.replace(J,':host([dir="$1"])'),e=e.replace(Q,':host([dir="$2"]) $1'),e}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){e.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(rt&&rt.takeRecords().length&&at(),nt.push(this),st(this))}disconnectedCallback(){if(e.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const t=nt.indexOf(this);t>-1&&nt.splice(t,1)}}}return n.__activateDir=!1,n}));n(87893);function ct(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?ct():window.addEventListener("DOMContentLoaded",ct);var dt=n(3572),pt=n(98348),ht=n(90992),ut=n(64005),ft=n(30623),mt=n(46969);n(38371);const gt=window.ShadyDOM,bt=window.ShadyCSS;function yt(t,e){return(0,mt.r)(t).getRootNode()===e}var At=n(14326);const wt="disable-upgrade",vt=t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]};(0,K.o)((t=>{const e=(0,q.SH)(t);let n=vt(e);return class extends e{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return n.call(this).concat(wt)}_initializeProperties(){this.hasAttribute(wt)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,n,r){t==wt?this.__isUpgradeDisabled&&null==n&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,n,r)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));var xt=n(73058);const _t="disable-upgrade";let kt=window.ShadyCSS;const Ct=(0,K.o)((t=>{const e=(0,X._)((0,q.SH)(t)),n=q.PP?e:lt(e),r=vt(n),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class o extends n{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(t,e,n){(this.__dataAttributes&&this.__dataAttributes[t]||t===_t)&&this.attributeChangedCallback(t,e,n,null)}setAttribute(t,e){if(At.j8&&!this._legacyForceObservedAttributes){const n=this.getAttribute(t);super.setAttribute(t,e),this.__attributeReaction(t,n,String(e))}else super.setAttribute(t,e)}removeAttribute(t){if(At.j8&&!this._legacyForceObservedAttributes){const e=this.getAttribute(t);super.removeAttribute(t),this.__attributeReaction(t,e,null)}else super.removeAttribute(t)}static get observedAttributes(){return At.j8&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],(0,xt.z2)(this.prototype)),this.__observedAttributes):r.call(this).concat(_t)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(t,e,n,r){e!==n&&(t==_t?this.__isUpgradeDisabled&&null==n&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,(0,mt.r)(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(t,e,n,r),this.attributeChanged(t,e,n)))}attributeChanged(t,e,n){}_initializeProperties(){if(At.nL&&this.hasAttribute(_t))this.__isUpgradeDisabled=!0;else{let t=Object.getPrototypeOf(this);t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))||(this._registered(),t.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),At.j8&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const t=this.attributes;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.__attributeReaction(n.name,null,n.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(t){return this._serializeValue(t)}deserialize(t,e){return this._deserializeValue(t,e)}reflectPropertyToAttribute(t,e,n){this._propertyToAttribute(t,e,n)}serializeValueToAttribute(t,e,n){this._valueToNodeAttribute(n||this,t,e)}extend(t,e){if(!t||!e)return t||e;let n=Object.getOwnPropertyNames(e);for(let r,i=0;i<n.length&&(r=n[i]);i++){let n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n)}return t}mixin(t,e){for(let n in e)t[n]=e[n];return t}chainObject(t,e){return t&&e&&t!==e&&(t.__proto__=e),t}instanceTemplate(t){let e=this.constructor._contentForTemplate(t);return document.importNode(e,!0)}fire(t,e,n){n=n||{},e=null==e?{}:e;let r=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});r.detail=e;let i=n.node||this;return(0,mt.r)(i).dispatchEvent(r),r}listen(t,e,n){t=t||this;let r=this.__boundListeners||(this.__boundListeners=new WeakMap),i=r.get(t);i||(i={},r.set(t,i));let o=e+n;i[o]||(i[o]=this._addMethodEventListenerToNode(t,e,n,this))}unlisten(t,e,n){t=t||this;let r=this.__boundListeners&&this.__boundListeners.get(t),i=e+n,o=r&&r[i];o&&(this._removeEventListenerFromNode(t,e,o),r[i]=null)}setScrollDirection(t,e){(0,pt.BP)(e||this,i[t]||"auto")}$$(t){return this.root.querySelector(t)}get domHost(){let t=(0,mt.r)(this).getRootNode();return t instanceof DocumentFragment?t.host:t}distributeContent(){const t=(0,dt.vz)(this);window.ShadyDOM&&t.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return(0,dt.vz)(this).getEffectiveChildNodes()}queryDistributedElements(t){return(0,dt.vz)(this).queryDistributedElements(t)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let t=this.getEffectiveChildNodes(),e=[];for(let n,r=0;n=t[r];r++)n.nodeType!==Node.COMMENT_NODE&&e.push(n.textContent);return e.join("")}queryEffectiveChildren(t){let e=this.queryDistributedElements(t);return e&&e[0]}queryAllEffectiveChildren(t){return this.queryDistributedElements(t)}getContentChildNodes(t){let e=this.root.querySelector(t||"slot");return e?(0,dt.vz)(e).getDistributedNodes():[]}getContentChildren(t){return this.getContentChildNodes(t).filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(t){const e=this;return e!==t&&(0,mt.r)(e).contains(t)&&(0,mt.r)(e).getRootNode()===(0,mt.r)(t).getRootNode()}isLocalDescendant(t){return this.root===(0,mt.r)(t).getRootNode()}scopeSubtree(t,e=!1){return function(t,e=!1){if(!gt||!bt)return null;if(!gt.handlesDynamicScoping)return null;const n=bt.ScopingShim;if(!n)return null;const r=n.scopeForNode(t),i=(0,mt.r)(t).getRootNode(),o=t=>{if(!yt(t,i))return;const e=Array.from(gt.nativeMethods.querySelectorAll.call(t,"*"));e.push(t);for(let t=0;t<e.length;t++){const o=e[t];if(!yt(o,i))continue;const s=n.currentScopeForNode(o);s!==r&&(""!==s&&n.unscopeNode(o,s),n.scopeNode(o,r))}};if(o(t),e){const e=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const n=t[e];for(let t=0;t<n.addedNodes.length;t++){const e=n.addedNodes[t];e.nodeType===Node.ELEMENT_NODE&&o(e)}}}));return e.observe(t,{childList:!0,subtree:!0}),e}return null}(t,e)}getComputedStyleValue(t){return kt.getComputedStyleValue(this,t)}debounce(t,e,n){return this._debouncers=this._debouncers||{},this._debouncers[t]=ht.dx.debounce(this._debouncers[t],n>0?ut.Wc.after(n):ut.YA,e.bind(this))}isDebouncerActive(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];return!(!e||!e.isActive())}flushDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.flush()}cancelDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.cancel()}async(t,e){return e>0?ut.Wc.run(t.bind(this),e):~ut.YA.run(t.bind(this))}cancelAsync(t){t<0?ut.YA.cancel(~t):ut.Wc.cancel(t)}create(t,e){let n=document.createElement(t);if(e)if(n.setProperties)n.setProperties(e);else for(let t in e)n[t]=e[t];return n}elementMatches(t,e){return(0,dt.Ku)(e||this,t)}toggleAttribute(t,e){let n=this;return 3===arguments.length&&(n=arguments[2]),1==arguments.length&&(e=!n.hasAttribute(t)),e?((0,mt.r)(n).setAttribute(t,""),!0):((0,mt.r)(n).removeAttribute(t),!1)}toggleClass(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?n.classList.add(t):n.classList.remove(t)}transform(t,e){(e=e||this).style.webkitTransform=t,e.style.transform=t}translate3d(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)}arrayDelete(t,e){let n;if(Array.isArray(t)){if(n=t.indexOf(e),n>=0)return t.splice(n,1)}else{if(n=(0,ft.U2)(this,t).indexOf(e),n>=0)return this.splice(t,n,1)}return null}_logger(t,e){switch(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":console[t](...e)}}_log(...t){this._logger("log",t)}_warn(...t){this._logger("warn",t)}_error(...t){this._logger("error",t)}_logf(t,...e){return["[%s::%s]",this.is,t,...e]}}return o.prototype.is="",o}))},50696:(t,e,n)=>{"use strict";n.d(e,{k:()=>u});var r=n(82523),i=n(14326);const o={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},s={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},a=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},s);function l(t,e,n,r){!function(t,e,n){const r=t._noAccessors,i=Object.getOwnPropertyNames(t);for(let o=0;o<i.length;o++){let s=i[o];if(!(s in n))if(r)e[s]=t[s];else{let n=Object.getOwnPropertyDescriptor(t,s);n&&(n.configurable=!0,Object.defineProperty(e,s,n))}}}(e,t,r);for(let t in o)e[t]&&(n[t]=n[t]||[],n[t].push(e[t]))}function c(t,e,n){e=e||[];for(let r=t.length-1;r>=0;r--){let i=t[r];i?Array.isArray(i)?c(i,e):e.indexOf(i)<0&&(!n||n.indexOf(i)<0)&&e.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return e}function d(t,e){for(const n in e){const r=t[n],i=e[n];t[n]=!("value"in i)&&r&&"value"in r?Object.assign({value:r.value},i):i}}const p=(0,r.x)(HTMLElement);function h(t,e,n){let r;const o={};class p extends e{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(r)for(let t,e=0;e<r.length;e++)t=r[e],t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties);t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties),this._prepareTemplate()}else e._finalizeClass.call(this)}static get properties(){const e={};if(r)for(let t=0;t<r.length;t++)d(e,r[t].properties);return d(e,t.properties),e}static get observers(){let e=[];if(r)for(let t,n=0;n<r.length;n++)t=r[n],t.observers&&(e=e.concat(t.observers));return t.observers&&(e=e.concat(t.observers)),e}created(){super.created();const t=o.created;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}_registered(){const t=p.prototype;if(!t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))){t.__hasRegisterFinished=!0,super._registered(),i.nL&&h(t);const e=Object.getPrototypeOf(this);let n=o.beforeRegister;if(n)for(let t=0;t<n.length;t++)n[t].call(e);if(n=o.registered,n)for(let t=0;t<n.length;t++)n[t].call(e)}}_applyListeners(){super._applyListeners();const t=o.listeners;if(t)for(let e=0;e<t.length;e++){const n=t[e];if(n)for(let t in n)this._addMethodEventListenerToNode(this,t,n[t])}}_ensureAttributes(){const t=o.hostAttributes;if(t)for(let e=t.length-1;e>=0;e--){const n=t[e];for(let t in n)this._ensureAttribute(t,n[t])}super._ensureAttributes()}ready(){super.ready();let t=o.ready;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attached(){super.attached();let t=o.attached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}detached(){super.detached();let t=o.detached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attributeChanged(t,e,n){super.attributeChanged();let r=o.attributeChanged;if(r)for(let i=0;i<r.length;i++)r[i].call(this,t,e,n)}}if(n){Array.isArray(n)||(n=[n]);let t=e.prototype.behaviors;r=c(n,null,t),p.prototype.behaviors=t?t.concat(n):r}const h=e=>{r&&function(t,e,n){for(let r=0;r<e.length;r++)l(t,e[r],n,a)}(e,r,o),l(e,t,o,s)};return i.nL||h(p.prototype),p.generatedFrom=t,p}n(38371);const u=function(t){let e;return e="function"==typeof t?t:u.Class(t),t._legacyForceObservedAttributes&&(e.prototype._legacyForceObservedAttributes=t._legacyForceObservedAttributes),customElements.define(e.is,e),e};u.Class=function(t,e){t||console.warn("Polymer.Class requires `info` argument");let n=e?e(p):p;return n=h(t,n,t.behaviors),n.is=n.prototype.is=t.is,n}},3572:(t,e,n)=>{"use strict";n.d(e,{vz:()=>m,Ku:()=>d});n(38371);var r=n(46969),i=(n(14326),n(64575)),o=n(64005);function s(t){return"slot"===t.localName}let a=class{static getFlattenedNodes(t){const e=(0,r.r)(t);return s(t)?e.assignedNodes({flatten:!0}):Array.from(e.childNodes).map((t=>s(t)?(0,r.r)(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){s(this._target)?this._listenSlots([this._target]):(0,r.r)(this._target).children&&(this._listenSlots((0,r.r)(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){s(this._target)?this._unlistenSlots([this._target]):(0,r.r)(this._target).children&&(this._unlistenSlots((0,r.r)(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,o.YA.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let n=t[e];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),n=(0,i.c)(e,this._effectiveNodes);for(let e,r=0;r<n.length&&(e=n[r]);r++)for(let n,r=0;r<e.removed.length&&(n=e.removed[r]);r++)t.removedNodes.push(n);for(let r,i=0;i<n.length&&(r=n[i]);i++)for(let n=r.index;n<r.index+r.addedCount;n++)t.addedNodes.push(e[n]);this._effectiveNodes=e;let r=!1;return(t.addedNodes.length||t.removedNodes.length)&&(r=!0,this.callback.call(this._target,t)),r}_listenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];s(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];s(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};n(91704),n(90992);const l=Element.prototype,c=l.matches||l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector,d=function(t,e){return c.call(t,e)};class p{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new a(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if((0,r.r)(this.node).contains(t))return!0;let e=t,n=t.ownerDocument;for(;e&&e!==n&&e!==this.node;)e=(0,r.r)(e).parentNode||(0,r.r)(e).host;return e===this.node}getOwnerRoot(){return(0,r.r)(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?(0,r.r)(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],e=(0,r.r)(this.node).assignedSlot;for(;e;)t.push(e),e=(0,r.r)(e).assignedSlot;return t}importNode(t,e){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return(0,r.r)(n).importNode(t,e)}getEffectiveChildNodes(){return a.getFlattenedNodes(this.node)}queryDistributedElements(t){let e=this.getEffectiveChildNodes(),n=[];for(let r,i=0,o=e.length;i<o&&(r=e[i]);i++)r.nodeType===Node.ELEMENT_NODE&&d(r,t)&&n.push(r);return n}get activeElement(){let t=this.node;return void 0!==t._activeElement?t._activeElement:t.activeElement}}function h(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},configurable:!0})}}class u{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}p.prototype.cloneNode,p.prototype.appendChild,p.prototype.insertBefore,p.prototype.removeChild,p.prototype.replaceChild,p.prototype.setAttribute,p.prototype.removeAttribute,p.prototype.querySelector,p.prototype.querySelectorAll,p.prototype.parentNode,p.prototype.firstChild,p.prototype.lastChild,p.prototype.nextSibling,p.prototype.previousSibling,p.prototype.firstElementChild,p.prototype.lastElementChild,p.prototype.nextElementSibling,p.prototype.previousElementSibling,p.prototype.childNodes,p.prototype.children,p.prototype.classList,p.prototype.textContent,p.prototype.innerHTML;let f=p;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class t extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(p.prototype).forEach((e=>{"activeElement"!=e&&(t.prototype[e]=p.prototype[e])})),h(t.prototype,["classList"]),f=t,Object.defineProperties(u.prototype,{localTarget:{get(){const t=this.event.currentTarget,e=t&&m(t).getOwnerRoot(),n=this.path;for(let t=0;t<n.length;t++){const r=n[t];if(m(r).getOwnerRoot()===e)return r}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(t,e){for(let n=0;n<e.length;n++){let r=e[n];t[r]=function(){return this.node[r].apply(this.node,arguments)}}}(p.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll","attachShadow"]),h(p.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList","shadowRoot"]),function(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},set:function(t){this.node[r]=t},configurable:!0})}}(p.prototype,["textContent","innerHTML","className"]);const m=function(t){if((t=t||document)instanceof f)return t;if(t instanceof u)return t;let e=t.__domApi;return e||(e=t instanceof Event?new u(t):new f(t),t.__domApi=e),e}},2414:(t,e,n)=>{"use strict";n.d(e,{SH:()=>f,PP:()=>u});n(38371);var r=n(14326),i=n(28091),o=n(74546),s=n(87812),a=n(13517),l=n(51349),c=n(73058),d=n(49922);const p=(0,i.o)((t=>{const e=(0,d.e)(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){(0,c.z2)(this.prototype);const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){(0,c.Gd)(),this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i}));var h=n(46969);const u=window.ShadyCSS&&window.ShadyCSS.cssBuild,f=(0,i.o)((t=>{const e=p((0,l.q)(t));return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((n=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",n))||(n.__ownObservers=n.hasOwnProperty(JSCompiler_renameProperty("observers",n))?n.observers:null),n.__ownObservers);var n;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):r.nL||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let o in t)e=this.prototype,n=o,r=t[o],i=t,r.computed&&(r.readOnly=!0),r.computed&&(e._hasReadOnlyEffect(n)?console.warn(`Cannot redefine computed property '${n}'.`):e._createComputedProperty(n,r.computed,i)),r.readOnly&&!e._hasReadOnlyEffect(n)?e._createReadOnlyProperty(n,!r.computed):!1===r.readOnly&&e._hasReadOnlyEffect(n)&&console.warn(`Cannot make readOnly property '${n}' non-readOnly.`),r.reflectToAttribute&&!e._hasReflectEffect(n)?e._createReflectedProperty(n):!1===r.reflectToAttribute&&e._hasReflectEffect(n)&&console.warn(`Cannot make reflected property '${n}' non-reflected.`),r.notify&&!e._hasNotifyEffect(n)?e._createNotifyingProperty(n):!1===r.notify&&e._hasNotifyEffect(n)&&console.warn(`Cannot make notify property '${n}' non-notify.`),r.observer&&e._createPropertyObserver(n,r.observer,i[r.observer]),e._addPropertyToAttributeMap(n);var e,n,r,i}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!r.XN||r.ZN)&&(e=a.t.import(t,"template"),r.XN&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=(0,s.iY)(t.url);else{const t=a.t.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=r.sM,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return(0,s.Rq)(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;!function(t,e,n,i){if(!u){const r=e.content.querySelectorAll("style"),s=(0,o.uT)(e),a=(0,o.lx)(n),l=e.content.firstElementChild;for(let n=0;n<a.length;n++){let r=a[n];r.textContent=t._processStyleText(r.textContent,i),e.content.insertBefore(r,l)}let c=0;for(let e=0;e<s.length;e++){let n=s[e],o=r[c];o!==n?(n=n.cloneNode(!0),o.parentNode.insertBefore(n,o)):c++,n.textContent=t._processStyleText(n.textContent,i)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,n),r.md&&u&&r.FV){const n=e.content.querySelectorAll("style");if(n){let e="";Array.from(n).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}}(this,e,t,n?(0,s.Kk)(n):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=(0,h.r)(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),r.Hr&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=(0,s.Kk)(this.importPath)),(0,s.Kk)(t,e)}static _parseTemplateContent(t,n,r){return n.dynamicFns=n.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,n,r)}static _addTemplatePropertyEffect(t,n,i){return!r.a2||n in this._properties||i.info.part.signature&&i.info.part.signature.static||i.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,n,i)}}}))},98956:(t,e,n)=>{"use strict";n.d(e,{_:()=>o});n(38371);var r=n(28091),i=n(98348);const o=(0,r.o)((t=>class extends t{_addEventListenerToNode(t,e,n){(0,i.NH)(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){(0,i.ys)(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}))},49922:(t,e,n)=>{"use strict";n.d(e,{e:()=>a});n(38371);var r=n(28091),i=n(64005),o=n(46969);const s=i.YA,a=(0,r.o)((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],i=this._shouldPropertyChange(t,e,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),i}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,s.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,i=r&&r[t]||t;this[i]=this._deserializeValue(e,n||this.constructor.typeForProperty(i))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=(0,o.r)(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}}))},25608:(t,e,n)=>{"use strict";n.d(e,{Q:()=>c});n(38371);var r=n(28091),i=n(23025),o=n(49922);const s={};let a=HTMLElement.prototype;for(;a;){let t=Object.getOwnPropertyNames(a);for(let e=0;e<t.length;e++)s[t[e]]=!0;a=Object.getPrototypeOf(a)}const l=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const c=(0,r.o)((t=>{const e=(0,o.e)(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor((0,i.z)(t[e]))}static attributeNameForProperty(t){return(0,i.n)(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(l(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!s[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}}))},51349:(t,e,n)=>{"use strict";n.d(e,{q:()=>et});n(38371);var r=n(46969),i=n(28091),o=n(30623),s=n(23025),a=n(25608);const l={"dom-if":!0,"dom-repeat":!0};let c=!1,d=!1;function p(t){(function(){if(!c){c=!0;const t=document.createElement("textarea");t.placeholder="a",d=t.placeholder===t.textContent}return d})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}const h=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,n,r)=>{const i=n.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(i,r)):e.setAttribute(r,i)}})();function u(t){let e=t.getAttribute("is");if(e&&l[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;){const{name:e}=n.attributes[0];h(t,n,e),n.removeAttribute(e)}}return t}function f(t,e){let n=e.parentInfo&&f(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function m(t,e,n,r){r.id&&(e[r.id]=n)}function g(t,e,n){if(n.events&&n.events.length)for(let r,i=0,o=n.events;i<o.length&&(r=o[i]);i++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function b(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const y=(0,i.o)((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,i=t;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,e,n)||r,p(i),i.firstChild&&this._parseTemplateChildNodes(i,e,n),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,i=t.firstChild,o=0;i;i=r){if("template"==i.localName&&(i=u(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)i.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!i.textContent.trim()){t.removeChild(i);continue}}let s={parentIndex:o,parentInfo:n};this._parseTemplateNode(i,e,s)&&(s.infoIndex=e.nodeInfoList.push(s)-1),i.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,i=this._parseTemplate(r,e);return(i.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=i,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,i=Array.from(t.attributes);for(let o,s=i.length-1;o=i[s];s--)r=this._parseTemplateNodeAttribute(t,e,n,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,i){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,i=document.importNode(r,!0);i.__noInsertionPoint=!e.hasInsertionPoint;let o=i.nodeList=new Array(n.length);i.$={};for(let t,r=0,s=n.length;r<s&&(t=n[r]);r++){let n=o[r]=f(i,t);m(0,i.$,n,t),b(0,n,t,e),g(this,n,t)}return i}_addMethodEventListenerToNode(t,e,n,r){let i=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,i),i}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));var A=n(14326);let w=0;const v=[],x={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},_="__computeInfo",k=/[A-Z]/;function C(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function E(t,e,n,r,i,s){if(e){let a=!1;const l=w++;for(let c in n){let d=e[i?(0,o.Jz)(c):c];if(d)for(let e,o=0,p=d.length;o<p&&(e=d[o]);o++)e.info&&e.info.lastRun===l||i&&!B(c,e.trigger)||(e.info&&(e.info.lastRun=l),e.fn(t,c,n,r,e.info,i,s),a=!0)}return a}return!1}function S(t,e,n,r,i,s,a,l){let c=!1,d=e[a?(0,o.Jz)(r):r];if(d)for(let e,o=0,p=d.length;o<p&&(e=d[o]);o++)e.info&&e.info.lastRun===n||a&&!B(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,i,s,e.info,a,l),c=!0);return c}function B(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!(0,o.jg)(n,t))||!(!e.wildcard||!(0,o.SG)(n,t))}return!0}function O(t,e,n,r,i){let o="string"==typeof i.method?t[i.method]:i.method,s=i.property;o?o.call(t,t.__data[s],r[s]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function M(t,e,n){let r=(0,o.Jz)(e);if(r!==e){return I(t,(0,s.n)(r)+"-changed",n[e],e),!0}return!1}function I(t,e,n,i){let o={value:n,queueProperty:!0};i&&(o.path=i),(0,r.r)(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function $(t,e,n,r,i,s){let a=(s?(0,o.Jz)(e):e)!=e?e:null,l=a?(0,o.U2)(t,a):t.__data[e];a&&void 0===l&&(l=n[e]),I(t,i.eventName,l,a)}function T(t,e,n,r,i){let o=t.__data[e];A.v1&&(o=(0,A.v1)(o,i.attrName,"attribute",t)),t._propertyToAttribute(e,i.attrName,o)}function L(t,e,n,r){let i=t[x.COMPUTE];if(i)if(A.ls){w++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[x.COMPUTE];let r,{counts:i,ready:o,total:s}=function(t){const e=t[_],n={},r=t[x.COMPUTE],i=[];let o=0;for(let t in e){const r=e[t];o+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||i.push(t);return{counts:n,ready:i,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--s,0==--i[e]&&o.push(e)}))}if(0!==s){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),s=[];for(let t in e)R(t,i,s,o,r);let a;for(;a=s.shift();)P(t,"",e,n,a)&&R(a.methodInfo,i,s,o,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;E(t,i,o,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}const N=(t,e,n)=>{let r=0,i=e.length-1,o=-1;for(;r<=i;){const s=r+i>>1,a=n.get(e[s].methodInfo)-n.get(t.methodInfo);if(a<0)r=s+1;else{if(!(a>0)){o=s;break}i=s-1}}o<0&&(o=i+1),e.splice(o,0,t)},R=(t,e,n,r,i)=>{const s=e[i?(0,o.Jz)(t):t];if(s)for(let e=0;e<s.length;e++){const o=s[e];o.info.lastRun===w||i&&!B(t,o.trigger)||(o.info.lastRun=w,N(o.info,n,r))}};function P(t,e,n,r,i){let o=F(t,e,n,r,i);if(o===v)return!1;let s=i.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[s]?t._setPendingProperty(s,o,!0):(t[s]=o,!1)}function D(t,e,n,r,i,o,a){n.bindings=n.bindings||[];let l={kind:r,target:i,parts:o,literal:a,isCompound:1!==o.length};if(n.bindings.push(l),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(l)){let{event:t,negate:e}=l.parts[0];l.listenerEvent=t||(0,s.n)(i)+"-changed",l.listenerNegate=e}let c=e.nodeInfoList.length;for(let n=0;n<l.parts.length;n++){let r=l.parts[n];r.compoundIndex=n,z(t,e,l,r,c)}}function z(t,e,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let o=r.dependencies,s={index:i,binding:n,part:r,evaluator:t};for(let n=0;n<o.length;n++){let r=o[n];"string"==typeof r&&(r=K(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:H,info:s,trigger:r})}}}function H(t,e,n,r,i,s,a){let l=a[i.index],c=i.binding,d=i.part;if(s&&d.source&&e.length>d.source.length&&"property"==c.kind&&!c.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[c.target]){let r=n[e];e=(0,o.Iu)(d.source,c.target,e),l._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(l)}else{let o=i.evaluator._evaluateBinding(t,d,e,n,r,s);o!==v&&function(t,e,n,r,i){i=function(t,e,n,r){if(n.isCompound){let i=t.__dataCompoundStorage[n.target];i[r.compoundIndex]=e,e=i.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,i,n,r),A.v1&&(i=(0,A.v1)(i,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,i,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[x.READ_ONLY]&&e[x.READ_ONLY][r]||e._setPendingProperty(r,i)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,i)}}(t,l,c,d,o)}}function j(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,o=new Array(i.length);for(let t=0;t<i.length;t++)o[t]=i[t].literal;let s=e.target;n[s]=o,e.literal&&"property"==e.kind&&("className"===s&&(t=(0,r.r)(t)),t[s]=e.literal)}}function U(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,i){let s,a=t.detail,l=a&&a.path;l?(r=(0,o.Iu)(n,r,l),s=a&&a.value):s=t.currentTarget[n],s=i?!s:s,e[x.READ_ONLY]&&e[x.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,s,!0,Boolean(l))||a&&a.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function Z(t,e,n,r,i,o){o=e.static||o&&("object"!=typeof o||o[e.methodName]);let s={methodName:e.methodName,args:e.args,methodInfo:i,dynamicFn:o};for(let i,o=0;o<e.args.length&&(i=e.args[o]);o++)i.literal||t._addPropertyEffect(i.rootProperty,n,{fn:r,info:s,trigger:i});return o&&t._addPropertyEffect(e.methodName,n,{fn:r,info:s}),s}function F(t,e,n,r,i){let o=t._methodHost||t,s=o[i.methodName];if(s){let r=t._marshalArgs(i.args,e,n);return r===v?v:s.apply(o,r)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}const V=[],Y="(?:[a-zA-Z_$][\\w.:$\\-*]*)",W="(?:("+Y+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",q=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?"+("("+Y+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+W+"(?:,\\s*"+W+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function X(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function G(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:V};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=K(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t)}return t}return null}function K(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=(0,o.Jz)(e),n.structured=(0,o.AZ)(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function J(t,e,n){let r=(0,o.U2)(t,n);return void 0===r&&(r=e[n]),r}function Q(t,e,n,r){const i={indexSplices:r};A.HY&&!t._overrideLegacyUndefined&&(e.splices=i),t.notifyPath(n+".splices",i),t.notifyPath(n+".length",e.length),A.HY&&!t._overrideLegacyUndefined&&(i.indexSplices=[])}function tt(t,e,n,r,i,o){Q(t,e,n,[{index:r,addedCount:i,removed:o,object:e,type:"splice"}])}const et=(0,i.o)((t=>{const e=y((0,a.Q)(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return x}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(nt.length){let t=nt[nt.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[x.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==x.READ_ONLY);let r=C(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=C(this,e,!0)[t],i=r.indexOf(n);i>=0&&r.splice(i,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,x.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,x.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,x.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,x.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||(0,o.Jz)(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=(0,o.U2)(this,t);if(!(t=(0,o.t8)(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let i;for(let s in r){let a=r[s];(0,o.SG)(s,e)?(i=(0,o.Iu)(s,a,e),t._setPendingPropertyOrPath(i,n,!0,!0)):(0,o.SG)(a,e)&&(i=(0,o.Iu)(a,s,e),t._setPendingPropertyOrPath(i,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=(0,r.r)(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&(0,o.AZ)(t),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,i[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[x.NOTIFY]&&this[x.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[x.READ_ONLY]&&this[x.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,i=this.__dataHasPaths;this.__dataHasPaths=!1,L(this,e,n,i),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,i),this._flushClients(),E(this,this[x.REFLECT],e,n,i),E(this,this[x.OBSERVE],e,n,i),r&&function(t,e,n,r,i){let o,s,a=t[x.NOTIFY],l=w++;for(let s in e)e[s]&&(a&&S(t,a,l,s,n,r,i)||i&&M(t,s,n))&&(o=!0);o&&(s=t.__dataHost)&&s._invalidateProperties&&s._invalidateProperties()}(this,r,e,n,i),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[x.PROPAGATE]&&E(this,this[x.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const i=(e,r)=>{E(this,t.propertyEffects,e,n,r,t.nodeList);for(let i=t.firstChild;i;i=i.nextSibling)this._runEffectsForTemplate(i,e,n,r)};t.runEffects?t.runEffects(i,e,r):i(e,r)}linkPaths(t,e){t=(0,o.Fv)(t),e=(0,o.Fv)(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=(0,o.Fv)(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};Q(this,(0,o.U2)(this,t,n),n.path,e)}get(t,e){return(0,o.U2)(e||this,t)}set(t,e,n){n?(0,o.t8)(n,t,e):this[x.READ_ONLY]&&this[x.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=(0,o.U2)(this,t,n),i=r.length,s=r.push(...e);return e.length&&tt(this,r,n.path,i,e.length,[]),s}pop(t){let e={path:""},n=(0,o.U2)(this,t,e),r=Boolean(n.length),i=n.pop();return r&&tt(this,n,e.path,n.length,0,[i]),i}splice(t,e,n,...r){let i,s={path:""},a=(0,o.U2)(this,t,s);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),i=2===arguments.length?a.splice(e):a.splice(e,n,...r),(r.length||i.length)&&tt(this,a,s.path,e,r.length,i),i}shift(t){let e={path:""},n=(0,o.U2)(this,t,e),r=Boolean(n.length),i=n.shift();return r&&tt(this,n,e.path,0,0,[i]),i}unshift(t,...e){let n={path:""},r=(0,o.U2)(this,t,n),i=r.unshift(...e);return e.length&&tt(this,r,n.path,0,e.length,[]),i}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=(0,o.U2)(this,t,r),n=r.path}else n=Array.isArray(t)?(0,o.Fv)(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,x.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,x.OBSERVE,{fn:O,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,x.OBSERVE,{fn:O,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=G(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");Z(this,n,x.OBSERVE,F,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,x.NOTIFY,{fn:$,info:{eventName:(0,s.n)(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,x.REFLECT,{fn:T,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=G(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const i=Z(this,r,x.COMPUTE,P,t,n);C(this,_)[t]=i}_marshalArgs(t,e,n){const r=this.__data,i=[];for(let s=0,a=t.length;s<a;s++){let{name:a,structured:l,wildcard:c,value:d,literal:p}=t[s];if(!p)if(c){const t=(0,o.SG)(a,e),i=J(r,n,t?e:a);d={path:t?e:a,value:i,base:t?(0,o.U2)(r,a):i}}else d=l?J(r,n,a):r[a];if(A.HY&&!this._overrideLegacyUndefined&&void 0===d&&t.length>1)return v;i[s]=d}return i}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),nt.push(this);let n=super._stampTemplate(t,e);if(nt.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let i=r[e],o=n[e],s=i.bindings;if(s)for(let e=0;e<s.length;e++){let n=s[e];j(o,n),U(o,t,n)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:i,parent:o}=e;n?n.nextSibling=i:o&&(o.firstChild=i),i?i.previousSibling=n:o&&(o.lastChild=n),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];(0,r.r)((0,r.r)(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let i=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=X(e)||" ",D(this,n,r,"text","textContent",e),i=!0)}return i}static _parseTemplateNodeAttribute(t,n,r,i,o){let a=this._parseBindings(o,n);if(a){let e=i,o="property";k.test(i)?o="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),o="attribute");let l=X(a);return l&&"attribute"==o&&("class"==i&&t.hasAttribute("class")&&(l+=" "+t.getAttribute(i)),t.setAttribute(i,l)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(i,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(i=(0,s.z)(i)),D(this,n,r,o,i,a,l),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,i,o)}static _parseTemplateNestedTemplate(t,n,r){let i=e._parseTemplateNestedTemplate.call(this,t,n,r);const o=t.parentNode,s=r.templateInfo,a="dom-if"===o.localName,l="dom-repeat"===o.localName;A.gx&&(a||l)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=s,r.noted=!0,i=!1);let c=s.hostProps;if(A.ew&&a)c&&(n.hostProps=Object.assign(n.hostProps||{},c),A.gx||(r.parentInfo.noted=!0));else{let t="{";for(let e in c){D(this,n,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return i}static _parseBindings(t,e){let n,r=[],i=0;for(;null!==(n=q.exec(t));){n.index>i&&r.push({literal:t.slice(i,n.index)});let o=n[1][0],s=Boolean(n[2]),a=n[3].trim(),l=!1,c="",d=-1;"{"==o&&(d=a.indexOf("::"))>0&&(c=a.substring(d+2),a=a.substring(0,d),l=!0);let p=G(a),h=[];if(p){let{args:t,methodName:n}=p;for(let e=0;e<t.length;e++){let n=t[e];n.literal||h.push(n)}let r=e.dynamicFns;(r&&r[n]||p.static)&&(h.push(n),p.dynamicFn=!0)}else h.push(a);r.push({source:a,mode:o,negate:s,customEvent:l,signature:p,dependencies:h,event:c}),i=q.lastIndex}if(i&&i<t.length){let e=t.substring(i);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,i,s){let a;return a=e.signature?F(t,n,r,0,e.signature):n!=e.source?(0,o.U2)(t,e.source):s&&(0,o.AZ)(n)?(0,o.U2)(t,n):t.__data[n],e.negate&&(a=!a),a}}})),nt=[]},64575:(t,e,n)=>{"use strict";n.d(e,{c:()=>c});n(38371);function r(t,e,n){return{index:t,removed:e,addedCount:n}}const i=0,o=1,s=2,a=3;function l(t,e,n,l,c,p){let h,u=0,f=0,m=Math.min(n-e,p-c);if(0==e&&0==c&&(u=function(t,e,n){for(let r=0;r<n;r++)if(!d(t[r],e[r]))return r;return n}(t,l,m)),n==t.length&&p==l.length&&(f=function(t,e,n){let r=t.length,i=e.length,o=0;for(;o<n&&d(t[--r],e[--i]);)o++;return o}(t,l,m-u)),c+=u,p-=f,(n-=f)-(e+=u)==0&&p-c==0)return[];if(e==n){for(h=r(e,[],0);c<p;)h.removed.push(l[c++]);return[h]}if(c==p)return[r(e,[],n-e)];let g=function(t){let e=t.length-1,n=t[0].length-1,r=t[e][n],l=[];for(;e>0||n>0;){if(0==e){l.push(s),n--;continue}if(0==n){l.push(a),e--;continue}let c,d=t[e-1][n-1],p=t[e-1][n],h=t[e][n-1];c=p<h?p<d?p:d:h<d?h:d,c==d?(d==r?l.push(i):(l.push(o),r=d),e--,n--):c==p?(l.push(a),e--,r=p):(l.push(s),n--,r=h)}return l.reverse(),l}(function(t,e,n,r,i,o){let s=o-i+1,a=n-e+1,l=new Array(s);for(let t=0;t<s;t++)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;t++)l[0][t]=t;for(let n=1;n<s;n++)for(let o=1;o<a;o++)if(d(t[e+o-1],r[i+n-1]))l[n][o]=l[n-1][o-1];else{let t=l[n-1][o]+1,e=l[n][o-1]+1;l[n][o]=t<e?t:e}return l}(t,e,n,l,c,p));h=void 0;let b=[],y=e,A=c;for(let t=0;t<g.length;t++)switch(g[t]){case i:h&&(b.push(h),h=void 0),y++,A++;break;case o:h||(h=r(y,[],0)),h.addedCount++,y++,h.removed.push(l[A]),A++;break;case s:h||(h=r(y,[],0)),h.addedCount++,y++;break;case a:h||(h=r(y,[],0)),h.removed.push(l[A]),A++}return h&&b.push(h),b}function c(t,e){return l(t,0,t.length,e,0,e.length)}function d(t,e){return t===e}},64005:(t,e,n)=>{"use strict";n.d(e,{Wc:()=>c,YA:()=>d});n(38371);let r=0,i=0,o=[],s=0,a=!1,l=document.createTextNode("");new window.MutationObserver((function(){a=!1;const t=o.length;for(let e=0;e<t;e++){let t=o[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}o.splice(0,t),i+=t})).observe(l,{characterData:!0});const c={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},d={run:t=>(a||(a=!0,l.textContent=s++),o.push(t),r++),cancel(t){const e=t-i;if(e>=0){if(!o[e])throw new Error("invalid async handle: "+t);o[e]=null}}}},38371:()=>{"use strict";window.JSCompiler_renameProperty=function(t,e){return t}},23025:(t,e,n)=>{"use strict";n.d(e,{n:()=>a,z:()=>s});n(38371);const r={},i=/-[a-z]/g,o=/([A-Z])/g;function s(t){return r[t]||(r[t]=t.indexOf("-")<0?t:t.replace(i,(t=>t[1].toUpperCase())))}function a(t){return r[t]||(r[t]=t.replace(o,"-$1").toLowerCase())}},90992:(t,e,n)=>{"use strict";n.d(e,{Ex:()=>o,Jk:()=>s,dx:()=>r});n(38371),n(28091),n(64005);class r{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,i.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),i.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,n){return t instanceof r?t._cancelAsync():t=new r,t.setConfig(e,n),t}}let i=new Set;const o=function(t){i.add(t)},s=function(){const t=Boolean(i.size);return i.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}},91704:(t,e,n)=>{"use strict";n.d(e,{E:()=>r.Ex,y:()=>i});n(38371);var r=n(90992);const i=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=(0,r.Jk)()}while(t||e)}},98348:(t,e,n)=>{"use strict";n.d(e,{BP:()=>z,NH:()=>R,nJ:()=>Y,ys:()=>P});n(38371);var r=n(64005),i=n(90992),o=n(14326),s=n(46969);let a="string"==typeof document.head.style.touchAction,l="__polymerGestures",c="__polymerGesturesHandled",d="__polymerGesturesTouchAction",p=25,h=5,u=2500,f=["mousedown","mousemove","mouseup","click"],m=[0,1,4,2],g=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function b(t){return f.indexOf(t)>-1}let y=!1;function A(t){if(!b(t)&&"touchend"!==t)return a&&y&&o.f6?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){y=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let w=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const v=[],x={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},_={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function k(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];try{let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = '${t.id}']`);for(let t=0;t<r.length;t++)e.push(r[t])}}catch(t){}}return e}let C=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[c]={skip:!0},"click"===t.type)){let e=!1,r=I(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)v.push(r[t]);else if(n=r[t],x[n.localName]){let n=k(r[t]);for(let t=0;t<n.length;t++)e=e||v.indexOf(n[t])>-1}if(r[t]===B.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function E(t){let e=w?["click"]:f;for(let n,r=0;r<e.length;r++)n=e[r],t?(v.length=0,document.addEventListener(n,C,!0)):document.removeEventListener(n,C,!0)}function S(t){let e=t.type;if(!b(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!g&&(e=m[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let B={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function O(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function M(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}o.z2&&document.addEventListener("touchend",(function(t){if(!o.z2)return;B.mouse.mouseIgnoreJob||E(!0),B.mouse.target=I(t)[0],B.mouse.mouseIgnoreJob=i.dx.debounce(B.mouse.mouseIgnoreJob,r.Wc.after(u),(function(){E(),B.mouse.target=null,B.mouse.mouseIgnoreJob=null}))}),!!y&&{passive:!0});const I=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],$={},T=[];function L(t){const e=I(t);return e.length>0?e[0]:t.target}function N(t){let e,n=t.type,r=t.currentTarget[l];if(!r)return;let i=r[n];if(i){if(!t[c]&&(t[c]={},"touch"===n.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(B.touch.id=e.identifier),B.touch.id!==e.identifier)return;a||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)B.touch.x=e.clientX,B.touch.y=e.clientY,B.touch.scrollDecided=!1;else if("touchmove"===n){if(B.touch.scrollDecided)return;B.touch.scrollDecided=!0;let n=function(t){let e="auto",n=I(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[d]){e=t[d];break}return e}(t),r=!1,i=Math.abs(B.touch.x-e.clientX),o=Math.abs(B.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=o>i:"pan-y"===n&&(r=i>o)),r?t.preventDefault():j("track")}}(t)}if(e=t[c],!e.skip){for(let n,r=0;r<T.length;r++)n=T[r],i[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,o=0;o<T.length;o++)r=T[o],i[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function R(t,e,n){return!!$[e]&&(function(t,e,n){let r=$[e],i=r.deps,o=r.name,s=t[l];s||(t[l]=s={});for(let e,n,r=0;r<i.length;r++)e=i[r],w&&b(e)&&"click"!==e||(n=s[e],n||(s[e]=n={_count:0}),0===n._count&&t.addEventListener(e,N,A(e)),n[o]=(n[o]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&&z(t,r.touchAction)}(t,e,n),!0)}function P(t,e,n){return!!$[e]&&(function(t,e,n){let r=$[e],i=r.deps,o=r.name,s=t[l];if(s)for(let e,n,r=0;r<i.length;r++)e=i[r],n=s[e],n&&n[o]&&(n[o]=(n[o]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,N,A(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function D(t){T.push(t);for(let e=0;e<t.emits.length;e++)$[t.emits[e]]=t}function z(t,e){a&&t instanceof HTMLElement&&r.YA.run((()=>{t.style.touchAction=e})),t[d]=e}function H(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,(0,s.r)(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function j(t){let e=function(t){for(let e,n=0;n<T.length;n++){e=T[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function U(t,e,n,r){e&&H(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return j(t)}})}function Z(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),i=Math.abs(t.y-n);return r>=h||i>=h}function F(t,e,n){if(!e)return;let r,i=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1],s=o.x-t.x,a=o.y-t.y,l=0;i&&(r=o.x-i.x,l=o.y-i.y),H(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:s,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return function(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot&&!window.ShadyDOM;){let i=r;if(r=r.shadowRoot.elementFromPoint(t,e),i===r)break;r&&(n=r)}return n}(n.clientX,n.clientY)}})}function V(t,e,n){let r=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),o=L(n||e);!o||_[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(i)||r<=p&&i<=p||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=L(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,i=t.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||H(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}D({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){M(this.info)},mousedown:function(t){if(!S(t))return;let e=L(t),n=this;O(this.info,(function(t){S(t)||(U("up",e,t),M(n.info))}),(function(t){S(t)&&U("up",e,t),M(n.info)})),U("down",e,t)},touchstart:function(t){U("down",L(t),t.changedTouches[0],t)},touchend:function(t){U("up",L(t),t.changedTouches[0],t)}}),D({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,M(this.info)},mousedown:function(t){if(!S(t))return;let e=L(t),n=this,r=function(t){let r=t.clientX,i=t.clientY;Z(n.info,r,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&j("tap"),n.info.addMove({x:r,y:i}),S(t)||(n.info.state="end",M(n.info)),e&&F(n.info,e,t),n.info.started=!0)};O(this.info,r,(function(t){n.info.started&&r(t),M(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=L(t),n=t.changedTouches[0],r=n.clientX,i=n.clientY;Z(this.info,r,i)&&("start"===this.info.state&&j("tap"),this.info.addMove({x:r,y:i}),F(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=L(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),F(this.info,e,n))}}),D({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){S(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){S(t)&&V(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){V(this.info,t.changedTouches[0],t)}});const Y=L},24931:(t,e,n)=>{"use strict";n.d(e,{d:()=>s});n(38371);const r=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class i{constructor(t,e){a(t,e);const n=e.reduce(((e,n,r)=>e+o(n)+t[r+1]),t[0]);this.value=n.toString()}toString(){return this.value}}function o(t){if(t instanceof i)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const s=function(t,...e){a(t,e);const n=document.createElement("template");let s=e.reduce(((e,n,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof i)return o(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(n)+t[r+1]),t[0]);return r&&(s=r.createHTML(s)),n.innerHTML=s,n},a=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")}},28091:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});n(38371);let r=0;function i(){}i.prototype.__mixinApplications,i.prototype.__mixinSet;const o=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=r++;return function(r){let i=r.__mixinSet;if(i&&i[n])return r;let o=e,s=o.get(r);if(!s){s=t(r),o.set(r,s);let e=Object.create(s.__mixinSet||i||null);e[n]=!0,s.__mixinSet=e}return s}}},30623:(t,e,n)=>{"use strict";n.d(e,{AZ:()=>r,Fv:()=>c,Iu:()=>a,Jz:()=>i,SG:()=>s,U2:()=>p,jg:()=>o,t8:()=>h,wB:()=>l});n(38371);function r(t){return t.indexOf(".")>=0}function i(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function o(t,e){return 0===t.indexOf(e+".")}function s(t,e){return 0===e.indexOf(t+".")}function a(t,e,n){return e+n.slice(t.length)}function l(t,e){return t===e||o(t,e)||s(t,e)}function c(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function d(t){return Array.isArray(t)?c(t).split("."):t.toString().split(".")}function p(t,e,n){let r=t,i=d(e);for(let t=0;t<i.length;t++){if(!r)return;r=r[i[t]]}return n&&(n.path=i.join(".")),r}function h(t,e,n){let r=t,i=d(e),o=i[i.length-1];if(i.length>1){for(let t=0;t<i.length-1;t++){if(r=r[i[t]],!r)return}r[o]=n}else r[e]=n;return i.join(".")}},87893:(t,e,n)=>{"use strict";n.d(e,{T8:()=>c});n(38371);let r=!1,i=[],o=[];function s(){r=!0,requestAnimationFrame((function(){r=!1,a(i),setTimeout((function(){!function(t){for(let e=0,n=t.length;e<n;e++)l(t.shift())}(o)}))}))}function a(t){for(;t.length;)l(t.shift())}function l(t){const e=t[0],n=t[1],r=t[2];try{n.apply(e,r)}catch(t){setTimeout((()=>{throw t}))}}function c(t,e,n){r||s(),o.push([t,e,n])}},87812:(t,e,n)=>{"use strict";n.d(e,{Kk:()=>a,Rq:()=>l,iY:()=>c});n(38371);let r,i,o=/(url\()([^)]*)(\))/g,s=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function a(t,e){if(t&&s.test(t))return t;if("//"===t)return t;if(void 0===r){r=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",r="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),r)try{return new URL(t,e).href}catch(e){return t}return i||(i=document.implementation.createHTMLDocument("temp"),i.base=i.createElement("base"),i.head.appendChild(i.base),i.anchor=i.createElement("a"),i.body.appendChild(i.anchor)),i.base.href=e,i.anchor.href=t,i.anchor.href||t}function l(t,e){return t.replace(o,(function(t,n,r,i){return n+"'"+a(r.replace(/["']/g,""),e)+"'"+i}))}function c(t){return t.substring(0,t.lastIndexOf("/")+1)}},14326:(t,e,n)=>{"use strict";n.d(e,{FV:()=>o,HY:()=>f,Hr:()=>u,XN:()=>c,ZN:()=>d,a2:()=>h,dJ:()=>A,ew:()=>y,f6:()=>l,gx:()=>b,j8:()=>w,ls:()=>m,md:()=>v,my:()=>i,nL:()=>p,sM:()=>s,v1:()=>a,z2:()=>g});n(38371);var r=n(87812);const i=!window.ShadyDOM||!window.ShadyDOM.inUse,o=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),window.customElements.polyfillWrapFlushCallback,i&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})());let s=window.Polymer&&window.Polymer.rootPath||(0,r.iY)(document.baseURI||window.location.href);let a=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let l=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;let c=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;let d=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;let p=window.Polymer&&window.Polymer.legacyOptimizations||!1;let h=window.Polymer&&window.Polymer.legacyWarnings||!1;let u=window.Polymer&&window.Polymer.syncInitialRender||!1;let f=window.Polymer&&window.Polymer.legacyUndefined||!1;let m=window.Polymer&&window.Polymer.orderedComputed||!1;let g=!0;let b=window.Polymer&&window.Polymer.removeNestedTemplates||!1;let y=window.Polymer&&window.Polymer.fastDomIf||!1;let A=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let w=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;let v=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1},74546:(t,e,n)=>{"use strict";n.d(e,{jv:()=>m,lx:()=>u,uT:()=>h});var r=n(13517),i=n(87812);const o="link[rel=import][type~=css]",s="include",a="shady-unscoped";function l(t){return r.t.import(t)}function c(t){let e=t.body?t.body:t;const n=(0,i.Rq)(e.textContent,t.baseURI),r=document.createElement("style");return r.textContent=n,r}function d(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...p(e[t]));return n}function p(t){const e=l(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...f(e));const n=e.querySelector("template");n&&t.push(...h(n,e.assetpath)),e._styles=t}return e._styles}function h(t,e){if(!t._styles){const n=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let o=r[t],a=o.getAttribute(s);a&&n.push(...d(a).filter((function(t,e,n){return n.indexOf(t)===e}))),e&&(o.textContent=(0,i.Rq)(o.textContent,e)),n.push(o)}t._styles=n}return t._styles}function u(t){let e=l(t);return e?f(e):[]}function f(t){const e=[],n=t.querySelectorAll(o);for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute(a);if(n&&!t._unscopedStyle){const e=c(t);e.setAttribute(a,""),t._unscopedStyle=e}else t._style||(t._style=c(t));e.push(n?t._unscopedStyle:t._style)}}return e}function m(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=g(e[t]);return n}function g(t){let e=l(t);if(e&&void 0===e._cssText){let t=b(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=h(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}function b(t){let e="",n=f(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}},73058:(t,e,n)=>{"use strict";n.d(e,{Gd:()=>r,z2:()=>o});function r(){0}const i=[];function o(t){i.push(t)}},46969:(t,e,n)=>{"use strict";n.d(e,{r:()=>r});const r=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t},51014:(t,e,n)=>{"use strict";n.d(e,{H3:()=>i});var r=n(2414);n(24931);const i=(0,r.SH)(HTMLElement)},94002:(t,e,n)=>{"use strict";n.d(e,{XY:()=>Q,dy:()=>J.d});var r=n(82523),i=(n(50696),n(38371),n(51349)),o=n(28091);function s(t,e,n,r,i){let o;i&&(o="object"==typeof n&&null!==n,o&&(r=t.__dataTemp[e]));let s=r!==n&&(r==r||n==n);return o&&s&&(t.__dataTemp[e]=n),s}const a=(0,o.o)((t=>class extends t{_shouldPropertyChange(t,e,n){return s(this,t,e,n,!0)}})),l=(0,o.o)((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,n){return s(this,t,e,n,this.mutableData)}}));a._mutablePropertyChange=s;var c=n(14326),d=n(46969);let p=null;function h(){return p}h.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:h,writable:!0}});const u=(0,i.q)(h),f=a(u);const m=(0,i.q)(class{});function g(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(Boolean(t)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(t)r.__polymerReplaced__=document.createComment("hidden-slot"),(0,d.r)((0,d.r)(r).parentNode).replaceChild(r.__polymerReplaced__,r);else{const t=r.__polymerReplaced__;t&&(0,d.r)((0,d.r)(t).parentNode).replaceChild(r,t)}else r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=t,r._showHideChildren&&r._showHideChildren(t)}}class b extends m{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let n=this.__templatizeOptions;(t&&n.instanceProps||!n.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,n){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,n(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,n)}}_showHideChildren(t){g(t,this.children)}_setUnmanagedPropertyToNode(t,e,n){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=n:super._setUnmanagedPropertyToNode(t,e,n)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}b.prototype.__dataHost,b.prototype.__templatizeOptions,b.prototype._methodHost,b.prototype.__templatizeOwner,b.prototype.__hostProps;const y=a(b);function A(t){let e=t.__dataHost;return e&&e._methodHost||e}function w(t,e,n){let r=n.mutableData?y:b;k.mixin&&(r=k.mixin(r));let i=class extends r{};return i.prototype.__templatizeOptions=n,i.prototype._bindTemplate(t),function(t,e,n,r){let i=n.hostProps||{};for(let e in r.instanceProps){delete i[e];let n=r.notifyInstanceProp;n&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:_(e,n)})}if(r.forwardHostProp&&e.__dataHost)for(let e in i)n.hasHostProps||(n.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,n){t.__dataHost._setPendingPropertyOrPath("_host_"+e,n[e],!0,!0)}})}(i,t,e,n),i}function v(t,e,n,r){let i=n.forwardHostProp;if(i&&e.hasHostProps){const a="template"==t.localName;let l=e.templatizeTemplateClass;if(!l){if(a){let t=n.mutableData?f:u;class r extends t{}l=e.templatizeTemplateClass=r}else{const n=t.constructor;class r extends n{}l=e.templatizeTemplateClass=r}let o=e.hostProps;for(let t in o)l.prototype._addPropertyEffect("_host_"+t,l.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:x(t,i)}),l.prototype._createNotifyingProperty("_host_"+t);c.a2&&r&&function(t,e,n){const r=n.constructor._properties,{propertyEffects:i}=t,{instanceProps:o}=e;for(let t in i)if(!(r[t]||o&&o[t])){const e=i[t];for(let n=0;n<e.length;n++){const{part:r}=e[n].info;if(!r.signature||!r.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,n,r)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),a)s=l,p=o=t,Object.setPrototypeOf(o,s.prototype),new s,p=null,t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,l.prototype);const n=e.hostProps;for(let e in n)if(e="_host_"+e,e in t){const n=t[e];delete t[e],t.__data[e]=n}}}var o,s}function x(t,e){return function(t,n,r){e.call(t.__templatizeOwner,n.substring("_host_".length),r[n])}}function _(t,e){return function(t,n,r){e.call(t.__templatizeOwner,t,n,r[n])}}function k(t,e,n){if(c.XN&&!A(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(n=n||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:b)._parseTemplate(t),i=r.templatizeInstanceClass;i||(i=w(t,r,n),r.templatizeInstanceClass=i);const o=A(t);v(t,r,n,o);let s=class extends i{};return s.prototype._methodHost=o,s.prototype.__dataHost=t,s.prototype.__templatizeOwner=e,s.prototype.__hostProps=r.hostProps,s}function C(t,e){let n;for(;e;)if(n=e.__dataHost?e:e.__templatizeInstance){if(n.__dataHost==t)return n;e=n.__dataHost}else e=(0,d.r)(e).parentNode;return null}var E=n(98956);let S=!1;function B(){if(c.nL&&!c.my){if(!S){S=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}const O=(0,E._)(l((0,i.q)(HTMLElement)));customElements.define("dom-bind",class extends O{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),c.XN)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,e,n,r){this.mutableData=!0}connectedCallback(){B()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){(0,d.r)((0,d.r)(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let e=new MutationObserver((()=>{if(t=this.querySelector("template"),!t)throw new Error("dom-bind requires a <template> child");e.disconnect(),this.render()}));return void e.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let t=this.root.firstChild;t;t=t.nextSibling)this.__children[this.__children.length]=t;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});var M=n(51014),I=n(90992),$=n(91704),T=n(30623),L=n(64005);const N=l(M.H3);class R extends N{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!c.dJ,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),B()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=(0,d.r)((0,d.r)(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let n={};n[this.as]=!0,n[this.indexAs]=!0,n[this.itemsIndexAs]=!0,this.__ctor=k(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:n,forwardHostProp:function(t,e){let n=this.__instances;for(let r,i=0;i<n.length&&(r=n[i]);i++)r.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,n){if((0,T.wB)(this.as,e)){let r=t[this.itemsIndexAs];e==this.as&&(this.items[r]=n);let i=(0,T.Iu)(this.as,`${JSCompiler_renameProperty("items",this)}.${r}`,e);this.notifyPath(i,n)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,n=this.__getMethodHost();return function(){return n[e].apply(n,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let n=0;n<e.length;n++)0===t.indexOf(e[n])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=I.dx.debounce(this.__renderDebouncer,e>0?L.Wc.after(e):L.YA,t.bind(this)),(0,$.E)(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),(0,$.y)()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),n=this.__calculateLimit(e.length);this.__updateInstances(t,n,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),c.dJ&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=n;return this.__filterFn&&(e=e.filter(((e,n,r)=>this.__filterFn(t[e],n,r)))),this.__sortFn&&e.sort(((e,n)=>this.__sortFn(t[e],t[n]))),e}__calculateLimit(t){let e=t;const n=this.__instances.length;if(this.initialCount){let r;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),r=Math.max(e-n,0),this.__chunkCount=r||1):(r=Math.min(Math.max(t-n,0),this.__chunkCount),e=Math.min(n+r,t)),this.__shouldMeasureChunk=r===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,n){const r=this.__itemsIdxToInstIdx={};let i;for(i=0;i<e;i++){let e=this.__instances[i],o=n[i],s=t[o];r[o]=i,e?(e._setPendingProperty(this.as,s),e._setPendingProperty(this.indexAs,i),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(s,i,o)}for(let t=this.__instances.length-1;t>=i;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const n=(0,d.r)(e.root);for(let t=0;t<e.children.length;t++){let r=e.children[t];n.appendChild(r)}return e}__attachInstance(t,e){let n=this.__instances[t];e.insertBefore(n.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,n){let r={};return r[this.as]=t,r[this.indexAs]=e,r[this.itemsIndexAs]=n,new this.__ctor(r)}__insertInstance(t,e,n){const r=this.__stampInstance(t,e,n);let i=this.__instances[e+1],o=i?i.children[0]:this;return(0,d.r)((0,d.r)(this).parentNode).insertBefore(r.root,o),this.__instances[e]=r,r}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let n=t.slice(6),r=n.indexOf("."),i=r<0?n:n.substring(0,r);if(i==parseInt(i,10)){let t=r<0?"":n.substring(r+1);this.__handleObservedPaths(t);let o=this.__itemsIdxToInstIdx[i],s=this.__instances[o];if(s){let n=this.as+(t?"."+t:"");s._setPendingPropertyOrPath(n,e,!1,!0),s._flushProperties()}return!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return C(this.template,t)}}customElements.define(R.is,R);class P extends M.H3{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=I.dx.debounce(this.__renderDebouncer,L.YA,(()=>this.__render())),(0,$.E)(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const t=(0,d.r)(this).parentNode;t&&(t.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||(0,d.r)(t).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),B()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const t=this;let e=t._templateInfo?t:(0,d.r)(t).querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!(0,d.r)(this).querySelector("template"))throw new Error("dom-if requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}this.__template=e}return!0}__ensureInstance(){let t=(0,d.r)(this).parentNode;if(this.__hasInstance()){let e=this.__getInstanceNodes();if(e&&e.length){if((0,d.r)(this).previousSibling!==e[e.length-1])for(let n,r=0;r<e.length&&(n=e[r]);r++)(0,d.r)(t).insertBefore(n,this)}}else{if(!t)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){(0,$.y)()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),c.dJ&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}}const D=c.ew?class extends P{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(t){const e=this.__dataHost||this;if(c.XN&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const n=e._bindTemplate(this.__template,!0);n.runEffects=(t,e,n)=>{let r=this.__syncInfo;if(this.if)r&&(this.__syncInfo=null,this._showHideChildren(),e=Object.assign(r.changedProps,e)),t(e,n);else if(this.__instance)if(r||(r=this.__syncInfo={runEffects:t,changedProps:{}}),n)for(const t in e){const e=(0,T.Jz)(t);r.changedProps[e]=this.__dataHost[e]}else Object.assign(r.changedProps,e)},this.__instance=e._stampTemplate(this.__template,n),(0,d.r)(t).insertBefore(this.__instance,this)}__syncHostProperties(){const t=this.__syncInfo;t&&(this.__syncInfo=null,t.runEffects(t.changedProps,!1))}__teardownInstance(){const t=this.__dataHost||this;this.__instance&&(t._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,g(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}}:class extends P{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=k(this.__template,this,{mutableData:!0,forwardHostProp:function(t,e){this.__instance&&(this.if?this.__instance.forwardHostProp(t,e):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[(0,T.Jz)(t)]=!0))}})),this.__instance=new this.__ctor,(0,d.r)(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let e=(0,d.r)(t[0]).parentNode;if(e){e=(0,d.r)(e);for(let n,r=0;r<t.length&&(n=t[r]);r++)e.removeChild(n)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let e in t)this.__instance._setPendingProperty(e,this.__dataHost[e]);this.__instance._flushProperties()}}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}};customElements.define(D.is,D);var z=n(64575),H=n(2414);let j=(0,o.o)((t=>{let e=(0,H.SH)(t);return class extends e{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(t,e){let n=e.path;if(n==JSCompiler_renameProperty("items",this)){let n=e.base||[],r=this.__lastItems;if(t!==this.__lastMulti&&this.clearSelection(),r){let t=(0,z.c)(n,r);this.__applySplices(t)}this.__lastItems=n,this.__lastMulti=t}else if(e.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(e.value.indexSplices);else{let t=n.slice(`${JSCompiler_renameProperty("items",this)}.`.length),e=parseInt(t,10);t.indexOf(".")<0&&t==e&&this.__deselectChangedIdx(e)}}__applySplices(t){let e=this.__selectedMap;for(let n=0;n<t.length;n++){let r=t[n];e.forEach(((t,n)=>{t<r.index||(t>=r.index+r.removed.length?e.set(n,t+r.addedCount-r.removed.length):e.set(n,-1))}));for(let t=0;t<r.addedCount;t++){let n=r.index+t;e.has(this.items[n])&&e.set(this.items[n],n)}}this.__updateLinks();let n=0;e.forEach(((t,r)=>{t<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null,e.delete(r)):n++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let t=0;this.__selectedMap.forEach((e=>{e>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${e}`,`${JSCompiler_renameProperty("selected",this)}.${t++}`)}))}else this.__selectedMap.forEach((t=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${t}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${t}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(t){return this.__selectedMap.has(t)}isIndexSelected(t){return this.isSelected(this.items[t])}__deselectChangedIdx(t){let e=this.__selectedIndexForItemIndex(t);if(e>=0){let t=0;this.__selectedMap.forEach(((n,r)=>{e==t++&&this.deselect(r)}))}}__selectedIndexForItemIndex(t){let e=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${t}`];if(e)return parseInt(e.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(t){let e=this.__selectedMap.get(t);if(e>=0){let n;this.__selectedMap.delete(t),this.multi&&(n=this.__selectedIndexForItemIndex(e)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null}}deselectIndex(t){this.deselect(this.items[t])}select(t){this.selectIndex(this.items.indexOf(t))}selectIndex(t){let e=this.items[t];this.isSelected(e)?this.toggle&&this.deselectIndex(t):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(e,t),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),e):this.selected=this.selectedItem=e)}}}))(M.H3);class U extends j{static get is(){return"array-selector"}static get template(){return null}}customElements.define(U.is,U);var Z=n(22859),F=n(95),V=n(85794);const Y=new Z.ZP;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,n){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,n){},styleSubtree(t,e){Y.processStyles(),(0,F.wW)(t,e)},styleElement(t){Y.processStyles()},styleDocument(t){Y.processStyles(),(0,F.wW)(document.body,t)},getComputedStyleValue:(t,e)=>(0,F.B7)(t,e),flushCustomStyles(){},nativeCss:V.rd,nativeShadow:V.WA,cssBuild:V.Cp,disableRuntime:V.jF}),window.ShadyCSS.CustomStyleInterface=Y;var W=n(74546);const q="include",X=window.ShadyCSS.CustomStyleInterface;class G extends HTMLElement{constructor(){super(),this._style=null,X.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(q);return e&&(t.removeAttribute(q),t.textContent=(0,W.jv)(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}let K;window.customElements.define("custom-style",G),K=a._mutablePropertyChange;Boolean;var J=n(24931);const Q=(0,r.x)(HTMLElement).prototype},62398:(t,e,n)=>{"use strict";n.d(e,{$T:()=>i,CN:()=>r,mA:()=>o});const r=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,i=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,o=/@media\s(.*)/},95:(t,e,n)=>{"use strict";n.d(e,{B7:()=>o,OH:()=>s,wW:()=>i});var r=n(62398);function i(t,e){for(let n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function o(t,e){const n=window.getComputedStyle(t).getPropertyValue(e);return n?n.trim():""}function s(t){const e=r.$T.test(t)||r.CN.test(t);return r.$T.lastIndex=0,r.CN.lastIndex=0,e}},22859:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>p});let r,i=null,o=window.HTMLImports&&window.HTMLImports.whenReady||null;function s(t){requestAnimationFrame((function(){o?o(t):(i||(i=new Promise((t=>{r=t})),"complete"===document.readyState?r():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&r()}))),i.then((function(){t&&t()})))}))}const a="__seenByShadyCSS",l="__shadyCSSCachedStyle";let c=null,d=null;class p{constructor(){this.customStyles=[],this.enqueued=!1,s((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&d&&(this.enqueued=!0,s(d))}addCustomStyle(t){t[a]||(t[a]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[l])return t[l];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const n=t[e];if(n[l])continue;const r=this.getStyleForCustomStyle(n);if(r){const t=r.__appliedElement||r;c&&c(t),n[l]=t}}return t}}p.prototype.addCustomStyle=p.prototype.addCustomStyle,p.prototype.getStyleForCustomStyle=p.prototype.getStyleForCustomStyle,p.prototype.processStyles=p.prototype.processStyles,Object.defineProperties(p.prototype,{transformCallback:{get:()=>c,set(t){c=t}},validateCallback:{get:()=>d,set(t){let e=!1;d||(e=!0),d=t,e&&this.enqueueDocumentValidation()}}})},85794:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>o,WA:()=>r,jF:()=>a,rd:()=>l});const r=!(window.ShadyDOM&&window.ShadyDOM.inUse);let i,o;function s(t){i=(!t||!t.shimcssproperties)&&(r||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(o=window.ShadyCSS.cssBuild);const a=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?i=window.ShadyCSS.nativeCss:window.ShadyCSS?(s(window.ShadyCSS),window.ShadyCSS=void 0):s(window.WebComponents&&window.WebComponents.flags);const l=i},44139:(t,e,n)=>{"use strict";var r=n(62680)("ArrayBuffer.prototype.byteLength",!0),i=n(72226);t.exports=function(t){return i(t)?r?r(t):t.byteLength:NaN}},76828:(t,e,n)=>{"use strict";function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}n.d(e,{W7:()=>l,ZP:()=>r,_j:()=>a}),window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1;let i=r()?"http://localhost:3000":"https://api.creaditor.ai",o=r()?"ws://127.0.0.1:9999":"wss://gateway.creaditor.ai";const s=i+"/static/scripts",a={history:"history",fonts:"fonts",site:"sites",components:"components",skeletons:"skeletons",colors:"colors",generateCode:"sites/generateCode",log:"logs",openAi:"gpt"},l={endPoint:i,ws_url:o,render_url:r()?"http://localhost:3003/r/":"https://render.creaditor.ai/r/",agent_url:r()?"http://localhost:8000/api/v1/":"https://agent.creaditor.ai/api/v1/",static_path:s,api_url:i+"/v1/",domain:i,access_db:"access_v1"}},35210:(t,e,n)=>{"use strict";n.d(e,{R:()=>i});const r=n(80184);function i(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3;const i=r(e).getLuminance(),o=function(t,e){const n=r(e),i=r(t),o=n.getLuminance(),s=i.getLuminance();return(Math.max(o,s)+.05)/(Math.min(o,s)+.05)}(t,e);return o<n?i>.5?"#000000":"#FFFFFF":t}},40949:(t,e,n)=>{"use strict";function r(t){const e=document.createDocumentFragment();return t.forEach((function t(n){if(n instanceof HTMLElement||n instanceof SVGElement||n instanceof Comment||n instanceof DocumentFragment)e.appendChild(n);else if("string"==typeof n||"number"==typeof n){const t=document.createTextNode(n);e.appendChild(t)}else n instanceof Array&&n.forEach(t)})),e}n.d(e,{Z:()=>c});var i=n(80287);class o extends HTMLElement{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),t&&(this.props=t||{})}connectedCallback(){if(!this.isConnected)return null;const{props:t}=this;t.children instanceof HTMLElement&&this.appendChild(t.children),"string"==typeof t.children&&(this.innerHTML=t.children),"function"==typeof t.children&&this.appendChild(t.children()),"function"==typeof t.onUpdate&&t.onUpdate(this),"function"!=typeof t.onMount||this.isLoaded||(this.isLoaded=!0,t.onMount(this))}disconnectedCallback(){const{props:t}=this;"function"==typeof t.onUnMount&&t.onUnMount(this)}}customElements.get("hook-jsxelement")||customElements.define("hook-jsxelement",o);const s=o,a=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];function l(t,e,n){const o=function(t){const e=new RegExp(`^${t}$`,"i");return["path","svg","use","g"].some((t=>e.test(t)))}(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t),l=r(n);return o.appendChild(l),o._data={},Object.keys(e||{}).forEach((t=>{if("style"===t)"object"==typeof e[t]?o.style=(0,i.H)(e[t]):"string"==typeof e[t]&&o.setAttribute(t,e[t]);else if("ref"===t){if("object"==typeof e[t]&&(null===e[t].element&&(e[t].element=o),"function"==typeof e[t].onCreate&&e[t].onCreate(o),"function"==typeof e[t].onMount&&!a.find((t=>t===o.tagName.toLowerCase())))){const n=new s({onUnMount:n=>{"function"==typeof e[t].onUnMount&&e[t].onUnMount(o)},onMount:n=>{"function"!=typeof e[t].onUnMount&&n.remove(),e[t].onMount(o)}});o.appendChild(n)}}else if(e[t]&&"className"===t)o.setAttribute("class",e[t]),delete e[t];else if("htmlFor"===t)o.setAttribute("for",e[t]);else if("xlinkHref"===t)o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e[t]);else if(function(t){if(new RegExp("^on").test(t)){let e=t.replace("on","");return/[A-Z]/.test(e)}}(t)){const n=t.replace(/^on/,"").toLowerCase();"function"!=typeof e[t]||o[t.toLowerCase()]||o.addEventListener(n,e[t])}else if("dangerouslySetInnerHTML"===t&&"object"==typeof e[t]){if("string"==typeof e[t].__html)o.innerHTML=e[t].__html;else if("object"==typeof e[t].__html){const n=document.createElement("div");n.appendChild(e[t].__html),Array.from(n.childNodes).forEach((t=>{const e=t.cloneNode(!0);o.appendChild(e)}))}}else"object"==typeof e[t]&&-1!==window.location.href.indexOf("debug=1")&&-1!==window.location.href.indexOf("localhost")&&(o._data[t]=e[t]);"string"!=typeof e[t]&&"boolean"!=typeof e[t]&&"number"!=typeof e[t]||"children"===t||o.setAttribute(t,e[t])})),o}const c=function(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return"function"==typeof t?function(t,e,n){const i=Object.assign({},t.defaultProps||{},e,{children:n});let o;if(t?.prototype?.render){const e=new t(i);o=e.render,o=o.bind(e)}else o=t;const s=o(i);return"FRAGMENT"===s?r(n):s}(t,e,i):"string"==typeof t?l(t,e,i):void console.error("jsx-render does not handle "+typeof tag)}},80287:(t,e,n)=>{"use strict";function r(t){let e=[];for(const r in t)if(t.hasOwnProperty(r)){const i=t[r];e.push(`${n=r,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${i}`)}var n;return e.join(";")}n.d(e,{H:()=>r})},66331:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var r=n(7896),i=n(40949),o=n(46062),s=n.n(o),a=n(32877),l=n.n(a),c=n(96793),d=n.n(c),p=n(17892),h=n.n(p),u=n(11173),f=n.n(u),m=n(31335),g={};g.setAttributes=h(),g.insert=d().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=f();s()(m.Z,g);const b=m.Z&&m.Z.locals?m.Z.locals:void 0;var y=n(35965),A=n(9571);const w=t=>{const{children:e,className:n="",fullWidth:o,id:s,tagName:a="button"}=t;let{color:l="#f7f7f7",textColor:c="inherit",rasied:d=!1}=t;const p=s||`btn-${(0,A.Z)()}`,h=`#${p}{\n background: ${l};\n color:${c};\n }\n #${p}:hover{\n box-shadow:${d?"rgba(0, 0, 0, 0.24) 0px 3px 8px;":"none"}\n }`,u=(0,y.Z)(n,b.btn,o?b.fullWidth:""),f=`${a}`;return(0,i.Z)(f,(0,r.Z)({},t,{className:u,id:p}),e,(0,i.Z)("style",null,h))}},11961:(t,e,n)=>{"use strict";n.d(e,{x:()=>r});const r=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}]},32173:(t,e,n)=>{"use strict";n.d(e,{a:()=>f});var r=n(57701),i=n.n(r),o=n(45607),s=n(81487);class a extends HTMLElement{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),t&&(this.props=t||{})}connectedCallback(){if(!this.isConnected)return null;const{props:t}=this;t.children instanceof HTMLElement&&this.appendChild(t.children),"string"==typeof t.children&&(this.innerHTML=t.children),"function"==typeof t.children&&this.appendChild(t.children()),"function"==typeof t.onUpdate&&t.onUpdate(this),"function"!=typeof t.onMount||this.isLoaded||(this.isLoaded=!0,t.onMount(this))}disconnectedCallback(){const{props:t}=this;"function"==typeof t.onUnMount&&t.onUnMount(this)}}customElements.define("cdtr-life-cycle-dom-element",a);const l=a;var c=n(14200),d=n(70538),p=n(70235),h=n(67237),u=n(65329);const f=t=>{let{name:e,id:n,onSelect:r,focus:a,onDeselect:f,atomElement:m,droppable:g,draggable:b,allowSortable:y,childrenHolder:A,render:w,onChanges:v,resize:x,remove:_,handleBar:k,destroy:C,template:E,schema:S,createEditor:B,getRenderedHTML:O,elementProps:M,resizeable:I,commands:$={},defaultProps:T={},globalCommands:L={},validator:N}=t;if(!N)throw new Error("validator is required");if(!e)throw new Error("name is required");if(L&&"object"==typeof L&&(o.Z.globalCommands={...o.Z.globalCommands,...L}),T&&"object"==typeof T)for(const t in T)if(Object.hasOwnProperty.call(T,t)){const e=T[t];if(void 0===M.props[t])M.props[t]=e;else if(M.props[t]&&"object"==typeof M.props[t]&&T[t]&&"object"==typeof T[t]){for(const e in T[t])if(Object.hasOwnProperty.call(T[t],e)){const n=T[t][e];void 0===M.props[t][e]&&(M.props[t][e]=n)}if("style"===t&&M.props[t]){const e=M.props[t];!e.padding||void 0===e.paddingTop&&void 0===e.paddingBottom&&void 0===e.paddingLeft&&void 0===e.paddingRight||delete e.padding,!e.margin||void 0===e.marginTop&&void 0===e.marginBottom&&void 0===e.marginLeft&&void 0===e.marginRight||delete e.margin}}}if("function"==typeof m&&(m=m({props:M.props,data:M})),m&&"boolean"==typeof I&&!0===I)m.setAttribute("cdtr-resizable","true");else if("function"==typeof I){const t=I();t&&t.setAttribute("cdtr-resizable","true")}if("function"==typeof E&&(E=E({props:M.props})),!E)throw new Error("template is required");if(b&&"object"==typeof b&&b.group&&(E.setAttribute("draggable-element",b.group),b.direction&&E.setAttribute("draggable-direction",b.direction)),g&&"object"==typeof g&&g.group&&E.setAttribute("droppable-element",g.group),"boolean"==typeof k&&k){const t=document.createElement("cdtr-move-handle-bar");t.for=n,E.appendChild(t)}E.setAttribute("data-type",e),n?E.setAttribute("data-id",n):console.warn("There is no id on this element",e),m||(m=E),E.classList.add(`${e}-component`),m.dataset.id=n;const R=(0,s.Z)(E,M,N);if(R.editor=o.Z,R.commands=$||{},R.onSelect=r,R.childrenHolder=A||E,R.allowSortable=y,R.onDeselect=f,R.remove=_,R.destroy=C,R.focus=a,R.atomElement=m,R.type=e,R.schema=S,R.getRenderedHTML=O,R.commands.execCommand=(t,e)=>o.Z.store().execCommand2({transactions:[{key:t,value:e}],update:[R]}),R.commands.remove=()=>{const t=[],e=p.h.get("components",R.id),n=e.closest("block"),r=e.parent(),i=r.children.findIndex((t=>t===e.id));t.push(new c.Z({componentId:e.id,parentId:r.id,index:i})),o.Z.removeComponent({componentId:e.id});if((0,u.X)(r).forEach((e=>t.push(e))),n){(0,d.c)(n).forEach((e=>t.push(e)))}const s=document.querySelector(`.block-component[data-id="${n.id}"]`)?.dataset.id||document.querySelector(".block-component[data-id]")?.dataset.id;s&&o.Z.clean().selectComponent(p.h.get("components",s)),t.length>0&&(0,h.Z)({steps:t,force:!0,update:!0})},R.render=w,R.resize=x,"function"==typeof w){const t=new l({onMount:()=>{t.remove(),w()}});E.appendChild(t)}return"function"==typeof v&&o.Z.on("change",v),"function"==typeof B&&(R.createEditor=t=>B({component:R,props:R.props,commands:$,tools:{textEditor:i()},...t}),R.editor={render:()=>{const t=B({component:R,props:R.props,commands:$});if(t)return t.layout?t.layout:t}}),R}},1434:(t,e,n)=>{"use strict";n.d(e,{s:()=>Zt,u:()=>Vt});var r=n(7896),i=n(40949),o=(n(93339),n(35965)),s=n(33776),a=n(59320),l=n(70235),c=n(46062),d=n.n(c),p=n(32877),h=n.n(p),u=n(96793),f=n.n(u),m=n(17892),g=n.n(m),b=n(11173),y=n.n(b),A=n(35647),w={};w.setAttributes=g(),w.insert=f().bind(null,"head"),w.domAPI=h(),w.insertStyleElement=y();d()(A.Z,w);const v=A.Z&&A.Z.locals?A.Z.locals:void 0;var x=n(36546),_=n(54774),k=n.n(_),C=n(51921),E=n(45607),S=n(8441),B=n(58860),O=n(32173),M="undefined"!=typeof window?window:null,I=null===M,$=I?void 0:M.document,T="addEventListener",L="removeEventListener",N="getBoundingClientRect",R="_a",P="_b",D="_c",z="horizontal",H=function(){return!1},j=I?"calc":["","-webkit-","-moz-","-o-"].filter((function(t){var e=$.createElement("div");return e.style.cssText="width:"+t+"calc(9px)",!!e.style.length})).shift()+"calc",U=function(t){return"string"==typeof t||t instanceof String},Z=function(t){if(U(t)){var e=$.querySelector(t);if(!e)throw new Error("Selector "+t+" did not match a DOM element");return e}return t},F=function(t,e,n){var r=t[e];return void 0!==r?r:n},V=function(t,e,n,r){if(e){if("end"===r)return 0;if("center"===r)return t/2}else if(n){if("start"===r)return 0;if("center"===r)return t/2}return t},Y=function(t,e){var n=$.createElement("div");return n.className="gutter gutter-"+e,n},W=function(t,e,n){var r={};return U(e)?r[t]=e:r[t]=j+"("+e+"% - "+n+"px)",r},q=function(t,e){var n;return(n={})[t]=e+"px",n};const X=function(t,e){if(void 0===e&&(e={}),I)return{};var n,r,i,o,s,a,l=t;Array.from&&(l=Array.from(l));var c=Z(l[0]).parentNode,d=getComputedStyle?getComputedStyle(c):null,p=d?d.flexDirection:null,h=F(e,"sizes")||l.map((function(){return 100/l.length})),u=F(e,"minSize",100),f=Array.isArray(u)?u:l.map((function(){return u})),m=F(e,"maxSize",1/0),g=Array.isArray(m)?m:l.map((function(){return m})),b=F(e,"expandToMin",!1),y=F(e,"gutterSize",10),A=F(e,"gutterAlign","center"),w=F(e,"snapOffset",30),v=Array.isArray(w)?w:l.map((function(){return w})),x=F(e,"dragInterval",1),_=F(e,"direction",z),k=F(e,"cursor",_===z?"col-resize":"row-resize"),C=F(e,"gutter",Y),E=F(e,"elementStyle",W),S=F(e,"gutterStyle",q);function B(t,e,r,i){var o=E(n,e,r,i);Object.keys(o).forEach((function(e){t.style[e]=o[e]}))}function O(){return a.map((function(t){return t.size}))}function j(t){return"touches"in t?t.touches[0][r]:t[r]}function U(t){var e=a[this.a],n=a[this.b],r=e.size+n.size;e.size=t/this.size*r,n.size=r-t/this.size*r,B(e.element,e.size,this[P],e.i),B(n.element,n.size,this[D],n.i)}function X(t){var n,r=a[this.a],i=a[this.b];this.dragging&&(n=j(t)-this.start+(this[P]-this.dragOffset),x>1&&(n=Math.round(n/x)*x),n<=r.minSize+r.snapOffset+this[P]?n=r.minSize+this[P]:n>=this.size-(i.minSize+i.snapOffset+this[D])&&(n=this.size-(i.minSize+this[D])),n>=r.maxSize-r.snapOffset+this[P]?n=r.maxSize+this[P]:n<=this.size-(i.maxSize-i.snapOffset+this[D])&&(n=this.size-(i.maxSize+this[D])),U.call(this,n),F(e,"onDrag",H)(O()))}function G(){var t=a[this.a].element,e=a[this.b].element,r=t[N](),s=e[N]();this.size=r[n]+s[n]+this[P]+this[D],this.start=r[i],this.end=r[o]}function K(t){var e=function(t){if(!getComputedStyle)return null;var e=getComputedStyle(t);if(!e)return null;var n=t[s];return 0===n?null:n-=_===z?parseFloat(e.paddingLeft)+parseFloat(e.paddingRight):parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)}(c);if(null===e)return t;if(f.reduce((function(t,e){return t+e}),0)>e)return t;var n=0,r=[],i=t.map((function(i,o){var s=e*i/100,a=V(y,0===o,o===t.length-1,A),l=f[o]+a;return s<l?(n+=l-s,r.push(0),l):(r.push(s-l),s)}));return 0===n?t:i.map((function(t,i){var o=t;if(n>0&&r[i]-n>0){var s=Math.min(n,r[i]-n);n-=s,o=t-s}return o/e*100}))}function J(){var t=this,n=a[t.a].element,r=a[t.b].element;t.dragging&&F(e,"onDragEnd",H)(O()),t.dragging=!1,M[L]("mouseup",t.stop),M[L]("touchend",t.stop),M[L]("touchcancel",t.stop),M[L]("mousemove",t.move),M[L]("touchmove",t.move),t.stop=null,t.move=null,n[L]("selectstart",H),n[L]("dragstart",H),r[L]("selectstart",H),r[L]("dragstart",H),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor="",$.body.style.cursor=""}function Q(t){if(!("button"in t)||0===t.button){var n=this,r=a[n.a].element,i=a[n.b].element;n.dragging||F(e,"onDragStart",H)(O()),t.preventDefault(),n.dragging=!0,n.move=X.bind(n),n.stop=J.bind(n),M[T]("mouseup",n.stop),M[T]("touchend",n.stop),M[T]("touchcancel",n.stop),M[T]("mousemove",n.move),M[T]("touchmove",n.move),r[T]("selectstart",H),r[T]("dragstart",H),i[T]("selectstart",H),i[T]("dragstart",H),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",i.style.userSelect="none",i.style.webkitUserSelect="none",i.style.MozUserSelect="none",i.style.pointerEvents="none",n.gutter.style.cursor=k,n.parent.style.cursor=k,$.body.style.cursor=k,G.call(n),n.dragOffset=j(t)-n.end}}_===z?(n="width",r="clientX",i="left",o="right",s="clientWidth"):"vertical"===_&&(n="height",r="clientY",i="top",o="bottom",s="clientHeight"),h=K(h);var tt=[];function et(t){var e=t.i===tt.length,n=e?tt[t.i-1]:tt[t.i];G.call(n);var r=e?n.size-t.minSize-n[D]:t.minSize+n[P];U.call(n,r)}return(a=l.map((function(t,e){var r,i={element:Z(t),size:h[e],minSize:f[e],maxSize:g[e],snapOffset:v[e],i:e};if(e>0&&((r={a:e-1,b:e,dragging:!1,direction:_,parent:c})[P]=V(y,e-1==0,!1,A),r[D]=V(y,!1,e===l.length-1,A),"row-reverse"===p||"column-reverse"===p)){var o=r.a;r.a=r.b,r.b=o}if(e>0){var s=C(e,_,i.element);!function(t,e,r){var i=S(n,e,r);Object.keys(i).forEach((function(e){t.style[e]=i[e]}))}(s,y,e),r[R]=Q.bind(r),s[T]("mousedown",r[R]),s[T]("touchstart",r[R]),c.insertBefore(s,i.element),r.gutter=s}return B(i.element,i.size,V(y,0===e,e===l.length-1,A),e),e>0&&tt.push(r),i}))).forEach((function(t){var e=t.element[N]()[n];e<t.minSize&&(b?et(t):t.minSize=e)})),{setSizes:function(t){var e=K(t);e.forEach((function(t,n){if(n>0){var r=tt[n-1],i=a[r.a],o=a[r.b];i.size=e[n-1],o.size=t,B(i.element,i.size,r[P],i.i),B(o.element,o.size,r[D],o.i)}}))},getSizes:O,collapse:function(t){et(a[t])},destroy:function(t,e){tt.forEach((function(r){if(!0!==e?r.parent.removeChild(r.gutter):(r.gutter[L]("mousedown",r[R]),r.gutter[L]("touchstart",r[R])),!0!==t){var i=E(n,r.a.size,r[P]);Object.keys(i).forEach((function(t){a[r.a].element.style[t]="",a[r.b].element.style[t]=""}))}}))},parent:c,pairs:tt}};let G;const K="is_resize_on_proggress",J=t=>{const e=l.h.get(K);if(e)return;G&&!e&&(G.destroy(),G=null);let n=l.h.get("components",t.id).children.map((t=>l.h.get("components",t))).filter((t=>"col"===t.type));if(n=n.map((t=>t.element)),n.length<2)return;let r=0,i=[],o=[];for(let t=0;t<n.length;t++){const e=n[t];r+=parseInt(e.getAttribute("lg"))}if(r>12)return;const s=t.element.getBoundingClientRect().width;Array.from(n).forEach((t=>{const e=t.getBoundingClientRect();i.push(e.width)})),i=i.map((t=>Math.floor(function(t,e,n){const r=Math.abs((e-t)/e*100-100);return n?Math.round(r):r}(t,s))));if(i.reduce(((t,e)=>t+e),0)>100){const t=100/n.length;i=i.map((e=>t))}return G=new X(n,{sizes:i,minSize:100,gutterSize:0,dragInterval:2,snapOffset:10,onDrag:(t,e)=>{if((t=t.map((t=>Math.round(t/8)))).reduce(((t,e)=>t+e),0)>12){let e=t[0],n=0;for(var r=0;r<t.length;r++)n<t[r]&&(e=r,n=t[r]);t[e]=t[e]-1}n.forEach(((e,n)=>{e.setAttribute("lg",t[n])})),o=t},onDragStart:function(){l.h.set({[K]:!0})},onDragEnd:function(t){if(l.h.set({[K]:!1}),G&&(G.destroy(),G=null),!o)return;const e=[];Array.from(n).forEach((t=>{const n=l.h.get("components",t.dataset.id);n&&e.push(n)}));if(e.length!==n.length)return void console.error("cant find all the components,..");const r=[];E.Z.clean(),e.forEach(((t,e)=>{var n=o[e];r.push(new S.Z({componentId:t.id,key:"lg",value:n}))})),E.Z.store().execCommands(r)}}),{split:G,destroy:()=>{G&&(G.destroy(),G=null)}}};let Q;const tt=t=>{const e=new a.Z;t.props.justify||(t.props.justify="center"),t?.props?.style?.backgroundImage&&delete t.props.style.backgroundImage,t?.props?.lg?.style&&(t.props.style={...t.props.style,...t.props.lg.style}),t.props.style.margin="0 auto";const c=(0,o.Z)("block-component",t.classList,v.main),d={type:t.type,"data-type":t.type,"data-id":t.id},p=(0,i.Z)("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:"100%",overflow:"hidden",opacity:t.opacity||1,zIndex:-1}}),h=(0,i.Z)("div",{"data-for":t.id,"data-type":t.type,className:(0,o.Z)(v.container),style:{width:"100%",justifyContent:t.props.justify}},t.children);function u(t){const e=()=>{const e=document.createElement(t.component);p.appendChild(e),(0,s.Z)(e,t.properties)};for(;p.firstChild;)p.firstChild.remove();t&&(t.installed?e():t.component&&("cdtr-media-player"===t.component&&(t.component="cdtr-background-video"),n(26831)(`./${t.component}`).then((t=>{e()}))))}t.background?u(t.background):t.background={};const f=()=>{h.classList.add(v.dragging)};B.Z.subscribe("elements:draggable:start",f),B.Z.subscribe("elements:draggable:end",(()=>{h.classList.remove(v.dragging)}));const m=(0,i.Z)("div",(0,r.Z)({},d,{"droppable-element":t.type,"droppable-direction":"top,bottom",className:c,"data-type":t.type,"data-id":t.id}),h,t.elements,p);if("menu"===t.as){const e=(0,i.Z)("div",{className:v.draggableHeightTitle},(0,i.Z)("span",null,t.style.marginBottom||0)),n=(0,i.Z)("div",{className:v.draggableHolder},e);m.appendChild(n),m.classList.add(v.menu),t.style.marginBottom&&(n.style.height=t.style.marginBottom)}const g=new C.ZP(h,{handle:".col-handle",draggable:".col-component",animation:300,onChoose:()=>{Q&&(Q.destroy(),Q=null),l.h.set({isResizeBlockOn:!0}),E.Z.getEditor().filter((t=>"text"===t.type)).forEach((t=>"function"==typeof t.editor.setEditable&&t.editor.setEditable(!1)))},onEnd:t=>{const e=t.item,n=e.dataset.id,r=t.to.dataset.for,i=t.from.dataset.for,o=t.oldIndex,s=t.newIndex;l.h.set({isResizeBlockOn:!1}),E.Z.getEditor().filter((t=>"text"===t.type)).forEach((t=>"function"==typeof t.editor.setEditable&&t.editor.setEditable(!0)));const a={componentId:n,newParentId:r,oldParentId:i,newAfterElId:e.nextSibling?.dataset.id,newPreviousElId:e.previousSibling?.dataset.id,oldIndex:o,newIndex:s,type:x.W.MOVE};E.Z.moveComponent(a)}}),b=()=>{try{Q=J(A)}catch(t){console.error(t)}};m.addEventListener("mouseover",b);m.addEventListener("mouseleave",(()=>{l.h.get("isResizeBlockOn")||Q&&Q.destroy()}));const y={set:(t,e,n)=>{switch(e){case"expand_image_for_outlook":case"noResponsive":return t[e]=n,!0;case"background":return t[e]=n,u(n),!0;case"style":return t[e]=k()(t[e],n),!0;default:return!1}}},A=(0,O.a)({id:t.id,name:t.type,globalCommands:{},schema:t.schema,validator:y,allowSortable:!0,childrenHolder:h,template:m,elementProps:t,defaultProps:{justify:"center"},commands:{compareCols:()=>{e.run((()=>{(()=>{const t=A.get();if(!t)return;if(!Array.isArray(t.children))return;const e=t.children,n=[];e.forEach((t=>{const e=l.h.get("components",t);if(e){const t=e.find("card");t&&(t.element.style.minHeight=null,n.push(t))}}));let r,i=0;n.forEach((t=>{const e=t.element.getBoundingClientRect();e.height>i&&(i=e.height,r=t)})),1!==n.length||"none"===n[0].props.style.minHeight?n.forEach((t=>{if(r){const e=r.element.getBoundingClientRect(),n=t.element.getBoundingClientRect(),o=i-n.height,s=Math.round(n.height+o)+"px";t.props.lg||(t.props.lg={}),t.props.lg.style||(t.props.lg.style={}),t.props.lg.style.minHeight!==s&&e.top===n.top&&E.Z.updateComponent(t,"lg",{style:{minHeight:s}}),t.element.style.minHeight=s}})):E.Z.updateComponent(n[0],"lg",{style:{minHeight:"none"}})})()}))},fixCols:()=>{const t=[],e=[];Array.from(A.childrenHolder.children).forEach((e=>{e.classList.contains("col-component")&&t.push(e)}));const n=Math.floor(12/t.length);return t.forEach(((t,r)=>{const i=l.h.get("components",t.dataset.id);i&&e.push(new S.Z({componentId:i.id,key:"lg",value:n}))})),Q&&(Q.destroy(),Q=null,b()),{sizes:e}}},destroy:()=>{g&&g.destroy(),B.Z.unSubscribe("elements:draggable:start",f),m.removeEventListener("mouseover",b)},remove:()=>{m.remove()},onSelect:t=>{m.classList.add(t)},onDeselect:t=>{m.classList.remove(t)},onChanges:()=>{A.isInDom()&&function t(){const e=A.get().props;if(e.expand_image_for_outlook)if(e.background&&e.background.properties&&e.background.properties.src){const n=document.createElement("img"),r=m.getBoundingClientRect();n.width=r.width,n.style.height="auto",n.src=e.background.properties.src,document.body.appendChild(n),n.addEventListener("load",(()=>{if(0===n.height)return t();const e=n.height;m.style.minHeight=e+"px",n.remove()}))}else m.style.minHeight="auto"}()},render:()=>{if((0,s.Z)(m,{style:A.props.style}),A.props.expand_image_for_outlook){const t=document.createElement("img");t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.width=A.props.style.width,t.style.height="auto",t.src=A.props.background.properties.src,document.body.appendChild(t),t.onload=()=>{const e=window.getComputedStyle(t);m.style.minHeight=e.height,t.remove()}}else m.style.minHeight="auto"}});return A};n(64721);var et=n(73501),nt={};nt.setAttributes=g(),nt.insert=f().bind(null,"head"),nt.domAPI=h(),nt.insertStyleElement=y();d()(et.Z,nt);et.Z&&et.Z.locals&&et.Z.locals;n(23602);var rt=n(941),it={};it.setAttributes=g(),it.insert=f().bind(null,"head"),it.domAPI=h(),it.insertStyleElement=y();d()(rt.Z,it);rt.Z&&rt.Z.locals&&rt.Z.locals;var ot=n(21009),st=n(81487);var at=n(46807),lt={};lt.setAttributes=g(),lt.insert=f().bind(null,"head"),lt.domAPI=h(),lt.insertStyleElement=y();d()(at.Z,lt);const ct=at.Z&&at.Z.locals?at.Z.locals:void 0,dt=t=>{new a.Z;const e=(0,o.Z)("iframe-component",t.classList,ct.main);t.style.display||(t.style.display="block"),t.style.margin||(t.style.margin="auto");const n=()=>(0,i.Z)("div",{className:(0,o.Z)(ct.emptyIframeHolder,"placeholder")},(0,i.Z)("cdtr-col",{lg:"12",md:"12",sm:"12"},(0,i.Z)("h1",{align:"center"},(0,i.Z)("lang-text",{text:"this_is_empty_iframe_start_add_url_link"}))),(0,i.Z)("cdtr-col",{sm:"12",lg:"12",md:"12"},(0,i.Z)("cdtr-input",{onChange:t=>E.Z.store().execCommand("src",t.target.value),style:"text-align:left;direction:ltr;width:290px;",placeholder:"https://",autoFocus:"true"}))),r=(0,i.Z)("iframe",{src:t.src,style:t.style},c),l=(0,i.Z)("cdtr-row",{style:{height:"100%"},alignItems:t.props.alignItems,justify:t.justify||"center"},(0,i.Z)("div",{style:{position:"relative",maxWidth:"100%",height:"100%",width:"100%"}},r,(0,i.Z)("cdtr-move-handle-bar",{for:t.id}))),c=(0,i.Z)("cdtr-col",{"data-id":t.id,"draggable-element":"element","droppable-element":"element",className:e},l,t.props.src?null:n()),d={set:(t,e,i)=>{switch(e){case"src":return t[e]=i,(0,s.Z)(r,{src:i}),r.onload=()=>{const t=c.querySelector(".placeholder"),e=r.getBoundingClientRect();i&&!t&&e.width>500?c.appendChild(n()):i&&t?t.remove():!i&&t||!i&&!t&&e.width>500&&c.appendChild(n())},r.onerror=()=>{(0,s.Z)(r,{src:""})},!0;case"style":return t[e]=k()(t[e],i),(0,s.Z)(r,{style:t[e]}),!0;default:return!1}}},p=(0,st.Z)(c,t,d);return p.onSelect=t=>{c.classList.add(t)},p.remove=()=>{c.remove()},p.onDeselect=t=>{c.classList.remove(t)},p};var pt=n(56666),ht=n(21293);const ut=t=>new Proxy(t,{}),ft=t=>{const e=new a.Z,n=(0,i.Z)("cdtr-background-element",(0,r.Z)({onDelete:()=>{(0,ot.rZ)(t.id,"backgrounds").then((e=>{if(e&&e.data&&e.data.id){const r=n.closest(`[_id='${e.data.id}']`);r&&(0,ot.v7)(t.id,r.id,"backgrounds")}}))}},t));return{element:n,props:ut(t,{set:(r,i,o)=>{switch(i){case"backgroundVideo":return r[i]=o,(0,s.Z)(n,{backgroundVideo:o}),e.run((()=>{(0,ot.KL)(t.id,"backgroundVideo",o)})),!0;case"is_removed":return(0,s.Z)(n,{is_removed:o}),!0;case"style":return r[i]=k()(r[i],o),(0,s.Z)(n,{style:r[i]}),e.run((()=>{(0,ot.KL)(t.id,"style",r[i])})),!0;default:return!1}}})}};class mt extends ht.oi{constructor(){super(),this.items=[{text:l.h.get("lang","edit_background")},{text:l.h.get("lang","delete_bcakground"),value:"delete"}]}render(){return ht.dy`<vaadin-context-menu
35
35
  @item-selected=${t=>{"delete"===t.detail.value.value&&this.dispatchEvent(new CustomEvent("delete"),{})}}
36
36
  .items=${this.items}
37
37
  >
38
- ${this.backgroundVideo?ft.dy` ${this.backgroundVideo}<cdtr-background-video
38
+ ${this.backgroundVideo?ht.dy` ${this.backgroundVideo}<cdtr-background-video
39
39
  style="z-index:1"
40
40
  videoPath=${this.backgroundVideo}
41
41
  ></cdtr-background-video>`:null}
42
- </vaadin-context-menu>`}}(0,ut.Z)(bt,"properties",{id:{type:String},backgroundVideo:{type:String,reflect:!0}}),(0,ut.Z)(bt,"styles",ft.iv`
42
+ </vaadin-context-menu>`}}(0,pt.Z)(mt,"properties",{id:{type:String},backgroundVideo:{type:String,reflect:!0}}),(0,pt.Z)(mt,"styles",ht.iv`
43
43
  :host {
44
44
  display: block;
45
45
  }
@@ -51,7 +51,7 @@
51
51
  width: 100%;
52
52
  position: absolute;
53
53
  }
54
- `),customElements.define("cdtr-background-element",bt);var yt=n(91426),At={};At.setAttributes=g(),At.insert=f().bind(null,"head"),At.domAPI=h(),At.insertStyleElement=y();d()(yt.Z,At);const wt=yt.Z&&yt.Z.locals?yt.Z.locals:void 0,vt=t=>{new a.Z;const e=(0,o.Z)("row-component",t.classList,wt.root),n=(0,i.Z)("cdtr-row",{justify:"center",style:t.props.style,"data-type":t.type,"data-id":t.id,className:e},t.children),r={set:(t,e,r)=>"style"===e&&(t[e]=r,(0,s.Z)(n,{style:t[e]}),!0)};return(0,I.a)({id:t.id,name:t.type,allowSortable:!0,validator:r,template:n,childrenHolder:n,elementProps:t,destroy:()=>{},remove:()=>{n.remove()},onSelect:t=>{},onDeselect:t=>{}})};var xt=n(14043),_t={};_t.setAttributes=g(),_t.insert=f().bind(null,"head"),_t.domAPI=h(),_t.insertStyleElement=y();d()(xt.Z,_t);const kt=xt.Z&&xt.Z.locals?xt.Z.locals:void 0;n(66331),n(67237);const Ct=t=>{let{event:e,compose:n}=t;const{key:r,target:i,ctrlKey:o}=e;if(o){const t=n.closest("col");if(!t)return;const e=t.props.justify;"ArrowLeft"===r?"flex-end"===e?B.j.store().execCommand("justify","center",{find:"col"}):B.j.store().execCommand("justify","flex-start",{find:"col"}):"ArrowRight"===r&&("flex-start"===e?B.j.store().execCommand("justify","center",{find:"col"}):B.j.store().execCommand("justify","flex-end",{find:"col"}));const i=B.j.getEditor().find((t=>"resizeable"===t.name));i&&i.editor.rePosition()}};n(43214);const Et=t=>{const{children:e,bottomSpacing:s="20px",editor:c}=t,d=(new a.Z,(0,o.Z)("menu-component",t.classList,kt.main)),p=(t.props,(0,i.Z)("cdtr-menu-editor",{style:{width:"100%"}}));p.onChangeText=(e,n,r)=>{const i=p.items.findIndex((t=>t.id===r.id));if(r){const n=JSON.parse(JSON.stringify(p.items));n[i].text=e,c.store().execCommand2({transactions:[{key:"items",value:n,type:t.type}]})}};const h=e=>{if(e&&e.editor&&Array.isArray(e.editor.components)){if(!e.editor.components.find((e=>e.id===t.id))&&Array.isArray(p.items)){const t=[...p.items];t.forEach((t=>t.selected=!1)),p.items=t}}};n.e(7302).then(n.t.bind(n,87302,23)).then((()=>{c.on("select",h),p.spacing="20px",p.translates={add:l.h.get("lang","add"),placeholder:"...",remove:l.h.get("lang","remove"),info:l.h.get("lang","drag_to_move_click_to_options")},p.onFocus=()=>{p.focused=!0},p.onBlur=(t,e)=>{p.focused=!1},p.justify=t.justify,p.items=t.props.items,p.onAdd=(t,e)=>{if(p.items.length>8)throw new Error("now the limit is 8");t.text="";const n=[...p.items];n.forEach((t=>t.selected=!1)),n.length>0&&(t.style=n[0].style,t.selected=!0),n.unshift(t),c.store().execCommand("items",n)},p.onRemove=t=>{const e=JSON.parse(JSON.stringify(p.items)),n=e.findIndex((e=>e.id===t.id));-1!==n&&(e.splice(n,1),c.store().execCommand("items",e))},p.onSort=t=>{c.store().execCommand("items",t)},p.onSelect=t=>{const e=[...p.items],n=e.find((e=>e.id===t.id));n&&(e.forEach((t=>t.selected=!1)),n.selected=!0),p.items=e,b.props.items=e}}));const u=(0,i.Z)("cdtr-move-handle-bar",{className:(0,o.Z)(kt.handle)}),f=(0,i.Z)("cdtr-row",{alignItems:"center",style:{height:"100%"},justify:"flex-start"},(0,i.Z)("div",{style:{width:"100%"}},p)),m=(0,i.Z)("div",{"data-type":t.type,"data-id":t.id,"draggable-element":"element",style:{width:"100%"}},u,(0,i.Z)("nav",(0,r.Z)({},t,{className:d}),f)),g={set:(e,n,r)=>{switch(n){case"style":return e[n]=k()(e[n],r),t.props.style=r,!0;case"items":return p.items=r,e[n]=r,!0;case"justify":return e[n]=r,p.justify=r,!0;default:return!1}}},b=(0,lt.Z)(m,t,g);return b.onKeyUp=Ct,b.onSelect=e=>{m.classList.add(e),u.setAttribute("for",t.id)},b.destroy=()=>{c.off("select",h)},b.remove=()=>{m.remove()},b.onDeselect=t=>{m.classList.remove(t)},b};var St=n(43824),Bt=n(51679);const Ot=t=>{let{item:e,index:n}=t;B.Z.components.forEach((t=>{if("form"===t.type){const r=t.props.items;t.props.items[n]&&"button"!==t.props.items[n].type&&n++;let i=null,o={},s={};const a=r.find((t=>"input"===t.type)),l=r.find((t=>t?.props?.label_field));switch(a&&a.props.style&&(s=a.props.style),l&&l&&l?.props?.label_field?.props.style&&(o=l.props.label_field.props.style),e.type){case"input":["type","id","name","paramName","inputType"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Bt.Z)(e,{fieldStyle:s,labelStyle:o});break;case"textarea":["type","id","name","paramName"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Bt.Z)(e,{labelStyle:o,fieldStyle:s});break;case"checkbox":case"toggle":["type","id","name","paramName"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Bt.Z)(e,{labelStyle:o});break;case"radio-group":if(["type","id","name","paramName","items"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),!Array.isArray(e.items))throw new Error("'array of items' is required");if(e.items.length>10)throw new Error("'items' should not be more than 10");e.items.forEach((t=>{["label","value"].forEach((e=>{if(!t[e])throw new Error(`'${e}' is required`)})),t={id:t.id||null,label:t.label||t.name,value:t.value}})),i=(0,Bt.Z)(e,{labelStyle:o});break;case"menu":case"dropdown":if(["type","id","name","paramName","items"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),!Array.isArray(e.items))throw new Error("'array of items' is required");if(e.items.length>150)throw new Error("'items' should not be more than 10");e.items.forEach((t=>{["value"].forEach((e=>{if(!t[e])throw new Error(`'${e}' is required`)})),t={id:t.id||null,name:t.label||t.name,value:t.value}})),i=(0,Bt.Z)(e,{labelStyle:o});break;default:return void console.warn("unknown type in form creator.")}r.splice(n>r.length?r.length-1:n,0,i),B.Z.store().updateComponent(t,"items",r)}}))};var Mt=n(99366),It={};It.setAttributes=g(),It.insert=f().bind(null,"head"),It.domAPI=h(),It.insertStyleElement=y();d()(Mt.Z,It);const $t=Mt.Z&&Mt.Z.locals?Mt.Z.locals:void 0;var Tt=n(31490);function Lt(t){const{props:e,commands:r,justify:o,items:s,editor:a,store:l,schema:c}=t,{style:d,classList:p=[]}=e;t.automations||(t.automations={});const h=(0,i.Z)("div",null,(0,i.Z)("cdtr-block-loader",null),(0,i.Z)("cdtr-title",null,(0,i.Z)("lang-text",{text:"please_wait_downloading_new_version"}))),u=(0,i.Z)("cdtr-form-builder",{className:$t.form},h);n.e(6724).then(n.t.bind(n,6724,23)).then((()=>{h.remove(),u.style.outlineOffset="10px",u.style.display="block",u.language=l.get("config","language"),u.autoComplete="off",u.spacing=2,u.theme={palette:{primary:{main:"#845EC2"}}},u.formStyle=t.style,u.onSelectField=(t,e)=>{const n=[...u.items];l.get("ctrlKey")?n[t].selected=!n[t].selected:(n.forEach((t=>t.selected=!1)),n[t].selected=!0),u.items=n,a.dispatch("update")},u.onSortEnd=t=>{let{items:e}=t;a.store().updateComponent(v,"items",e)},u.items=t.items}));const f=(0,i.Z)("cdtr-move-handle-bar",null),m=(0,i.Z)("cdtr-editor-bar",{opened:!1,direction:"left",offsetY:60,componentId:t.id},(0,i.Z)("cdtr-tooltip",{content:"form:manage_fields"},(0,i.Z)("paper-button",{class:$t.button,onClick:()=>y()},(0,i.Z)("cdtr-icon",{width:"36",height:"36",icon:"createField"}))),(0,i.Z)("cdtr-tooltip",{content:"design_form"},(0,i.Z)("paper-button",{onClick:()=>{const t=v.closest("card");t&&a.clean().selectComponent(t)},class:$t.button},(0,i.Z)("cdtr-icon",{width:"36",height:"36",icon:"designForm"})))),g=(0,i.Z)("div",{"data-type":t.type,"data-id":t.id,"draggable-element":"element","droppable-element":"element",style:{width:"100%"},className:p.concat("form-component").join(" ")},u,f,m),b={set:(t,e,n)=>{switch(e){case"onSubmit":return u.onSubmit=t[e],!0;case"items:v":return u.items=[],t[e]=r.cloneDeep(n),u.items=t[e],!0;case"items":return r.debounce((()=>{u.items=[],t[e]=r.cloneDeep(n),u.items=t[e]}),10),!0;case"automations":return t[e]=r.deepMerge(t[e],n),!0;case"style":return t[e]=r.deepMerge(t[e],n),u.formStyle=t[e],!0;default:return!0}}};m.opened=!1;const y=()=>{const e=t.schema.configure.fields,n=(0,i.Z)("cdtr-drawer",{backdropColor:"#000000a1",width:"400px",style:{direction:"var(--direction-locale)"}});n.opened=!0,n.headerText="available_fields",document.body.appendChild(n);const r={fields:e.map((t=>{const e=u.items.find((e=>e.id===t.id));return t.inserted=!!e,t})),onChange:(t,e,n)=>{const r=u.items.findIndex((e=>e.id===t.id));if(e&&-1===r){const e=u.items.findIndex((t=>t.selected))||u.items.length-1;Ot({item:t,index:e})}else if(-1!==r){const t=[...u.items];if(t[r]&&"button"===t[r].type)return;t.splice(r,1),a.updateComponent(v,"items",t)}}},o=t=>{(0,ft.sY)((0,Tt.Z)({items:t,onChange:r.onChange,debounce:t=>{let{target:e}=t;const n=e.value,i=r.fields.filter((t=>-1!==t.name.indexOf(n)));o(i)}}),n)};o(r.fields),n.addEventListener("close",(()=>{n.remove()}),{once:!0})},A=function(t){let{debounce:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a.components.forEach((e=>{if("form"===e.type){const n=JSON.parse(JSON.stringify(e.props.items));let r=0;const i=()=>{r=n.length};for(;r<n.length;r++){const o=n[r];o.props.label_field||(o.props.label_field={props:{inline:!1,style:{},text:""}}),o.props.label_field.props||(o.props.label_field={props:{inline:!1,style:{},text:""}}),o.props.label_field.props.style||(o.props.label_field.props.style={}),"menu"!==o.type&&"dropdown"!==o.type||(o.props.triggerProps||(o.props.triggerProps={}),o.props.triggerProps.style||(o.props.triggerProps.style={})),t(o,{stop:i,items:n,compose:e})}a.store().updateComponent(e,"items",n)}}))};let w=!1;const v=(0,I.a)({name:"form",id:t.id,template:g,atomElement:u,defaultProps:{style:{},classList:[],items:[]},schema:c,onSelect:t=>{m.opened=!0,m.componentId=v.closest("card")?.id},onDeselect:t=>{m.opened=!1},elementProps:t,createEditor:t=>{let{component:e,props:n,commands:r,helpers:i}=t;const o={BUTTONS:["button"],INPUTS:["input","textarea"],TOGGLES:["radio-group","checkbox","toggle"],MENUS:["dropdown","menu"]},s=e.props.items?.find((t=>t.selected));if(!s)return{};function l(){return c?.configure?.mailingLists.map((t=>({...t,value:t.label})))}return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"list-settings"},{text:"automations"},{text:"settings"}];return e.forEach((e=>e.selected=e.text===t)),e},layout:t=>{let{tab:n,changeTab:r,tabs:d}=t;const p=[{type:"heading",level:4,text:s.type},{type:"input",title:"text:button",active:"button"===s.type,value:s.props.text,onInput:t=>{const e=t.target.value;A((t=>{t.selected&&"button"===t.type&&(t.props.text=e)}),{debounce:!0})}},{type:"input",title:"label",active:"button"!==s.type&&("design"===n.text||"list-settings"===n.text),value:s?.props?.label_field?.props?.text,onInput:t=>{const e=t.target.value;A((t=>{t.selected&&"button"!==t.type&&(t.props.label_field.props.text=e)}),{debounce:!0})}},{type:"input",title:"placeholder",active:o.INPUTS.includes(s.type)&&["list-settings","design"].includes(n.text),value:s.props.placeholder,onInput:t=>{const e=t.target.value;A((t=>{o.INPUTS.includes(t.type)&&t.selected&&"button"!==t.type&&(t.props.placeholder=e)}),{debounce:!0})}},{type:"checkbox",title:"checkbox_checked_as_default",checked:s.props.checked,active:["toggle","checkbox"].includes(s.type)&&"list-settings"===n.text,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&o.TOGGLES.includes(t.type)&&(t.props.checked=e)}))}},{type:"checkbox",title:"checkbox_on_right_side",checked:!0===s.props.labelPlacement,active:"checkbox"===s.type&&"list-settings"===n.text,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&"checkbox"===t.type&&(t.props.labelPlacement=e?"start":"end")}))}},{type:"stringListBuilder",title:"items_in_menu",active:(o.MENUS.includes(s.type)||"radio-group"===s.type)&&"list-settings"===n.text,items:s.props.items,changeItemValue:(t,e,n)=>{A((n=>{n!==s&&n.id!==s.id||(n.props.items[t].label=e)}))}},{type:"option",text:"advance_setting",active:"design"===n.text,onClick:()=>{r("list-settings")}},{type:"divider",active:"design"===n.text},{type:"fontFamily",active:"design"===n.text,value:s?.props?.style?.fontFamily||s?.props?.label_field?.props?.style.fontFamily,onChange:t=>{const e=t.target.value;(0,St.TL)({cssRule:e}),e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.fontFamily=e:o.TOGGLES.includes(s.type)&&s.id===t.id?(t.props.label_field.props.style.fontFamily=e,t.props.style.fontFamily=e):[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.fontFamily=e:(t.props.label_field.props.style.fontFamily=e,t.props.style.fontFamily=e))}),{debounce:!0})}},{type:"slider",title:"fontSize",max:30,min:8,active:"design"===n.text,value:parseInt(s.props?.style.fontSize)||parseInt(s?.props?.label_field?.props?.style.fontSize)||16,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.fontSize=e:(o.TOGGLES.includes(s.type)&&s.id===t.id||[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type))&&(t.props.label_field.props.style.fontSize=e)}),{debounce:!0})}},{type:"colorpicker",title:"component_color",active:()=>"design"===n.text&&o.TOGGLES.includes(s?.type),value:s.props?.style.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.TOGGLES.includes(s.type)&&s.id===t.id&&(t.props.style.color=e)}),{debounce:!0})}},{type:"colorpicker",title:"color:label",active:"design"===n.text,value:s.props?.label_field?.props?.style?.color||s.props?.style.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.color=e:(o.TOGGLES.includes(s.type)&&s.id===t.id||[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type))&&(t.props.label_field.props.style.color=e)}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"typography",active:"design"===n.text,bold:700===s.props?.style?.fontWeight||700===s.props?.label_field?.props?.style?.fontWeight,italic:"italic"===s.props?.style?.fontStyle||"italic"===s.props?.label_field?.props.style?.fontStyle,underline:"underline"===s.props?.style?.textDecoration||"underline"===s.props?.label_field?.props?.style?.textDecoration,onChange:t=>{function e(e){switch(t){case"bold":e.fontWeight=null===e.fontWeight?700:null;break;case"italic":e.fontStyle=null===e.fontStyle?"italic":null;break;case"underline":e.textDecoration="underline"===e.textDecoration?null:"underline"}}A((t=>{"checkbox"===s.type?t.selected&&"checkbox"===t.type&&e(t.props.label_field.props.style):t.selected&&"button"===s.type&&"button"===t.type?e(t.props.style):"button"!==s.type&&"button"!==t.type&&(!t.selected||"menu"!==t.type&&"dropdown"!==t.type?t.selected&&e(t.props.label_field.props.style):e(t.props.label_field.props.style))}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"colorpicker",title:"button"===s.type?"background":"form:background",active:"design"===n.text&&-1!==[...o.BUTTONS,...o.INPUTS,...o.MENUS].indexOf(s.type),value:s.props?.triggerProps?.style?.background||s.props?.style?.background,onChange:t=>{const e=t.target.value;e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.background=e:[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.background=e:t.props.style.background=e)}))}},{type:"colorpicker",title:"form:placeholder_color",active:"design"===n.text&&-1!==[...o.INPUTS,...o.MENUS].indexOf(s.type),value:s.props?.style?.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.INPUTS.includes(t.type)&&o.INPUTS.includes(s.type)?t.props.style.color=e:o.MENUS.includes(t.type)&&o.MENUS.includes(s.type)&&(t.props.triggerProps.style.color=e)}),{debounce:!0})}},{type:"slider",title:"height",max:70,min:20,active:"design"===n.text&&["input",...o.MENUS,...o.BUTTONS].includes(s.type),value:parseInt(s.props.style.minHeight)||parseInt(s?.props?.triggerProps?.style.minHeight)||40,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?(delete t.props.style.height,t.props.style.minHeight=e):[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.minHeight=e:delete t.props.style.height,t.props.style.minHeight=e)}),{debounce:!0})}},{type:"slider",title:"radius",max:50,min:0,active:"design"===n.text&&[...o.INPUTS,...o.MENUS,...o.BUTTONS].includes(s.type),value:parseInt(s?.props?.style.borderRadius)||parseInt(s?.props?.triggerProps?.style?.borderRadius)||0,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.borderRadius=e:[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.borderRadius=e:t.props.style.borderRadius=e)}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"dropdown",title:"type",value:s.props.type,active:()=>"input"===s.type&&"list-settings"===n.text,selected:s.props.type,items:c.types.find((t=>"input"===t.name))?.types.map((t=>new Object({key:t,value:t}))),onChange:t=>{const e=t.target.value;A((t=>{"input"===s.type&&t.selected&&"input"===t.type&&(t.props.type=e)}),{debounce:!0})}},{type:"input",title:"default_value",active:()=>"input"===s.type&&"list-settings"===n.text,value:s.props.value,onInput:t=>{const e=t.target.value;A((t=>{!t.selected||"input"!==t.type&&"menu"!==t.type&&"dropdown"!==t.type&&"textarea"!==t.type||(t.props.value=e)}),{debounce:!0})}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"checkbox",title:"required",info:"required_form_field_info",checked:s.props.isRequired,controlled:!1,active:"list-settings"===n.text&&"button"!==s.type,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&(t.props.isRequired=e)}))}},{type:"checkbox",title:"hidden_field",info:"hidden_form_field_info",checked:s.props.isHidden,controlled:!1,active:"list-settings"===n.text&&"button"!==s.type,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&(t.props.isHidden=e)}))}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"input",max:1024,title:"url_param",active:"list-settings"===n.text&&"button"!==s.type,value:s.props.paramName,onInput:t=>{let{target:e}=t,n=e.value;n=n.trim().replace(/\s/g,"_"),n=n.replace(/\//g,""),n=n.replace(/\\/g,""),n=n.replace(/[^a-zA-Z0-9_\-]/g,"");A(((t,r)=>{let{stop:i,items:o}=r;o.find((t=>t.paramName===n))||t.selected&&"button"!==t.type&&(t.props.paramName=e.value=n,i())}))}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"dropdown",title:"after_submission",active:()=>(w=!!e?.props?.automations?.when?.submitted?.then?.redirect?.url,"automations"===n.text),selected:e?.props?.automations?.when?.submitted?.then?.redirect?.url?"redirect":"stay_at_page",value:w?"redirect":"stay_at_page",items:[{value:"stay_at_page",key:"stay_at_page"},{value:"redirect",key:"redirect",selected:!!e?.props?.automations?.when?.submitted?.then?.redirect?.url}],onChange:t=>{"redirect"===t.target.value?(w=!0,r("automations")):(w=!1,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:null}}}}}),options:{find:"form"}}),r("automations"))}},{type:"input",title:"where_to_redirect",max:1024,value:e?.props?.automations?.when?.submitted?.then?.redirect?.url||"",active:!0===w&&"automations"===n.text,autofocus:!1==!!e?.props?.automations?.when?.submitted?.then?.redirect?.url,onChange:t=>{let{target:e}=t;const n=e.value,r=new i.Url(n);if(""===r.href)return w=!1,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:null}}}}}),options:{find:"form"}});w=!0,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:r.href}}}}}),options:{find:"form"}})}},{type:"checkbox",title:"forward_params",checked:e?.props?.automations?.when?.submitted?.then?.redirect?.forward_params||!1,active:!0===w&&"automations"===n.text,onChange:t=>{let{target:e}=t;const n=e.checked;return a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{forward_params:n}}}}}),options:{find:"form"}})}},{type:"divider",active:!0===w&&"automations"===n.text},{type:"chipsInput",removeable:!1,active:"automations"===n.text,title:"add_user_from_mailinglist_after_subscribed",onCreate:()=>{c?.configure?.mailingListEvents?.create({name:"hello",resolve:()=>{},reject:()=>{}})},onChange:t=>{const n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists,r=n.findIndex((e=>e.key===t.key));-1!==r?n.splice(r,1):n.push({key:t.key}),a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{add:{to:{mailingLists:n}}}}}}),options:{find:"form"}})}else a.store().execCommands({key:"automations",value:e=>i.deepMerge(e.props.automations,{when:{submitted:{then:{add:{to:{mailingLists:[{key:t.key}]}}}}}}),options:{find:"form"}})},list:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const e=t;return n.forEach((t=>{const n=e.find((e=>e.key===t.key));n&&(n.inserted=!0)})),e}return[...t]}(),items:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const e=[];return n.forEach((n=>{const r=t.find((t=>t.key===n.key));r&&(r.inserted=!0,e.push(r))})),e}return[]}()},{type:"chipsInput",removeable:!1,active:"automations"===n.text,title:"remove_user_from_mailinglist_after_subscribed",onChange:t=>{const n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists,r=n.findIndex((e=>e.key===t.key));-1!==r?n.splice(r,1):n.push({key:t.key}),a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{remove:{from:{mailingLists:n}}}}}}),options:{find:"form"}})}else a.store().execCommands({key:"automations",value:e=>i.deepMerge(e.props.automations,{when:{submitted:{then:{remove:{from:{mailingLists:[{key:t.key}]}}}}}}),options:{find:"form"}})},list:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const e=t;return n.forEach((t=>{const n=e.find((e=>e.key===t.key));n&&(n.inserted=!0)})),e}return t}(),items:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const e=[];return n.forEach((n=>{const r=t.find((t=>t.key===n.key));r&&(r.inserted=!0,e.push(r))})),e}return[]}()},{type:"input",max:1024,active:"automations"===n.text,value:e?.props?.automations?.when?.submitted?.then?.sendParams?.url,placeholder:"URL...",title:"send_the_data_to",onInput:t=>{let{target:e}=t;const n=e.value,r={method:"post",url:new i.Url(n).href,type:"http"};a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{sendParams:r}}}}),options:{find:"form"}})}},{type:"stringListBuilder",title:"send_mail_on_submitted",active:"automations"===n.text,placeholder:"example@email.com",inputType:"email",items:e?.props?.automations?.when?.submitted?.then?.sendMail?.to||[],changeItemValue:(t,e,n)=>{a.store().execCommands({key:"automations",value:n=>{let r=n?.props?.automations?.when?.submitted?.then?.sendMail;if(r)return r.to[t]=e,i.deepMerge(n.props.automations,{when:{submitted:{then:{sendMail:r}}}})},options:{find:"form"}})},onRemove:(t,e)=>{a.store().execCommands({key:"automations",value:e=>{let n=e?.props?.automations?.when?.submitted?.then?.sendMail;if(n)return n.to.splice(t,1),i.deepMerge(e.props.automations,{when:{submitted:{then:{sendMail:n}}}})},options:{find:"form"}})},onAddItem:()=>{a.store().execCommands({key:"automations",value:t=>{let e=t?.props?.automations?.when?.submitted?.then?.sendMail;if(e||(e={to:[],html:"",text:"",subject:"",from:""}),!(e.to.length>3||e.to&&e.to.length>0&&""===e.to[e.to.length-1].trim()))return e.to.push(""),i.deepMerge(t.props.automations,{when:{submitted:{then:{sendMail:e}}}})},options:{find:"form"}})},onChange:(t,e,n)=>{a.store().execCommands({key:"automations",value:n=>{const r=n.props.automations.when.submitted.then.sendMail;return r.to[t]=e,i.deepMerge(n.props.automations,{when:{submitted:{then:{sendMail:r}}}})},options:{find:"form"}})}}];return p}}},commands:{select:t=>{m.opened=!0},deSelect:t=>{m.opened=!1},deSelectedField:()=>{u.items.forEach((t=>{t.selected=!1})),v.props.items=u.items}},globalCommands:{},remove:()=>{g.remove()},destroy:()=>{},validator:b});return v}var Nt=n(70143),Rt=n(96206),Pt=n.n(Rt),Dt=n(1670),zt=n(13185),Ht=n.n(zt);const jt={deepMerge:k(),mergeDiff:s.Z,deepEqual:Ht(),cloneDeep:Pt(),arrayToString:o.Z},Ut=t=>{const{type:e,children:n,props:c}=t,d={mergeDiff:s.Z,deepMerge:k(),isRtl:Nt.Z,arrayToString:o.Z,cloneDeep:Pt(),isImage:Dt.Z,debounce:(new a.Z).run,snackbar:t=>M.Z.dispatch("snackbar",{text:t})},p={...t,...c,commands:d,editor:B.Z,store:l.h},h={block:()=>(0,i.Z)(nt,p,n),row:()=>(0,i.Z)(vt,p,n),"menu-widget":()=>(0,i.Z)(Et,p,n),background:()=>(0,i.Z)(gt,p),form:()=>{const t=l.h.get("config","editor");if(t&&t.configure&&t.configure.plugins){const e=t.configure.plugins.find((t=>"form"===t.name));return(0,i.Z)(Lt,(0,r.Z)({schema:e},p),n)}},iframe:()=>(0,i.Z)(ht,p)};if(h[e])return"function"==typeof h[e]?h[e]():h[e];{let n=l.h.get("config","editor","configure","plugins"),r=l.h.get("config","channel");const i=n.find((t=>t.name===e));if(i&&i.name&&i.lazy&&"function"==typeof i.lazy){const o=i=>{const o=n.findIndex((t=>t.name===e));-1===o&&console.error("cant find the scheme on resolving component",e);const s=i.create({compose:p,createElement:I.a,helpers:jt,channel:r});s.type=e,s.createEditor&&(n[o].createEditor=s.createEditor),"function"==typeof i.menu&&(n[o].menu=i.menu);try{const c=l.h.get("components",t.id);if(!c)return console.error("cant get the element on lazy loading..","#8l#$f"),null;function d(){c.element.parentElement&&c.element.parentElement.replaceChild(s.element,c.element),c.element.remove()}"cdtr-block-loader"===c.element.localName&&(c.element.onLoad=()=>{d()},c.element.isLoaded&&d())}catch(h){console.error(h,e)}const a=l.h.get("components");a[t.id]=s,l.h.set({components:a})};return i.lazy(o),{name:i.name,id:t.id,element:(()=>{const e=document.createElement("cdtr-block-loader");return e.setAttribute("data-component-type",t.type),e})()}}if(i&&i.create){const t=i.create({compose:p,createElement:I.a,helpers:jt,channel:r});return t.type=e,t&&"object"==typeof t&&"function"==typeof t.createEditor&&(i.createEditor=t.createEditor),t}}};var Zt=n(27017);const Ft=t=>{(t=>{t.props&&(t.props.interactions||(t.props.interactions=[]),void 0===t.props.show_on_desktop&&(t.props.show_on_desktop=!0),void 0===t.props.show_on_tablet&&(t.props.show_on_tablet=!0),void 0===t.props.show_on_mobile&&(t.props.show_on_mobile=!0))})(t);const{props:e,element:n,id:r,extend:i,parentId:o,__children:s,__elements:a}=t,c=l.h.get("components");-1!==window.location.href.indexOf("localhost")&&(window.components=c);const d={id:r,...t,props:e,children:s||[],elements:a||[]};c[r]=d},Vt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=n=>{if(!n||n.is_removed)return;if(n.props||(n.props={}),"string"==typeof n)return n;n._id&&(n.id=n._id),t.id&&(n.parentId=t.id),n.children&&(n.__children=[...n.children].map((t=>{if(t)return t.id||t._id}))),n.elements&&(n.__elements=[...n.elements].map((t=>{if(t)return t.id||t._id})));const{children:o,elements:s}=Vt(n,e);n.props.style&&"object"==typeof n.props.style&&Object.keys(n.props.style).forEach((t=>{null!==n.props.style[t]&&void 0!==n.props.style[t]||delete n.props.style[t]}));const a=(0,i.Z)(Ut,(0,r.Z)({},n,{elements:s,"data-id":n.id,"data-type":n.type,silent:e.silent}),o);if(a&&!0!==e.slient)Ft({...n,...a});else if(!a)return console.error("this is un resolve compose..",n,n.type),null;return a.element};return"object"==typeof t&&(t=JSON.parse(JSON.stringify(t))),t.children&&(t.children=t.children.map(n)),t.elements&&(t.elements=t.elements.map(n)),t},Yt=(t,e)=>{if("text"===t&&"string"==typeof e)try{return JSON.parse(e)}catch(t){(0,Zt.H)({error_code:"#11jhb",info:t,msg:"cant parsed text using transformValues function",s:"E"})}return e},Wt=t=>{t.forEach((t=>{t.props||(t.props={}),t.props.style||(t.props.style={}),t.id||(t._id?(t.id=t._id,console.log("id created from _id",t.id)):console.error("component must have id")),t._id||(t._id=t.id)}));let e=t.findIndex((t=>"root"===t.type));-1===e&&(e=t.findIndex((t=>"section"===t.type)));const n={};let r;-1!==e&&([r]=t.splice(e,1),n.rootComponent=r);const i=e=>{if(e)return Array.isArray(e.children)&&e.children.length>0&&(e.children_ids=e.children,e.children=e.children.map((e=>{if(Array.isArray(e))return;if(!e)return;const r=t.find((t=>t._id===e));n(r);const o=i(r);return o&&o.children&&(r.children=o.children),o&&o.elements&&(r.elements=o.elements),r}))),Array.isArray(e.elements)&&e.elements.length>0&&(e.elements=e.elements.map((r=>{const o=t.find((t=>t._id===r));n(o);const s=i(o);return s&&s.elements&&(o.elements=s.elements),s&&s.children&&e.children.length>0&&(o.children=s.children),o}))),e;function n(t){[()=>{t&&"text"===t.type&&t.props&&"object"==typeof t.props&&t.props.text&&"string"==typeof t.props.text&&(t.props.text=Yt("text",t.props.text))},t=>{t&&"form"===t.type&&Array.isArray(t.props.items)&&t.props.items.forEach((t=>{const e=t?.props?.style?.fontFamily;e&&(0,St.TL)({cssRule:e})}))},t=>{if(t&&t.props&&t.props.style&&t.props.style.fontFamily){const e=t.props.style.fontFamily;e&&(0,St.TL)({cssRule:e})}}].forEach((e=>e(t)))}};if(r){const t=i(r);t.children&&(r.children=t.children)}return r}},64721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(40949);n(70235),n(45607);const i=t=>{{const{component:e,commands:n,helpers:r}=t;return e.props.style||(e.props.style={}),{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;return[{type:"divider"},{type:"slider",title:"height",active:()=>"design"===r.text,min:50,max:500,value:parseInt(e.props.style.minHeight),onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}},{type:"divider"},{type:"colorpicker",title:"backgroundColor",value:e.props.style.background||e.props.style.backgroundColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e,backgroundColor:null})}},{type:"divider"},{type:"justifyContent",value:e?.props.justify||"flex-start",active:()=>"design"===r.text,onChange:t=>{const e=t.target.value;n.execCommand("justify",e,{find:"col"})}},{type:"alignItems",title:"alignItems",active:()=>"design"===r.text,value:e?.props.alignItems||"flex-start",onChange:t=>{const e=t.target.value;n.execCommand("alignItems",e,{find:"col"})}},{type:"spacingPicker",active:()=>"design"===r.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(e?.props?.style?.paddingTop)||parseInt(e?.props?.style?.padding)||0,bottom:parseInt(e?.props?.style?.paddingBottom)||parseInt(e?.props?.style?.padding)||0,left:parseInt(e?.props?.style?.paddingLeft)||parseInt(e?.props?.style?.padding)||0,right:parseInt(e?.props?.style?.paddingRight)||parseInt(e?.props?.style?.padding)||0},onChange:t=>{const e=t.target.value;n.execCommand("style",{padding:e+"px"},{find:"col"})}}]}}}},o=t=>{let{helpers:e,template:n,row:r}=t;return{set:(t,e,r)=>{switch(e){case"style":case"justify":case"alignItems":return t[e]=r,!0;case"md":case"sm":case"lg":case"xl":t[e]=r,n.setAttribute(e,r);return 0===parseInt(r)?(n.removeAttribute("lg"),n.removeAttribute("xl")):(n.setAttribute("lg",r),n.setAttribute("xl",r)),!0;default:return!1}}}};var s=n(46062),a=n.n(s),l=n(32877),c=n.n(l),d=n(96793),p=n.n(d),h=n(17892),u=n.n(h),f=n(11173),m=n.n(f),g=n(37059),b={};b.setAttributes=u(),b.insert=p().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=m();a()(g.Z,b);const y=g.Z&&g.Z.locals?g.Z.locals:void 0;n(58860);var A=n(84817),w=n(59320),v=n(78529);const x=()=>({name:"col",create:t=>{const{createElement:e,compose:n,helpers:s}=t,{children:a,backgrounds:l,commands:c}=n,{mergeDiff:d,arrayToString:p}=c;n.props.justify||(n.props.justify="center");const h=new w.Z,u={element:t=>n.props.style};A.ZP.use((0,v.Z)());let f=A.ZP.createStyleSheet(u,{link:!0}).attach();f.update();const m=p("col-component",y.root,n.classList,f.classes.element),g=(0,r.Z)("cdtr-row",null,a),b=(0,r.Z)("cdtr-row",{className:p("row-of-col",y.row)},g),x=(0,r.Z)("cdtr-col",{className:m},b);x.setAttribute("droppable-direction","left,right");n.editor.on("update",(()=>{h.run((()=>{const t=x.parentElement;t&&"block"===t.dataset.type?x.setAttribute("droppable-element","col"):x.removeAttribute("droppable-element")}))})),x.setAttribute("draggable-direction","left,right"),x.setAttribute("lg",n.props.lg),n.props||(n.props={});const _=e({name:"col",id:n.id,template:x,handleBar:!0,draggable:{group:"col"},render:()=>{_.props.justify&&(g.justify=_.props.justify,b.justify=_.props.justify),_.props.style||(_.props.style={}),_.props.style.height?b.style.height=_.props.style.height:b.style.height="",_.props.style.minHeight?b.style.minHeight=_.props.style.minHeight:b.style.minHeight="",_.props.alignItems&&(b.alignItems=_.props.alignItems),_.props.lg;{const t=parseInt(_.props.lg);0===t?(x.removeAttribute("lg"),x.removeAttribute("xl")):(x.setAttribute("lg",t),x.setAttribute("xl",t))}s.mergeDiff(x,{style:n.props.style})},childrenHolder:b,allowSortable:!0,defaultProps:{},validator:o({template:x,helpers:s,row:b}),schema:n.schema,onSelect:t=>{x.classList.add(t)},onDeselect:t=>{x.classList.remove(t)},elementProps:n,remove:()=>{x.remove()},createEditor:i});return _}})},93339:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(7896),i=n(40949),o=n(35965),s=n(51921),a=(n(36546),n(46062)),l=n.n(a),c=n(32877),d=n.n(c),p=n(96793),h=n.n(p),u=n(17892),f=n.n(u),m=n(11173),g=n.n(m),b=n(47224),y={};y.setAttributes=f(),y.insert=h().bind(null,"head"),y.domAPI=d(),y.insertStyleElement=g();l()(b.Z,y);const A=b.Z&&b.Z.locals?b.Z.locals:void 0;var w=n(58860),v=n(45607);var x=n(32173);const _=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;n.text||e("design")},tabs:t=>{const e=[{text:"design"},{text:"settings"}];return t?(e.forEach((e=>e.selected=e.selected=e.text===t)),e):e},layout:t=>{const{tab:r,changeTab:i,tabs:o}=t;return[{type:"colorpicker",title:"backgroundColor",value:e.props.style.background||e.props.style.backgroundColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e,backgroundColor:null})}}]}}}},k=()=>({name:"section",create:t=>(t=>{const{mergeDiff:e,deepMerge:n}=t.helpers,a=t.compose;a.props.style.minHeight||(a.props.style.minHeight="100px"),a.props.style.width="100%";const l=(0,o.Z)("section-component",a.classList,A.section),c=(0,i.Z)("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:"100%",overflow:"hidden",opacity:a.opacity||1}}),d=(0,i.Z)("div",{style:{minHeight:"50px"},className:(0,o.Z)("sortable-element--with-section",A.layerBlock),"data-id":a.id},a.children);a.bottomStyle||(a.bottomStyle={},a.bottomStyle.style={height:0});const p=()=>(0,i.Z)("div",{className:A.placeholder},(0,i.Z)("h3",null,(0,i.Z)("lang-text",{text:"empty_section_info"})),(0,i.Z)("div",null,(0,i.Z)("paper-button",{onMouseUp:()=>{w.Z.dispatch("open_add_menu",{type:"block-component"})},style:"color:var(--primary)"},(0,i.Z)("lang-text",{text:"click_here_to_add"})))),h=(0,i.Z)("section",(0,r.Z)({},a,{"droppable-element":a.type,"droppable-direction":"top,bottom","droppable-if":"empty","droppable-level":"5","droppable-bottom":"lastChild",className:l}),c,d,a.elements);a.props.alignItems&&(d.style.justifyContent=a.props.alignItems),0===d.children.length&&h.appendChild(p());const u=()=>{setTimeout((()=>{const t=h.querySelector(`.${A.placeholder}`),e=d.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||h.appendChild(p()))}),0)};v.Z.on("update",(()=>u())),u();let f,m,g=(0,i.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');const b=new s.ZP(d,{group:"block-component",animation:300,handle:".block-handle--sortable",draggable:".block-component",easing:"cubic-bezier(1, 0, 0, 1)",onStart:t=>{document.body.appendChild(g);const e=t.item;f=e.previousSibling?.dataset.id,m=e.nextSibling?.dataset.id},onEnd:function(t){g.remove();const e=t.item.dataset.id,n=t.to.dataset.id,r=t.from.dataset.id,i=t.oldIndex;let o=t.newIndex;v.Z.store().moveComponent({componentId:e,newParentId:n,oldParentId:r,oldIndex:i,newIndex:o,direction:o>i?"bottom":"top"})}}),y={set:(t,r,i)=>{switch(r){case"bottomStyle":return t[r]=n(t[r],i),e(marginBottomEl,{style:t[r].style}),!0;case"alignItems":return t[r]=i,d.style.justifyContent=i,!0;case"opacity":return t[r]=i,c.style.opacity=i,!0;case"style":return t[r]=n(t[r],i),e(h,{style:t[r]}),!0;case"is_removed":return e(h,{is_removed:i}),!0;default:return!1}}};return(0,x.a)({id:a.id,name:"section",template:h,allowSortable:!0,schema:a.schema,draggable:{group:"section",direction:"top,bottom"},render:()=>{},destroy:()=>{"function"==typeof b.destroy&&b.destroy(),v.Z.off("update",(()=>u()))},remove:()=>{h.remove()},onSelect:t=>{h.classList.add(t)},onDeselect:t=>{h.classList.remove(t)},elementProps:a,validator:y,createEditor:_,commands:{},defaultProps:{},childrenHolder:d})})(t)})},45607:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C,j:()=>k});var r=n(64603),i=n(67237),o=n(81929),s=(n(21009),n(85731)),a=n(97278),l=n(70235),c=n(9571),d=n(1434);n(36546);class p{constructor(t){let{componentId:e,parentId:n,index:r,layer:i}=t;this.componentId=e,this.parentId=n,this.index=r,this.type="ADD",this.layer=i}}var h=n(49721),u=n(14200),f=n(7910),m=n(8441),g=n(59320),b=n(27017),y=n(70538),A=n(52278);const w=class{constructor(t,e,n,r,i){this.component=t,this.color=e,this.userId=n,this.name=r,this.componentId=i,this.borderElement=null,this.isDestroyed=!1,this.createBorder(),this.updatePosition(),this.attachListeners()}createBorder(){this.borderElement=document.createElement("div"),this.borderElement.style.position="absolute",this.borderElement.style.pointerEvents="none",this.borderElement.style.border=`2px solid ${this.color}`,this.borderElement.style.zIndex="0",this.borderElement.style.transition="all 0.01s ease-out",document.body.appendChild(this.borderElement),this.labelElement=document.createElement("div"),this.labelElement.textContent=this.name,this.labelElement.style.position="absolute",this.labelElement.style.pointerEvents="none",this.labelElement.style.backgroundColor=this.color,this.labelElement.style.color="#fff",this.labelElement.style.padding="2px 6px",this.labelElement.style.fontSize="11px",this.labelElement.style.fontWeight="500",this.labelElement.style.borderRadius="3px",this.labelElement.style.zIndex="0",this.labelElement.style.whiteSpace="nowrap",this.labelElement.style.transition="all 0.01s ease-out",this.labelElement.style.boxShadow="0 1px 3px rgba(0,0,0,0.2)",document.body.appendChild(this.labelElement),this.updatePosition()}updatePosition(){if(this.isDestroyed||!this.component.element)return;const t=this.component.element.getBoundingClientRect();if(this.borderElement.style.top=t.top+"px",this.borderElement.style.left=t.left+"px",this.borderElement.style.width=t.width+"px",this.borderElement.style.height=t.height+"px",this.labelElement){const e=t.top-20,n=e<0?t.top+2:e;this.labelElement.style.top=n+"px",this.labelElement.style.left=t.left+t.width/6+"px"}}attachListeners(){this.boundUpdatePosition=this.updatePosition.bind(this),window.addEventListener("scroll",this.boundUpdatePosition,!0),window.addEventListener("resize",this.boundUpdatePosition),this.mutationObserver=new MutationObserver(this.boundUpdatePosition),this.component.element&&this.mutationObserver.observe(this.component.element,{attributes:!0,attributeFilter:["style","class"]})}remove(){this.isDestroyed=!0,window.removeEventListener("scroll",this.boundUpdatePosition,!0),window.removeEventListener("resize",this.boundUpdatePosition),this.mutationObserver&&this.mutationObserver.disconnect(),this.borderElement&&this.borderElement.parentNode&&this.borderElement.parentNode.removeChild(this.borderElement),this.labelElement&&this.labelElement.parentNode&&this.labelElement.parentNode.removeChild(this.labelElement),this.borderElement=null,this.labelElement=null,this.component=null}};let v=[];window.location.href.indexOf("DEBUG=1"),window.__trace__=[];const x=(t,e)=>{t&&(e(t),t.children&&t.children.forEach((t=>{x(t,e)})))},_=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;l.h.get("error","status")||n(70717)(`./${t}`).then((()=>{l.h.set({error:{status:t}}),window.__show_errors=!0;const e=document.createElement(`cdtr-${t}`);document.body.appendChild(e)}))};const k=new class{constructor(t){let{editors:e}=t;this.debounder=new g.Z,this.configure={},this.app=new r.Z,this.transactions_to_sync=[],this.undoRedo=o.Z,this.templates={},this.commands={goToError:_,logError:b.H},this.wsService={send:t=>{console.warn("ws not connected yet, please wait..",t)}},window.transactions=this.transactions={},this.withSnapshot=!1,this.editors=[],this.__elements={},this.changes=[],this.globalCommands={bodyWalk:x},this.serverOn=!1,this.reconnectAttempts=0,this.maxReconnectAttempts=10,this.reconnectDelay=1e3,this.reconnectTimer=null,this.wsConnectionProps=null,this.isReconnecting=!1,this.wasConnected=!1,this.lastSyncTimestamp=Date.now(),this.disconnectedAt=null,this.maxDisconnectTime=3e5,this.connectWithCloud=t=>{if(t&&"object"==typeof t){const{sessionId:e,avatar:n,name:r}=t,i=(0,c.Z)();e||_(401),this.connectToWSServer({userId:i,sessionId:e,avatar:n,name:r,onOpen:()=>{this.serverOn=!0,this.app.dispatch("ws-loaded",{editor:this})}})}},e&&e.forEach((t=>this.addEditor(t))),this.type,this.components=[],this.undoRedo.on("ON_REDO",(()=>setTimeout((()=>{this.updateAll()}),200))),this.undoRedo.on("ON_UNDO",(()=>setTimeout((()=>{this.updateAll()}),200))),this.undoRedo.on("ON_SNAPSHOT",(t=>{let{deletedSteps:e}=t;Array.isArray(e)&&e.forEach((t=>{t&&Array.isArray(t.stack)&&t.stack.forEach((t=>{if("CREATE"===t.type||"REMOVE"===t.type){const e=this.getComponent(t.componentId);console.log("should destroyed",e),t.__type=t.type;const n=[{componentId:t.componentId,__type:t.type,index:t.index,type:"PREMANENTLY:DELETE"}];console.log("PREMANENTLY:DELETE",n)}}))}))}))}syncWithServer(t){l.h.get("config","savedDebounce");this.transactions_to_sync.push(...t),this.debounder.run((()=>{this.updateAll([...this.transactions_to_sync]),Array.isArray(window.__trace__)&&window.__trace__.push({transactions:[...this.transactions_to_sync]}),this.transactions_to_sync.forEach((t=>{delete t.newValue,delete t.oldValue}));const t={transactions:[...this.transactions_to_sync],transactionId:(0,c.Z)(),created_at:Date.now()};if(this.transactions[t.transactionId]=[...this.transactions_to_sync],this.serverOn){const e=JSON.stringify(t);if(this.wsService.readyState===WebSocket.OPEN)try{this.wsService.send(e),console.trace("transactions sent",t.transactions.length),this.transactions_to_sync=[],this.transactions[t.transactionId]=[]}catch(t){(0,b.H)({msg:"There is Error on sync data with the server",info:e,error_code:"#c4ca4",s:"E"}),console.warn("error on syncing, sent:",e),_()}else(0,b.H)({msg:"ws cant connected",s:"E",info:{connection:this.wsService.readyState},error_code:"#c4ca9"}),console.warn("ws not connected"),_()}}))}updateAll(t){if(t){t.forEach((t=>{const e=this.getComponent(t.componentId);if(e){const t=(e.atomElement||e.element).getBoundingClientRect();e.props.rect=t,e.props.width=t.width,e.props.height=t.height}else console.error("cant find component on updateAll: #$mvbaem3i",t)}))}this.app.dispatch("update",{editor:this}),v.forEach((t=>{t.borderSelected.updatePosition()}));const e=l.h.get("config","editor","props","onSave");"function"==typeof e&&e({transactions:t,toJson:A.au,toJSON:A.au,toHTML:A.io})}dispatch(t,e){return this.app.dispatch(t,e),this}on(t,e){this.app.subscribe(t,e)}off(t,e){switch(t){case"update":this.app.unSubscribe("update",e);break;case"select":this.app.unSubscribe("select",e)}}attemptReconnect(){if(this.disconnectedAt){if(Date.now()-this.disconnectedAt>this.maxDisconnectTime)return console.error("%cDisconnected too long, reload required","color:red"),this.isReconnecting=!1,l.h.set({wsConnection:{status:"failed",message:"Disconnected for too long. Please reload the page to ensure data sync."}}),void _("updateNeeded")}if(this.reconnectAttempts>=this.maxReconnectAttempts)return console.error("%cMax reconnection attempts reached","color:red"),this.isReconnecting=!1,l.h.set({wsConnection:{status:"failed",message:"Unable to reconnect to server"}}),void _(500);this.reconnectAttempts++;const t=1===this.reconnectAttempts?0:Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-2),3e4);0===t?console.log(`%cAttempting to reconnect immediately (${this.reconnectAttempts}/${this.maxReconnectAttempts})`,"color:orange"):console.log(`%cAttempting to reconnect (${this.reconnectAttempts}/${this.maxReconnectAttempts}) in ${t}ms`,"color:orange"),l.h.set({wsConnection:{status:"reconnecting",attempts:this.reconnectAttempts,nextAttemptIn:t}}),this.reconnectTimer=setTimeout((()=>{this.wsConnectionProps&&(console.log("%cReconnecting...","color:orange"),this.connectToWSServer(this.wsConnectionProps))}),t)}cancelReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.isReconnecting=!1}connectToWSServer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onOpen:e,userId:n,sessionId:r,avatar:i,name:o}=t;n||_(401),r||_(401),this.wsConnectionProps={onOpen:e,userId:n,sessionId:r,avatar:i,name:o},this.cancelReconnect(),l.h.set({wsConnection:{status:this.isReconnecting?"reconnecting":"connecting",attempts:this.reconnectAttempts}});const c=this.wsService=new s.w3cwebsocket(`${a.W7.ws_url}/freesolo?userId=${n}&sessionId=${r}&avatar=${i}&name=${o}`);c.onopen=()=>{console.log("%cConnected","color:green"),console.log("WebSocket readyState:",c.readyState),console.log("wsService instance:",this.wsService===c),this.wasConnected=!0,this.reconnectAttempts=0,this.isReconnecting=!1,this.disconnectedAt=null,l.h.set({wsConnection:{status:"connected",attempts:0}}),"function"==typeof e&&e()},c.onmessage=t=>{try{console.log("WS MESSAGE RECEIVED:",t.data);const e=JSON.parse(t.data);return e.transactions.forEach((t=>{switch(t.type){case"SELECT_ELEMENT":{const n=this.getComponent(t.componentId);if(n){const r=v.findIndex((t=>t?.userId===e.user.id));-1!==r&&(v[r].borderSelected.remove(),v.splice(r,1));const i=new w(n,e.user.color,e.user.id,e.user.name,t.componentId);v.push({userId:e.user.id,componentId:t.componentId,borderSelected:i})}}break;case"USER_JOINED":{const e=l.h.get("connectedUsers")||[];l.h.set({connectedUsers:[...e,t.user]})}break;case"USER_LEFT":{const e=l.h.get("connectedUsers")||[];l.h.set({connectedUsers:e.filter((e=>e.userId!==t.user.userId))});const n=v.findIndex((e=>e.userId===t.user.userId));-1!==n&&(v[n].borderSelected.remove(),v.splice(n,1))}break;case"SESSION_INITIALIZED":const r=t.users.filter((t=>t.userId!==n));l.h.set({connectedUsers:r});break;case"PATCH":this.updateComponent(t.componentId,t.key,t.value,{slient:!0,sync:!1});break;case"MOVE":this.moveComponent({componentId:t.componentId,newParentId:t.newParentId,newIndex:t.newIndex,oldIndex:t.oldIndex,oldParentId:t.oldParentId,direction:t.direction},{sync:!1});break;case"CREATE":this.createComponent({componentId:t.componentId,parentId:t.parentId,index:t.index,body:t.body},{sync:!1,clone:!0});break;case"ADD":this.addComponent({componentId:t.componentId,parentId:t.parentId,index:t.index},{sync:!1});break;case"REMOVE":this.removeComponent({componentId:t.componentId,parentId:t.parentId,index:t.index},{sync:!1})}})),void v.forEach((t=>{t.borderSelected.updatePosition()}))}catch(t){(0,b.H)({msg:t.message,s:"E",info:{data:t.stack},error_code:"#c4222"}),console.error(t)}},c.onclose=t=>{if(console.log("%cWebSocket connection closed","color:orange",t),l.h.set({wsConnection:{status:"disconnected",code:t.code,reason:t.reason}}),!this.wasConnected)return console.error("%cInitial connection failed, not attempting reconnection","color:red"),void _(500);this.disconnectedAt||(this.disconnectedAt=Date.now());if([1e3,1008,4401].includes(t.code))return console.log("%cNot attempting reconnection due to close code:","color:red",t.code),void _(500);this.isReconnecting||(this.isReconnecting=!0,this.attemptReconnect())},c.onerror=t=>{console.error("%cWebSocket error:","color:red",t),l.h.set({wsConnection:{status:"error",error:t.message||"WebSocket error occurred"}})}}addEditor(t){let{id:e,type:n,name:r,editor:i}=t;this.editors.push({id:e,type:n,name:r,editor:i})}removeEditor(t){let{id:e,name:n,type:r}=t;e&&(this.editors=this.editors.filter((t=>t.id!==e))),n&&(this.editors=this.editors.filter((t=>t.name!==n))),r&&(this.editors=this.editors.filter((t=>t.type!==r)))}getComponents(){return l.h.get("components")}getComponent(t){return t?l.h.get("components",t):null}getEditor(t){if(t){const e=this.editors.find((e=>e.name===t));return e?e.editor:null}return this.editors}getSelectedComponent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{find:e=null}=t;if(e){const t=[],n=r=>{r&&r.forEach((r=>{const i=this.getComponent(r);i&&(e&&e.equalWith(i.type)&&t.push(i),n(i.children))}))};return this.components.forEach((r=>{e&&e.equalWith(r.type)&&t.push(r),r.children&&n(r.children)})),t}return this.components}addComponent(t){let{componentId:e,parentId:n,index:r,layer:o}=t,{sync:s=!0,insert:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c=l.h.get("components",e);if(!c)return;const d=l.h.get("components",n);if(c&&d){const t=[new p({componentId:e,parentId:n,index:r,layer:o})];c.parentId=n,2===o?d.elements.push(e):d.children.splice(r,0,e),this.withSnapshot&&t.length>0&&(0,i.Z)({steps:t,onEnd:()=>{this.withSnapshot=!1}}),d.appendChild(c.element,r),s&&this.syncWithServer(t)}}selectComponent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?(-1!==this.components.findIndex((e=>e.id===t.id))||(t.isSelected=!0,this.type=e.type||t.type,"function"==typeof t.onSelect&&t.onSelect("selected"),this.wsService.send(JSON.stringify({transactions:[{type:"SELECT_ELEMENT",componentId:t.id}]})),this.components.push(t),this.app.dispatch("update",{editor:this,props:e}),this.app.dispatch("select",{editor:this,props:e,component:t,components:this.components})),this):this}clean(){return this.components.forEach((t=>{t.isSelected=!1,"function"==typeof t.onDeselect&&t.onDeselect("selected")})),this.components=[],this}cloneComponent(t){let{componentId:e,parentId:n,index:r}=t;const o=[],s=k.getComponent(e),a=k.getComponent(n);if(!s||!a)return console.error("component not founded");const l=(t,e,n)=>{JSON.parse(JSON.stringify(t.props));const r=JSON.parse(JSON.stringify(t.props)),i={id:`cdtr-${(0,c.Z)()}`,type:t.type,parentId:e.id,index:n,props:r};i.id=`cdtr-${(0,c.Z)()}`,delete i._id,i.children=[];const s=k.createComponent({body:i,parentId:e.id,index:n});o.push(new h.Z({componentId:s.id,parentId:e.id,index:n,body:i})),t.children&&t.children.forEach(((t,e)=>{const n=k.getComponent(t),r=k.getComponent(s.id);n&&l(n,r,e)}))};if(l(s,a,r),"card"===s.type||"col"===s.type){const t=s.closest("block");if(t){(0,y.c)(t).forEach((t=>{k.getComponent(t.componentId)?o.push(t):(console.error("cant find col to resize on clone at editor."),k.commands.logError({s:"E",error_code:"#ggbbk$",info:{},msg:"Cant find col to resize on clone at the editor"}))}))}}(0,i.Z)({steps:o,update:!0})}removeComponent(t){let{componentId:e}=t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{const{sync:t=!0}=n,r=l.h.get("components",e);r||((0,b.H)({msg:`cant find parent index, the index:${index}`,error_code:"#e44lk",info:{data:{componentId:e,parentId:o.id,children:o.children,layer:1}},s:"E"}),_());r.closest("block");let o=r.parent();if(o&&2!==r.props.layer){const n=o.children.findIndex((t=>t===r.id));if(n<0)return(0,b.H)({msg:`cant find children(${r.id}) index: of parent, the index:${n}`,error_code:"#e24lmvD3",info:{data:{componentId:e,parentId:o.id,children:o.children,layer:1}},s:"E"}),_(),this;o.children.splice(n,1);const s=[new u.Z({componentId:e,parentId:o.id,index:n,layer:r.layer})];r.remove(),this.withSnapshot&&s.length>0&&(0,i.Z)({steps:s,onEnd:()=>{this.withSnapshot=!1}}),t&&this.syncWithServer(s)}else{const t=o.elements.findIndex((t=>t===r.id));if(t<0)return(0,b.H)({msg:`cant find parent index, the index:${t}`,error_code:"#eggf4",info:{data:{componentId:e,parentId:o.id,elements:o.elements,layer:2}},s:"E"}),_(),console.error("index not found"),this;o.elements.splice(t,1);const n=[new u.Z({componentId:e,parentId:o.id,index:t,layer:2})];r.remove(),this.withSnapshot&&n.length>0&&(0,i.Z)({steps:n,onEnd:()=>{this.withSnapshot=!1}}),this.syncWithServer(n)}return this}catch(t){(0,b.H)({error_code:"#eggf!!4",msg:t.message,info:{data:t.stack},s:"E"}),_(),console.error(t)}}moveComponent(t){let{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c,direction:d}=t,{sync:p=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1===s)return console.log("old index is -1 on moveComponent"),(0,b.H)({error_code:"#eggf$^4",msg:"old index is -1 on moveComponent",info:{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c},s:"E"}),_(),null;if(-1===o)return console.log("new index is -1 on moveComponent"),(0,b.H)({error_code:"#e@#$^4",msg:"new index is -1 on moveComponent",info:{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c},s:"E"}),_(),null;const h=[new f.Z({componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,direction:d,fromLayer:a,toLayer:c})],u=l.h.get("components",r),m=l.h.get("components",n),g=l.h.get("components",e);if(g&&m&&u){try{if(2===a&&2===c){u.elements.splice(s,1),m.elements.splice(o,0,g.id);m.element.appendChild(g.element)}else{u.children.splice(s,1),m.children.splice(o,0,g.id);let t;u.id===m.id&&"block"===m.type&&(t={direction:o>s?"bottom":"top"}),m.appendChild(g.element,o,t)}}catch(t){console.error("please provide appendChild method to perform move, the component:",m)}this.withSnapshot&&h.length>0&&(0,i.Z)({steps:h,onEnd:()=>{this.withSnapshot=!1}}),g.parentId=n,p&&this.syncWithServer(h)}else console.error("component not founded on move");return this}createComponent(t){let{body:e,parentId:n,index:r,layer:o}=t,{sync:s=!0,clone:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const p=l.h.get("components",n);if(!p)return _(),(0,b.H)({msg:"component not founded on creating",error_code:"#c49vk",info:{data:{body:e,parentId:n,index:r,layer:o}},s:"E"}),void console.error("component not founded on reordered");e.layer=o||1;const u=t=>{t.id=t._id=a?t.id:`cdtr-${(0,c.Z)()}`,t.children&&t.children.forEach(((e,n)=>{e.parentId=t.id,u(e)}))};e.children||(e.children=[]),u(e),2===o?(Array.isArray(p.elements)||(p.elements=[]),p.elements.splice(r,0,e.id)):p.children.splice(r,0,e.id);const{children:f}=(0,d.s)({children:[e],id:n});p.appendChild(f[0],r);const m=[new h.Z({componentId:e.id,parentId:n,body:e,index:r,layer:o})];return s&&this.syncWithServer(m),this.withSnapshot&&m.length>0&&(0,i.Z)({steps:m,onEnd:()=>{this.withSnapshot=!1}}),l.h.get("components",e.id)}updateComponent(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{slient:o,sync:s=!0}=r;if("string"==typeof t&&(t=l.h.get("components",t)),!t)return console.error("component not founded on update"),(0,b.H)({error_code:"#e@lld",msg:"component not founded on update",info:{},s:"E"}),null;const a=[new m.Z({componentId:t.id,key:e,value:n&&"object"==typeof n?JSON.parse(JSON.stringify(n)):n})];return this.withSnapshot&&a.length>0?(0,i.Z)({steps:a,onEnd:t=>{let{id:e,key:n,value:r}=t;this.withSnapshot=!1,s&&this.syncWithServer(a)}}):(t.props[e]=n,s?this.syncWithServer(a):this.updateAll()),this}saveTemplate(t,e){this.templates[t]=e}getTemplate(t){return this.templates[`style:${t}`]}slientPatch(t,e,n){const r=[new m.Z({componentId:t.id,key:e,value:n})];this.syncWithServer(r)}store(){return this.withSnapshot=!0,this}execCommand2(t){let{transactions:e,update:n=this.components}=t;const r=[];Array.isArray(n)||(n=[n]),e.forEach((t=>{let{type:e,key:i,value:o}=t;n.forEach((t=>{const n=e?t.closest(e):t;if(n){const t=new m.Z({componentId:n.id,key:i,value:o});r.push(t)}}))})),this.withSnapshot&&r.length>0?(0,i.Z)({steps:r,onEnd:t=>{let{componentId:e,key:n,value:r,stack:i,steps:o}=t;this.withSnapshot=!1,this.syncWithServer(o)}}):r.forEach((t=>{let{componentId:e,key:n,value:i}=t;const o=l.h.get("components",e);o&&(o.props[n]=i,this.syncWithServer(r))}))}execCommands(t,e){let{components:n=[...this.components],silent:r=!1}=e||{};Array.isArray(n)||(n=[n]),Array.isArray(t)||(t=[t]);const o=[];return t.forEach((t=>{let{componentId:e,key:r,value:i,options:s={}}=t;const{find:a}=s;if(e){if("function"==typeof i){const t=this.getComponent(e);i=i(t)}const t=new m.Z({componentId:e,key:r,value:i});o.push(t)}else n.forEach((t=>{if(a){let e;if(e=t.closest(a),e||(e=t.find(a)),!e)return void console.log("component not found on execCommands",a);t=e}let e=i;if("function"==typeof i&&(e=i(t),null===e))return this;const n=new m.Z({componentId:t.id,key:r,value:e});o.push(n)}))})),this.withSnapshot&&o.length>0?(0,i.Z)({steps:o,onEnd:t=>{let{componentId:e,key:n,value:r,steps:i}=t;this.withSnapshot=!1,this.syncWithServer(o)}}):o.forEach((t=>{let{componentId:e,key:n,value:r}=t;const i=l.h.get("components",e);i&&(i.props[n]=r,this.syncWithServer(o))})),this}execCommand(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.execCommands({key:t,value:e,options:n}),this}createschema(t,e){this.__elements[t]=e}getschema(t){return this.__elements[t]}}({}),C=k},70538:(t,e,n)=>{"use strict";function r(t){const e=[];if(t&&"function"==typeof t.commands.fixCols){t.commands.fixCols().sizes.forEach((t=>e.push(t)))}return e}n.d(e,{c:()=>r})},65329:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var r=n(45607),i=n(14200);function o(t){let e=[],n=t;for(;n&&(!n||"section"!==n.type&&"root"!==n.type);){if(0===n.children.length){const t=n.parent(),o=t.children.findIndex((t=>t===n.id));-1!==o&&(e.push(new i.Z({componentId:n.id,parentId:t.id,index:o})),r.Z.removeComponent({componentId:n.id}))}n=n.parent()}return e}},31490:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(21293);n(27338);const i=t=>{let{items:e,onChange:n,debounce:i,onCreate:o}=t;const s=[...e];return r.dy`<cdtr-row dir="ltr" style="padding:10px;">
54
+ `),customElements.define("cdtr-background-element",mt);var gt=n(91426),bt={};bt.setAttributes=g(),bt.insert=f().bind(null,"head"),bt.domAPI=h(),bt.insertStyleElement=y();d()(gt.Z,bt);const yt=gt.Z&&gt.Z.locals?gt.Z.locals:void 0,At=t=>{new a.Z;const e=(0,o.Z)("row-component",t.classList,yt.root),n=(0,i.Z)("cdtr-row",{justify:"center",style:t.props.style,"data-type":t.type,"data-id":t.id,className:e},t.children),r={set:(t,e,r)=>"style"===e&&(t[e]=r,(0,s.Z)(n,{style:t[e]}),!0)};return(0,O.a)({id:t.id,name:t.type,allowSortable:!0,validator:r,template:n,childrenHolder:n,elementProps:t,destroy:()=>{},remove:()=>{n.remove()},onSelect:t=>{},onDeselect:t=>{}})};var wt=n(14043),vt={};vt.setAttributes=g(),vt.insert=f().bind(null,"head"),vt.domAPI=h(),vt.insertStyleElement=y();d()(wt.Z,vt);const xt=wt.Z&&wt.Z.locals?wt.Z.locals:void 0;n(66331),n(67237);const _t=t=>{let{event:e,compose:n}=t;const{key:r,target:i,ctrlKey:o}=e;if(o){const t=n.closest("col");if(!t)return;const e=t.props.justify;"ArrowLeft"===r?"flex-end"===e?E.j.store().execCommand("justify","center",{find:"col"}):E.j.store().execCommand("justify","flex-start",{find:"col"}):"ArrowRight"===r&&("flex-start"===e?E.j.store().execCommand("justify","center",{find:"col"}):E.j.store().execCommand("justify","flex-end",{find:"col"}));const i=E.j.getEditor().find((t=>"resizeable"===t.name));i&&i.editor.rePosition()}};n(43214);const kt=t=>{const{children:e,bottomSpacing:s="20px",editor:c}=t,d=(new a.Z,(0,o.Z)("menu-component",t.classList,xt.main)),p=(t.props,(0,i.Z)("cdtr-menu-editor",{style:{width:"100%"}}));p.onChangeText=(e,n,r)=>{const i=p.items.findIndex((t=>t.id===r.id));if(r){const n=JSON.parse(JSON.stringify(p.items));n[i].text=e,c.store().execCommand2({transactions:[{key:"items",value:n,type:t.type}]})}};const h=e=>{if(e&&e.editor&&Array.isArray(e.editor.components)){if(!e.editor.components.find((e=>e.id===t.id))&&Array.isArray(p.items)){const t=[...p.items];t.forEach((t=>t.selected=!1)),p.items=t}}};n.e(7302).then(n.t.bind(n,87302,23)).then((()=>{c.on("select",h),p.spacing="20px",p.translates={add:l.h.get("lang","add"),placeholder:"...",remove:l.h.get("lang","remove"),info:l.h.get("lang","drag_to_move_click_to_options")},p.onFocus=()=>{p.focused=!0},p.onBlur=(t,e)=>{p.focused=!1},p.justify=t.justify,p.items=t.props.items,p.onAdd=(t,e)=>{if(p.items.length>8)throw new Error("now the limit is 8");t.text="";const n=[...p.items];n.forEach((t=>t.selected=!1)),n.length>0&&(t.style=n[0].style,t.selected=!0),n.unshift(t),c.store().execCommand("items",n)},p.onRemove=t=>{const e=JSON.parse(JSON.stringify(p.items)),n=e.findIndex((e=>e.id===t.id));-1!==n&&(e.splice(n,1),c.store().execCommand("items",e))},p.onSort=t=>{c.store().execCommand("items",t)},p.onSelect=t=>{const e=[...p.items],n=e.find((e=>e.id===t.id));n&&(e.forEach((t=>t.selected=!1)),n.selected=!0),p.items=e,b.props.items=e}}));const u=(0,i.Z)("cdtr-move-handle-bar",{className:(0,o.Z)(xt.handle)}),f=(0,i.Z)("cdtr-row",{alignItems:"center",style:{height:"100%"},justify:"flex-start"},(0,i.Z)("div",{style:{width:"100%"}},p)),m=(0,i.Z)("div",{"data-type":t.type,"data-id":t.id,"draggable-element":"element",style:{width:"100%"}},u,(0,i.Z)("nav",(0,r.Z)({},t,{className:d}),f)),g={set:(e,n,r)=>{switch(n){case"style":return e[n]=k()(e[n],r),t.props.style=r,!0;case"items":return p.items=r,e[n]=r,!0;case"justify":return e[n]=r,p.justify=r,!0;default:return!1}}},b=(0,st.Z)(m,t,g);return b.onKeyUp=_t,b.onSelect=e=>{m.classList.add(e),u.setAttribute("for",t.id)},b.destroy=()=>{c.off("select",h)},b.remove=()=>{m.remove()},b.onDeselect=t=>{m.classList.remove(t)},b};var Ct=n(43824),Et=n(51679);const St=t=>{let{item:e,index:n}=t;E.Z.components.forEach((t=>{if("form"===t.type){const r=t.props.items;t.props.items[n]&&"button"!==t.props.items[n].type&&n++;let i=null,o={},s={};const a=r.find((t=>"input"===t.type)),l=r.find((t=>t?.props?.label_field));switch(a&&a.props.style&&(s=a.props.style),l&&l&&l?.props?.label_field?.props.style&&(o=l.props.label_field.props.style),e.type){case"input":["type","id","name","paramName","inputType"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Et.Z)(e,{fieldStyle:s,labelStyle:o});break;case"textarea":["type","id","name","paramName"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Et.Z)(e,{labelStyle:o,fieldStyle:s});break;case"checkbox":case"toggle":["type","id","name","paramName"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),i=(0,Et.Z)(e,{labelStyle:o});break;case"radio-group":if(["type","id","name","paramName","items"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),!Array.isArray(e.items))throw new Error("'array of items' is required");if(e.items.length>10)throw new Error("'items' should not be more than 10");e.items.forEach((t=>{["label","value"].forEach((e=>{if(!t[e])throw new Error(`'${e}' is required`)})),t={id:t.id||null,label:t.label||t.name,value:t.value}})),i=(0,Et.Z)(e,{labelStyle:o});break;case"menu":case"dropdown":if(["type","id","name","paramName","items"].forEach((t=>{if(!e[t])throw new Error(`'${t}' is required`)})),!Array.isArray(e.items))throw new Error("'array of items' is required");if(e.items.length>150)throw new Error("'items' should not be more than 10");e.items.forEach((t=>{["value"].forEach((e=>{if(!t[e])throw new Error(`'${e}' is required`)})),t={id:t.id||null,name:t.label||t.name,value:t.value}})),i=(0,Et.Z)(e,{labelStyle:o});break;default:return void console.warn("unknown type in form creator.")}r.splice(n>r.length?r.length-1:n,0,i),E.Z.store().updateComponent(t,"items",r)}}))};var Bt=n(99366),Ot={};Ot.setAttributes=g(),Ot.insert=f().bind(null,"head"),Ot.domAPI=h(),Ot.insertStyleElement=y();d()(Bt.Z,Ot);const Mt=Bt.Z&&Bt.Z.locals?Bt.Z.locals:void 0;var It=n(31490);function $t(t){const{props:e,commands:r,justify:o,items:s,editor:a,store:l,schema:c}=t,{style:d,classList:p=[]}=e;t.automations||(t.automations={});const h=(0,i.Z)("div",null,(0,i.Z)("cdtr-block-loader",null),(0,i.Z)("cdtr-title",null,(0,i.Z)("lang-text",{text:"please_wait_downloading_new_version"}))),u=(0,i.Z)("cdtr-form-builder",{className:Mt.form},h);n.e(6724).then(n.t.bind(n,6724,23)).then((()=>{h.remove(),u.style.outlineOffset="10px",u.style.display="block",u.language=l.get("config","language"),u.autoComplete="off",u.spacing=2,u.theme={palette:{primary:{main:"#845EC2"}}},u.formStyle=t.style,u.onSelectField=(t,e)=>{const n=[...u.items];l.get("ctrlKey")?n[t].selected=!n[t].selected:(n.forEach((t=>t.selected=!1)),n[t].selected=!0),u.items=n,a.dispatch("update")},u.onSortEnd=t=>{let{items:e}=t;a.store().updateComponent(v,"items",e)},u.items=t.items}));const f=(0,i.Z)("cdtr-move-handle-bar",null),m=(0,i.Z)("cdtr-editor-bar",{opened:!1,direction:"left",offsetY:60,componentId:t.id},(0,i.Z)("cdtr-tooltip",{content:"form:manage_fields"},(0,i.Z)("paper-button",{class:Mt.button,onClick:()=>y()},(0,i.Z)("cdtr-icon",{width:"36",height:"36",icon:"createField"}))),(0,i.Z)("cdtr-tooltip",{content:"design_form"},(0,i.Z)("paper-button",{onClick:()=>{const t=v.closest("card");t&&a.clean().selectComponent(t)},class:Mt.button},(0,i.Z)("cdtr-icon",{width:"36",height:"36",icon:"designForm"})))),g=(0,i.Z)("div",{"data-type":t.type,"data-id":t.id,"draggable-element":"element","droppable-element":"element",style:{width:"100%"},className:p.concat("form-component").join(" ")},u,f,m),b={set:(t,e,n)=>{switch(e){case"onSubmit":return u.onSubmit=t[e],!0;case"items:v":return u.items=[],t[e]=r.cloneDeep(n),u.items=t[e],!0;case"items":return r.debounce((()=>{u.items=[],t[e]=r.cloneDeep(n),u.items=t[e]}),10),!0;case"automations":return t[e]=r.deepMerge(t[e],n),!0;case"style":return t[e]=r.deepMerge(t[e],n),u.formStyle=t[e],!0;default:return!0}}};m.opened=!1;const y=()=>{const e=t.schema.configure.fields,n=(0,i.Z)("cdtr-drawer",{backdropColor:"#000000a1",width:"400px",style:{direction:"var(--direction-locale)"}});n.opened=!0,n.headerText="available_fields",document.body.appendChild(n);const r={fields:e.map((t=>{const e=u.items.find((e=>e.id===t.id));return t.inserted=!!e,t})),onChange:(t,e,n)=>{const r=u.items.findIndex((e=>e.id===t.id));if(e&&-1===r){const e=u.items.findIndex((t=>t.selected))||u.items.length-1;St({item:t,index:e})}else if(-1!==r){const t=[...u.items];if(t[r]&&"button"===t[r].type)return;t.splice(r,1),a.updateComponent(v,"items",t)}}},o=t=>{(0,ht.sY)((0,It.Z)({items:t,onChange:r.onChange,debounce:t=>{let{target:e}=t;const n=e.value,i=r.fields.filter((t=>-1!==t.name.indexOf(n)));o(i)}}),n)};o(r.fields),n.addEventListener("close",(()=>{n.remove()}),{once:!0})},A=function(t){let{debounce:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a.components.forEach((e=>{if("form"===e.type){const n=JSON.parse(JSON.stringify(e.props.items));let r=0;const i=()=>{r=n.length};for(;r<n.length;r++){const o=n[r];o.props.label_field||(o.props.label_field={props:{inline:!1,style:{},text:""}}),o.props.label_field.props||(o.props.label_field={props:{inline:!1,style:{},text:""}}),o.props.label_field.props.style||(o.props.label_field.props.style={}),"menu"!==o.type&&"dropdown"!==o.type||(o.props.triggerProps||(o.props.triggerProps={}),o.props.triggerProps.style||(o.props.triggerProps.style={})),t(o,{stop:i,items:n,compose:e})}a.store().updateComponent(e,"items",n)}}))};let w=!1;const v=(0,O.a)({name:"form",id:t.id,template:g,atomElement:u,defaultProps:{style:{},classList:[],items:[]},schema:c,onSelect:t=>{m.opened=!0,m.componentId=v.closest("card")?.id},onDeselect:t=>{m.opened=!1},elementProps:t,createEditor:t=>{let{component:e,props:n,commands:r,helpers:i}=t;const o={BUTTONS:["button"],INPUTS:["input","textarea"],TOGGLES:["radio-group","checkbox","toggle"],MENUS:["dropdown","menu"]},s=e.props.items?.find((t=>t.selected));if(!s)return{};function l(){return c?.configure?.mailingLists.map((t=>({...t,value:t.label})))}return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"list-settings"},{text:"automations"},{text:"settings"}];return e.forEach((e=>e.selected=e.text===t)),e},layout:t=>{let{tab:n,changeTab:r,tabs:d}=t;const p=[{type:"heading",level:4,text:s.type},{type:"input",title:"text:button",active:"button"===s.type,value:s.props.text,onInput:t=>{const e=t.target.value;A((t=>{t.selected&&"button"===t.type&&(t.props.text=e)}),{debounce:!0})}},{type:"input",title:"label",active:"button"!==s.type&&("design"===n.text||"list-settings"===n.text),value:s?.props?.label_field?.props?.text,onInput:t=>{const e=t.target.value;A((t=>{t.selected&&"button"!==t.type&&(t.props.label_field.props.text=e)}),{debounce:!0})}},{type:"input",title:"placeholder",active:o.INPUTS.includes(s.type)&&["list-settings","design"].includes(n.text),value:s.props.placeholder,onInput:t=>{const e=t.target.value;A((t=>{o.INPUTS.includes(t.type)&&t.selected&&"button"!==t.type&&(t.props.placeholder=e)}),{debounce:!0})}},{type:"checkbox",title:"checkbox_checked_as_default",checked:s.props.checked,active:["toggle","checkbox"].includes(s.type)&&"list-settings"===n.text,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&o.TOGGLES.includes(t.type)&&(t.props.checked=e)}))}},{type:"checkbox",title:"checkbox_on_right_side",checked:!0===s.props.labelPlacement,active:"checkbox"===s.type&&"list-settings"===n.text,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&"checkbox"===t.type&&(t.props.labelPlacement=e?"start":"end")}))}},{type:"stringListBuilder",title:"items_in_menu",active:(o.MENUS.includes(s.type)||"radio-group"===s.type)&&"list-settings"===n.text,items:s.props.items,changeItemValue:(t,e,n)=>{A((n=>{n!==s&&n.id!==s.id||(n.props.items[t].label=e)}))}},{type:"option",text:"advance_setting",active:"design"===n.text,onClick:()=>{r("list-settings")}},{type:"divider",active:"design"===n.text},{type:"fontFamily",active:"design"===n.text,value:s?.props?.style?.fontFamily||s?.props?.label_field?.props?.style.fontFamily,onChange:t=>{const e=t.target.value;(0,Ct.TL)({cssRule:e}),e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.fontFamily=e:o.TOGGLES.includes(s.type)&&s.id===t.id?(t.props.label_field.props.style.fontFamily=e,t.props.style.fontFamily=e):[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.fontFamily=e:(t.props.label_field.props.style.fontFamily=e,t.props.style.fontFamily=e))}),{debounce:!0})}},{type:"slider",title:"fontSize",max:30,min:8,active:"design"===n.text,value:parseInt(s.props?.style.fontSize)||parseInt(s?.props?.label_field?.props?.style.fontSize)||16,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.fontSize=e:(o.TOGGLES.includes(s.type)&&s.id===t.id||[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type))&&(t.props.label_field.props.style.fontSize=e)}),{debounce:!0})}},{type:"colorpicker",title:"component_color",active:()=>"design"===n.text&&o.TOGGLES.includes(s?.type),value:s.props?.style.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.TOGGLES.includes(s.type)&&s.id===t.id&&(t.props.style.color=e)}),{debounce:!0})}},{type:"colorpicker",title:"color:label",active:"design"===n.text,value:s.props?.label_field?.props?.style?.color||s.props?.style.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.color=e:(o.TOGGLES.includes(s.type)&&s.id===t.id||[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type))&&(t.props.label_field.props.style.color=e)}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"typography",active:"design"===n.text,bold:700===s.props?.style?.fontWeight||700===s.props?.label_field?.props?.style?.fontWeight,italic:"italic"===s.props?.style?.fontStyle||"italic"===s.props?.label_field?.props.style?.fontStyle,underline:"underline"===s.props?.style?.textDecoration||"underline"===s.props?.label_field?.props?.style?.textDecoration,onChange:t=>{function e(e){switch(t){case"bold":e.fontWeight=null===e.fontWeight?700:null;break;case"italic":e.fontStyle=null===e.fontStyle?"italic":null;break;case"underline":e.textDecoration="underline"===e.textDecoration?null:"underline"}}A((t=>{"checkbox"===s.type?t.selected&&"checkbox"===t.type&&e(t.props.label_field.props.style):t.selected&&"button"===s.type&&"button"===t.type?e(t.props.style):"button"!==s.type&&"button"!==t.type&&(!t.selected||"menu"!==t.type&&"dropdown"!==t.type?t.selected&&e(t.props.label_field.props.style):e(t.props.label_field.props.style))}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"colorpicker",title:"button"===s.type?"background":"form:background",active:"design"===n.text&&-1!==[...o.BUTTONS,...o.INPUTS,...o.MENUS].indexOf(s.type),value:s.props?.triggerProps?.style?.background||s.props?.style?.background,onChange:t=>{const e=t.target.value;e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.background=e:[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.background=e:t.props.style.background=e)}))}},{type:"colorpicker",title:"form:placeholder_color",active:"design"===n.text&&-1!==[...o.INPUTS,...o.MENUS].indexOf(s.type),value:s.props?.style?.color,onChange:t=>{const e=t.target.value;e&&A((t=>{o.INPUTS.includes(t.type)&&o.INPUTS.includes(s.type)?t.props.style.color=e:o.MENUS.includes(t.type)&&o.MENUS.includes(s.type)&&(t.props.triggerProps.style.color=e)}),{debounce:!0})}},{type:"slider",title:"height",max:70,min:20,active:"design"===n.text&&["input",...o.MENUS,...o.BUTTONS].includes(s.type),value:parseInt(s.props.style.minHeight)||parseInt(s?.props?.triggerProps?.style.minHeight)||40,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?(delete t.props.style.height,t.props.style.minHeight=e):[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.minHeight=e:delete t.props.style.height,t.props.style.minHeight=e)}),{debounce:!0})}},{type:"slider",title:"radius",max:50,min:0,active:"design"===n.text&&[...o.INPUTS,...o.MENUS,...o.BUTTONS].includes(s.type),value:parseInt(s?.props?.style.borderRadius)||parseInt(s?.props?.triggerProps?.style?.borderRadius)||0,onInput:t=>{const e=t.target.value+"px";e&&A((t=>{o.BUTTONS.includes(s.type)&&o.BUTTONS.includes(t.type)?t.props.style.borderRadius=e:[...o.INPUTS,...o.MENUS].includes(s.type)&&[...o.INPUTS,...o.MENUS].includes(t.type)&&(o.MENUS.includes(t.type)?t.props.triggerProps.style.borderRadius=e:t.props.style.borderRadius=e)}),{debounce:!0})}},{type:"divider",active:"design"===n.text},{type:"dropdown",title:"type",value:s.props.type,active:()=>"input"===s.type&&"list-settings"===n.text,selected:s.props.type,items:c.types.find((t=>"input"===t.name))?.types.map((t=>new Object({key:t,value:t}))),onChange:t=>{const e=t.target.value;A((t=>{"input"===s.type&&t.selected&&"input"===t.type&&(t.props.type=e)}),{debounce:!0})}},{type:"input",title:"default_value",active:()=>"input"===s.type&&"list-settings"===n.text,value:s.props.value,onInput:t=>{const e=t.target.value;A((t=>{!t.selected||"input"!==t.type&&"menu"!==t.type&&"dropdown"!==t.type&&"textarea"!==t.type||(t.props.value=e)}),{debounce:!0})}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"checkbox",title:"required",info:"required_form_field_info",checked:s.props.isRequired,controlled:!1,active:"list-settings"===n.text&&"button"!==s.type,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&(t.props.isRequired=e)}))}},{type:"checkbox",title:"hidden_field",info:"hidden_form_field_info",checked:s.props.isHidden,controlled:!1,active:"list-settings"===n.text&&"button"!==s.type,onChange:t=>{const e=t.target.checked;A((t=>{t.selected&&(t.props.isHidden=e)}))}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"input",max:1024,title:"url_param",active:"list-settings"===n.text&&"button"!==s.type,value:s.props.paramName,onInput:t=>{let{target:e}=t,n=e.value;n=n.trim().replace(/\s/g,"_"),n=n.replace(/\//g,""),n=n.replace(/\\/g,""),n=n.replace(/[^a-zA-Z0-9_\-]/g,"");A(((t,r)=>{let{stop:i,items:o}=r;o.find((t=>t.paramName===n))||t.selected&&"button"!==t.type&&(t.props.paramName=e.value=n,i())}))}},{type:"divider",active:"list-settings"===n.text&&"button"!==s.type},{type:"dropdown",title:"after_submission",active:()=>(w=!!e?.props?.automations?.when?.submitted?.then?.redirect?.url,"automations"===n.text),selected:e?.props?.automations?.when?.submitted?.then?.redirect?.url?"redirect":"stay_at_page",value:w?"redirect":"stay_at_page",items:[{value:"stay_at_page",key:"stay_at_page"},{value:"redirect",key:"redirect",selected:!!e?.props?.automations?.when?.submitted?.then?.redirect?.url}],onChange:t=>{"redirect"===t.target.value?(w=!0,r("automations")):(w=!1,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:null}}}}}),options:{find:"form"}}),r("automations"))}},{type:"input",title:"where_to_redirect",max:1024,value:e?.props?.automations?.when?.submitted?.then?.redirect?.url||"",active:!0===w&&"automations"===n.text,autofocus:!1==!!e?.props?.automations?.when?.submitted?.then?.redirect?.url,onChange:t=>{let{target:e}=t;const n=e.value,r=new i.Url(n);if(""===r.href)return w=!1,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:null}}}}}),options:{find:"form"}});w=!0,a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{url:r.href}}}}}),options:{find:"form"}})}},{type:"checkbox",title:"forward_params",checked:e?.props?.automations?.when?.submitted?.then?.redirect?.forward_params||!1,active:!0===w&&"automations"===n.text,onChange:t=>{let{target:e}=t;const n=e.checked;return a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{redirect:{forward_params:n}}}}}),options:{find:"form"}})}},{type:"divider",active:!0===w&&"automations"===n.text},{type:"chipsInput",removeable:!1,active:"automations"===n.text,title:"add_user_from_mailinglist_after_subscribed",onCreate:()=>{c?.configure?.mailingListEvents?.create({name:"hello",resolve:()=>{},reject:()=>{}})},onChange:t=>{const n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists,r=n.findIndex((e=>e.key===t.key));-1!==r?n.splice(r,1):n.push({key:t.key}),a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{add:{to:{mailingLists:n}}}}}}),options:{find:"form"}})}else a.store().execCommands({key:"automations",value:e=>i.deepMerge(e.props.automations,{when:{submitted:{then:{add:{to:{mailingLists:[{key:t.key}]}}}}}}),options:{find:"form"}})},list:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const e=t;return n.forEach((t=>{const n=e.find((e=>e.key===t.key));n&&(n.inserted=!0)})),e}return[...t]}(),items:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.add?.to?.mailingLists;if(n){const e=[];return n.forEach((n=>{const r=t.find((t=>t.key===n.key));r&&(r.inserted=!0,e.push(r))})),e}return[]}()},{type:"chipsInput",removeable:!1,active:"automations"===n.text,title:"remove_user_from_mailinglist_after_subscribed",onChange:t=>{const n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists,r=n.findIndex((e=>e.key===t.key));-1!==r?n.splice(r,1):n.push({key:t.key}),a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{remove:{from:{mailingLists:n}}}}}}),options:{find:"form"}})}else a.store().execCommands({key:"automations",value:e=>i.deepMerge(e.props.automations,{when:{submitted:{then:{remove:{from:{mailingLists:[{key:t.key}]}}}}}}),options:{find:"form"}})},list:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const e=t;return n.forEach((t=>{const n=e.find((e=>e.key===t.key));n&&(n.inserted=!0)})),e}return t}(),items:function(){const t=l(),n=e.props.automations?.when?.submitted?.then?.remove?.from?.mailingLists;if(n){const e=[];return n.forEach((n=>{const r=t.find((t=>t.key===n.key));r&&(r.inserted=!0,e.push(r))})),e}return[]}()},{type:"input",max:1024,active:"automations"===n.text,value:e?.props?.automations?.when?.submitted?.then?.sendParams?.url,placeholder:"URL...",title:"send_the_data_to",onInput:t=>{let{target:e}=t;const n=e.value,r={method:"post",url:new i.Url(n).href,type:"http"};a.store().execCommands({key:"automations",value:t=>i.deepMerge(t.props.automations,{when:{submitted:{then:{sendParams:r}}}}),options:{find:"form"}})}},{type:"stringListBuilder",title:"send_mail_on_submitted",active:"automations"===n.text,placeholder:"example@email.com",inputType:"email",items:e?.props?.automations?.when?.submitted?.then?.sendMail?.to||[],changeItemValue:(t,e,n)=>{a.store().execCommands({key:"automations",value:n=>{let r=n?.props?.automations?.when?.submitted?.then?.sendMail;if(r)return r.to[t]=e,i.deepMerge(n.props.automations,{when:{submitted:{then:{sendMail:r}}}})},options:{find:"form"}})},onRemove:(t,e)=>{a.store().execCommands({key:"automations",value:e=>{let n=e?.props?.automations?.when?.submitted?.then?.sendMail;if(n)return n.to.splice(t,1),i.deepMerge(e.props.automations,{when:{submitted:{then:{sendMail:n}}}})},options:{find:"form"}})},onAddItem:()=>{a.store().execCommands({key:"automations",value:t=>{let e=t?.props?.automations?.when?.submitted?.then?.sendMail;if(e||(e={to:[],html:"",text:"",subject:"",from:""}),!(e.to.length>3||e.to&&e.to.length>0&&""===e.to[e.to.length-1].trim()))return e.to.push(""),i.deepMerge(t.props.automations,{when:{submitted:{then:{sendMail:e}}}})},options:{find:"form"}})},onChange:(t,e,n)=>{a.store().execCommands({key:"automations",value:n=>{const r=n.props.automations.when.submitted.then.sendMail;return r.to[t]=e,i.deepMerge(n.props.automations,{when:{submitted:{then:{sendMail:r}}}})},options:{find:"form"}})}}];return p}}},commands:{select:t=>{m.opened=!0},deSelect:t=>{m.opened=!1},deSelectedField:()=>{u.items.forEach((t=>{t.selected=!1})),v.props.items=u.items}},globalCommands:{},remove:()=>{g.remove()},destroy:()=>{},validator:b});return v}var Tt=n(70143),Lt=n(96206),Nt=n.n(Lt),Rt=n(1670),Pt=n(13185),Dt=n.n(Pt);const zt={deepMerge:k(),mergeDiff:s.Z,deepEqual:Dt(),cloneDeep:Nt(),arrayToString:o.Z},Ht=t=>{const{type:e,children:n,props:c}=t,d={mergeDiff:s.Z,deepMerge:k(),isRtl:Tt.Z,arrayToString:o.Z,cloneDeep:Nt(),isImage:Rt.Z,debounce:(new a.Z).run,snackbar:t=>B.Z.dispatch("snackbar",{text:t})},p={...t,...c,commands:d,editor:E.Z,store:l.h},h={block:()=>(0,i.Z)(tt,p,n),row:()=>(0,i.Z)(At,p,n),"menu-widget":()=>(0,i.Z)(kt,p,n),background:()=>(0,i.Z)(ft,p),form:()=>{const t=l.h.get("config","editor");if(t&&t.configure&&t.configure.plugins){const e=t.configure.plugins.find((t=>"form"===t.name));return(0,i.Z)($t,(0,r.Z)({schema:e},p),n)}},iframe:()=>(0,i.Z)(dt,p)};if(h[e])return"function"==typeof h[e]?h[e]():h[e];{let n=l.h.get("config","editor","configure","plugins"),r=l.h.get("config","channel");const i=n.find((t=>t.name===e));if(i&&i.name&&i.lazy&&"function"==typeof i.lazy){const o=i=>{const o=n.findIndex((t=>t.name===e));-1===o&&console.error("cant find the scheme on resolving component",e);const s=i.create({compose:p,createElement:O.a,helpers:zt,channel:r});s.type=e,s.createEditor&&(n[o].createEditor=s.createEditor),"function"==typeof i.menu&&(n[o].menu=i.menu);try{const c=l.h.get("components",t.id);if(!c)return console.error("cant get the element on lazy loading..","#8l#$f"),null;function d(){c.element.parentElement&&c.element.parentElement.replaceChild(s.element,c.element),c.element.remove()}"cdtr-block-loader"===c.element.localName&&(c.element.onLoad=()=>{d()},c.element.isLoaded&&d())}catch(h){console.error(h,e)}const a=l.h.get("components");a[t.id]=s,l.h.set({components:a})};return i.lazy(o),{name:i.name,id:t.id,element:(()=>{const e=document.createElement("cdtr-block-loader");return e.setAttribute("data-component-type",t.type),e})()}}if(i&&i.create){const t=i.create({compose:p,createElement:O.a,helpers:zt,channel:r});return t.type=e,t&&"object"==typeof t&&"function"==typeof t.createEditor&&(i.createEditor=t.createEditor),t}}};var jt=n(27017);const Ut=t=>{(t=>{t.props&&(t.props.interactions||(t.props.interactions=[]),void 0===t.props.show_on_desktop&&(t.props.show_on_desktop=!0),void 0===t.props.show_on_tablet&&(t.props.show_on_tablet=!0),void 0===t.props.show_on_mobile&&(t.props.show_on_mobile=!0))})(t);const{props:e,element:n,id:r,extend:i,parentId:o,__children:s,__elements:a}=t,c=l.h.get("components");-1!==window.location.href.indexOf("localhost")&&(window.components=c);const d={id:r,...t,props:e,children:s||[],elements:a||[]};c[r]=d},Zt=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=n=>{if(!n||n.is_removed)return;if(n.props||(n.props={}),"string"==typeof n)return n;n._id&&(n.id=n._id),t.id&&(n.parentId=t.id),n.children&&(n.__children=[...n.children].map((t=>{if(t)return t.id||t._id}))),n.elements&&(n.__elements=[...n.elements].map((t=>{if(t)return t.id||t._id})));const{children:o,elements:s}=Zt(n,e);n.props.style&&"object"==typeof n.props.style&&Object.keys(n.props.style).forEach((t=>{null!==n.props.style[t]&&void 0!==n.props.style[t]||delete n.props.style[t]}));const a=(0,i.Z)(Ht,(0,r.Z)({},n,{elements:s,"data-id":n.id,"data-type":n.type,silent:e.silent}),o);if(a&&!0!==e.slient)Ut({...n,...a});else if(!a)return console.error("this is un resolve compose..",n,n.type),null;return a.element};return"object"==typeof t&&(t=JSON.parse(JSON.stringify(t))),t.children&&(t.children=t.children.map(n)),t.elements&&(t.elements=t.elements.map(n)),t},Ft=(t,e)=>{if("text"===t&&"string"==typeof e)try{return JSON.parse(e)}catch(t){(0,jt.H)({error_code:"#11jhb",info:t,msg:"cant parsed text using transformValues function",s:"E"})}return e},Vt=t=>{t.forEach((t=>{t.props||(t.props={}),t.props.style||(t.props.style={}),t.id||(t._id?(t.id=t._id,console.log("id created from _id",t.id)):console.error("component must have id")),t._id||(t._id=t.id)}));let e=t.findIndex((t=>"root"===t.type));-1===e&&(e=t.findIndex((t=>"section"===t.type)));const n={};let r;-1!==e&&([r]=t.splice(e,1),n.rootComponent=r);const i=e=>{if(e)return Array.isArray(e.children)&&e.children.length>0&&(e.children_ids=e.children,e.children=e.children.map((e=>{if(Array.isArray(e))return;if(!e)return;const r=t.find((t=>t._id===e));n(r);const o=i(r);return o&&o.children&&(r.children=o.children),o&&o.elements&&(r.elements=o.elements),r}))),Array.isArray(e.elements)&&e.elements.length>0&&(e.elements=e.elements.map((r=>{const o=t.find((t=>t._id===r));n(o);const s=i(o);return s&&s.elements&&(o.elements=s.elements),s&&s.children&&e.children.length>0&&(o.children=s.children),o}))),e;function n(t){[()=>{t&&"text"===t.type&&t.props&&"object"==typeof t.props&&t.props.text&&"string"==typeof t.props.text&&(t.props.text=Ft("text",t.props.text))},t=>{t&&"form"===t.type&&Array.isArray(t.props.items)&&t.props.items.forEach((t=>{const e=t?.props?.style?.fontFamily;e&&(0,Ct.TL)({cssRule:e})}))},t=>{if(t&&t.props&&t.props.style&&t.props.style.fontFamily){const e=t.props.style.fontFamily;e&&(0,Ct.TL)({cssRule:e})}}].forEach((e=>e(t)))}};if(r){const t=i(r);t.children&&(r.children=t.children)}return r}},64721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(40949);n(70235),n(45607);const i=t=>{{const{component:e,commands:n,helpers:r}=t;return e.props.style||(e.props.style={}),{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;return[{type:"divider"},{type:"slider",title:"height",active:()=>"design"===r.text,min:50,max:500,value:parseInt(e.props.style.minHeight),onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}},{type:"divider"},{type:"colorpicker",title:"backgroundColor",value:e.props.style.background||e.props.style.backgroundColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e,backgroundColor:null})}},{type:"divider"},{type:"justifyContent",value:e?.props.justify||"flex-start",active:()=>"design"===r.text,onChange:t=>{const e=t.target.value;n.execCommand("justify",e,{find:"col"})}},{type:"alignItems",title:"alignItems",active:()=>"design"===r.text,value:e?.props.alignItems||"flex-start",onChange:t=>{const e=t.target.value;n.execCommand("alignItems",e,{find:"col"})}},{type:"spacingPicker",active:()=>"design"===r.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(e?.props?.style?.paddingTop)||parseInt(e?.props?.style?.padding)||0,bottom:parseInt(e?.props?.style?.paddingBottom)||parseInt(e?.props?.style?.padding)||0,left:parseInt(e?.props?.style?.paddingLeft)||parseInt(e?.props?.style?.padding)||0,right:parseInt(e?.props?.style?.paddingRight)||parseInt(e?.props?.style?.padding)||0},onChange:t=>{const e=t.target.value;n.execCommand("style",{padding:e+"px"},{find:"col"})}}]}}}},o=t=>{let{helpers:e,template:n,row:r}=t;return{set:(t,e,r)=>{switch(e){case"style":case"justify":case"alignItems":return t[e]=r,!0;case"md":case"sm":case"lg":case"xl":t[e]=r,n.setAttribute(e,r);return 0===parseInt(r)?(n.removeAttribute("lg"),n.removeAttribute("xl")):(n.setAttribute("lg",r),n.setAttribute("xl",r)),!0;default:return!1}}}};var s=n(46062),a=n.n(s),l=n(32877),c=n.n(l),d=n(96793),p=n.n(d),h=n(17892),u=n.n(h),f=n(11173),m=n.n(f),g=n(37059),b={};b.setAttributes=u(),b.insert=p().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=m();a()(g.Z,b);const y=g.Z&&g.Z.locals?g.Z.locals:void 0;n(58860);var A=n(84817),w=n(59320),v=n(78529);const x=()=>({name:"col",create:t=>{const{createElement:e,compose:n,helpers:s}=t,{children:a,backgrounds:l,commands:c}=n,{mergeDiff:d,arrayToString:p}=c;n.props.justify||(n.props.justify="center");const h=new w.Z,u={element:t=>n.props.style};A.ZP.use((0,v.Z)());let f=A.ZP.createStyleSheet(u,{link:!0}).attach();f.update();const m=p("col-component",y.root,n.classList,f.classes.element),g=(0,r.Z)("cdtr-row",null,a),b=(0,r.Z)("cdtr-row",{className:p("row-of-col",y.row)},g),x=(0,r.Z)("cdtr-col",{className:m},b);x.setAttribute("droppable-direction","left,right");n.editor.on("update",(()=>{h.run((()=>{const t=x.parentElement;t&&"block"===t.dataset.type?x.setAttribute("droppable-element","col"):x.removeAttribute("droppable-element")}))})),x.setAttribute("draggable-direction","left,right"),x.setAttribute("lg",n.props.lg),n.props||(n.props={});const _=e({name:"col",id:n.id,template:x,handleBar:!0,draggable:{group:"col"},render:()=>{_.props.justify&&(g.justify=_.props.justify,b.justify=_.props.justify),_.props.style||(_.props.style={}),_.props.style.height?b.style.height=_.props.style.height:b.style.height="",_.props.style.minHeight?b.style.minHeight=_.props.style.minHeight:b.style.minHeight="",_.props.alignItems&&(b.alignItems=_.props.alignItems),_.props.lg;{const t=parseInt(_.props.lg);0===t?(x.removeAttribute("lg"),x.removeAttribute("xl")):(x.setAttribute("lg",t),x.setAttribute("xl",t))}s.mergeDiff(x,{style:n.props.style})},childrenHolder:b,allowSortable:!0,defaultProps:{},validator:o({template:x,helpers:s,row:b}),schema:n.schema,onSelect:t=>{x.classList.add(t)},onDeselect:t=>{x.classList.remove(t)},elementProps:n,remove:()=>{x.remove()},createEditor:i});return _}})},93339:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(7896),i=n(40949),o=n(35965),s=n(51921),a=(n(36546),n(46062)),l=n.n(a),c=n(32877),d=n.n(c),p=n(96793),h=n.n(p),u=n(17892),f=n.n(u),m=n(11173),g=n.n(m),b=n(47224),y={};y.setAttributes=f(),y.insert=h().bind(null,"head"),y.domAPI=d(),y.insertStyleElement=g();l()(b.Z,y);const A=b.Z&&b.Z.locals?b.Z.locals:void 0;var w=n(58860),v=n(45607);var x=n(32173);n(21293);const _=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;n.text||e("background")},tabs:t=>{const e=[{text:"background"},{text:"settings"}];return t?(e.forEach((e=>e.selected=e.selected=e.text===t)),e):e},layout:t=>{const{tab:r,changeTab:i,tabs:o}=t;return[{type:"background",hasPreview:!0,hasInput:!0,value:e.props.background,src:e.props.background?.properties?.src,onChange:t=>{const e=t.detail.src;n.execCommand("background",{type:"images",component:"cdtr-images-preset",properties:{src:e,style:{backgroundAttachment:"fixed",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}})}},{type:"divider"},{type:"colorpicker",title:"backgroundColor",value:e.props.style.background||e.props.style.backgroundColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e,backgroundColor:null}),n.execCommand("background",null)}}]}}}},k=()=>({name:"section",create:t=>(t=>{const{mergeDiff:e,deepMerge:a}=t.helpers,l=t.compose;l.props.style.minHeight||(l.props.style.minHeight="100px"),l.props.style.width="100%";const c=(0,o.Z)("section-component",l.classList,A.section),d=(0,i.Z)("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:"100%",overflow:"hidden",opacity:l.opacity||1}});function p(t){const r=()=>{const n=document.createElement(t.component);d.appendChild(n),e(n,t.properties)};for(;d.firstChild;)d.firstChild.remove();t&&(t.installed?r():t.component&&("cdtr-media-player"===t.component&&(t.component="cdtr-background-video"),n(26831)(`./${t.component}`).then((t=>{r()}))))}l.background?p(l.background):l.background={};const h=(0,i.Z)("div",{style:{minHeight:"50px"},className:(0,o.Z)("sortable-element--with-section",A.layerBlock),"data-id":l.id},l.children);l.bottomStyle||(l.bottomStyle={},l.bottomStyle.style={height:0});const u=()=>(0,i.Z)("div",{className:A.placeholder},(0,i.Z)("h3",null,(0,i.Z)("lang-text",{text:"empty_section_info"})),(0,i.Z)("div",null,(0,i.Z)("paper-button",{onMouseUp:()=>{w.Z.dispatch("open_add_menu",{type:"block-component"})},style:"color:var(--primary)"},(0,i.Z)("lang-text",{text:"click_here_to_add"})))),f=(0,i.Z)("section",(0,r.Z)({},l,{"droppable-element":l.type,"droppable-direction":"top,bottom","droppable-if":"empty","droppable-level":"5","droppable-bottom":"lastChild",className:c}),d,h,l.elements);l.props.alignItems&&(h.style.justifyContent=l.props.alignItems),0===h.children.length&&f.appendChild(u());const m=()=>{setTimeout((()=>{const t=f.querySelector(`.${A.placeholder}`),e=h.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||f.appendChild(u()))}),0)};v.Z.on("update",(()=>m())),m();let g,b,y=(0,i.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');const k=new s.ZP(h,{group:"block-component",animation:300,handle:".block-handle--sortable",draggable:".block-component",easing:"cubic-bezier(1, 0, 0, 1)",onStart:t=>{document.body.appendChild(y);const e=t.item;g=e.previousSibling?.dataset.id,b=e.nextSibling?.dataset.id},onEnd:function(t){y.remove();const e=t.item.dataset.id,n=t.to.dataset.id,r=t.from.dataset.id,i=t.oldIndex;let o=t.newIndex;v.Z.store().moveComponent({componentId:e,newParentId:n,oldParentId:r,oldIndex:i,newIndex:o,direction:o>i?"bottom":"top"})}}),C={set:(t,n,r)=>{switch(n){case"bottomStyle":return t[n]=a(t[n],r),e(marginBottomEl,{style:t[n].style}),!0;case"alignItems":return t[n]=r,h.style.justifyContent=r,!0;case"opacity":return t[n]=r,d.style.opacity=r,!0;case"background":return t[n]=r,p(r),!0;case"style":return t[n]=a(t[n],r),e(f,{style:t[n]}),!0;case"is_removed":return e(f,{is_removed:r}),!0;default:return!1}}};return(0,x.a)({id:l.id,name:"section",template:f,allowSortable:!0,schema:l.schema,draggable:{group:"section",direction:"top,bottom"},render:()=>{},destroy:()=>{"function"==typeof k.destroy&&k.destroy(),v.Z.off("update",(()=>m()))},remove:()=>{f.remove()},onSelect:t=>{f.classList.add(t)},onDeselect:t=>{f.classList.remove(t)},elementProps:l,validator:C,createEditor:_,commands:{},defaultProps:{},childrenHolder:h})})(t)})},45607:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C,j:()=>k});var r=n(64603),i=n(67237),o=n(81929),s=(n(21009),n(85731)),a=n(97278),l=n(70235),c=n(9571),d=n(1434);n(36546);class p{constructor(t){let{componentId:e,parentId:n,index:r,layer:i}=t;this.componentId=e,this.parentId=n,this.index=r,this.type="ADD",this.layer=i}}var h=n(49721),u=n(14200),f=n(7910),m=n(8441),g=n(59320),b=n(27017),y=n(70538),A=n(52278);const w=class{constructor(t,e,n,r,i){this.component=t,this.color=e,this.userId=n,this.name=r,this.componentId=i,this.borderElement=null,this.isDestroyed=!1,this.createBorder(),this.updatePosition(),this.attachListeners()}createBorder(){this.borderElement=document.createElement("div"),this.borderElement.style.position="absolute",this.borderElement.style.pointerEvents="none",this.borderElement.style.border=`2px solid ${this.color}`,this.borderElement.style.zIndex="0",this.borderElement.style.transition="all 0.01s ease-out",document.body.appendChild(this.borderElement),this.labelElement=document.createElement("div"),this.labelElement.textContent=this.name,this.labelElement.style.position="absolute",this.labelElement.style.pointerEvents="none",this.labelElement.style.backgroundColor=this.color,this.labelElement.style.color="#fff",this.labelElement.style.padding="2px 6px",this.labelElement.style.fontSize="11px",this.labelElement.style.fontWeight="500",this.labelElement.style.borderRadius="3px",this.labelElement.style.zIndex="0",this.labelElement.style.whiteSpace="nowrap",this.labelElement.style.transition="all 0.01s ease-out",this.labelElement.style.boxShadow="0 1px 3px rgba(0,0,0,0.2)",document.body.appendChild(this.labelElement),this.updatePosition()}updatePosition(){if(this.isDestroyed||!this.component.element)return;const t=this.component.element.getBoundingClientRect();if(this.borderElement.style.top=t.top+"px",this.borderElement.style.left=t.left+"px",this.borderElement.style.width=t.width+"px",this.borderElement.style.height=t.height+"px",this.labelElement){const e=t.top-20,n=e<0?t.top+2:e;this.labelElement.style.top=n+"px",this.labelElement.style.left=t.left+t.width/6+"px"}}attachListeners(){this.boundUpdatePosition=this.updatePosition.bind(this),window.addEventListener("scroll",this.boundUpdatePosition,!0),window.addEventListener("resize",this.boundUpdatePosition),this.mutationObserver=new MutationObserver(this.boundUpdatePosition),this.component.element&&this.mutationObserver.observe(this.component.element,{attributes:!0,attributeFilter:["style","class"]})}remove(){this.isDestroyed=!0,window.removeEventListener("scroll",this.boundUpdatePosition,!0),window.removeEventListener("resize",this.boundUpdatePosition),this.mutationObserver&&this.mutationObserver.disconnect(),this.borderElement&&this.borderElement.parentNode&&this.borderElement.parentNode.removeChild(this.borderElement),this.labelElement&&this.labelElement.parentNode&&this.labelElement.parentNode.removeChild(this.labelElement),this.borderElement=null,this.labelElement=null,this.component=null}};let v=[];window.location.href.indexOf("DEBUG=1"),window.__trace__=[];const x=(t,e)=>{t&&(e(t),t.children&&t.children.forEach((t=>{x(t,e)})))},_=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;l.h.get("error","status")||n(70717)(`./${t}`).then((()=>{l.h.set({error:{status:t}}),window.__show_errors=!0;const e=document.createElement(`cdtr-${t}`);document.body.appendChild(e)}))};const k=new class{constructor(t){let{editors:e}=t;this.debounder=new g.Z,this.configure={},this.app=new r.Z,this.transactions_to_sync=[],this.undoRedo=o.Z,this.templates={},this.commands={goToError:_,logError:b.H},this.wsService={send:t=>{console.warn("ws not connected yet, please wait..",t)}},window.transactions=this.transactions={},this.withSnapshot=!1,this.editors=[],this.__elements={},this.changes=[],this.globalCommands={bodyWalk:x},this.serverOn=!1,this.reconnectAttempts=0,this.maxReconnectAttempts=10,this.reconnectDelay=1e3,this.reconnectTimer=null,this.wsConnectionProps=null,this.isReconnecting=!1,this.wasConnected=!1,this.lastSyncTimestamp=Date.now(),this.disconnectedAt=null,this.maxDisconnectTime=3e5,this.connectWithCloud=t=>{if(t&&"object"==typeof t){const{sessionId:e,avatar:n,name:r}=t,i=(0,c.Z)();e||_(401),this.connectToWSServer({userId:i,sessionId:e,avatar:n,name:r,onOpen:()=>{this.serverOn=!0,this.app.dispatch("ws-loaded",{editor:this})}})}},e&&e.forEach((t=>this.addEditor(t))),this.type,this.components=[],this.undoRedo.on("ON_REDO",(()=>setTimeout((()=>{this.updateAll()}),200))),this.undoRedo.on("ON_UNDO",(()=>setTimeout((()=>{this.updateAll()}),200))),this.undoRedo.on("ON_SNAPSHOT",(t=>{let{deletedSteps:e}=t;Array.isArray(e)&&e.forEach((t=>{t&&Array.isArray(t.stack)&&t.stack.forEach((t=>{if("CREATE"===t.type||"REMOVE"===t.type){const e=this.getComponent(t.componentId);console.log("should destroyed",e),t.__type=t.type;const n=[{componentId:t.componentId,__type:t.type,index:t.index,type:"PREMANENTLY:DELETE"}];console.log("PREMANENTLY:DELETE",n)}}))}))}))}syncWithServer(t){l.h.get("config","savedDebounce");this.transactions_to_sync.push(...t),this.debounder.run((()=>{this.updateAll([...this.transactions_to_sync]),Array.isArray(window.__trace__)&&window.__trace__.push({transactions:[...this.transactions_to_sync]}),this.transactions_to_sync.forEach((t=>{delete t.newValue,delete t.oldValue}));const t={transactions:[...this.transactions_to_sync],transactionId:(0,c.Z)(),created_at:Date.now()};if(this.transactions[t.transactionId]=[...this.transactions_to_sync],this.serverOn){const e=JSON.stringify(t);if(this.wsService.readyState===WebSocket.OPEN)try{this.wsService.send(e),console.trace("transactions sent",t.transactions.length),this.transactions_to_sync=[],this.transactions[t.transactionId]=[]}catch(t){(0,b.H)({msg:"There is Error on sync data with the server",info:e,error_code:"#c4ca4",s:"E"}),console.warn("error on syncing, sent:",e),_()}else(0,b.H)({msg:"ws cant connected",s:"E",info:{connection:this.wsService.readyState},error_code:"#c4ca9"}),console.warn("ws not connected"),_()}}))}updateAll(t){if(t){t.forEach((t=>{const e=this.getComponent(t.componentId);if(e){const t=(e.atomElement||e.element).getBoundingClientRect();e.props.rect=t,e.props.width=t.width,e.props.height=t.height}else console.error("cant find component on updateAll: #$mvbaem3i",t)}))}this.app.dispatch("update",{editor:this}),v.forEach((t=>{t.borderSelected.updatePosition()}));const e=l.h.get("config","editor","props","onSave");"function"==typeof e&&e({transactions:t,toJson:A.au,toJSON:A.au,toHTML:A.io})}dispatch(t,e){return this.app.dispatch(t,e),this}on(t,e){this.app.subscribe(t,e)}off(t,e){switch(t){case"update":this.app.unSubscribe("update",e);break;case"select":this.app.unSubscribe("select",e)}}attemptReconnect(){if(this.disconnectedAt){if(Date.now()-this.disconnectedAt>this.maxDisconnectTime)return console.error("%cDisconnected too long, reload required","color:red"),this.isReconnecting=!1,l.h.set({wsConnection:{status:"failed",message:"Disconnected for too long. Please reload the page to ensure data sync."}}),void _("updateNeeded")}if(this.reconnectAttempts>=this.maxReconnectAttempts)return console.error("%cMax reconnection attempts reached","color:red"),this.isReconnecting=!1,l.h.set({wsConnection:{status:"failed",message:"Unable to reconnect to server"}}),void _(500);this.reconnectAttempts++;const t=1===this.reconnectAttempts?0:Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-2),3e4);0===t?console.log(`%cAttempting to reconnect immediately (${this.reconnectAttempts}/${this.maxReconnectAttempts})`,"color:orange"):console.log(`%cAttempting to reconnect (${this.reconnectAttempts}/${this.maxReconnectAttempts}) in ${t}ms`,"color:orange"),l.h.set({wsConnection:{status:"reconnecting",attempts:this.reconnectAttempts,nextAttemptIn:t}}),this.reconnectTimer=setTimeout((()=>{this.wsConnectionProps&&(console.log("%cReconnecting...","color:orange"),this.connectToWSServer(this.wsConnectionProps))}),t)}cancelReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.isReconnecting=!1}connectToWSServer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onOpen:e,userId:n,sessionId:r,avatar:i,name:o}=t;n||_(401),r||_(401),this.wsConnectionProps={onOpen:e,userId:n,sessionId:r,avatar:i,name:o},this.cancelReconnect(),l.h.set({wsConnection:{status:this.isReconnecting?"reconnecting":"connecting",attempts:this.reconnectAttempts}});const c=this.wsService=new s.w3cwebsocket(`${a.W7.ws_url}/freesolo?userId=${n}&sessionId=${r}&avatar=${i}&name=${o}`);c.onopen=()=>{console.log("%cConnected","color:green"),console.log("WebSocket readyState:",c.readyState),console.log("wsService instance:",this.wsService===c),this.wasConnected=!0,this.reconnectAttempts=0,this.isReconnecting=!1,this.disconnectedAt=null,l.h.set({wsConnection:{status:"connected",attempts:0}}),"function"==typeof e&&e()},c.onmessage=t=>{try{console.log("WS MESSAGE RECEIVED:",t.data);const e=JSON.parse(t.data);return e.transactions.forEach((t=>{switch(t.type){case"SELECT_ELEMENT":{const n=this.getComponent(t.componentId);if(n){const r=v.findIndex((t=>t?.userId===e.user.id));-1!==r&&(v[r].borderSelected.remove(),v.splice(r,1));const i=new w(n,e.user.color,e.user.id,e.user.name,t.componentId);v.push({userId:e.user.id,componentId:t.componentId,borderSelected:i})}}break;case"USER_JOINED":{const e=l.h.get("connectedUsers")||[];l.h.set({connectedUsers:[...e,t.user]})}break;case"USER_LEFT":{const e=l.h.get("connectedUsers")||[];l.h.set({connectedUsers:e.filter((e=>e.userId!==t.user.userId))});const n=v.findIndex((e=>e.userId===t.user.userId));-1!==n&&(v[n].borderSelected.remove(),v.splice(n,1))}break;case"SESSION_INITIALIZED":const r=t.users.filter((t=>t.userId!==n));l.h.set({connectedUsers:r});break;case"PATCH":this.updateComponent(t.componentId,t.key,t.value,{slient:!0,sync:!1});break;case"MOVE":this.moveComponent({componentId:t.componentId,newParentId:t.newParentId,newIndex:t.newIndex,oldIndex:t.oldIndex,oldParentId:t.oldParentId,direction:t.direction},{sync:!1});break;case"CREATE":this.createComponent({componentId:t.componentId,parentId:t.parentId,index:t.index,body:t.body},{sync:!1,clone:!0});break;case"ADD":this.addComponent({componentId:t.componentId,parentId:t.parentId,index:t.index},{sync:!1});break;case"REMOVE":this.removeComponent({componentId:t.componentId,parentId:t.parentId,index:t.index},{sync:!1})}})),void v.forEach((t=>{t.borderSelected.updatePosition()}))}catch(t){(0,b.H)({msg:t.message,s:"E",info:{data:t.stack},error_code:"#c4222"}),console.error(t)}},c.onclose=t=>{if(console.log("%cWebSocket connection closed","color:orange",t),l.h.set({wsConnection:{status:"disconnected",code:t.code,reason:t.reason}}),!this.wasConnected)return console.error("%cInitial connection failed, not attempting reconnection","color:red"),void _(500);this.disconnectedAt||(this.disconnectedAt=Date.now());if([1e3,1008,4401].includes(t.code))return console.log("%cNot attempting reconnection due to close code:","color:red",t.code),void _(500);this.isReconnecting||(this.isReconnecting=!0,this.attemptReconnect())},c.onerror=t=>{console.error("%cWebSocket error:","color:red",t),l.h.set({wsConnection:{status:"error",error:t.message||"WebSocket error occurred"}})}}addEditor(t){let{id:e,type:n,name:r,editor:i}=t;this.editors.push({id:e,type:n,name:r,editor:i})}removeEditor(t){let{id:e,name:n,type:r}=t;e&&(this.editors=this.editors.filter((t=>t.id!==e))),n&&(this.editors=this.editors.filter((t=>t.name!==n))),r&&(this.editors=this.editors.filter((t=>t.type!==r)))}getComponents(){return l.h.get("components")}getComponent(t){return t?l.h.get("components",t):null}getEditor(t){if(t){const e=this.editors.find((e=>e.name===t));return e?e.editor:null}return this.editors}getSelectedComponent(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{find:e=null}=t;if(e){const t=[],n=r=>{r&&r.forEach((r=>{const i=this.getComponent(r);i&&(e&&e.equalWith(i.type)&&t.push(i),n(i.children))}))};return this.components.forEach((r=>{e&&e.equalWith(r.type)&&t.push(r),r.children&&n(r.children)})),t}return this.components}addComponent(t){let{componentId:e,parentId:n,index:r,layer:o}=t,{sync:s=!0,insert:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c=l.h.get("components",e);if(!c)return;const d=l.h.get("components",n);if(c&&d){const t=[new p({componentId:e,parentId:n,index:r,layer:o})];c.parentId=n,2===o?d.elements.push(e):d.children.splice(r,0,e),this.withSnapshot&&t.length>0&&(0,i.Z)({steps:t,onEnd:()=>{this.withSnapshot=!1}}),d.appendChild(c.element,r),s&&this.syncWithServer(t)}}selectComponent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?(-1!==this.components.findIndex((e=>e.id===t.id))||(t.isSelected=!0,this.type=e.type||t.type,"function"==typeof t.onSelect&&t.onSelect("selected"),this.wsService.send(JSON.stringify({transactions:[{type:"SELECT_ELEMENT",componentId:t.id}]})),this.components.push(t),this.app.dispatch("update",{editor:this,props:e}),this.app.dispatch("select",{editor:this,props:e,component:t,components:this.components})),this):this}clean(){return this.components.forEach((t=>{t.isSelected=!1,"function"==typeof t.onDeselect&&t.onDeselect("selected")})),this.components=[],this}cloneComponent(t){let{componentId:e,parentId:n,index:r}=t;const o=[],s=k.getComponent(e),a=k.getComponent(n);if(!s||!a)return console.error("component not founded");const l=(t,e,n)=>{JSON.parse(JSON.stringify(t.props));const r=JSON.parse(JSON.stringify(t.props)),i={id:`cdtr-${(0,c.Z)()}`,type:t.type,parentId:e.id,index:n,props:r};i.id=`cdtr-${(0,c.Z)()}`,delete i._id,i.children=[];const s=k.createComponent({body:i,parentId:e.id,index:n});o.push(new h.Z({componentId:s.id,parentId:e.id,index:n,body:i})),t.children&&t.children.forEach(((t,e)=>{const n=k.getComponent(t),r=k.getComponent(s.id);n&&l(n,r,e)}))};if(l(s,a,r),"card"===s.type||"col"===s.type){const t=s.closest("block");if(t){(0,y.c)(t).forEach((t=>{k.getComponent(t.componentId)?o.push(t):(console.error("cant find col to resize on clone at editor."),k.commands.logError({s:"E",error_code:"#ggbbk$",info:{},msg:"Cant find col to resize on clone at the editor"}))}))}}(0,i.Z)({steps:o,update:!0})}removeComponent(t){let{componentId:e}=t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{const{sync:t=!0}=n,r=l.h.get("components",e);r||((0,b.H)({msg:`cant find parent index, the index:${index}`,error_code:"#e44lk",info:{data:{componentId:e,parentId:o.id,children:o.children,layer:1}},s:"E"}),_());r.closest("block");let o=r.parent();if(o&&2!==r.props.layer){const n=o.children.findIndex((t=>t===r.id));if(n<0)return(0,b.H)({msg:`cant find children(${r.id}) index: of parent, the index:${n}`,error_code:"#e24lmvD3",info:{data:{componentId:e,parentId:o.id,children:o.children,layer:1}},s:"E"}),_(),this;o.children.splice(n,1);const s=[new u.Z({componentId:e,parentId:o.id,index:n,layer:r.layer})];r.remove(),this.withSnapshot&&s.length>0&&(0,i.Z)({steps:s,onEnd:()=>{this.withSnapshot=!1}}),t&&this.syncWithServer(s)}else{const t=o.elements.findIndex((t=>t===r.id));if(t<0)return(0,b.H)({msg:`cant find parent index, the index:${t}`,error_code:"#eggf4",info:{data:{componentId:e,parentId:o.id,elements:o.elements,layer:2}},s:"E"}),_(),console.error("index not found"),this;o.elements.splice(t,1);const n=[new u.Z({componentId:e,parentId:o.id,index:t,layer:2})];r.remove(),this.withSnapshot&&n.length>0&&(0,i.Z)({steps:n,onEnd:()=>{this.withSnapshot=!1}}),this.syncWithServer(n)}return this}catch(t){(0,b.H)({error_code:"#eggf!!4",msg:t.message,info:{data:t.stack},s:"E"}),_(),console.error(t)}}moveComponent(t){let{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c,direction:d}=t,{sync:p=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1===s)return console.log("old index is -1 on moveComponent"),(0,b.H)({error_code:"#eggf$^4",msg:"old index is -1 on moveComponent",info:{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c},s:"E"}),_(),null;if(-1===o)return console.log("new index is -1 on moveComponent"),(0,b.H)({error_code:"#e@#$^4",msg:"new index is -1 on moveComponent",info:{componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,fromLayer:a,toLayer:c},s:"E"}),_(),null;const h=[new f.Z({componentId:e,newParentId:n,oldParentId:r,newIndex:o,oldIndex:s,direction:d,fromLayer:a,toLayer:c})],u=l.h.get("components",r),m=l.h.get("components",n),g=l.h.get("components",e);if(g&&m&&u){try{if(2===a&&2===c){u.elements.splice(s,1),m.elements.splice(o,0,g.id);m.element.appendChild(g.element)}else{u.children.splice(s,1),m.children.splice(o,0,g.id);let t;u.id===m.id&&"block"===m.type&&(t={direction:o>s?"bottom":"top"}),m.appendChild(g.element,o,t)}}catch(t){console.error("please provide appendChild method to perform move, the component:",m)}this.withSnapshot&&h.length>0&&(0,i.Z)({steps:h,onEnd:()=>{this.withSnapshot=!1}}),g.parentId=n,p&&this.syncWithServer(h)}else console.error("component not founded on move");return this}createComponent(t){let{body:e,parentId:n,index:r,layer:o}=t,{sync:s=!0,clone:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const p=l.h.get("components",n);if(!p)return _(),(0,b.H)({msg:"component not founded on creating",error_code:"#c49vk",info:{data:{body:e,parentId:n,index:r,layer:o}},s:"E"}),void console.error("component not founded on reordered");e.layer=o||1;const u=t=>{t.id=t._id=a?t.id:`cdtr-${(0,c.Z)()}`,t.children&&t.children.forEach(((e,n)=>{e.parentId=t.id,u(e)}))};e.children||(e.children=[]),u(e),2===o?(Array.isArray(p.elements)||(p.elements=[]),p.elements.splice(r,0,e.id)):p.children.splice(r,0,e.id);const{children:f}=(0,d.s)({children:[e],id:n});p.appendChild(f[0],r);const m=[new h.Z({componentId:e.id,parentId:n,body:e,index:r,layer:o})];return s&&this.syncWithServer(m),this.withSnapshot&&m.length>0&&(0,i.Z)({steps:m,onEnd:()=>{this.withSnapshot=!1}}),l.h.get("components",e.id)}updateComponent(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{slient:o,sync:s=!0}=r;if("string"==typeof t&&(t=l.h.get("components",t)),!t)return console.error("component not founded on update"),(0,b.H)({error_code:"#e@lld",msg:"component not founded on update",info:{},s:"E"}),null;const a=[new m.Z({componentId:t.id,key:e,value:n&&"object"==typeof n?JSON.parse(JSON.stringify(n)):n})];return this.withSnapshot&&a.length>0?(0,i.Z)({steps:a,onEnd:t=>{let{id:e,key:n,value:r}=t;this.withSnapshot=!1,s&&this.syncWithServer(a)}}):(t.props[e]=n,s?this.syncWithServer(a):this.updateAll()),this}saveTemplate(t,e){this.templates[t]=e}getTemplate(t){return this.templates[`style:${t}`]}slientPatch(t,e,n){const r=[new m.Z({componentId:t.id,key:e,value:n})];this.syncWithServer(r)}store(){return this.withSnapshot=!0,this}execCommand2(t){let{transactions:e,update:n=this.components}=t;const r=[];Array.isArray(n)||(n=[n]),e.forEach((t=>{let{type:e,key:i,value:o}=t;n.forEach((t=>{const n=e?t.closest(e):t;if(n){const t=new m.Z({componentId:n.id,key:i,value:o});r.push(t)}}))})),this.withSnapshot&&r.length>0?(0,i.Z)({steps:r,onEnd:t=>{let{componentId:e,key:n,value:r,stack:i,steps:o}=t;this.withSnapshot=!1,this.syncWithServer(o)}}):r.forEach((t=>{let{componentId:e,key:n,value:i}=t;const o=l.h.get("components",e);o&&(o.props[n]=i,this.syncWithServer(r))}))}execCommands(t,e){let{components:n=[...this.components],silent:r=!1}=e||{};Array.isArray(n)||(n=[n]),Array.isArray(t)||(t=[t]);const o=[];return t.forEach((t=>{let{componentId:e,key:r,value:i,options:s={}}=t;const{find:a}=s;if(e){if("function"==typeof i){const t=this.getComponent(e);i=i(t)}const t=new m.Z({componentId:e,key:r,value:i});o.push(t)}else n.forEach((t=>{if(a){let e;if(e=t.closest(a),e||(e=t.find(a)),!e)return void console.log("component not found on execCommands",a);t=e}let e=i;if("function"==typeof i&&(e=i(t),null===e))return this;const n=new m.Z({componentId:t.id,key:r,value:e});o.push(n)}))})),this.withSnapshot&&o.length>0?(0,i.Z)({steps:o,onEnd:t=>{let{componentId:e,key:n,value:r,steps:i}=t;this.withSnapshot=!1,this.syncWithServer(o)}}):o.forEach((t=>{let{componentId:e,key:n,value:r}=t;const i=l.h.get("components",e);i&&(i.props[n]=r,this.syncWithServer(o))})),this}execCommand(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.execCommands({key:t,value:e,options:n}),this}createschema(t,e){this.__elements[t]=e}getschema(t){return this.__elements[t]}}({}),C=k},70538:(t,e,n)=>{"use strict";function r(t){const e=[];if(t&&"function"==typeof t.commands.fixCols){t.commands.fixCols().sizes.forEach((t=>e.push(t)))}return e}n.d(e,{c:()=>r})},65329:(t,e,n)=>{"use strict";n.d(e,{X:()=>o});var r=n(45607),i=n(14200);function o(t){let e=[],n=t;for(;n&&(!n||"section"!==n.type&&"root"!==n.type);){if(0===n.children.length){const t=n.parent(),o=t.children.findIndex((t=>t===n.id));-1!==o&&(e.push(new i.Z({componentId:n.id,parentId:t.id,index:o})),r.Z.removeComponent({componentId:n.id}))}n=n.parent()}return e}},31490:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(21293);n(27338);const i=t=>{let{items:e,onChange:n,debounce:i,onCreate:o}=t;const s=[...e];return r.dy`<cdtr-row dir="ltr" style="padding:10px;">
55
55
  <cdtr-col style="margin-top:20;margin-bottom:20px;" sm="12">
56
56
  <style>
57
57
  ${"cdtr-input.list-manager-search-input{\n --cdtr-input-height:50px;\n }"}
@@ -80,7 +80,7 @@
80
80
  </cdtr-col>`}(t,{onChange:n})))}
81
81
  </div></cdtr-col
82
82
  >
83
- </cdtr-row>`}},51679:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(70235);const i=function(t){let{labelStyle:e={},fieldStyle:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.type,o=t?.props?.isRequired;switch(i){case"input":return{type:t.type,id:t.id,props:{type:t.inputType||"text",placeholder:t.placeholder||"",label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,style:{width:"100%",...n},paramName:t.paramName}};case"textarea":return{type:t.type,id:t.id,props:{label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,minRows:5,style:{...n},paramName:t.paramName}};case"checkbox":case"toggle":return{type:t.type,id:t.id,props:{label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,checked:!1,style:{width:"100%"},paramName:t.paramName}};case"radio-group":return{type:t.type,id:t.id,props:{items:t.items,label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,style:{width:"100%"},paramName:t.paramName}};case"menu":case"dropdown":return{type:t.type,id:t.id,props:{isRequired:o,placeholder:r.h.get("lang","choose_an_option"),value:"",variant:"outlined",triggerProps:{fullWidth:!0,name:t.label||t.name,style:{}},items:t.items,label_field:{props:{text:t.label||t.name,style:e}},style:{width:"100%"},paramName:t.paramName}};default:return console.warn("unknown type in form creator."),{type:"unknown",id:Date.now(),props:{label_field:{props:{text:"__",style:e}},style:{},paramName:""}}}}},49721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,parentId:n,index:r,body:i,layer:o}=t;this.componentId=e,this.parentId=n,this.index=r,this.body=i,this.type="CREATE",this.layer=o||1}}},7910:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,newParentId:n,oldParentId:r,newIndex:i,oldIndex:o,fromLayer:s,toLayer:a}=t;this.componentId=e,this.newParentId=n,this.oldParentId=r,this.newIndex=i,this.oldIndex=o,this.fromLayer=s||1,this.toLayer=a||1,this.type="MOVE"}}},8441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,key:n,value:r,newValue:i,oldValue:o}=t;this.componentId=e,this.key=n,this.value=r,this.oldValue=o,this.type="PATCH"}}},14200:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,parentId:n,layer:r=1,index:i}=t;this.componentId=e,this.parentId=n,this.index=i,this.layer=r,this.type="REMOVE"}}},81487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r=n(58860),i=n(36546),o=n(70235),s=n(81929),a=(n(67237),n(1434),n(43214)),l=n(45607),c=n(36351),d=n(27017);(0,c.c)();a.Z.connect(a.F.KEY_UP,(t=>{if(t.ctrlKey){o.h.get("components").filter((t=>"function"==typeof t.onKeyUp&&t.isSelected)).forEach((e=>{e.onKeyUp({event:t,compose:e})}))}})),s.Z.on(s.F.ON_UNDO,(t=>{try{const{stack:e}=t;e.forEach((t=>{const{type:e}=t;switch(e){case i.W.ADD:case i.W.CREATE:case i.W.CLONE:try{const{componentId:e,parentId:n}=t;l.Z.removeComponent({componentId:e})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.PATCH:try{const{componentId:e,key:n,oldValue:r}=t,i=o.h.get("components",e);l.Z.updateComponent(i,n,r).clean().selectComponent(i)}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v2",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.REMOVE:try{const{componentId:e,parentId:n,index:r}=t,i=o.h.get("components",n),s=o.h.get("components",e);if(!i)throw new Error(`cant find the parent:${n} on undo removed element.`);if(!s)throw new Error(`cant find component:${s} on undo removed element.`);l.Z.addComponent({componentId:e,parentId:i.id,index:r,layer:s.layer})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v3",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.MOVE:try{const{componentId:e,oldParentId:n,newParentId:r,oldIndex:i,newIndex:o,fromLayer:s,toLayer:a}=t;l.Z.moveComponent({componentId:e,oldParentId:r,newParentId:n,oldIndex:o,newIndex:i,fromLayer:s,toLayer:a,direction:o>i?"bottom":"top"})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v4",info:{data:t.stack},s:"E"}),console.error(t)}}}))}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v5",info:{data:t.stack},s:"E"}),console.error(t)}finally{r.Z.dispatch("changed",{})}})),s.Z.on(s.F.ON_REDO,(t=>{const{stack:e}=t;e.forEach((t=>{const{type:e}=t;switch(e){case i.W.ADD:case i.W.CLONE:case i.W.CREATE:try{const{componentId:e,parentId:n,index:r}=t,i=o.h.get("components",n),s=o.h.get("components",e);if(!i)throw new Error(`cant find the parent:${n} on undo removed element.`);if(!s)throw new Error(`cant find component:${s} on undo removed element.`);i.appendChild(s.element,r),l.Z.addComponent({componentId:e,parentId:i.id,index:r,layer:s.layer})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v66",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.PATCH:try{{const{componentId:e,key:n,newValue:r}=t,i=o.h.get("components",e);l.Z.updateComponent(i,n,r).clean().selectComponent(i)}}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5vv7",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.REMOVE:try{{const{componentId:e,parentId:n,fromLayer:r,toLayer:i}=t;if(!o.h.get("components",n))throw new Error(`cant find the parent:${n} on undo removed element.`);o.h.get("components",e);l.Z.removeComponent({componentId:e,fromLayer:r,toLayer:i})}}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v8",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.MOVE:try{let{componentId:e,newParentId:n,newIndex:r,oldParentId:i,newPreviousElId:o,oldIndex:s,fromLayer:a,direction:c,toLayer:d}=t;l.Z.moveComponent({componentId:e,oldParentId:i,newParentId:n,oldIndex:s,newIndex:r,fromLayer:a,toLayer:d,direction:r>s?"bottom":"top"})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v9",info:{data:t.stack},s:"E"}),console.error(t)}}})),r.Z.dispatch("changed",{})}));const p=function(t,e,n){e.style||(e.style={}),e.classList||(e.classList=[]);const r={set:(t,e,r)=>{if(void 0===r&&(console.warn("test faild: value is undefined",e,r),"rect"===e))return!0;const o=n.set(t,e,r,null);if("width"===e||"height"===e)return t[e]=r,!0;if("breakpoints"===e)return t[e]=r,!0;if("classList"===e)return t[e]=r,!0;if("interactions"===e)return t[e]=r,!0;if("show_on_mobile"===e)return t[e]=r,!0;if("show_on_tablet"===e)return t[e]=r,!0;if("show_on_desktop"===e)return t[e]=r,!0;if("name"===e)return t[e]=r,!0;if("element_ID"===e)return t[e]=r,!0;if("rect"===e&&"object"==typeof r&&"number"==typeof r.height&&"number"==typeof r.width)return t[e]=r,!0;if("width"===e&&"number"==typeof r)return t[e]=r,!0;if("height"===e&&"number"==typeof r)return t[e]=r,!0;if(o){function s(){const t=i.get();i.element;document.querySelector(`[data-id="${t.id}"]`)&&"function"==typeof t.render&&t.render({value:r,key:e})}s()}return o}},i={isSelected:!1,element:t,get:()=>o.h.get("components",i.id),find:t=>{const e=o.h.get("components",i.id);if(!Array.isArray(e.children))return null;for(let n=0;n<e.children.length;n++){const r=e.children[n],i=o.h.get("components",r);if(i){if(i.type.equalWith(t))return i;let e;try{e=i.find(t)}catch(t){console.error(t)}if(e)return e}}},treeWalk:t=>{const e=o.h.get("components",i.id);if(t(e),!Array.isArray(e.children))return null;for(let n=0;n<e.children.length;n++){const r=e.children[n],i=o.h.get("components",r);i&&(t(i),i.treeWalk(t))}},findAllByType:t=>{const e=[],n=o.h.get("components",i.id);if(!Array.isArray(n.children))return e;for(let r=0;r<n.children.length;r++){const i=n.children[r],s=o.h.get("components",i);if(s){s.type.equalWith(t)&&e.push(s);s.findAllByType(t).forEach((t=>e.push(t)))}}return e},appendChild:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=i.get(),o=r.children.findIndex((e=>e===t.dataset.id));if(!r.allowSortable)return void console.error("sortable not allowed");const s=r.childrenHolder;0===e?s.prepend(t):e===r.children.length-1?s.appendChild(t):-1!==o&&o<e&&s.children[e]&&s.children[e].nextElementSibling?s.insertBefore(t,s.children[e].nextElementSibling):(n&&"bottom"===n.direction&&(e+=1),s.insertBefore(t,s.children[e]))},closest:t=>{let e=0;if(i.type.equalWith(t))return o.h.get("components",i.id);let n,r=o.h.get("components",i.id);for(;r;){e++;const i=o.h.get("components",r.parentId);if(!i||i.type===t){n=i;break}r=i}return n&&(n.level=e),n},isInDom:()=>document.querySelector(`[data-id="${i.id}"]`),select:()=>{l.Z.clean().selectComponent(i.get())},parent:()=>{let t=o.h.get("components",i.id).parentId;return o.h.get("components",t)},unsafeRemove:()=>{t.remove()},extend:{},id:e.id,type:e.type,parentId:e.parentId,props:new Proxy(e.props,r),children:e.children,addProp:(t,e)=>{i[t]=e}};return i}},58860:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=new(n(85517).Z)},67237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(36546),i=n(59320);const o=t=>t instanceof Date,s=t=>null!=t&&"object"==typeof t,a=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),l=t=>s(t)&&(t=>0===Object.keys(t).length)(t),c=(t,e)=>{if(t===e)return{};if(!s(t)||!s(e))return e;const n=Object.keys(t).reduce(((t,n)=>(a(e,n)||(t[n]=void 0),t)),Object.create(null));return o(t)||o(e)?t.valueOf()==e.valueOf()?{}:e:Object.keys(e).reduce(((n,r)=>{if(!a(t,r))return n[r]=e[r],n;const i=c(t[r],e[r]);return!l(i)||o(i)||!l(t[r])&&l(e[r])?(n[r]=i,n):n}),n)},d=c;var p=n(58860),h=n(81929),u=(n(54774),n(70235)),f=n(45607),m=n(46245);const g=n(3096),b=n(96206),y=new i.Z,A={},w={},v=[],x=t=>{try{let{steps:e,options:n,onEnd:i,force:o,update:s}=t;Array.isArray(e)||(e=[e]),e.forEach((t=>{const{type:e}=t;if(e===r.W.PATCH){const{componentId:e,key:n,options:r}=t;let{value:i}=t;const o=g({componentId:e,key:n}),s=u.h.get("components",e);if(!s)return console.error("component not found",e,t),void console.trace();A[o]||(A[o]=b(s.props[n]));let a=b(i);switch(n){case"style":case"iconStyle":a&&"object"==typeof a&&(a=w[o]=(0,m.Z)(s.props[n],a));break;default:w[o]=b(a)}if(void 0!==(s.props[n]=w[o])){const r=v.findIndex((t=>t.componentId===e&&t.key===n));-1!==r&&v.splice(r,1);const i={...t};i.newValue=a,v.push(i)}else delete w[o]}else v.push(t)})),y.run((()=>{for(let t=0;t<v.length;t++){const e=v[t],{type:n}=e;if("PATCH"===n){const{newValue:t,componentId:n,key:r}=e,i=g({componentId:n,key:r}),a=A[i];e.oldValue=a,delete A[g({componentId:n,key:r})];let l={};l=Array.isArray(t)&&Array.isArray(a)?t.filter((t=>!a.find((e=>e===t)))):d(a,t),null!==l&&"object"==typeof l&&Object.keys(l).forEach((t=>{void 0===l[t]&&delete l[t]})),!0!==o&&null!==l&&"object"==typeof l&&Object.keys(l).length,s&&void 0!==w[i]&&f.Z.slientPatch(f.Z.getComponent(n),r,w[i]),delete w[i]}}if(v.length>0){h.Z.create({stack:v,options:n});const t=[...v];"function"==typeof i&&i({stack:t,steps:t})}for(;v.length;)v.pop()}))}catch(e){console.error(e),f.Z.commands.logError({error_code:"#123!#",info:{data:e.trace,...t},msg:e.message,s:"E"})}finally{p.Z.dispatch("changed",{})}}},23602:(t,e,n)=>{"use strict";n.d(e,{HE:()=>a,IT:()=>c,fI:()=>o,sX:()=>l,wO:()=>s});var r=n(7896),i=n(40949);const o=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M12 2c5.522 0 10 3.978 10 8.889a5.558 5.558 0 0 1-5.556 5.555h-1.966c-.922 0-1.667.745-1.667 1.667 0 .422.167.811.422 1.1.267.3.434.689.434 1.122C13.667 21.256 12.9 22 12 22 6.478 22 2 17.522 2 12S6.478 2 12 2zm-1.189 16.111a3.664 3.664 0 0 1 3.667-3.667h1.966A3.558 3.558 0 0 0 20 10.89C20 7.139 16.468 4 12 4a8 8 0 0 0-.676 15.972 3.648 3.648 0 0 1-.513-1.86zM7.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm9 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM12 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})),s=t=>(0,i.Z)("svg",(0,r.Z)({},t,{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"}),(0,i.Z)("g",null,(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))),a=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M19 10h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 1 1 14 0v1zM5 12v8h14v-8H5zm6 2h2v4h-2v-4zm6-4V9A5 5 0 0 0 7 9v1h10z"})),l=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M7 10h13a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 0 1 13.262-3.131l-1.789.894A5 5 0 0 0 7 9v1zm-2 2v8h14v-8H5zm5 3h4v2h-4v-2z"})),c=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))},33776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});n(54774);var r=n(68905);const i=(t,e)=>{if("object"!=typeof e)return console.error("attributes must be an object.."),t;for(const n in e)if(Object.hasOwnProperty.call(e,n)){const i=e[n];switch(n){case"style":case"iconStyle":if(!i)return;t.setAttribute(n,(0,r.o)(i)),"svg"===t.nodeName.toLowerCase()&&(t.removeAttribute("width"),t.removeAttribute("height"));break;default:"string"!=typeof n||"string"!=typeof i&&"boolean"!=typeof i&&"number"!=typeof i||t.setAttribute(n,i),void 0!==t[n]&&(t[n]=i)}}return t}},35965:(t,e,n)=>{"use strict";function r(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let i=[];return"string"==typeof e?e.split(",").join(" "):(e.forEach((t=>{"string"==typeof t?i.push(t):Array.isArray(t)&&i.push(r(...t))})),i=i.filter((t=>t)),i.join(" "))}n.d(e,{Z:()=>r})},41636:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const r=n(80184),i=(t,e)=>r(t).setAlpha(e).toRgbString()},36351:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s,c:()=>l});var r=n(56666);const i=new Map;class o{constructor(t){let{onEnd:e}=t;(0,r.Z)(this,"callback",void 0),(0,r.Z)(this,"timeout",void 0),(0,r.Z)(this,"delay",void 0),this.delay=300,this.onEnd=e,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;this.callback=t,"number"==typeof e&&(this.delay=e),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.callback(),"function"==typeof this.onEnd&&this.onEnd()}),this.delay)}}function s(t,e){if(i.has(t)){i.get(t).run(t,e)}else{const n=new o({onEnd:()=>{i.delete(t)}});n.run(t,e),i.set(t,n)}}class a{constructor(){(0,r.Z)(this,"timeout",void 0),this.delay=300,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;clearTimeout(this.timeout),this.timeout=setTimeout((()=>{t()}),e)}}function l(){return new a}},71781:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Ot});var r=n(56666);const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),a=new WeakMap;class l{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&a.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new l(n,t,s)},d=(t,e)=>{if(o)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),r=i.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}},p=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:h,defineProperty:u,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:b}=Object,y=globalThis,A=y.trustedTypes,w=A?A.emptyScript:"",v=y.reactiveElementPolyfillSupport,x=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?w:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},k=(t,e)=>!h(t,e),C={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:k};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&u(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=f(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=b(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...m(t),...g(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(p(t))}else void 0!==t&&e.push(p(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:_).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??k)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[x("elementProperties")]=new Map,E[x("finalized")]=new Map,v?.({ReactiveElement:E}),(y.reactiveElementVersions??=[]).push("2.1.1");const S=globalThis,B=S.trustedTypes,O=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,$="?"+I,T=`<${$}>`,L=document,N=()=>L.createComment(""),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D=t=>P(t)||"function"==typeof t?.[Symbol.iterator],z="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,U=/>/g,Z=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,V=/"/g,Y=/^(?:script|style|textarea|title)$/i,W=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),q=W(1),X=(W(2),W(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),K=new WeakMap,J=L.createTreeWalker(L,129);function Q(t,e){if(!P(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}const tt=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=H;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===H?"!--"===l[1]?s=j:void 0!==l[1]?s=U:void 0!==l[2]?(Y.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=Z):void 0!==l[3]&&(s=Z):s===Z?">"===l[0]?(s=i??H,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?Z:'"'===l[3]?V:F):s===V||s===F?s=Z:s===j||s===U?s=H:(s=Z,i=void 0);const p=s===Z&&t[e+1].startsWith("/>")?" ":"";o+=s===H?n+T:c>=0?(r.push(a),n.slice(0,c)+M+n.slice(c)+I+p):n+I+(-2===c?e:p)}return[Q(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class et{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=tt(t,e);if(this.el=et.createElement(l,n),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=J.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(M)){const e=c[o++],n=r.getAttribute(t).split(I),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?st:"?"===s[1]?at:"@"===s[1]?lt:ot}),r.removeAttribute(t)}else t.startsWith(I)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(Y.test(r.tagName)){const t=r.textContent.split(I),e=t.length-1;if(e>0){r.textContent=B?B.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],N()),J.nextNode(),a.push({type:2,index:++i});r.append(t[e],N())}}}else if(8===r.nodeType)if(r.data===$)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(I,t+1));)a.push({type:7,index:i}),t+=I.length-1}i++}}static createElement(t,e){const n=L.createElement("template");return n.innerHTML=t,n}}function nt(t,e,n=t,r){if(e===X)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=R(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=nt(t,i._$AS(t,e.values),i,r)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??L).importNode(e,!0);J.currentNode=r;let i=J.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new it(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new ct(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=J.nextNode(),o++)}return J.currentNode=L,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),R(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):D(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(L.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=et.createElement(Q(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new rt(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new it(this.O(N()),this.O(N()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=nt(this,t,e,0),o=!R(t)||t!==this._$AH&&t!==X,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=nt(this,r[n+s],e,s),a===X&&(a=this._$AH[s]),o||=!R(a)||a!==this._$AH[s],a===G?t=G:t!==G&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class st extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class at extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class lt extends ot{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??G)===X)return;const n=this._$AH,r=t===G&&n!==G||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==G&&(n===G||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const dt={M,P:I,A:$,C:1,L:tt,R:rt,D,V:nt,I:it,H:ot,N:at,U:lt,B:st,F:ct},pt=S.litHtmlPolyfillSupport;pt?.(et,it),(S.litHtmlVersions??=[]).push("3.3.1");const ht=globalThis;class ut extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new it(e.insertBefore(N(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}ut._$litElement$=!0,ut.finalized=!0,ht.litElementHydrateSupport?.({LitElement:ut});const ft=ht.litElementPolyfillSupport;ft?.({LitElement:ut});(ht.litElementVersions??=[]).push("4.2.1");const{I:mt}=dt,gt=2;class bt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const yt=(t,e)=>{const n=t._$AN;if(void 0===n)return!1;for(const t of n)t._$AO?.(e,!1),yt(t,e);return!0},At=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===n?.size)},wt=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),_t(e)}};function vt(t){void 0!==this._$AN?(At(this),this._$AM=t,wt(this)):this._$AM=t}function xt(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)yt(r[t],!1),At(r[t]);else null!=r&&(yt(r,!1),At(r));else yt(this,t)}const _t=t=>{t.type==gt&&(t._$AP??=xt,t._$AQ??=vt)};class kt extends bt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),wt(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(yt(this,t),At(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Ct{}const Et=new WeakMap,St=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends kt{render(t){return G}update(t,[e]){const n=e!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),G}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let n=Et.get(e);void 0===n&&(n=new WeakMap,Et.set(e,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?Et.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Bt=n(49120);class Ot extends ut{constructor(){super(),(0,r.Z)(this,"contentRef",new Ct),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(t){this.searchText=t.target.value;const e=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}render(){return q`
83
+ </cdtr-row>`}},51679:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(70235);const i=function(t){let{labelStyle:e={},fieldStyle:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=t.type,o=t?.props?.isRequired;switch(i){case"input":return{type:t.type,id:t.id,props:{type:t.inputType||"text",placeholder:t.placeholder||"",label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,style:{width:"100%",...n},paramName:t.paramName}};case"textarea":return{type:t.type,id:t.id,props:{label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,minRows:5,style:{...n},paramName:t.paramName}};case"checkbox":case"toggle":return{type:t.type,id:t.id,props:{label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,checked:!1,style:{width:"100%"},paramName:t.paramName}};case"radio-group":return{type:t.type,id:t.id,props:{items:t.items,label_field:{props:{text:t.label||t.name,style:e}},isRequired:o,style:{width:"100%"},paramName:t.paramName}};case"menu":case"dropdown":return{type:t.type,id:t.id,props:{isRequired:o,placeholder:r.h.get("lang","choose_an_option"),value:"",variant:"outlined",triggerProps:{fullWidth:!0,name:t.label||t.name,style:{}},items:t.items,label_field:{props:{text:t.label||t.name,style:e}},style:{width:"100%"},paramName:t.paramName}};default:return console.warn("unknown type in form creator."),{type:"unknown",id:Date.now(),props:{label_field:{props:{text:"__",style:e}},style:{},paramName:""}}}}},49721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,parentId:n,index:r,body:i,layer:o}=t;this.componentId=e,this.parentId=n,this.index=r,this.body=i,this.type="CREATE",this.layer=o||1}}},7910:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,newParentId:n,oldParentId:r,newIndex:i,oldIndex:o,fromLayer:s,toLayer:a}=t;this.componentId=e,this.newParentId=n,this.oldParentId=r,this.newIndex=i,this.oldIndex=o,this.fromLayer=s||1,this.toLayer=a||1,this.type="MOVE"}}},8441:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,key:n,value:r,newValue:i,oldValue:o}=t;this.componentId=e,this.key=n,this.value=r,this.oldValue=o,this.type="PATCH"}}},14200:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});class r{constructor(t){let{componentId:e,parentId:n,layer:r=1,index:i}=t;this.componentId=e,this.parentId=n,this.index=i,this.layer=r,this.type="REMOVE"}}},81487:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r=n(58860),i=n(36546),o=n(70235),s=n(81929),a=(n(67237),n(1434),n(43214)),l=n(45607),c=n(36351),d=n(27017);(0,c.c)();a.Z.connect(a.F.KEY_UP,(t=>{if(t.ctrlKey){o.h.get("components").filter((t=>"function"==typeof t.onKeyUp&&t.isSelected)).forEach((e=>{e.onKeyUp({event:t,compose:e})}))}})),s.Z.on(s.F.ON_UNDO,(t=>{try{const{stack:e}=t;e.forEach((t=>{const{type:e}=t;switch(e){case i.W.ADD:case i.W.CREATE:case i.W.CLONE:try{const{componentId:e,parentId:n}=t;l.Z.removeComponent({componentId:e})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.PATCH:try{const{componentId:e,key:n,oldValue:r}=t,i=o.h.get("components",e);l.Z.updateComponent(i,n,r).clean().selectComponent(i)}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v2",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.REMOVE:try{const{componentId:e,parentId:n,index:r}=t,i=o.h.get("components",n),s=o.h.get("components",e);if(!i)throw new Error(`cant find the parent:${n} on undo removed element.`);if(!s)throw new Error(`cant find component:${s} on undo removed element.`);l.Z.addComponent({componentId:e,parentId:i.id,index:r,layer:s.layer})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v3",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.MOVE:try{const{componentId:e,oldParentId:n,newParentId:r,oldIndex:i,newIndex:o,fromLayer:s,toLayer:a}=t;l.Z.moveComponent({componentId:e,oldParentId:r,newParentId:n,oldIndex:o,newIndex:i,fromLayer:s,toLayer:a,direction:o>i?"bottom":"top"})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v4",info:{data:t.stack},s:"E"}),console.error(t)}}}))}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v5",info:{data:t.stack},s:"E"}),console.error(t)}finally{r.Z.dispatch("changed",{})}})),s.Z.on(s.F.ON_REDO,(t=>{const{stack:e}=t;e.forEach((t=>{const{type:e}=t;switch(e){case i.W.ADD:case i.W.CLONE:case i.W.CREATE:try{const{componentId:e,parentId:n,index:r}=t,i=o.h.get("components",n),s=o.h.get("components",e);if(!i)throw new Error(`cant find the parent:${n} on undo removed element.`);if(!s)throw new Error(`cant find component:${s} on undo removed element.`);i.appendChild(s.element,r),l.Z.addComponent({componentId:e,parentId:i.id,index:r,layer:s.layer})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v66",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.PATCH:try{{const{componentId:e,key:n,newValue:r}=t,i=o.h.get("components",e);l.Z.updateComponent(i,n,r).clean().selectComponent(i)}}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5vv7",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.REMOVE:try{{const{componentId:e,parentId:n,fromLayer:r,toLayer:i}=t;if(!o.h.get("components",n))throw new Error(`cant find the parent:${n} on undo removed element.`);o.h.get("components",e);l.Z.removeComponent({componentId:e,fromLayer:r,toLayer:i})}}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v8",info:{data:t.stack},s:"E"}),console.error(t)}break;case i.W.MOVE:try{let{componentId:e,newParentId:n,newIndex:r,oldParentId:i,newPreviousElId:o,oldIndex:s,fromLayer:a,direction:c,toLayer:d}=t;l.Z.moveComponent({componentId:e,oldParentId:i,newParentId:n,oldIndex:s,newIndex:r,fromLayer:a,toLayer:d,direction:r>s?"bottom":"top"})}catch(t){l.Z.commands.goToError(),(0,d.H)({msg:t.message,error_code:"#c4ca5v9",info:{data:t.stack},s:"E"}),console.error(t)}}})),r.Z.dispatch("changed",{})}));const p=function(t,e,n){e.style||(e.style={}),e.classList||(e.classList=[]);const r={set:(t,e,r)=>{if(void 0===r&&(console.warn("test faild: value is undefined",e,r),"rect"===e))return!0;const o=n.set(t,e,r,null);if("width"===e||"height"===e)return t[e]=r,!0;if("breakpoints"===e)return t[e]=r,!0;if("classList"===e)return t[e]=r,!0;if("interactions"===e)return t[e]=r,!0;if("show_on_mobile"===e)return t[e]=r,!0;if("show_on_tablet"===e)return t[e]=r,!0;if("show_on_desktop"===e)return t[e]=r,!0;if("name"===e)return t[e]=r,!0;if("element_ID"===e)return t[e]=r,!0;if("rect"===e&&"object"==typeof r&&"number"==typeof r.height&&"number"==typeof r.width)return t[e]=r,!0;if("width"===e&&"number"==typeof r)return t[e]=r,!0;if("height"===e&&"number"==typeof r)return t[e]=r,!0;if(o){function s(){const t=i.get();i.element;document.querySelector(`[data-id="${t.id}"]`)&&"function"==typeof t.render&&t.render({value:r,key:e})}s()}return o}},i={isSelected:!1,element:t,get:()=>o.h.get("components",i.id),find:t=>{const e=o.h.get("components",i.id);if(!Array.isArray(e.children))return null;for(let n=0;n<e.children.length;n++){const r=e.children[n],i=o.h.get("components",r);if(i){if(i.type.equalWith(t))return i;let e;try{e=i.find(t)}catch(t){console.error(t)}if(e)return e}}},treeWalk:t=>{const e=o.h.get("components",i.id);if(t(e),!Array.isArray(e.children))return null;for(let n=0;n<e.children.length;n++){const r=e.children[n],i=o.h.get("components",r);i&&(t(i),i.treeWalk(t))}},findAllByType:t=>{const e=[],n=o.h.get("components",i.id);if(!Array.isArray(n.children))return e;for(let r=0;r<n.children.length;r++){const i=n.children[r],s=o.h.get("components",i);if(s){s.type.equalWith(t)&&e.push(s);s.findAllByType(t).forEach((t=>e.push(t)))}}return e},appendChild:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=i.get(),o=r.children.findIndex((e=>e===t.dataset.id));if(!r.allowSortable)return void console.error("sortable not allowed");const s=r.childrenHolder;0===e?s.prepend(t):e===r.children.length-1?s.appendChild(t):-1!==o&&o<e&&s.children[e]&&s.children[e].nextElementSibling?s.insertBefore(t,s.children[e].nextElementSibling):(n&&"bottom"===n.direction&&(e+=1),s.insertBefore(t,s.children[e]))},closest:t=>{let e=0;if(i.type.equalWith(t))return o.h.get("components",i.id);let n,r=o.h.get("components",i.id);for(;r;){e++;const i=o.h.get("components",r.parentId);if(!i||i.type===t){n=i;break}r=i}return n&&(n.level=e),n},isInDom:()=>document.querySelector(`[data-id="${i.id}"]`),select:()=>{l.Z.clean().selectComponent(i.get())},parent:()=>{let t=o.h.get("components",i.id).parentId;return o.h.get("components",t)},unsafeRemove:()=>{t.remove()},extend:{},id:e.id,type:e.type,parentId:e.parentId,props:new Proxy(e.props,r),children:e.children,addProp:(t,e)=>{i[t]=e}};return i}},58860:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=new(n(85517).Z)},67237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(36546),i=n(59320);const o=t=>t instanceof Date,s=t=>null!=t&&"object"==typeof t,a=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),l=t=>s(t)&&(t=>0===Object.keys(t).length)(t),c=(t,e)=>{if(t===e)return{};if(!s(t)||!s(e))return e;const n=Object.keys(t).reduce(((t,n)=>(a(e,n)||(t[n]=void 0),t)),Object.create(null));return o(t)||o(e)?t.valueOf()==e.valueOf()?{}:e:Object.keys(e).reduce(((n,r)=>{if(!a(t,r))return n[r]=e[r],n;const i=c(t[r],e[r]);return!l(i)||o(i)||!l(t[r])&&l(e[r])?(n[r]=i,n):n}),n)},d=c;var p=n(58860),h=n(81929),u=(n(54774),n(70235)),f=n(45607),m=n(46245);const g=n(3096),b=n(96206),y=new i.Z,A={},w={},v=[],x=t=>{try{let{steps:e,options:n,onEnd:i,force:o,update:s}=t;Array.isArray(e)||(e=[e]),e.forEach((t=>{const{type:e}=t;if(e===r.W.PATCH){const{componentId:e,key:n,options:r}=t;let{value:i}=t;const o=g({componentId:e,key:n}),s=u.h.get("components",e);if(!s)return console.error("component not found",e,t),void console.trace();A[o]||(A[o]=b(s.props[n]));let a=b(i);switch(n){case"style":case"iconStyle":a&&"object"==typeof a&&(a=w[o]=(0,m.Z)(s.props[n],a));break;default:w[o]=b(a)}if(void 0!==(s.props[n]=w[o])){const r=v.findIndex((t=>t.componentId===e&&t.key===n));-1!==r&&v.splice(r,1);const i={...t};i.newValue=a,v.push(i)}else delete w[o]}else v.push(t)})),y.run((()=>{for(let t=0;t<v.length;t++){const e=v[t],{type:n}=e;if("PATCH"===n){const{newValue:t,componentId:n,key:r}=e,i=g({componentId:n,key:r}),a=A[i];e.oldValue=a,delete A[g({componentId:n,key:r})];let l={};l=Array.isArray(t)&&Array.isArray(a)?t.filter((t=>!a.find((e=>e===t)))):d(a,t),null!==l&&"object"==typeof l&&Object.keys(l).forEach((t=>{void 0===l[t]&&delete l[t]})),!0!==o&&null!==l&&"object"==typeof l&&Object.keys(l).length,s&&void 0!==w[i]&&f.Z.slientPatch(f.Z.getComponent(n),r,w[i]),delete w[i]}}if(v.length>0){h.Z.create({stack:v,options:n});const t=[...v];"function"==typeof i&&i({stack:t,steps:t})}for(;v.length;)v.pop()}))}catch(e){console.error(e),f.Z.commands.logError({error_code:"#123!#",info:{data:e.trace,...t},msg:e.message,s:"E"})}finally{p.Z.dispatch("changed",{})}}},23602:(t,e,n)=>{"use strict";n.d(e,{HE:()=>a,IT:()=>c,fI:()=>o,sX:()=>l,wO:()=>s});var r=n(7896),i=n(40949);const o=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M12 2c5.522 0 10 3.978 10 8.889a5.558 5.558 0 0 1-5.556 5.555h-1.966c-.922 0-1.667.745-1.667 1.667 0 .422.167.811.422 1.1.267.3.434.689.434 1.122C13.667 21.256 12.9 22 12 22 6.478 22 2 17.522 2 12S6.478 2 12 2zm-1.189 16.111a3.664 3.664 0 0 1 3.667-3.667h1.966A3.558 3.558 0 0 0 20 10.89C20 7.139 16.468 4 12 4a8 8 0 0 0-.676 15.972 3.648 3.648 0 0 1-.513-1.86zM7.5 12a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm9 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM12 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})),s=t=>(0,i.Z)("svg",(0,r.Z)({},t,{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"}),(0,i.Z)("g",null,(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))),a=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M19 10h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 1 1 14 0v1zM5 12v8h14v-8H5zm6 2h2v4h-2v-4zm6-4V9A5 5 0 0 0 7 9v1h10z"})),l=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M7 10h13a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1V9a7 7 0 0 1 13.262-3.131l-1.789.894A5 5 0 0 0 7 9v1zm-2 2v8h14v-8H5zm5 3h4v2h-4v-2z"})),c=t=>(0,i.Z)("svg",(0,r.Z)({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20"}),(0,i.Z)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,i.Z)("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))},33776:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});n(54774);var r=n(68905);const i=(t,e)=>{if("object"!=typeof e)return console.error("attributes must be an object.."),t;for(const n in e)if(Object.hasOwnProperty.call(e,n)){const i=e[n];switch(n){case"style":case"iconStyle":if(!i)return;const e=(0,r.o)(i);t.setAttribute(n,e),"svg"===t.nodeName.toLowerCase()&&(t.removeAttribute("width"),t.removeAttribute("height"));break;default:"string"!=typeof n||"string"!=typeof i&&"boolean"!=typeof i&&"number"!=typeof i||t.setAttribute(n,i),void 0!==t[n]&&(t[n]=i)}}return t}},35965:(t,e,n)=>{"use strict";function r(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];let i=[];return"string"==typeof e?e.split(",").join(" "):(e.forEach((t=>{"string"==typeof t?i.push(t):Array.isArray(t)&&i.push(r(...t))})),i=i.filter((t=>t)),i.join(" "))}n.d(e,{Z:()=>r})},41636:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const r=n(80184),i=(t,e)=>r(t).setAlpha(e).toRgbString()},36351:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s,c:()=>l});var r=n(56666);const i=new Map;class o{constructor(t){let{onEnd:e}=t;(0,r.Z)(this,"callback",void 0),(0,r.Z)(this,"timeout",void 0),(0,r.Z)(this,"delay",void 0),this.delay=300,this.onEnd=e,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;this.callback=t,"number"==typeof e&&(this.delay=e),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.callback(),"function"==typeof this.onEnd&&this.onEnd()}),this.delay)}}function s(t,e){if(i.has(t)){i.get(t).run(t,e)}else{const n=new o({onEnd:()=>{i.delete(t)}});n.run(t,e),i.set(t,n)}}class a{constructor(){(0,r.Z)(this,"timeout",void 0),this.delay=300,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;clearTimeout(this.timeout),this.timeout=setTimeout((()=>{t()}),e)}}function l(){return new a}},71781:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>Ot});var r=n(56666);const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),a=new WeakMap;class l{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&a.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new l(n,t,s)},d=(t,e)=>{if(o)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),r=i.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}},p=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:h,defineProperty:u,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:b}=Object,y=globalThis,A=y.trustedTypes,w=A?A.emptyScript:"",v=y.reactiveElementPolyfillSupport,x=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?w:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},k=(t,e)=>!h(t,e),C={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:k};Symbol.metadata??=Symbol("metadata"),y.litPropertyMetadata??=new WeakMap;class E extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&u(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=f(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??C}static _$Ei(){if(this.hasOwnProperty(x("elementProperties")))return;const t=b(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(x("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x("properties"))){const t=this.properties,e=[...m(t),...g(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(p(t))}else void 0!==t&&e.push(p(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:_).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??k)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[x("elementProperties")]=new Map,E[x("finalized")]=new Map,v?.({ReactiveElement:E}),(y.reactiveElementVersions??=[]).push("2.1.1");const S=globalThis,B=S.trustedTypes,O=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",I=`lit$${Math.random().toFixed(9).slice(2)}$`,$="?"+I,T=`<${$}>`,L=document,N=()=>L.createComment(""),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,D=t=>P(t)||"function"==typeof t?.[Symbol.iterator],z="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,U=/>/g,Z=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,V=/"/g,Y=/^(?:script|style|textarea|title)$/i,W=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),q=W(1),X=(W(2),W(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),K=new WeakMap,J=L.createTreeWalker(L,129);function Q(t,e){if(!P(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}const tt=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=H;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===H?"!--"===l[1]?s=j:void 0!==l[1]?s=U:void 0!==l[2]?(Y.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=Z):void 0!==l[3]&&(s=Z):s===Z?">"===l[0]?(s=i??H,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?Z:'"'===l[3]?V:F):s===V||s===F?s=Z:s===j||s===U?s=H:(s=Z,i=void 0);const p=s===Z&&t[e+1].startsWith("/>")?" ":"";o+=s===H?n+T:c>=0?(r.push(a),n.slice(0,c)+M+n.slice(c)+I+p):n+I+(-2===c?e:p)}return[Q(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class et{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=tt(t,e);if(this.el=et.createElement(l,n),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=J.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(M)){const e=c[o++],n=r.getAttribute(t).split(I),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?st:"?"===s[1]?at:"@"===s[1]?lt:ot}),r.removeAttribute(t)}else t.startsWith(I)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(Y.test(r.tagName)){const t=r.textContent.split(I),e=t.length-1;if(e>0){r.textContent=B?B.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],N()),J.nextNode(),a.push({type:2,index:++i});r.append(t[e],N())}}}else if(8===r.nodeType)if(r.data===$)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(I,t+1));)a.push({type:7,index:i}),t+=I.length-1}i++}}static createElement(t,e){const n=L.createElement("template");return n.innerHTML=t,n}}function nt(t,e,n=t,r){if(e===X)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=R(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=nt(t,i._$AS(t,e.values),i,r)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??L).importNode(e,!0);J.currentNode=r;let i=J.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new it(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new ct(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=J.nextNode(),o++)}return J.currentNode=L,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),R(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):D(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(L.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=et.createElement(Q(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new rt(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new it(this.O(N()),this.O(N()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=nt(this,t,e,0),o=!R(t)||t!==this._$AH&&t!==X,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=nt(this,r[n+s],e,s),a===X&&(a=this._$AH[s]),o||=!R(a)||a!==this._$AH[s],a===G?t=G:t!==G&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class st extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class at extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class lt extends ot{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??G)===X)return;const n=this._$AH,r=t===G&&n!==G||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==G&&(n===G||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const dt={M,P:I,A:$,C:1,L:tt,R:rt,D,V:nt,I:it,H:ot,N:at,U:lt,B:st,F:ct},pt=S.litHtmlPolyfillSupport;pt?.(et,it),(S.litHtmlVersions??=[]).push("3.3.1");const ht=globalThis;class ut extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new it(e.insertBefore(N(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}ut._$litElement$=!0,ut.finalized=!0,ht.litElementHydrateSupport?.({LitElement:ut});const ft=ht.litElementPolyfillSupport;ft?.({LitElement:ut});(ht.litElementVersions??=[]).push("4.2.1");const{I:mt}=dt,gt=2;class bt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const yt=(t,e)=>{const n=t._$AN;if(void 0===n)return!1;for(const t of n)t._$AO?.(e,!1),yt(t,e);return!0},At=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===n?.size)},wt=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),_t(e)}};function vt(t){void 0!==this._$AN?(At(this),this._$AM=t,wt(this)):this._$AM=t}function xt(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)yt(r[t],!1),At(r[t]);else null!=r&&(yt(r,!1),At(r));else yt(this,t)}const _t=t=>{t.type==gt&&(t._$AP??=xt,t._$AQ??=vt)};class kt extends bt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),wt(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(yt(this,t),At(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Ct{}const Et=new WeakMap,St=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends kt{render(t){return G}update(t,[e]){const n=e!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),G}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let n=Et.get(e);void 0===n&&(n=new WeakMap,Et.set(e,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?Et.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Bt=n(49120);class Ot extends ut{constructor(){super(),(0,r.Z)(this,"contentRef",new Ct),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(t){this.searchText=t.target.value;const e=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}render(){return q`
84
84
  <slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
85
85
  ${this.opened?q` <div
86
86
  @mouseup=${this.onClickOutside}
@@ -722,7 +722,7 @@
722
722
  <path d="M17 4C20.3137 4 23 6.68629 23 10V14C23 17.3137 20.3137 20 17 20H7C3.68629 20 1 17.3137 1 14V10C1 6.68629 3.68629 4 7 4H17ZM17 6H7C4.8578 6 3.10892 7.68397 3.0049 9.80036L3 10V14C3 16.1422 4.68397 17.8911 6.80036 17.9951L7 18H17C19.1422 18 20.8911 16.316 20.9951 14.1996L21 14V10C21 7.8578 19.316 6.10892 17.1996 6.0049L17 6ZM10 9V11H12V13H9.999L10 15H8L7.999 13H6V11H8V9H10ZM18 13V15H16V13H18ZM16 9V11H14V9H16Z"></path>
723
723
  `,ut=r.YP`
724
724
  <path d="M7.82843 10.9999H20V12.9999H7.82843L13.1924 18.3638L11.7782 19.778L4 11.9999L11.7782 4.22168L13.1924 5.63589L7.82843 10.9999Z"></path>
725
- `},42729:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var r=n(56666),i=n(8427),o=n(61828),s=n(36351),a=n(61456),l=n(70235);const c=(0,s.c)();class d extends i.oi{constructor(){super(),(0,r.Z)(this,"inputRef",(0,o.V)()),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("padding-left:40px;")&&(this.inputStyle+=";padding-left:40px;"));const t=l.h.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===(0,a.o)(t)?"right":"")));const e=this.multiline?i.dy` <textarea
725
+ `},42729:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var r=n(56666),i=n(8427),o=n(61828),s=n(36351),a=n(61456),l=n(70235);const c=(0,s.c)();class d extends i.oi{constructor(){super(),(0,r.Z)(this,"inputRef",(0,o.V)()),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=l.h.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===(0,a.o)(t)?"right":"")));const e=this.multiline?i.dy` <textarea
726
726
  row=${this.row||4}
727
727
  .disabled=${this.disabled}
728
728
  dir="auto"
@@ -1129,7 +1129,7 @@
1129
1129
  @change=${t=>{let{target:e}=t;i(e.value),r()}}
1130
1130
  ></cdtr-input>
1131
1131
  </cdtr-row>
1132
- `}(e);default:return""}}function Dt(t,e,n,r,i,o){if(!t)return null;const s="string"==typeof t?new mt.Z({href:t,protocol:e,params:n}):new mt.Z(t);return t?"whatsapp:"===e||"whatsapp:"===s.protocol?function(t,e,n,r,i){const o="string"==typeof t?new mt.Z({href:t,protocol:e,params:n}):new mt.Z(t),s=(o.params&&(o.params.phone||function(t){try{const e=/whatsapp:([^?]+)/,n=t.match(e);return n?n[1]:""}catch(t){return""}}(o.fullHref))||Rt("phone",o.href||"")||o.url||"").replace(/\D+/g,"");if(!s)return null;const a=r||o.params&&(o.params.text||o.params.body)||"",l=a?encodeURIComponent(a):"";let c=`https://wa.me/${s}`;l&&(c+=`?text=${l}`);const d=new mt.Z(c);return d.target=i||d.target||"_blank",{url:d,params:d.params,protocol:"whatsapp:"}}(t,e,n,r,o):(s.isEmail?function(t,e,n){e&&t.addParam("subject",e),n&&t.addParam("body",n)}(s,i,r):r&&s.addParam("body",r),s.target=o||s.target||"_blank",{url:s,params:s.params,protocol:s.protocol}):null}function zt(t,e,n){if(!t)return{href:{},protocol:null,body:"",subject:""};if(t.startsWith("http")&&!t.startsWith("http://")&&!t.startsWith("https://"))return null;const r=mt.Z.getProtocol(t);let i=e;r&&(i=r+":");const o=new mt.Z({href:t,protocol:i||null});console.log("output",o);const s=(n instanceof mt.Z?n:new mt.Z(n)).url!==o.url;return{href:o,protocol:o.protocol,shouldBlur:o.isValid,clearParams:s}}function Ht(t){const{value:e="",inputRef:n,autofocus:r=!1,onChange:i,onBlur:o,onKeyDown:s,placeholder:a="",inputStyle:l="padding-left:40px;height:40px;",style:c="width:260px;",width:d=It}=t,p=t=>{i&&i(t),o&&o()};return W`
1132
+ `}(e);default:return""}}function Dt(t,e,n,r,i,o){if(!t)return null;const s="string"==typeof t?new mt.Z({href:t,protocol:e,params:n}):new mt.Z(t);return t?"whatsapp:"===e||"whatsapp:"===s.protocol?function(t,e,n,r,i){const o="string"==typeof t?new mt.Z({href:t,protocol:e,params:n}):new mt.Z(t),s=(o.params&&(o.params.phone||function(t){try{const e=/whatsapp:([^?]+)/,n=t.match(e);return n?n[1]:""}catch(t){return""}}(o.fullHref))||Rt("phone",o.href||"")||o.url||"").replace(/\D+/g,"");if(!s)return null;const a=r||o.params&&(o.params.text||o.params.body)||"",l=a?encodeURIComponent(a):"";let c=`https://wa.me/${s}`;l&&(c+=`?text=${l}`);const d=new mt.Z(c);return d.target=i||d.target||"_blank",{url:d,params:d.params,protocol:"whatsapp:"}}(t,e,n,r,o):(s.isEmail?function(t,e,n){e&&t.addParam("subject",e),n&&t.addParam("body",n)}(s,i,r):r&&s.addParam("body",r),s.target=o||s.target||"_blank",{url:s,params:s.params,protocol:s.protocol}):null}function zt(t,e,n){if(!t)return{href:{},protocol:null,body:"",subject:""};if(t.startsWith("http")&&!t.startsWith("http://")&&!t.startsWith("https://"))return null;const r=mt.Z.getProtocol(t);let i=e;r&&(i=r+":");const o=new mt.Z({href:t,protocol:i||null});console.log("output",o);const s=(n instanceof mt.Z?n:new mt.Z(n)).url!==o.url;return{href:o,protocol:o.protocol,shouldBlur:o.isValid,clearParams:s}}function Ht(t){const{value:e="",inputRef:n,autofocus:r=!1,onChange:i,onBlur:o,onKeyDown:s,placeholder:a="",inputStyle:l="",style:c="width:260px;",width:d=It}=t,p=t=>{i&&i(t),o&&o()};return W`
1133
1133
  <cdtr-row style="position:relative;" spacing="5">
1134
1134
  <span style="display:none;" aria-hidden="true">${e}</span>
1135
1135
  <cdtr-input
@@ -2047,7 +2047,7 @@
2047
2047
  </paper-button>
2048
2048
  </cdtr-row>
2049
2049
  </form>
2050
- </div>`,f),document.body.appendChild(f)}}},59320:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(56666);class i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;(0,r.Z)(this,"callback",void 0),(0,r.Z)(this,"timeout",void 0),(0,r.Z)(this,"delay",void 0),this.delay=t,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;this.callback=t,"number"==typeof e&&(this.delay=e),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.callback()}),this.delay)}}},70143:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=t=>{if(!t||"string"!=typeof t)return;const e="$%^$%^";return 0===t.replace(/[^\P{L}a-z][^a-z]*/giu,e).indexOf(e)||(t=(t=t.replace(/[0-9]/g,"")).replace(/\n/g,""),new RegExp(/^[\u0590-\u05FF ,.,!,?,/,*,#,@,&,(,)'-]+$/i).test(t))}},1670:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const r=JSON.parse('["ase","art","bmp","blp","cd5","cit","cpt","cr2","cut","dds","dib","djvu","egt","exif","gif","gpl","grf","icns","ico","iff","jng","jpeg","jpg","jfif","jp2","jps","lbm","max","miff","mng","msp","nef","nitf","ota","pbm","pc1","pc2","pc3","pcf","pcx","pdn","pgm","PI1","PI2","PI3","pict","pct","pnm","pns","ppm","psb","psd","pdd","psp","px","pxm","pxr","qfx","raw","rle","sct","sgi","rgb","int","bw","tga","tiff","tif","vtf","xbm","xcf","xpm","3dv","amf","ai","awg","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","gbr","odg","svg","stl","vrml","x3d","sxd","v2d","vnd","wmf","emf","art","xar","png","webp","jxr","hdp","wdp","cur","ecw","iff","lbm","liff","nrrd","pam","pcx","pgf","sgi","rgb","rgba","bw","int","inta","sid","ras","sun","tga","heic","heif"]');function i(t){const e=/(?:\.([^.]+))?$/.exec(t.toLowerCase())[1]||"",n=e.includes("&")?e.split("&")[0]:e;return-1!==r.findIndex((t=>t===n))}},21009:(t,e,n)=>{"use strict";n.d(e,{KL:()=>s,rZ:()=>o,v7:()=>a});var r=n(97278),i=n(66248);n(70235);const o=t=>{const e={id:t};return(0,i.v_)(`${r.W7.api_url+r._j.components}/getParent`,e)},s=(t,e,n)=>{const o={key:e,value:n};return(0,i.r$)(r.W7.api_url+r._j.components+`/${t}`,o)},a=(t,e)=>(0,i.ZJ)(r.W7.api_url+r._j.components+`/${t}`,{parentId:e})},43824:(t,e,n)=>{"use strict";n.d(e,{Pn:()=>o,TL:()=>i});n(97278),n(66248);var r=n(70235);async function i(t){let{cssRule:e,name:n,id:r,url:i}=t;if(!i){const t=(await o()).find((t=>t.id===r||t.cssRule===e||t.name===n));t&&(i=t.url)}if(!i)return null;if(!document.querySelector(`link[href="${i}"]`)){const t=document.createElement("link");t.href=i,t.rel="stylesheet",t.type="text/css",document.head.appendChild(t)}}const o=async()=>new Promise((t=>{const e=r.h.get("config","editor","configure","editorProps","fonts");e&&t(e)}))},27017:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var r=n(97278),i=n(70235),o=n(66248),s=n(4147);const a=t=>{const e=i.h.get("config")._id;return t.siteId=e,t.v=s.i8,console.log(t),(0,o.v_)(r.W7.api_url+r._j.log,t)}},36546:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});let r=function(t){return t.PATCH="PATCH",t.REMOVE="REMOVE",t.CLONE="CLONE",t.ADD="ADD",t.MOVE="MOVE",t.CREATE="CREATE",t}({})},81929:(t,e,n)=>{"use strict";n.d(e,{F:()=>d,Z:()=>c});var r=n(56666),i=n(64603),o=n(9571),s=n(70235);const a=n(96206),l=t=>{const e=typeof t;return Array.isArray(t)||"object"===e?JSON.parse(JSON.stringify(t)):t};const c=new class{constructor(){(0,r.Z)(this,"emitter",void 0),(0,r.Z)(this,"state",void 0),this.emitter=new i.Z,this.state={past:[],present:null,future:[]}}setHistory(t){t&&"object"==typeof t&&Array.isArray(t.past)&&Array.isArray(t.future)&&t.present&&(this.state=t,this.onAnyChange(),this.emitter.dispatch("ON_SNAPSHOT",this.dispatchValue(this.state.present)))}onAnyChange(){s.h.set({history:this.state})}hasRedo(){return this.state.future.length>0||"oldValue"===this.state.present?.currectValue}hasUndo(){return this.state.past.length>0||"newValue"===this.state.present?.currectValue}hasPresent(){return!!this.state.present}undo(){if(!this.hasUndo()&&!this.state.present)return;let t,e;"newValue"===this.state.present.currectValue?(t=this.state.present,e=l(this.state.present),this.state.present.currectValue="oldValue"):(t=this.state.past.pop(),t&&(this.state.future.unshift(this.state.present),this.state.present=t,e=l(this.state.present),this.state.present.currectValue="oldValue")),e&&(this.emitter.dispatch("ON_UNDO",this.dispatchValue(e)),this.onAnyChange())}redo(){if(!this.hasRedo()&&!this.state.present)return;let t,e;"oldValue"===this.state.present.currectValue?(t=this.state.present,e=l(this.state.present),this.state.present.currectValue="newValue"):(t=this.state.future.shift(),t&&(this.state.past.push(this.state.present),this.state.present=t,e=l(this.state.present),this.state.present.currectValue="newValue")),e&&(this.emitter.dispatch("ON_REDO",this.dispatchValue(e)),this.onAnyChange())}create(t){let e=[];this.state.present&&"newValue"===this.state.present.currectValue&&0===this.state.future.length?(this.state.present.currectValue="newValue",this.state.past.push(this.state.present),this.state.present=null):this.state.present&&"oldValue"===this.state.present.currectValue&&this.state.future.length>0&&(this.state.present=null),e=JSON.parse(JSON.stringify(this.state.future)),this.state.future=[];const n=a(t),r={id:(0,o.Z)(),stack:n.stack,options:n.options,created_at:Date.now(),currectValue:"newValue",deletedSteps:e};this.state.present=r,this.emitter.dispatch("ON_SNAPSHOT",this.dispatchValue(r)),this.onAnyChange()}dispatchValue(t){return{currectValue:t.currectValue,stack:t.stack,options:t.options,hasUndo:this.hasUndo(),hasRedo:this.hasRedo(),__state:this.state,pastLength:this.state.past.length+1,futureLength:this.state.future.length,deletedSteps:t.deletedSteps}}on(t,e){this.emitter.subscribe(t,e)}off(t,e){this.emitter.unSubscribe(t,e)}},d={ON_UNDO:"ON_UNDO",ON_REDO:"ON_REDO",ON_SNAPSHOT:"ON_SNAPSHOT"}},50939:(t,e,n)=>{"use strict";function r(t){return t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}n.d(e,{Z:()=>r})},52278:(t,e,n)=>{"use strict";n.d(e,{au:()=>c,b$:()=>a,io:()=>u});var r=n(76828),i=n(70235),o=n(9669),s=n.n(o);const a=t=>{const e=t,n=t.element.getBoundingClientRect(),r={id:e.id,_id:e.id,type:e.type,props:JSON.parse(JSON.stringify(e.props)),children:e.children,width:e.width,height:e.height,renderedHTML:null};return"function"==typeof e.getRenderedHTML&&(r.renderedHTML=e.getRenderedHTML({props:e.props})),n.width&&n.height?(r.width=n.width,r.height=n.height,r):(console.warn("The Editor is must be visible to get the correct width and height of the components"),r)},l=t=>Array.isArray(t)?t.filter((t=>"string"==typeof t||!(!t||!Array.isArray(t.children))&&(t.children=l(t.children),!0))):[],c=()=>{const t=i.h.get("components"),e=[];return t.forEach((t=>{const n=a(t);if(n&&Array.isArray(n.children)&&(n.children=l(n.children)),"root"===n.type){const t=i.h.get("config","editor","configure","editorProps","fonts"),e=Array.from(document.querySelectorAll("[data-cdtr-font-name]")).map((t=>t.getAttribute("data-cdtr-font-name"))),r=[...new Set(e)],o=[],s={};Array.isArray(t)&&r.forEach((e=>{const n=t.find((t=>t.cssRule===e));n&&!s[e]&&n&&(o.push(n),s[e]=!0)})),n.props.fonts=o}e.push(n)})),e.forEach((t=>{try{JSON.stringify(t)}catch(t){console.error("Error serializing component",t)}})),e};let d=!1,p=[];const h=async()=>{if(0===p.length)return void(d=!1);const{resolve:t,reject:e,components:n}=p[0];try{t((await s().post(`${r.W7.api_url.replace("v1","v2")}/render/newsletter/build`,{components:n})).data)}catch(t){e(t)}p.shift(),h()},u=async t=>{const e=c();return new Promise(((t,n)=>{p.push({resolve:t,reject:n,components:e}),d||(d=!0,h())}))}},47798:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=(t,e)=>{const n=document.head.querySelector(`script[src='${t}']`);if(n){const t=parseInt(n.dataset.requested)||1;return n.setAttribute("data-requested",String(t+1)),n.getAttribute("data-loaded"),void("function"==typeof e&&e())}const r=document.createElement("script");r.type="text/javascript",r.setAttribute("data-loaded","false"),r.async=!0,r.defer=!0,-1!==t.indexOf("?module")&&(r.type="module"),r.src=t,function(t){t.addEventListener("load",(()=>{t.setAttribute("data-loaded","true");const n=parseInt(t.dataset.requested)||0;t.setAttribute("data-requested",String(n+1)),"function"==typeof e&&e()}),{once:!0})}(r),r.addEventListener("error",(()=>{r.setAttribute("data-error","true")}),{once:!0}),document.getElementsByTagName("head")[0].appendChild(r)}},4164:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(56666);const i=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));const s=t=>t?t=(t=(t=t.replace(/^[^:]+:(?:\/\/)?/,"")).replace(/^\/+/,"")).split("?")[0]:"";class a{static getProtocol(t){if(!t)return"";if(-1!==t.indexOf("wa.me"))return"whatsapp:";const e=t.split(":");return e.length>1?e[0]:""}constructor(t,e){if((0,r.Z)(this,"protocol",""),(0,r.Z)(this,"href",""),(0,r.Z)(this,"fullHref",""),(0,r.Z)(this,"target","_self"),(0,r.Z)(this,"isEmail",!1),(0,r.Z)(this,"isPhone",!1),(0,r.Z)(this,"isAnchor",!1),(0,r.Z)(this,"url",""),(0,r.Z)(this,"isValid",!0),(0,r.Z)(this,"params",{}),"string"==typeof t?this.href=t:"object"==typeof t&&Object.assign(this,t),this.isValid=this.isValidUrl(this.href),e&&e.protocol?this.protocol=e.protocol:this.protocol=a.getProtocol(this.href),this.isEmail=i(s(this.href)),this.isPhone=o(s(this.href)),this.protocol||(this.isEmail&&(this.protocol="mailto:"),this.isPhone&&(this.protocol="tel:")),!this.protocol&&this.isValid&&(this.protocol="https:"),this.isAnchor=this.url.startsWith("#"),e&&e.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Invalid target: ${e.target}`);this.target=e.target}e&&e.params&&(this.params=e.params);const n=function(t){const e={},n=/([^&=]+)=?([^&]*)/g,r=t=>decodeURIComponent(t.replace(/\+/g," ")),i=t.indexOf("?");let o,s=-1!==i?t.substring(i+1):"";for(;null!==(o=n.exec(s));){const t=r(o[1]),n=r(o[2]);t&&(e[t]=n)}return e}(this.href);this.params={...this.params,...n},this.url=s(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":"),!this.protocol||"http:"!==this.protocol&&"https:"!==this.protocol?this.href=this.protocol+this.url:this.href=this.protocol+"//"+this.url,"whatsapp:"===this.protocol&&this.href.indexOf("wa.me"),this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t="",e=s(this.href);if(Object.keys(this.params).length>0){e+="?",t="?";for(const n in this.params)e+=`${n}=${this.params[n]}&`,t+=`${n}=${this.params[n]}&`;e=e.slice(0,-1)}if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return this.protocol+"//"+e;if("whatsapp:"===this.protocol){const n=this.extractPhoneFromTextUsingRegex(e);if(n.length>0)return"https://wa.me/"+n[0]+t;console.warn("No phone number found in the url")}return this.protocol+e}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map((t=>t[1]||t[0])).filter((t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15})).map((t=>t.trim()))))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}(0,r.Z)(a,"resetURL",s)},9571:(t,e,n)=>{"use strict";var r;n.d(e,{Z:()=>p});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(t){return"string"==typeof t&&s.test(t)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};const p=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return d(r)}},85731:(t,e,n)=>{var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(99742)}catch(t){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,o=n(27755);function s(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(t){Object.defineProperty(s,t,{get:function(){return i[t]}})})),t.exports={w3cwebsocket:i?s:null,version:o}},27755:(t,e,n)=>{t.exports=n(84735).version},66627:(t,e,n)=>{"use strict";var r=n(26302),i=n(26550),o=n(38104),s=n(88705),a=n(64134);t.exports=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t?null:r(t)?"String":i(t)?"Number":o(t)?"Boolean":s(t)?"Symbol":a(t)?"BigInt":void 0}},32094:(t,e,n)=>{"use strict";var r=n(83243),i=n(62191),o=n(62680),s=n(50326),a=o("Object.prototype.toString"),l=n(67226)(),c="undefined"==typeof globalThis?n.g:globalThis,d=i(),p=o("String.prototype.slice"),h={},u=Object.getPrototypeOf;l&&s&&u&&r(d,(function(t){if("function"==typeof c[t]){var e=new c[t];if(Symbol.toStringTag in e){var n=u(e),r=s(n,Symbol.toStringTag);if(!r){var i=u(n);r=s(i,Symbol.toStringTag)}h[t]=r.get}}}));var f=n(50198);t.exports=function(t){return!!f(t)&&(l&&Symbol.toStringTag in t?function(t){var e=!1;return r(h,(function(n,r){if(!e)try{var i=n.call(t);i===r&&(e=i)}catch(t){}})),e}(t):p(a(t),8,-1))}},9669:(t,e,n)=>{t.exports=n(51609)},55448:(t,e,n)=>{"use strict";var r=n(64867),i=n(36026),o=n(4372),s=n(15327),a=n(94097),l=n(84109),c=n(67985),d=n(85061),p=n(45655),h=n(65263);t.exports=function(t){return new Promise((function(e,n){var u,f=t.data,m=t.headers,g=t.responseType;function b(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}r.isFormData(f)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(t.auth){var A=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(A+":"+w)}var v=a(t.baseURL,t.url);function x(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y};i((function(t){e(t),b()}),(function(t){n(t),b()}),o),y=null}}if(y.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),y.timeout=t.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(d("Request aborted",t,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(d("Network Error",t,null,y)),y=null},y.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||p.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(d(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;_&&(m[t.xsrfHeaderName]=_)}"setRequestHeader"in y&&r.forEach(m,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete m[e]:y.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(y.withCredentials=!!t.withCredentials),g&&"json"!==g&&(y.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&y.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(u=function(t){y&&(n(!t||t&&t.type?new h("canceled"):t),y.abort(),y=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u))),f||(f=null),y.send(f)}))}},51609:(t,e,n)=>{"use strict";var r=n(64867),i=n(91849),o=n(30321),s=n(47185);var a=function t(e){var n=new o(e),a=i(o.prototype.request,n);return r.extend(a,o.prototype,n),r.extend(a,n),a.create=function(n){return t(s(e,n))},a}(n(45655));a.Axios=o,a.Cancel=n(65263),a.CancelToken=n(14972),a.isCancel=n(26502),a.VERSION=n(97288).version,a.all=function(t){return Promise.all(t)},a.spread=n(8713),a.isAxiosError=n(16268),t.exports=a,t.exports.default=a},65263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},14972:(t,e,n)=>{"use strict";var r=n(65263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},26502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},30321:(t,e,n)=>{"use strict";var r=n(64867),i=n(15327),o=n(80782),s=n(13572),a=n(47185),l=n(54875),c=l.validators;function d(t){this.defaults=t,this.interceptors={request:new o,response:new o}}d.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&l.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var d=[s,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(o),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var p=t;n.length;){var h=n.shift(),u=n.shift();try{p=h(p)}catch(t){u(t);break}}try{i=s(p)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},d.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){d.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){d.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=d},80782:(t,e,n)=>{"use strict";var r=n(64867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},94097:(t,e,n)=>{"use strict";var r=n(91793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},85061:(t,e,n)=>{"use strict";var r=n(80481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},13572:(t,e,n)=>{"use strict";var r=n(64867),i=n(18527),o=n(26502),s=n(45655),a=n(65263);function l(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a("canceled")}t.exports=function(t){return l(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return l(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(l(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},80481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},47185:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function s(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function a(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function l(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,i=e(t);r.isUndefined(i)&&e!==l||(n[t]=i)})),n}},36026:(t,e,n)=>{"use strict";var r=n(85061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},18527:(t,e,n)=>{"use strict";var r=n(64867),i=n(45655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},45655:(t,e,n)=>{"use strict";var r=n(64867),i=n(16016),o=n(80481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(55448)),l),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},97288:t=>{t.exports={version:"0.24.0"}},91849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},15327:(t,e,n)=>{"use strict";var r=n(64867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},16268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},67985:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},16016:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},84109:(t,e,n)=>{"use strict";var r=n(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},54875:(t,e,n)=>{"use strict";var r=n(97288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,s){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],s=e[o];if(s){var a=t[o],l=void 0===a||s(a,o,t);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},64867:(t,e,n)=>{"use strict";var r=n(91849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function l(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function d(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:d,merge:function t(){var e={};function n(n,r){l(e[r])&&l(n)?e[r]=t(e[r],n):l(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)d(arguments[r],n);return e},extend:function(t,e,n){return d(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},26831:(t,e,n)=>{var r={"./cdtr-background-video":[54455,3691,4455],"./cdtr-background-video/":[54455,3691,4455],"./cdtr-background-video/index":[54455,3691,4455],"./cdtr-background-video/index.js":[54455,3691,4455],"./cdtr-glows-preset":[63727,3727],"./cdtr-glows-preset/":[63727,3727],"./cdtr-glows-preset/index":[63727,3727],"./cdtr-glows-preset/index.js":[63727,3727],"./cdtr-halo-preset":[56080,6080],"./cdtr-halo-preset/":[56080,6080],"./cdtr-halo-preset/index":[56080,6080],"./cdtr-halo-preset/index.js":[56080,6080],"./cdtr-images-preset":[47511,7511],"./cdtr-images-preset/":[47511,7511],"./cdtr-images-preset/index":[47511,7511],"./cdtr-images-preset/index.js":[47511,7511],"./cdtr-particlesjs":[52757,2757],"./cdtr-particlesjs/":[52757,2757],"./cdtr-particlesjs/index":[52757,2757],"./cdtr-particlesjs/index.js":[52757,2757]};function i(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return Promise.all(e.slice(1).map(n.e)).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=26831,t.exports=i},70717:(t,e,n)=>{var r={"./401":[68642,8642],"./401.js":[68642,8642],"./404":[45090,5090],"./404.js":[45090,5090],"./500":[42475,2977],"./500.js":[42475,2977],"./504":[81731,1731],"./504.js":[81731,1731]};function i(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return n.e(e[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=70717,t.exports=i},75054:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return l.default}});var r=h(n(54925)),i=h(n(91915)),o=h(n(76480)),s=h(n(64340)),a=h(n(91036)),l=h(n(66430)),c=h(n(12601)),d=h(n(87593)),p=h(n(69551));function h(t){return t&&t.__esModule?t:{default:t}}},13759:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(l=o)|a>>>32-l,n);var a,l}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function l(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){const e=[],n=32*t.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=t[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[n(e)-1]=e;let i=1732584193,c=-271733879,d=-1732584194,p=271733878;for(let e=0;e<t.length;e+=16){const n=i,h=c,u=d,f=p;i=o(i,c,d,p,t[e],7,-680876936),p=o(p,i,c,d,t[e+1],12,-389564586),d=o(d,p,i,c,t[e+2],17,606105819),c=o(c,d,p,i,t[e+3],22,-1044525330),i=o(i,c,d,p,t[e+4],7,-176418897),p=o(p,i,c,d,t[e+5],12,1200080426),d=o(d,p,i,c,t[e+6],17,-1473231341),c=o(c,d,p,i,t[e+7],22,-45705983),i=o(i,c,d,p,t[e+8],7,1770035416),p=o(p,i,c,d,t[e+9],12,-1958414417),d=o(d,p,i,c,t[e+10],17,-42063),c=o(c,d,p,i,t[e+11],22,-1990404162),i=o(i,c,d,p,t[e+12],7,1804603682),p=o(p,i,c,d,t[e+13],12,-40341101),d=o(d,p,i,c,t[e+14],17,-1502002290),c=o(c,d,p,i,t[e+15],22,1236535329),i=s(i,c,d,p,t[e+1],5,-165796510),p=s(p,i,c,d,t[e+6],9,-1069501632),d=s(d,p,i,c,t[e+11],14,643717713),c=s(c,d,p,i,t[e],20,-373897302),i=s(i,c,d,p,t[e+5],5,-701558691),p=s(p,i,c,d,t[e+10],9,38016083),d=s(d,p,i,c,t[e+15],14,-660478335),c=s(c,d,p,i,t[e+4],20,-405537848),i=s(i,c,d,p,t[e+9],5,568446438),p=s(p,i,c,d,t[e+14],9,-1019803690),d=s(d,p,i,c,t[e+3],14,-187363961),c=s(c,d,p,i,t[e+8],20,1163531501),i=s(i,c,d,p,t[e+13],5,-1444681467),p=s(p,i,c,d,t[e+2],9,-51403784),d=s(d,p,i,c,t[e+7],14,1735328473),c=s(c,d,p,i,t[e+12],20,-1926607734),i=a(i,c,d,p,t[e+5],4,-378558),p=a(p,i,c,d,t[e+8],11,-2022574463),d=a(d,p,i,c,t[e+11],16,1839030562),c=a(c,d,p,i,t[e+14],23,-35309556),i=a(i,c,d,p,t[e+1],4,-1530992060),p=a(p,i,c,d,t[e+4],11,1272893353),d=a(d,p,i,c,t[e+7],16,-155497632),c=a(c,d,p,i,t[e+10],23,-1094730640),i=a(i,c,d,p,t[e+13],4,681279174),p=a(p,i,c,d,t[e],11,-358537222),d=a(d,p,i,c,t[e+3],16,-722521979),c=a(c,d,p,i,t[e+6],23,76029189),i=a(i,c,d,p,t[e+9],4,-640364487),p=a(p,i,c,d,t[e+12],11,-421815835),d=a(d,p,i,c,t[e+15],16,530742520),c=a(c,d,p,i,t[e+2],23,-995338651),i=l(i,c,d,p,t[e],6,-198630844),p=l(p,i,c,d,t[e+7],10,1126891415),d=l(d,p,i,c,t[e+14],15,-1416354905),c=l(c,d,p,i,t[e+5],21,-57434055),i=l(i,c,d,p,t[e+12],6,1700485571),p=l(p,i,c,d,t[e+3],10,-1894986606),d=l(d,p,i,c,t[e+10],15,-1051523),c=l(c,d,p,i,t[e+1],21,-2054922799),i=l(i,c,d,p,t[e+8],6,1873313359),p=l(p,i,c,d,t[e+15],10,-30611744),d=l(d,p,i,c,t[e+6],15,-1560198380),c=l(c,d,p,i,t[e+13],21,1309151649),i=l(i,c,d,p,t[e+4],6,-145523070),p=l(p,i,c,d,t[e+11],10,-1120210379),d=l(d,p,i,c,t[e+2],15,718787259),c=l(c,d,p,i,t[e+9],21,-343485551),i=r(i,n),c=r(c,h),d=r(d,u),p=r(p,f)}return[i,c,d,p]}(function(t){if(0===t.length)return[];const e=8*t.length,r=new Uint32Array(n(e));for(let n=0;n<e;n+=8)r[n>>5]|=(255&t[n/8])<<n%32;return r}(t),8*t.length))};e.default=c},95668:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},91036:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default="00000000-0000-0000-0000-000000000000"},69551:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};var o=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};e.default=o},89305:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},33893:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},34298:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<<e|t>>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const o=t.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(let e=0;e<s;++e){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=t[64*e+4*r]<<24|t[64*e+4*r+1]<<16|t[64*e+4*r+2]<<8|t[64*e+4*r+3];a[e]=n}a[s-1][14]=8*(t.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<s;++t){const o=new Uint32Array(80);for(let e=0;e<16;++e)o[e]=a[t][e];for(let t=16;t<80;++t)o[t]=r(o[t-3]^o[t-8]^o[t-14]^o[t-16],1);let s=i[0],l=i[1],c=i[2],d=i[3],p=i[4];for(let t=0;t<80;++t){const i=Math.floor(t/20),a=r(s,5)+n(i,l,c,d)+p+e[i]+o[t]>>>0;p=d,d=c,c=r(l,30)>>>0,l=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+l>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+p>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]};e.default=i},87593:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}var a=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n};e.default=a},54925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(33893))&&r.__esModule?r:{default:r},o=n(87593);let s,a,l=0,c=0;var d=function(t,e,n){let r=e&&n||0;const d=e||new Array(16);let p=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==p||null==h){const e=t.random||(t.rng||i.default)();null==p&&(p=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let u=void 0!==t.msecs?t.msecs:Date.now(),f=void 0!==t.nsecs?t.nsecs:c+1;const m=u-l+(f-c)/1e4;if(m<0&&void 0===t.clockseq&&(h=h+1&16383),(m<0||u>l)&&void 0===t.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=u,c=f,a=h,u+=122192928e5;const g=(1e4*(268435455&u)+f)%4294967296;d[r++]=g>>>24&255,d[r++]=g>>>16&255,d[r++]=g>>>8&255,d[r++]=255&g;const b=u/4294967296*1e4&268435455;d[r++]=b>>>8&255,d[r++]=255&b,d[r++]=b>>>24&15|16,d[r++]=b>>>16&255,d[r++]=h>>>8|128,d[r++]=255&h;for(let t=0;t<6;++t)d[r+t]=p[t];return e||(0,o.unsafeStringify)(d)};e.default=d},91915:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(87154)),i=o(n(13759));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},87154:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var l;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=(0,o.default)(r)),16!==(null===(l=r)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+t.length);if(c.set(r),c.set(t,r.length),c=n(c),c[6]=15&c[6]|e,c[8]=63&c[8]|128,s){a=a||0;for(let t=0;t<16;++t)s[a+t]=c[t];return s}return(0,i.unsafeStringify)(c)}try{r.name=t}catch(t){}return r.DNS=s,r.URL=a,r};var r,i=n(87593),o=(r=n(69551))&&r.__esModule?r:{default:r};const s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";e.DNS=s;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";e.URL=a},76480:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(95668)),i=s(n(33893)),o=n(87593);function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)};e.default=a},64340:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(87154)),i=o(n(34298));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},12601:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(89305))&&r.__esModule?r:{default:r};var o=function(t){return"string"==typeof t&&i.default.test(t)};e.default=o},66430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};var o=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)};e.default=o},92538:t=>{"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=="},4577:t=>{"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"},53260:()=>{},62191:(t,e,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;t.exports=function(){for(var t=[],e=0;e<r.length;e++)"function"==typeof i[r[e]]&&(t[t.length]=r[e]);return t}},60014:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=i.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const l=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:d}=Array,p=c("undefined");const h=l("ArrayBuffer");const u=c("string"),f=c("function"),m=c("number"),g=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},y=l("Date"),A=l("File"),w=l("Blob"),v=l("FileList"),x=l("URLSearchParams");function _(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),d(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}function k(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,E=t=>!p(t)&&t!==C;const S=(B="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>B&&t instanceof B);var B;const O=l("HTMLFormElement"),M=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),I=l("RegExp"),$=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};_(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)},T="abcdefghijklmnopqrstuvwxyz",L="0123456789",N={DIGIT:L,ALPHA:T,ALPHA_DIGIT:T+T.toUpperCase()+L};var R={isArray:d,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!p(t)&&null!==t.constructor&&!p(t.constructor)&&f(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||i.call(t)===e||f(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:u,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:b,isUndefined:p,isDate:y,isFile:A,isBlob:w,isRegExp:I,isFunction:f,isStream:t=>g(t)&&f(t.pipe),isURLSearchParams:x,isTypedArray:S,isFileList:v,forEach:_,merge:function t(){const{caseless:e}=E(this)&&this||{},n={},r=(r,i)=>{const o=e&&k(n,i)||i;b(n[o])&&b(r)?n[o]=t(n[o],r):b(r)?n[o]=t({},r):d(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&_(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(_(e,((e,i)=>{n&&f(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let i,s,a;const l={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],r&&!r(a,t,e)||l[a]||(e[a]=t[a],l[a]=!0);t=!1!==n&&o(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:l,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(d(t))return t;let e=t.length;if(!m(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:O,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:$,freezeMethods:t=>{$(t,((e,n)=>{if(f(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];f(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return d(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:k,global:C,isContextDefined:E,ALPHABET:N,generateString:(t=16,e=N.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&f(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=d(t)?[]:{};return _(t,((t,e)=>{const o=n(t,r+1);!p(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)}};function P(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}R.inherits(P,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const D=P.prototype,z={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{z[t]={value:t}})),Object.defineProperties(P,z),Object.defineProperty(D,"isAxiosError",{value:!0}),P.from=(t,e,n,r,i,o)=>{const s=Object.create(D);return R.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),P.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};function H(t){return R.isPlainObject(t)||R.isArray(t)}function j(t){return R.endsWith(t,"[]")?t.slice(0,-2):t}function U(t,e,n){return t?t.concat(e).map((function(t,e){return t=j(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Z=R.toFlatObject(R,{},null,(function(t){return/^is[A-Z]/.test(t)}));function F(t,e,n){if(!R.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!R.isUndefined(e[t])}))).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(R.isDate(t))return t.toISOString();if(!a&&R.isBlob(t))throw new P("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(t)||R.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,i){let a=t;if(t&&!i&&"object"==typeof t)if(R.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(R.isArray(t)&&function(t){return R.isArray(t)&&!t.some(H)}(t)||(R.isFileList(t)||R.endsWith(n,"[]"))&&(a=R.toArray(t)))return n=j(n),a.forEach((function(t,r){!R.isUndefined(t)&&null!==t&&e.append(!0===s?U([n],r,o):null===s?n:n+"[]",l(t))})),!1;return!!H(t)||(e.append(U(i,n,o),l(t)),!1)}const d=[],p=Object.assign(Z,{defaultVisitor:c,convertValue:l,isVisitable:H});if(!R.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!R.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),R.forEach(n,(function(n,o){!0===(!(R.isUndefined(n)||null===n)&&i.call(e,n,R.isString(o)?o.trim():o,r,p))&&t(n,r?r.concat(o):[o])})),d.pop()}}(t),e}function V(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Y(t,e){this._pairs=[],t&&F(t,this,e)}const W=Y.prototype;function q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||q,i=n&&n.serialize;let o;if(o=i?i(e,n):R.isURLSearchParams(e)?e.toString():new Y(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}W.append=function(t,e){this._pairs.push([t,e])},W.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var G=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},K={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var J={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Y,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Q(t){function e(t,n,r,i){let o=t[i++];const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&R.isArray(r)?r.length:o,a)return R.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&R.isObject(r[o])||(r[o]=[]);return e(t,n,r[o],i)&&R.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!s}if(R.isFormData(t)&&R.isFunction(t.entries)){const n={};return R.forEachEntry(t,((t,r)=>{e(function(t){return R.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const tt={"Content-Type":void 0};const et={transitional:K,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=R.isObject(t);i&&R.isHTMLForm(t)&&(t=new FormData(t));if(R.isFormData(t))return r&&r?JSON.stringify(Q(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return F(t,new J.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return J.isNode&&R.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=R.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return F(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(R.isString(t))try{return(e||JSON.parse)(t),R.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||et.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&R.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw P.from(t,P.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(t){et.headers[t]={}})),R.forEach(["post","put","patch"],(function(t){et.headers[t]=R.merge(tt)}));var nt=et;const rt=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const it=Symbol("internals");function ot(t){return t&&String(t).trim().toLowerCase()}function st(t){return!1===t||null==t?t:R.isArray(t)?t.map(st):String(t)}function at(t,e,n,r,i){return R.isFunction(r)?r.call(this,e,n):(i&&(e=n),R.isString(e)?R.isString(r)?-1!==e.indexOf(r):R.isRegExp(r)?r.test(e):void 0:void 0)}class lt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=ot(e);if(!i)throw new Error("header name must be a non-empty string");const o=R.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=st(t))}const o=(t,e)=>R.forEach(t,((t,n)=>i(t,n,e)));return R.isPlainObject(t)||t instanceof this.constructor?o(t,e):R.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&rt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&i(e,t,n),this}get(t,e){if(t=ot(t)){const n=R.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(R.isFunction(e))return e.call(this,t,n);if(R.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ot(t)){const n=R.findKey(this,t);return!(!n||void 0===this[n]||e&&!at(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=ot(t)){const i=R.findKey(n,t);!i||e&&!at(0,n[i],i,e)||(delete n[i],r=!0)}}return R.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!at(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return R.forEach(this,((r,i)=>{const o=R.findKey(n,i);if(o)return e[o]=st(r),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete e[i],e[s]=st(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return R.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&R.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[it]=this[it]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=ot(t);e[r]||(!function(t,e){const n=R.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return R.isArray(t)?t.forEach(r):r(t),this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.freezeMethods(lt.prototype),R.freezeMethods(lt);var ct=lt;function dt(t,e){const n=this||nt,r=e||n,i=ct.from(r.headers);let o=r.data;return R.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function pt(t){return!(!t||!t.__CANCEL__)}function ht(t,e,n){P.call(this,null==t?"canceled":t,P.ERR_CANCELED,e,n),this.name="CanceledError"}R.inherits(ht,P,{__CANCEL__:!0});var ut=J.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const s=[];s.push(t+"="+encodeURIComponent(e)),R.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),R.isString(r)&&s.push("path="+r),R.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ft(t,e){return t&&!function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var mt=J.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=R.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function gt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=r[s];i||(i=l),n[o]=a,r[o]=l;let d=s,p=0;for(;d!==o;)p+=n[d++],d%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-i<e)return;const h=c&&l-c;return h?Math.round(1e3*p/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a);n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}const bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const i=ct.from(t.headers).normalize(),o=t.responseType;let s;function a(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}R.isFormData(r)&&(J.isStandardBrowserEnv||J.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const c=ft(t.baseURL,t.url);function d(){if(!l)return;const r=ct.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(c,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new P("Request aborted",P.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new P("Network Error",P.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||K;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new P(e,r.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,t,l)),l=null},J.isStandardBrowserEnv){const e=(t.withCredentials||mt(c))&&t.xsrfCookieName&&ut.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&R.forEach(i.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),R.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&"json"!==o&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{l&&(n(!e||e.type?new ht(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);p&&-1===J.protocols.indexOf(p)?n(new P("Unsupported protocol "+p+":",P.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};R.forEach(bt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));var yt={getAdapter:t=>{t=R.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let i=0;i<e&&(n=t[i],!(r=R.isString(n)?bt[n.toLowerCase()]:n));i++);if(!r){if(!1===r)throw new P(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(R.hasOwnProp(bt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!R.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:bt};function At(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ht(null,t)}function wt(t){At(t),t.headers=ct.from(t.headers),t.data=dt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return yt.getAdapter(t.adapter||nt.adapter)(t).then((function(e){return At(t),e.data=dt.call(t,t.transformResponse,e),e.headers=ct.from(e.headers),e}),(function(e){return pt(e)||(At(t),e&&e.response&&(e.response.data=dt.call(t,t.transformResponse,e.response),e.response.headers=ct.from(e.response.headers))),Promise.reject(e)}))}const vt=t=>t instanceof ct?t.toJSON():t;function xt(t,e){e=e||{};const n={};function r(t,e,n){return R.isPlainObject(t)&&R.isPlainObject(e)?R.merge.call({caseless:n},t,e):R.isPlainObject(e)?R.merge({},e):R.isArray(e)?e.slice():e}function i(t,e,n){return R.isUndefined(e)?R.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!R.isUndefined(e))return r(void 0,e)}function s(t,e){return R.isUndefined(e)?R.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>i(vt(t),vt(e),!0)};return R.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const o=l[r]||i,s=o(t[r],e[r],r);R.isUndefined(s)&&o!==a||(n[r]=s)})),n}const _t="1.3.4",kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{kt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ct={};kt.transitional=function(t,e,n){function r(t,e){return"[Axios v"+_t+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new P(r(i," has been removed"+(e?" in "+e:"")),P.ERR_DEPRECATED);return e&&!Ct[i]&&(Ct[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};var Et={assertOptions:function(t,e,n){if("object"!=typeof t)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new P("option "+o+" must be "+n,P.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new P("Unknown option "+o,P.ERR_BAD_OPTION)}},validators:kt};const St=Et.validators;class Bt{constructor(t){this.defaults=t,this.interceptors={request:new G,response:new G}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=xt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;let o;void 0!==n&&Et.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),void 0!==r&&Et.assertOptions(r,{encode:St.function,serialize:St.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),o=i&&R.merge(i.common,i[e.method]),o&&R.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=ct.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let d,p=0;if(!a){const t=[wt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,l),d=t.length,c=Promise.resolve(e);p<d;)c=c.then(t[p++],t[p++]);return c}d=s.length;let h=e;for(p=0;p<d;){const t=s[p++],e=s[p++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=wt.call(this,h)}catch(t){return Promise.reject(t)}for(p=0,d=l.length;p<d;)c=c.then(l[p++],l[p++]);return c}getUri(t){return X(ft((t=xt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],(function(t){Bt.prototype[t]=function(e,n){return this.request(xt(n||{},{method:t,url:e,data:(n||{}).data}))}})),R.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(xt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Bt.prototype[t]=e(),Bt.prototype[t+"Form"]=e(!0)}));var Ot=Bt;class Mt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,i){n.reason||(n.reason=new ht(t,r,i),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Mt((function(e){t=e})),cancel:t}}}var It=Mt;const $t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($t).forEach((([t,e])=>{$t[e]=t}));var Tt=$t;const Lt=function t(e){const n=new Ot(e),i=r(Ot.prototype.request,n);return R.extend(i,Ot.prototype,n,{allOwnKeys:!0}),R.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(xt(e,n))},i}(nt);Lt.Axios=Ot,Lt.CanceledError=ht,Lt.CancelToken=It,Lt.isCancel=pt,Lt.VERSION=_t,Lt.toFormData=F,Lt.AxiosError=P,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=function(t){return function(e){return t.apply(null,e)}},Lt.isAxiosError=function(t){return R.isObject(t)&&!0===t.isAxiosError},Lt.mergeConfig=xt,Lt.AxiosHeaders=ct,Lt.formToJSON=t=>Q(R.isHTMLForm(t)?new FormData(t):t),Lt.HttpStatusCode=Tt,Lt.default=Lt,t.exports=Lt},97291:(t,e,n)=>{"use strict";var r=n(52635),i=n(28672);if(n(32636)()||n(66679)()){var o=Symbol.iterator;t.exports=function(t){return null!=t&&void 0!==t[o]?t[o]():r(t)?Array.prototype[o].call(t):void 0}}else{var s=n(77906),a=n(26302),l=n(67286),c=l("%Map%",!0),d=l("%Set%",!0),p=n(62680),h=p("Array.prototype.push"),u=p("String.prototype.charCodeAt"),f=p("String.prototype.slice"),m=function(t){var e=0;return{next:function(){var n,r=e>=t.length;return r||(n=t[e],e+=1),{done:r,value:n}}}},g=function(t,e){if(s(t)||r(t))return m(t);if(a(t)){var n=0;return{next:function(){var e=function(t,e){if(e+1>=t.length)return e+1;var n=u(t,e);if(n<55296||n>56319)return e+1;var r=u(t,e+1);return r<56320||r>57343?e+1:e+2}(t,n),r=f(t,n,e);return n=e,{done:e>t.length,value:r}}}}return e&&void 0!==t["_es6-shim iterator_"]?t["_es6-shim iterator_"]():void 0};if(c||d){var b=n(7968),y=n(13328),A=p("Map.prototype.forEach",!0),w=p("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var v=p("Map.prototype.iterator",!0),x=p("Set.prototype.iterator",!0);var _=p("Map.prototype.@@iterator",!0)||p("Map.prototype._es6-shim iterator_",!0),k=p("Set.prototype.@@iterator",!0)||p("Set.prototype._es6-shim iterator_",!0);t.exports=function(t){return function(t){if(b(t)){if(v)return i(v(t));if(_)return _(t);if(A){var e=[];return A(t,(function(t,n){h(e,[n,t])})),m(e)}}if(y(t)){if(x)return i(x(t));if(k)return k(t);if(w){var n=[];return w(t,(function(t){h(n,t)})),m(n)}}}(t)||g(t)}}else t.exports=function(t){if(null!=t)return g(t,!0)}}},2947:t=>{var e={exports:{}};function n(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((function(e){var r=t[e];"object"!=typeof r||Object.isFrozen(r)||n(r)})),t}e.exports=n,e.exports.default=n;class r{constructor(t){void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function o(t,...e){const n=Object.create(null);for(const e in t)n[e]=t[e];return e.forEach((function(t){for(const e in t)n[e]=t[e]})),n}const s=t=>!!t.scope||t.sublanguage&&t.language;class a{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=i(t)}openNode(t){if(!s(t))return;let e="";e=t.sublanguage?`language-${t.language}`:((t,{prefix:e})=>{if(t.includes(".")){const n=t.split(".");return[`${e}${n.shift()}`,...n.map(((t,e)=>`${t}${"_".repeat(e+1)}`))].join(" ")}return`${e}${t}`})(t.scope,{prefix:this.classPrefix}),this.span(e)}closeNode(t){s(t)&&(this.buffer+="</span>")}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const l=(t={})=>{const e={children:[]};return Object.assign(e,t),e};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=l({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return"string"==typeof e?t.addText(e):e.children&&(t.openNode(e),e.children.forEach((e=>this._walk(t,e))),t.closeNode(e)),t}static _collapse(t){"string"!=typeof t&&t.children&&(t.children.every((t=>"string"==typeof t))?t.children=[t.children.join("")]:t.children.forEach((t=>{c._collapse(t)})))}}class d extends c{constructor(t){super(),this.options=t}addKeyword(t,e){""!==t&&(this.openNode(e),this.addText(t),this.closeNode())}addText(t){""!==t&&this.add(t)}addSublanguage(t,e){const n=t.root;n.sublanguage=!0,n.language=e,this.add(n)}toHTML(){return new a(this,this.options).value()}finalize(){return!0}}function p(t){return t?"string"==typeof t?t:t.source:null}function h(t){return m("(?=",t,")")}function u(t){return m("(?:",t,")*")}function f(t){return m("(?:",t,")?")}function m(...t){return t.map((t=>p(t))).join("")}function g(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>p(t))).join("|")+")"}function b(t){return new RegExp(t.toString()+"|").exec("").length-1}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function A(t,{joinWith:e}){let n=0;return t.map((t=>{n+=1;const e=n;let r=p(t),i="";for(;r.length>0;){const t=y.exec(r);if(!t){i+=r;break}i+=r.substring(0,t.index),r=r.substring(t.index+t[0].length),"\\"===t[0][0]&&t[1]?i+="\\"+String(Number(t[1])+e):(i+=t[0],"("===t[0]&&n++)}return i})).map((t=>`(${t})`)).join(e)}const w="[a-zA-Z]\\w*",v="[a-zA-Z_]\\w*",x="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",C={begin:"\\\\[\\s\\S]",relevance:0},E={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[C]},S={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[C]},B=function(t,e,n={}){const r=o({scope:"comment",begin:t,end:e,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=g("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},O=B("//","$"),M=B("/\\*","\\*/"),I=B("#","$"),$={scope:"number",begin:x,relevance:0},T={scope:"number",begin:_,relevance:0},L={scope:"number",begin:k,relevance:0},N={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[C,{begin:/\[/,end:/\]/,relevance:0,contains:[C]}]}]},R={scope:"title",begin:w,relevance:0},P={scope:"title",begin:v,relevance:0},D={begin:"\\.\\s*"+v,relevance:0};var z=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:w,UNDERSCORE_IDENT_RE:v,NUMBER_RE:x,C_NUMBER_RE:_,BINARY_NUMBER_RE:k,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(t={})=>{const e=/^#![ ]*\//;return t.binary&&(t.begin=m(e,/.*\b/,t.binary,/\b.*/)),o({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,e)=>{0!==t.index&&e.ignoreMatch()}},t)},BACKSLASH_ESCAPE:C,APOS_STRING_MODE:E,QUOTE_STRING_MODE:S,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:B,C_LINE_COMMENT_MODE:O,C_BLOCK_COMMENT_MODE:M,HASH_COMMENT_MODE:I,NUMBER_MODE:$,C_NUMBER_MODE:T,BINARY_NUMBER_MODE:L,REGEXP_MODE:N,TITLE_MODE:R,UNDERSCORE_TITLE_MODE:P,METHOD_GUARD:D,END_SAME_AS_BEGIN:function(t){return Object.assign(t,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})}});function H(t,e){"."===t.input[t.index-1]&&e.ignoreMatch()}function j(t,e){void 0!==t.className&&(t.scope=t.className,delete t.className)}function U(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=H,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,void 0===t.relevance&&(t.relevance=0))}function Z(t,e){Array.isArray(t.illegal)&&(t.illegal=g(...t.illegal))}function F(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function V(t,e){void 0===t.relevance&&(t.relevance=1)}const Y=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},t);Object.keys(t).forEach((e=>{delete t[e]})),t.keywords=n.keywords,t.begin=m(n.beforeMatch,h(n.begin)),t.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},t.relevance=0,delete n.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"],q="keyword";function X(t,e,n=q){const r=Object.create(null);return"string"==typeof t?i(n,t.split(" ")):Array.isArray(t)?i(n,t):Object.keys(t).forEach((function(n){Object.assign(r,X(t[n],e,n))})),r;function i(t,n){e&&(n=n.map((t=>t.toLowerCase()))),n.forEach((function(e){const n=e.split("|");r[n[0]]=[t,G(n[0],n[1])]}))}}function G(t,e){return e?Number(e):function(t){return W.includes(t.toLowerCase())}(t)?0:1}const K={},J=t=>{console.error(t)},Q=(t,...e)=>{console.log(`WARN: ${t}`,...e)},tt=(t,e)=>{K[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),K[`${t}/${e}`]=!0)},et=new Error;function nt(t,e,{key:n}){let r=0;const i=t[n],o={},s={};for(let t=1;t<=e.length;t++)s[t+r]=i[t],o[t+r]=!0,r+=b(e[t-1]);t[n]=s,t[n]._emit=o,t[n]._multi=!0}function rt(t){!function(t){t.scope&&"object"==typeof t.scope&&null!==t.scope&&(t.beginScope=t.scope,delete t.scope)}(t),"string"==typeof t.beginScope&&(t.beginScope={_wrap:t.beginScope}),"string"==typeof t.endScope&&(t.endScope={_wrap:t.endScope}),function(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),et;if("object"!=typeof t.beginScope||null===t.beginScope)throw J("beginScope must be object"),et;nt(t,t.begin,{key:"beginScope"}),t.begin=A(t.begin,{joinWith:""})}}(t),function(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),et;if("object"!=typeof t.endScope||null===t.endScope)throw J("endScope must be object"),et;nt(t,t.end,{key:"endScope"}),t.end=A(t.end,{joinWith:""})}}(t)}function it(t){function e(e,n){return new RegExp(p(e),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(t,e){e.position=this.position++,this.matchIndexes[this.matchAt]=e,this.regexes.push([e,t]),this.matchAt+=b(t)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const t=this.regexes.map((t=>t[1]));this.matcherRe=e(A(t,{joinWith:"|"}),!0),this.lastIndex=0}exec(t){this.matcherRe.lastIndex=this.lastIndex;const e=this.matcherRe.exec(t);if(!e)return null;const n=e.findIndex(((t,e)=>e>0&&void 0!==t)),r=this.matchIndexes[n];return e.splice(0,n),Object.assign(e,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(t){if(this.multiRegexes[t])return this.multiRegexes[t];const e=new n;return this.rules.slice(t).forEach((([t,n])=>e.addRule(t,n))),e.compile(),this.multiRegexes[t]=e,e}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(t,e){this.rules.push([t,e]),"begin"===e.type&&this.count++}exec(t){const e=this.getMatcher(this.regexIndex);e.lastIndex=this.lastIndex;let n=e.exec(t);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const e=this.getMatcher(0);e.lastIndex=this.lastIndex+1,n=e.exec(t)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=o(t.classNameAliases||{}),function n(i,s){const a=i;if(i.isCompiled)return a;[j,F,rt,Y].forEach((t=>t(i,s))),t.compilerExtensions.forEach((t=>t(i,s))),i.__beforeBegin=null,[U,Z,V].forEach((t=>t(i,s))),i.isCompiled=!0;let l=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),l=i.keywords.$pattern,delete i.keywords.$pattern),l=l||/\w+/,i.keywords&&(i.keywords=X(i.keywords,t.case_insensitive)),a.keywordPatternRe=e(l,!0),s&&(i.begin||(i.begin=/\B|\b/),a.beginRe=e(a.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(a.endRe=e(a.end)),a.terminatorEnd=p(a.end)||"",i.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(a.illegalRe=e(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(t){return function(t){t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map((function(e){return o(t,{variants:null},e)})));if(t.cachedVariants)return t.cachedVariants;if(ot(t))return o(t,{starts:t.starts?o(t.starts):null});if(Object.isFrozen(t))return o(t);return t}("self"===t?i:t)}))),i.contains.forEach((function(t){n(t,a)})),i.starts&&n(i.starts,s),a.matcher=function(t){const e=new r;return t.contains.forEach((t=>e.addRule(t.begin,{rule:t,type:"begin"}))),t.terminatorEnd&&e.addRule(t.terminatorEnd,{type:"end"}),t.illegal&&e.addRule(t.illegal,{type:"illegal"}),e}(a),a}(t)}function ot(t){return!!t&&(t.endsWithParent||ot(t.starts))}class st extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const at=i,lt=o,ct=Symbol("nomatch"),dt=7;var pt=function(t){const n=Object.create(null),i=Object.create(null),o=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function p(t){return c.noHighlightRe.test(t)}function b(t,e,n){let r="",i="";"object"==typeof e?(r=t,n=e.ignoreIllegals,i=e.language):(tt("10.7.0","highlight(lang, code, ...args) has been deprecated."),tt("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=t,r=e),void 0===n&&(n=!0);const o={code:r,language:i};E("before:highlight",o);const s=o.result?o.result:y(o.language,o.code,n);return s.code=o.code,E("after:highlight",s),s}function y(t,e,i,o){const l=Object.create(null);function d(){if(!C.keywords)return void S.addText(B);let t=0;C.keywordPatternRe.lastIndex=0;let e=C.keywordPatternRe.exec(B),n="";for(;e;){n+=B.substring(t,e.index);const i=v.case_insensitive?e[0].toLowerCase():e[0],o=(r=i,C.keywords[r]);if(o){const[t,r]=o;if(S.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=dt&&(O+=r),t.startsWith("_"))n+=e[0];else{const n=v.classNameAliases[t]||t;S.addKeyword(e[0],n)}}else n+=e[0];t=C.keywordPatternRe.lastIndex,e=C.keywordPatternRe.exec(B)}var r;n+=B.substring(t),S.addText(n)}function p(){null!=C.subLanguage?function(){if(""===B)return;let t=null;if("string"==typeof C.subLanguage){if(!n[C.subLanguage])return void S.addText(B);t=y(C.subLanguage,B,!0,E[C.subLanguage]),E[C.subLanguage]=t._top}else t=A(B,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=t.relevance),S.addSublanguage(t._emitter,t.language)}():d(),B=""}function h(t,e){let n=1;const r=e.length-1;for(;n<=r;){if(!t._emit[n]){n++;continue}const r=v.classNameAliases[t[n]]||t[n],i=e[n];r?S.addKeyword(i,r):(B=i,d(),B=""),n++}}function u(t,e){return t.scope&&"string"==typeof t.scope&&S.openNode(v.classNameAliases[t.scope]||t.scope),t.beginScope&&(t.beginScope._wrap?(S.addKeyword(B,v.classNameAliases[t.beginScope._wrap]||t.beginScope._wrap),B=""):t.beginScope._multi&&(h(t.beginScope,e),B="")),C=Object.create(t,{parent:{value:C}}),C}function f(t,e,n){let i=function(t,e){const n=t&&t.exec(e);return n&&0===n.index}(t.endRe,n);if(i){if(t["on:end"]){const n=new r(t);t["on:end"](e,n),n.isMatchIgnored&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return f(t.parent,e,n)}function m(t){return 0===C.matcher.regexIndex?(B+=t[0],1):($=!0,0)}function g(t){const n=t[0],r=e.substring(t.index),i=f(C,t,r);if(!i)return ct;const o=C;C.endScope&&C.endScope._wrap?(p(),S.addKeyword(n,C.endScope._wrap)):C.endScope&&C.endScope._multi?(p(),h(C.endScope,t)):o.skip?B+=n:(o.returnEnd||o.excludeEnd||(B+=n),p(),o.excludeEnd&&(B=n));do{C.scope&&S.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&u(i.starts,t),o.returnEnd?0:n.length}let b={};function w(n,o){const a=o&&o[0];if(B+=n,null==a)return p(),0;if("begin"===b.type&&"end"===o.type&&b.index===o.index&&""===a){if(B+=e.slice(o.index,o.index+1),!s){const e=new Error(`0 width match regex (${t})`);throw e.languageName=t,e.badRule=b.rule,e}return 1}if(b=o,"begin"===o.type)return function(t){const e=t[0],n=t.rule,i=new r(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(t,i),i.isMatchIgnored))return m(e);return n.skip?B+=e:(n.excludeBegin&&(B+=e),p(),n.returnBegin||n.excludeBegin||(B=e)),u(n,t),n.returnBegin?0:e.length}(o);if("illegal"===o.type&&!i){const t=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw t.mode=C,t}if("end"===o.type){const t=g(o);if(t!==ct)return t}if("illegal"===o.type&&""===a)return 1;if(I>1e5&&I>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return B+=a,a.length}const v=_(t);if(!v)throw J(a.replace("{}",t)),new Error('Unknown language: "'+t+'"');const x=it(v);let k="",C=o||x;const E={},S=new c.__emitter(c);!function(){const t=[];for(let e=C;e!==v;e=e.parent)e.scope&&t.unshift(e.scope);t.forEach((t=>S.openNode(t)))}();let B="",O=0,M=0,I=0,$=!1;try{for(C.matcher.considerAll();;){I++,$?$=!1:C.matcher.considerAll(),C.matcher.lastIndex=M;const t=C.matcher.exec(e);if(!t)break;const n=w(e.substring(M,t.index),t);M=t.index+n}return w(e.substring(M)),S.closeAllNodes(),S.finalize(),k=S.toHTML(),{language:t,value:k,relevance:O,illegal:!1,_emitter:S,_top:C}}catch(n){if(n.message&&n.message.includes("Illegal"))return{language:t,value:at(e),illegal:!0,relevance:0,_illegalBy:{message:n.message,index:M,context:e.slice(M-100,M+100),mode:n.mode,resultSoFar:k},_emitter:S};if(s)return{language:t,value:at(e),illegal:!1,relevance:0,errorRaised:n,_emitter:S,_top:C};throw n}}function A(t,e){e=e||c.languages||Object.keys(n);const r=function(t){const e={value:at(t),illegal:!1,relevance:0,_top:l,_emitter:new c.__emitter(c)};return e._emitter.addText(t),e}(t),i=e.filter(_).filter(C).map((e=>y(e,t,!1)));i.unshift(r);const o=i.sort(((t,e)=>{if(t.relevance!==e.relevance)return e.relevance-t.relevance;if(t.language&&e.language){if(_(t.language).supersetOf===e.language)return 1;if(_(e.language).supersetOf===t.language)return-1}return 0})),[s,a]=o,d=s;return d.secondBest=a,d}function w(t){let e=null;const n=function(t){let e=t.className+" ";e+=t.parentNode?t.parentNode.className:"";const n=c.languageDetectRe.exec(e);if(n){const e=_(n[1]);return e||(Q(a.replace("{}",n[1])),Q("Falling back to no-highlight mode for this block.",t)),e?n[1]:"no-highlight"}return e.split(/\s+/).find((t=>p(t)||_(t)))}(t);if(p(n))return;if(E("before:highlightElement",{el:t,language:n}),t.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(t)),c.throwUnescapedHTML)){throw new st("One of your code blocks includes unescaped HTML.",t.innerHTML)}e=t;const r=e.textContent,o=n?b(r,{language:n,ignoreIllegals:!0}):A(r);t.innerHTML=o.value,function(t,e,n){const r=e&&i[e]||n;t.classList.add("hljs"),t.classList.add(`language-${r}`)}(t,n,o.language),t.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(t.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),E("after:highlightElement",{el:t,result:o,text:r})}let v=!1;function x(){if("loading"===document.readyState)return void(v=!0);document.querySelectorAll(c.cssSelector).forEach(w)}function _(t){return t=(t||"").toLowerCase(),n[t]||n[i[t]]}function k(t,{languageName:e}){"string"==typeof t&&(t=[t]),t.forEach((t=>{i[t.toLowerCase()]=e}))}function C(t){const e=_(t);return e&&!e.disableAutodetect}function E(t,e){const n=t;o.forEach((function(t){t[n]&&t[n](e)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){v&&x()}),!1),Object.assign(t,{highlight:b,highlightAuto:A,highlightAll:x,highlightElement:w,highlightBlock:function(t){return tt("10.7.0","highlightBlock will be removed entirely in v12.0"),tt("10.7.0","Please use highlightElement now."),w(t)},configure:function(t){c=lt(c,t)},initHighlighting:()=>{x(),tt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){x(),tt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,r){let i=null;try{i=r(t)}catch(t){if(J("Language definition for '{}' could not be registered.".replace("{}",e)),!s)throw t;J(t),i=l}i.name||(i.name=e),n[e]=i,i.rawDefinition=r.bind(null,t),i.aliases&&k(i.aliases,{languageName:e})},unregisterLanguage:function(t){delete n[t];for(const e of Object.keys(i))i[e]===t&&delete i[e]},listLanguages:function(){return Object.keys(n)},getLanguage:_,registerAliases:k,autoDetection:C,inherit:lt,addPlugin:function(t){!function(t){t["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=e=>{t["before:highlightBlock"](Object.assign({block:e.el},e))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=e=>{t["after:highlightBlock"](Object.assign({block:e.el},e))})}(t),o.push(t)}}),t.debugMode=function(){s=!1},t.safeMode=function(){s=!0},t.versionString="11.7.0",t.regex={concat:m,lookahead:h,either:g,optional:f,anyNumberOfTimes:u};for(const t in z)"object"==typeof z[t]&&e.exports(z[t]);return Object.assign(t,z),t}({});t.exports=pt,pt.HighlightJS=pt,pt.default=pt},1887:t=>{"use strict";var e,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={};function a(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}((t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})})(s,{Hooks:()=>mt,Lexer:()=>pt,Marked:()=>gt,Parser:()=>ft,Renderer:()=>ht,TextRenderer:()=>ut,Tokenizer:()=>dt,defaults:()=>l,getDefaults:()=>a,lexer:()=>Et,marked:()=>yt,options:()=>At,parse:()=>kt,parseInline:()=>_t,parser:()=>Ct,setOptions:()=>wt,use:()=>vt,walkTokens:()=>xt}),t.exports=(e=s,((t,e,s,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let l of i(e))o.call(t,l)||l===s||n(t,l,{get:()=>e[l],enumerable:!(a=r(e,l))||a.enumerable});return t})(n({},"__esModule",{value:!0}),e));var l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function c(t){l=t}var d={exec:()=>null};function p(t,e=""){let n="string"==typeof t?t:t.source;const r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(h.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var h={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f=/(?:[*+-]|\d{1,9}[.)])/,m=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g=p(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),b=p(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,A=/(?!\s*\])(?:\\.|[^\[\]\\])+/,w=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",A).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),v=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f).getRegex(),x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C=p(y).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),E={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:w,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:k,lheading:g,list:v,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:C,table:d,text:/^[^\n]+/},S=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),B={...E,lheading:b,table:S,paragraph:p(y).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",S).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},O={...E,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:d,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(y).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",g).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M=/^( {2,}|\\)\n(?!\s*$)/,I=/[\p{P}\p{S}]/u,$=/[\s\p{P}\p{S}]/u,T=/[^\s\p{P}\p{S}]/u,L=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$).getRegex(),N=/(?!~)[\p{P}\p{S}]/u,R=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P=p(R,"u").replace(/punct/g,I).getRegex(),D=p(R,"u").replace(/punct/g,N).getRegex(),z="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H=p(z,"gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,$).replace(/punct/g,I).getRegex(),j=p(z,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,N).getRegex(),U=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,$).replace(/punct/g,I).getRegex(),Z=p(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),F=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),V=p(_).replace("(?:--\x3e|$)","--\x3e").getRegex(),Y=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),W=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",W).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),X=p(/^!?\[(label)\]\[(ref)\]/).replace("label",W).replace("ref",A).getRegex(),G=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",A).getRegex(),K={_backpedal:d,anyPunctuation:Z,autolink:F,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:M,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:d,emStrongLDelim:P,emStrongRDelimAst:H,emStrongRDelimUnd:U,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:q,nolink:G,punctuation:L,reflink:X,reflinkSearch:p("reflink|nolink(?!\\()","g").replace("reflink",X).replace("nolink",G).getRegex(),tag:Y,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:d},J={...K,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",W).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W).getRegex()},Q={...K,emStrongRDelimAst:j,emStrongLDelim:D,url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tt={...Q,br:p(M).replace("{2,}","*").getRegex(),text:p(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},et={normal:E,gfm:B,pedantic:O},nt={normal:K,gfm:Q,breaks:tt,pedantic:J},rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},it=t=>rt[t];function ot(t,e){if(e){if(h.escapeTest.test(t))return t.replace(h.escapeReplace,it)}else if(h.escapeTestNoEncode.test(t))return t.replace(h.escapeReplaceNoEncode,it);return t}function st(t){try{t=encodeURI(t).replace(h.percentDecode,"%")}catch{return null}return t}function at(t,e){const n=t.replace(h.findPipe,((t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(h.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(h.slashPipe,"|");return n}function lt(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.slice(0,r-i)}function ct(t,e,n,r,i){const o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var dt=class{options;rules;lexer;constructor(t){this.options=t||l}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:lt(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(n.other.beginningSpace);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=lt(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:lt(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=lt(e[0],"\n").split("\n"),n="",r="";const i=[];for(;t.length>0;){let e=!1;const o=[];let s;for(s=0;s<t.length;s++)if(this.rules.other.blockquoteStart.test(t[s]))o.push(t[s]),e=!0;else{if(e)break;o.push(t[s])}t=t.slice(s);const a=o.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const d=i.at(-1);if("code"===d?.type)break;if("blockquote"===d?.type){const e=d,o=e.raw+"\n"+t.join("\n"),s=this.blockquote(o);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"!==d?.type);else{const e=d,o=e.raw+"\n"+t.join("\n"),s=this.list(o);i[i.length-1]=s,n=n.substring(0,n.length-d.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=o.substring(i.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let n=!1,r="",a="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),o=this.rules.other.headingBeginRegex(p),s=this.rules.other.htmlBeginRegex(p);for(;t;){const h=t.split("\n",1)[0];let u;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),u=c):u=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(o.test(c))break;if(s.test(c))break;if(e.test(c))break;if(n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+u.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(o.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),r+=h+"\n",t=t.substring(h.length+1),l=u.slice(p)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,u=null;this.options.gfm&&(u=this.rules.other.listIsTask.exec(a),u&&(h="[ ] "!==u[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!u,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=r}const a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){const e=i.items[t].tokens.filter((t=>"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const n=at(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)this.rules.other.tableAlignRight.test(t)?o.align.push("right"):this.rules.other.tableAlignCenter.test(t)?o.align.push("center"):this.rules.other.tableAlignLeft.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t<n.length;t++)o.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:o.align[t]});for(const t of i)o.rows.push(at(t,o.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=lt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),ct(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return ct(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=l.exec(e));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const e=[...r[0]][0].length,l=t.slice(0,n+r.index+e+o);if(Math.min(n,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},pt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||l,this.options.tokenizer=this.options.tokenizer||new dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={other:h,block:et.normal,inline:nt.normal};this.options.pedantic?(e.block=et.pedantic,e.inline=nt.pedantic):this.options.gfm&&(e.block=et.gfm,this.options.breaks?e.inline=nt.breaks:e.inline=nt.gfm),this.tokenizer.rules=e}static get rules(){return{block:et,inline:nt}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(h.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(h.tabCharGlobal," ").replace(h.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length)}else if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n=t,r=null;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;t;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let s=t;if(this.options.extensions?.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;const n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},ht=class{options;parser;constructor(t){this.options=t||l}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(h.notSpaceStart)?.[0],i=t.replace(h.endingNewline,"")+"\n";return r?'<pre><code class="language-'+ot(r)+'">'+(n?i:ot(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:ot(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e<t.items.length;e++){const n=t.items[e];r+=this.listitem(n)}const i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+ot(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){const i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ot(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=st(t);if(null===i)return r;let o='<a href="'+(t=i)+'"';return e&&(o+=' title="'+ot(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=st(t);if(null===i)return ot(n);let o=`<img src="${t=i}" alt="${n}"`;return e&&(o+=` title="${ot(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ot(t.text)}},ut=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ft=class t{options;renderer;textRenderer;constructor(t){this.options=t||l,this.options.renderer=this.options.renderer||new ht,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ut}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}const o=i;switch(o.type){case"space":n+=this.renderer.space(o);continue;case"hr":n+=this.renderer.hr(o);continue;case"heading":n+=this.renderer.heading(o);continue;case"code":n+=this.renderer.code(o);continue;case"table":n+=this.renderer.table(o);continue;case"blockquote":n+=this.renderer.blockquote(o);continue;case"list":n+=this.renderer.list(o);continue;case"html":n+=this.renderer.html(o);continue;case"paragraph":n+=this.renderer.paragraph(o);continue;case"text":{let i=o,s=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],s+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}const o=i;switch(o.type){case"escape":case"text":n+=e.text(o);break;case"html":n+=e.html(o);break;case"link":n+=e.link(o);break;case"image":n+=e.image(o);break;case"strong":n+=e.strong(o);break;case"em":n+=e.em(o);break;case"codespan":n+=e.codespan(o);break;case"br":n+=e.br(o);break;case"del":n+=e.del(o);break;default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},mt=class{options;block;constructor(t){this.options=t||l}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?pt.lex:pt.lexInline}provideParser(){return this.block?ft.parse:ft.parseInline}},gt=class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ft;Renderer=ht;TextRenderer=ut;Lexer=pt;Tokenizer=dt;Hooks=mt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const t=r;for(const r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{const t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=this.defaults.renderer||new ht(this.defaults);for(const n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,i=t.renderer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new dt(this.defaults);for(const n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new mt;for(const n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,i=t.hooks[r],o=e[r];mt.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>o.call(e,t)));const n=i.call(e,t);return o.call(e,n)}:e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return pt.lex(t,e??this.defaults)}parser(t,e){return ft.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{const r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?pt.lex:pt.lexInline,a=i.hooks?i.hooks.provideParser():t?ft.parse:ft.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>a(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let n=a(t,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(t){return o(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+ot(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}},bt=new gt;function yt(t,e){return bt.parse(t,e)}yt.options=yt.setOptions=function(t){return bt.setOptions(t),yt.defaults=bt.defaults,c(yt.defaults),yt},yt.getDefaults=a,yt.defaults=l,yt.use=function(...t){return bt.use(...t),yt.defaults=bt.defaults,c(yt.defaults),yt},yt.walkTokens=function(t,e){return bt.walkTokens(t,e)},yt.parseInline=bt.parseInline,yt.Parser=ft,yt.parser=ft.parse,yt.Renderer=ht,yt.TextRenderer=ut,yt.Lexer=pt,yt.lexer=pt.lex,yt.Tokenizer=dt,yt.Hooks=mt,yt.parse=yt;var At=yt.options,wt=yt.setOptions,vt=yt.use,xt=yt.walkTokens,_t=yt.parseInline,kt=yt,Ct=ft.parse,Et=pt.lex},80184:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,n=/\s+$/;function r(t,e){if(e=e||{},(t=t||"")instanceof r)return t;if(!(this instanceof r))return new r(t,e);var n=i(t);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=e.format||n.format,this._gradientType=e.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 i(e){var n={r:0,g:0,b:0},r=1,i=null,s=null,l=null,d=!1,p=!1;return"string"==typeof e&&(e=Z(e)),"object"==t(e)&&(U(e.r)&&U(e.g)&&U(e.b)?(n=o(e.r,e.g,e.b),d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(i=N(e.s),s=N(e.v),n=c(e.h,i,s),d=!0,p="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(i=N(e.s),l=N(e.l),n=a(e.h,i,l),d=!0,p="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=B(r),{ok:d,format:e.format||p,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function o(t,e,n){return{r:255*O(t,255),g:255*O(e,255),b:255*O(n,255)}}function s(t,e,n){t=O(t,255),e=O(e,255),n=O(n,255);var r,i,o=Math.max(t,e,n),s=Math.min(t,e,n),a=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=a>.5?l/(2-o-s):l/(o+s),o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,l:a}}function a(t,e,n){var r,i,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=O(t,360),e=O(e,100),n=O(n,100),0===e)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*r,g:255*i,b:255*o}}function l(t,e,n){t=O(t,255),e=O(e,255),n=O(n,255);var r,i,o=Math.max(t,e,n),s=Math.min(t,e,n),a=o,l=o-s;if(i=0===o?0:l/o,o==s)r=0;else{switch(o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,v:a}}function c(t,e,n){t=6*O(t,360),e=O(e,100),n=O(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6;return{r:255*[n,s,o,o,a,n][l],g:255*[a,n,n,s,o,o][l],b:255*[o,o,a,n,n,s][l]}}function d(t,e,n,r){var i=[L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(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 p(t,e,n,r,i){var o=[L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(Math.round(n).toString(16)),L(R(r))];return i&&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("")}function h(t,e,n,r){return[L(R(r)),L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(Math.round(n).toString(16))].join("")}function u(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s-=e/100,n.s=M(n.s),r(n)}function f(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s+=e/100,n.s=M(n.s),r(n)}function m(t){return r(t).desaturate(100)}function g(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l+=e/100,n.l=M(n.l),r(n)}function b(t,e){e=0===e?0:e||10;var n=r(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-e/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-e/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-e/100*255))),r(n)}function y(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l-=e/100,n.l=M(n.l),r(n)}function A(t,e){var n=r(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,r(n)}function w(t){var e=r(t).toHsl();return e.h=(e.h+180)%360,r(e)}function v(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=r(t).toHsl(),i=[r(t)],o=360/e,s=1;s<e;s++)i.push(r({h:(n.h+s*o)%360,s:n.s,l:n.l}));return i}function x(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+72)%360,s:e.s,l:e.l}),r({h:(n+216)%360,s:e.s,l:e.l})]}function _(t,e,n){e=e||6,n=n||30;var i=r(t).toHsl(),o=360/n,s=[r(t)];for(i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,s.push(r(i));return s}function k(t,e){e=e||6;for(var n=r(t).toHsv(),i=n.h,o=n.s,s=n.v,a=[],l=1/e;e--;)a.push(r({h:i,s:o,v:s})),s=(s+l)%1;return a}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,r=this.toRgb();return t=r.r/255,e=r.g/255,n=r.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=B(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=s(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return d(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return p(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 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)&&(E[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=r(t);n="#"+h(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(v,[3])},tetrad:function(){return this._applyCombination(v,[4])}},r.fromRatio=function(e,n){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:N(e[o]));e=i}return r(e,n)},r.equals=function(t,e){return!(!t||!e)&&r(t).toRgbString()==r(e).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(t,e,n){n=0===n?0:n||50;var i=r(t).toRgb(),o=r(e).toRgb(),s=n/100;return r({r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a})},r.readability=function(t,e){var n=r(t),i=r(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)},r.isReadable=function(t,e,n){var i,o,s=r.readability(t,e);switch(o=!1,(i=F(n)).level+i.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},r.mostReadable=function(t,e,n){var i,o,s,a,l=null,c=0;o=(n=n||{}).includeFallbackColors,s=n.level,a=n.size;for(var d=0;d<e.length;d++)(i=r.readability(t,e[d]))>c&&(c=i,l=r(e[d]));return r.isReadable(t,l,{level:s,size:a})||!o?l:(n.includeFallbackColors=!1,r.mostReadable(t,["#fff","#000"],n))};var C=r.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"},E=r.hexNames=S(C);function S(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function B(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function O(t,e){$(t)&&(t="100%");var n=T(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return Math.min(1,Math.max(0,t))}function I(t){return parseInt(t,16)}function $(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function T(t){return"string"==typeof t&&-1!=t.indexOf("%")}function L(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function P(t){return I(t)/255}var D,z,H,j=(z="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",H="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+H),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 U(t){return!!j.CSS_UNIT.exec(t)}function Z(t){t=t.replace(e,"").replace(n,"").toLowerCase();var r,i=!1;if(C[t])t=C[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(r=j.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=j.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=j.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=j.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=j.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=j.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=j.hex8.exec(t))?{r:I(r[1]),g:I(r[2]),b:I(r[3]),a:P(r[4]),format:i?"name":"hex8"}:(r=j.hex6.exec(t))?{r:I(r[1]),g:I(r[2]),b:I(r[3]),format:i?"name":"hex"}:(r=j.hex4.exec(t))?{r:I(r[1]+""+r[1]),g:I(r[2]+""+r[2]),b:I(r[3]+""+r[3]),a:P(r[4]+""+r[4]),format:i?"name":"hex8"}:!!(r=j.hex3.exec(t))&&{r:I(r[1]+""+r[1]),g:I(r[2]+""+r[2]),b:I(r[3]+""+r[3]),format:i?"name":"hex"}}function F(t){var e,n;return"AA"!==(e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e&&(e="AA"),"small"!==(n=(t.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:e,size:n}}return r}()},94732:(t,e,n)=>{"use strict";var r=n(7968),i=n(13328),o=n(56927),s=n(7938);t.exports=function(t){if(t&&"object"==typeof t){if(r(t))return"Map";if(i(t))return"Set";if(o(t))return"WeakMap";if(s(t))return"WeakSet"}return!1}},56666:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(34952);function i(t,e,n){return(e=(0,r.Z)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},7896:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:()=>r})},34952:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===r(e)?e:String(e)}n.d(e,{Z:()=>i})},88573:(t,e,n)=>{"use strict";n.d(e,{ML:()=>he,hj:()=>gt,vc:()=>ct,NB:()=>ye,nU:()=>q,XP:()=>zt,N2:()=>Ht,b5:()=>jt,qv:()=>Ut,u9:()=>Vt,QC:()=>Wt,Nl:()=>j,Jo:()=>Dt,tI:()=>qt,bR:()=>Jt,Cf:()=>ue,K9:()=>Ae,P1:()=>V,x2:()=>fe,Ss:()=>we,DS:()=>ge,zK:()=>me,S0:()=>be});var r=n(27191),i=n(52780),o=n(38404),s=n(52665),a=n(26151);const l=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function c(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const d=(t,e,n)=>{let i=c(t,n);if(!i)return!1;let o=f(i);if(!o){let n=i.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let l=o.nodeBefore;if(E(t,o,e,-1))return!0;if(0==i.parent.content.size&&(h(l,"end")||r.qv.isSelectable(l)))for(let n=i.depth;;n--){let c=(0,a.dR)(t.doc,i.before(n),i.after(n),s.p2.empty);if(c&&c.slice.size<c.to-c.from){if(e){let n=t.tr.step(c);n.setSelection(h(l,"end")?r.Y1.findFrom(n.doc.resolve(n.mapping.map(o.pos,-1)),-1):r.qv.create(n.doc,o.pos-l.nodeSize)),e(n.scrollIntoView())}return!0}if(1==n||i.node(n-1).childCount>1)break}return!(!l.isAtom||o.depth!=i.depth-1)&&(e&&e(t.tr.delete(o.pos-l.nodeSize,o.pos).scrollIntoView()),!0)};function p(t,e,n){let i=e.nodeBefore,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let t=i.lastChild;if(!t)return!1;i=t}let l=e.nodeAfter,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let t=l.firstChild;if(!t)return!1;l=t}let d=(0,a.dR)(t.doc,o,c,s.p2.empty);if(!d||d.from!=o||d instanceof a.Pu&&d.slice.size>=c-o)return!1;if(n){let e=t.tr.step(d);e.setSelection(r.Bs.create(e.doc,o)),n(e.scrollIntoView())}return!0}function h(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const u=(t,e,n)=>{let{$head:i,empty:o}=t.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;s=f(i)}let a=s&&s.nodeBefore;return!(!a||!r.qv.isSelectable(a))&&(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const g=(t,e,n)=>{let i=m(t,n);if(!i)return!1;let o=y(i);if(!o)return!1;let l=o.nodeAfter;if(E(t,o,e,1))return!0;if(0==i.parent.content.size&&(h(l,"start")||r.qv.isSelectable(l))){let n=(0,a.dR)(t.doc,i.before(),i.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let i=t.tr.step(n);i.setSelection(h(l,"start")?r.Y1.findFrom(i.doc.resolve(i.mapping.map(o.pos)),1):r.qv.create(i.doc,i.mapping.map(o.pos))),e(i.scrollIntoView())}return!0}}return!(!l.isAtom||o.depth!=i.depth-1)&&(e&&e(t.tr.delete(o.pos,o.pos+l.nodeSize).scrollIntoView()),!0)},b=(t,e,n)=>{let{$head:i,empty:o}=t.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;s=y(i)}let a=s&&s.nodeAfter;return!(!a||!r.qv.isSelectable(a))&&(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos)).scrollIntoView()),!0)};function y(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const A=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function w(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const v=(t,e)=>{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let o=n.node(-1),s=n.indexAfter(-1),a=w(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(e){let i=n.after(),o=t.tr.replaceWith(i,i,a.createAndFill());o.setSelection(r.Y1.near(o.doc.resolve(i),1)),e(o.scrollIntoView())}return!0},x=(t,e)=>{let n=t.selection,{$from:i,$to:o}=n;if(n instanceof r.C1||i.parent.inlineContent||o.parent.inlineContent)return!1;let s=w(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!i.parentOffset&&o.index()<o.parent.childCount?i:o).pos,a=t.tr.insert(n,s.createAndFill());a.setSelection(r.Bs.create(a.doc,n+1)),e(a.scrollIntoView())}return!0},_=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,a.Ax)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&(0,a.k9)(r);return null!=i&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};const k=(t,e)=>{let{$from:n,$to:i}=t.selection;if(t.selection instanceof r.qv&&t.selection.node.isBlock)return!(!n.parentOffset||!(0,a.Ax)(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.depth)return!1;let o,s,l=[],c=!1,d=!1;for(let t=n.depth;;t--){if(n.node(t).isBlock){c=n.end(t)==n.pos+(n.depth-t),d=n.start(t)==n.pos-(n.depth-t),s=w(n.node(t-1).contentMatchAt(n.indexAfter(t-1)));let e=C&&C(i.parent,c,n);l.unshift(e||(c&&s?{type:s}:null)),o=t;break}if(1==t)return!1;l.unshift(null)}let p=t.tr;(t.selection instanceof r.Bs||t.selection instanceof r.C1)&&p.deleteSelection();let h=p.mapping.map(n.pos),u=(0,a.Ax)(p.doc,h,l.length,l);if(u||(l[0]=s?{type:s}:null,u=(0,a.Ax)(p.doc,h,l.length,l)),!u)return!1;if(p.split(h,l.length,l),!c&&d&&n.node(o).type!=s){let t=p.mapping.map(n.before(o)),e=p.doc.resolve(t);s&&n.node(o-1).canReplaceWith(e.index(),e.index()+1,s)&&p.setNodeMarkup(p.mapping.map(n.before(o)),s)}return e&&e(p.scrollIntoView()),!0};var C;function E(t,e,n,i){let o,l,c=e.nodeBefore,d=e.nodeAfter,p=c.type.spec.isolating||d.type.spec.isolating;if(!p&&function(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!(0,a.Mn)(t.doc,e.pos)||(n&&n(t.tr.join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let u=!p&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(l=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&l.matchType(o[0]||d.type).validEnd){if(n){let r=e.pos+d.nodeSize,i=s.HY.empty;for(let t=o.length-1;t>=0;t--)i=s.HY.from(o[t].create(null,i));i=s.HY.from(c.copy(i));let l=t.tr.step(new a.FC(e.pos-1,r,e.pos,r,new s.p2(i,1,0),o.length,!0)),p=l.doc.resolve(r+2*o.length);p.nodeAfter&&p.nodeAfter.type==c.type&&(0,a.Mn)(l.doc,p.pos)&&l.join(p.pos),n(l.scrollIntoView())}return!0}let f=d.type.spec.isolating||i>0&&p?null:r.Y1.findFrom(e,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,a.k9)(m);if(null!=g&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(u&&h(d,"start",!0)&&h(c,"end")){let r=c,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let o=d,l=1;for(;!o.isTextblock;o=o.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,o.content)){if(n){let r=s.HY.empty;for(let t=i.length-1;t>=0;t--)r=s.HY.from(i[t].copy(r));n(t.tr.step(new a.FC(e.pos-i.length,e.pos+d.nodeSize,e.pos+l,e.pos+d.nodeSize-l,new s.p2(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function S(t){return function(e,n){let i=e.selection,o=t<0?i.$from:i.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(e.tr.setSelection(r.Bs.create(e.doc,t<0?o.start(s):o.end(s)))),!0)}}const B=S(-1),O=S(1);function M(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,((r,o)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)i=!0;else{let e=n.doc.resolve(o),r=e.index();i=e.parent.canReplaceWith(r,r+1,t)}}))}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,t,e)}r(i.scrollIntoView())}return!0}}function I(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let $=I(l,d,u),T=I(l,g,b);const L={Enter:I(A,x,_,k),"Mod-Enter":v,Backspace:$,"Mod-Backspace":$,"Shift-Backspace":$,Delete:T,"Mod-Delete":T,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new r.C1(t.doc))),!0)},N={"Ctrl-h":L.Backspace,"Alt-Backspace":L["Mod-Backspace"],"Ctrl-d":L.Delete,"Ctrl-Alt-Backspace":L["Mod-Delete"],"Alt-Delete":L["Mod-Delete"],"Alt-d":L["Mod-Delete"],"Ctrl-a":B,"Ctrl-e":O};for(let t in L)N[t]=L[t];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function R(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,l=i.blockRange(o);if(!l)return!1;let c=r?n.tr:null;return!!function(t,e,n,r=null){let i=!1,o=e,l=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){if(0==e.$from.index(e.depth-1))return!1;let t=l.resolve(e.start-2);o=new s.Ts(t,t,e.depth),e.endIndex<e.parent.childCount&&(e=new s.Ts(e.$from,l.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let c=(0,a.nd)(o,n,r,e);if(!c)return!1;t&&function(t,e,n,r,i){let o=s.HY.empty;for(let t=n.length-1;t>=0;t--)o=s.HY.from(n[t].type.create(n[t].attrs,o));t.step(new a.FC(e.start-(r?2:0),e.end,e.start,e.end,new s.p2(o,0,0),n.length,!0));let l=0;for(let t=0;t<n.length;t++)n[t].type==i&&(l=t+1);let c=n.length-l,d=e.start+n.length-(r?2:0),p=e.parent;for(let n=e.startIndex,r=e.endIndex,i=!0;n<r;n++,i=!1)!i&&(0,a.Ax)(t.doc,d,c)&&(t.split(d,c),d+=2*c),d+=p.child(n).nodeSize}(t,e,c,i,n);return!0}(c,l,t,e)&&(r&&r(c.scrollIntoView()),!0)}}function P(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,(e=>e.childCount>0&&e.firstChild.type==t));return!!o&&(!n||(r.node(o.depth-1).type==t?function(t,e,n,r){let i=t.tr,o=r.end,l=r.$to.end(r.depth);o<l&&(i.step(new a.FC(o-1,l,o,l,new s.p2(s.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.Ts(i.doc.resolve(r.$from.pos),i.doc.resolve(l),r.depth));const c=(0,a.k9)(r);if(null==c)return!1;i.lift(r,c);let d=i.doc.resolve(i.mapping.map(o,-1)-1);(0,a.Mn)(i.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&i.join(d.pos);return e(i.scrollIntoView()),!0}(e,n,t,o):function(t,e,n){let r=t.tr,i=n.parent;for(let t=n.end,e=n.endIndex-1,o=n.startIndex;e>o;e--)t-=i.child(e).nodeSize,r.delete(t-1,t+1);let o=r.doc.resolve(n.start),l=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==i.childCount,p=o.node(-1),h=o.index(-1);if(!p.canReplace(h+(c?0:1),h+1,l.content.append(d?s.HY.empty:s.HY.from(i))))return!1;let u=o.pos,f=u+l.nodeSize;return r.step(new a.FC(u-(c?1:0),f+(d?1:0),u+1,f-1,new s.p2((c?s.HY.empty:s.HY.from(i.copy(s.HY.empty))).append(d?s.HY.empty:s.HY.from(i.copy(s.HY.empty))),c?0:1,d?0:1),c?0:1)),e(r.scrollIntoView()),!0}(e,n,o)))}}function D(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class z{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!t,l=t||i.tr,c={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(l,e),i=n(...t)(r);return s.push(i),c}]))),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every((t=>!0===t)))};return c}createCan(t){const{rawCommands:e,state:n}=this,r=t||n.tr,i=this.buildProps(r,false),o=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:void 0})])));return{...o,chain:()=>this.createChain(r,false)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:t,editor:r,view:o,state:D({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}class H{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}}function j(t,e,n){if(void 0===t.config[e]&&t.parent)return j(t.parent,e,n);if("function"==typeof t.config[e]){return t.config[e].bind({...n,parent:t.parent?j(t.parent,e,n):null})}return t.config[e]}function U(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function Z(t){const e=[],{nodeExtensions:n,markExtensions:r}=U(t),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=j(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage,extensions:i});if(!n)return;n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...o,...r}})}))}))}))})),i.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=j(t,"addAttributes",n);if(!r)return;const i=r();Object.entries(i).forEach((([n,r])=>{const i={...o,...r};"function"==typeof(null==i?void 0:i.default)&&(i.default=i.default()),(null==i?void 0:i.isRequired)&&void 0===(null==i?void 0:i.default)&&delete i.default,e.push({type:t.name,name:n,attribute:i})}))})),e}function F(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function V(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{if(n[t])if("class"===t){const r=e?String(e).split(" "):[],i=n[t]?n[t].split(" "):[],o=r.filter((t=>!i.includes(t)));n[t]=[...i,...o].join(" ")}else if("style"===t){const r=e?e.split(";").map((t=>t.trim())).filter(Boolean):[],i=n[t]?n[t].split(";").map((t=>t.trim())).filter(Boolean):[],o=new Map;i.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));o.set(e,n)})),r.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));o.set(e,n)})),n[t]=Array.from(o.entries()).map((([t,e])=>`${t}: ${e}`)).join("; ")}else n[t]=e;else n[t]=e})),n}),{})}function Y(t,e){return e.filter((e=>e.type===t.type.name)).filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>V(t,e)),{})}function W(t){return"function"==typeof t}function q(t,e=undefined,...n){return W(t)?e?t.bind(e)(...n):t(...n):t}function X(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const i=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):function(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null==r?t:{...t,[e.name]:r}}),{});return{...r,...i}}}}function G(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&null!=e)))}function K(t,e){var n;const r=Z(t),{nodeExtensions:i,markExtensions:o}=U(t),a=null===(n=i.find((t=>j(t,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(i.map((n=>{const i=r.filter((t=>t.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=G({...t.reduce(((t,e)=>{const r=j(e,"extendNodeSchema",o);return{...t,...r?r(n):{}}}),{}),content:q(j(n,"content",o)),marks:q(j(n,"marks",o)),group:q(j(n,"group",o)),inline:q(j(n,"inline",o)),atom:q(j(n,"atom",o)),selectable:q(j(n,"selectable",o)),draggable:q(j(n,"draggable",o)),code:q(j(n,"code",o)),whitespace:q(j(n,"whitespace",o)),linebreakReplacement:q(j(n,"linebreakReplacement",o)),defining:q(j(n,"defining",o)),isolating:q(j(n,"isolating",o)),attrs:Object.fromEntries(i.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=q(j(n,"parseHTML",o));a&&(s.parseDOM=a.map((t=>X(t,i))));const l=j(n,"renderHTML",o);l&&(s.toDOM=t=>l({node:t,HTMLAttributes:Y(t,i)}));const c=j(n,"renderText",o);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(o.map((n=>{const i=r.filter((t=>t.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=G({...t.reduce(((t,e)=>{const r=j(e,"extendMarkSchema",o);return{...t,...r?r(n):{}}}),{}),inclusive:q(j(n,"inclusive",o)),excludes:q(j(n,"excludes",o)),group:q(j(n,"group",o)),spanning:q(j(n,"spanning",o)),code:q(j(n,"code",o)),attrs:Object.fromEntries(i.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=q(j(n,"parseHTML",o));a&&(s.parseDOM=a.map((t=>X(t,i))));const l=j(n,"renderHTML",o);return l&&(s.toDOM=t=>l({mark:t,HTMLAttributes:Y(t,i)})),[n.name,s]})));return new s.V_({topNode:a,nodes:l,marks:c})}function J(t,e){return e.nodes[t]||e.marks[t]||null}function Q(t,e){return Array.isArray(e)?e.some((e=>("string"==typeof e?e:e.name)===t.name)):e}function tt(t,e){const n=s.PW.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}const et=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,((t,e,i,o)=>{var s,a;const l=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:e,parent:i,index:o}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?l:l.slice(0,Math.max(0,r-e))})),n};function nt(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class rt{constructor(t){this.find=t.find,this.handler=t.handler}}const it=(t,e)=>{if(nt(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function ot(t){var e;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let d=!1;const p=et(c)+o;return s.forEach((t=>{if(d)return;const e=it(p,t.find);if(!e)return;const s=l.state.tr,c=D({state:l.state,transaction:s}),h={from:r-(e[0].length-o.length),to:i},{commands:u,chain:f,can:m}=new z({editor:n,state:c});null!==t.handler({state:c,range:h,match:e,commands:u,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),d=!0)})),d}function st(t){const{editor:e,rules:n}=t,i=new r.Sy({state:{init:()=>null,apply(t,r,o){const a=t.getMeta(i);if(a)return a;const l=t.getMeta("applyInputRules");return!!l&&setTimeout((()=>{let{text:t}=l;"string"==typeof t||(t=tt(s.HY.from(t),o.schema));const{from:r}=l,a=r+t.length;ot({editor:e,from:r,to:a,text:t,rules:n,plugin:i})})),t.selectionSet||t.docChanged?null:r}},props:{handleTextInput:(t,r,o,s)=>ot({editor:e,from:r,to:o,text:s,rules:n,plugin:i}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:r}=t.state.selection;r&&ot({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:i})})),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:o}=t.state.selection;return!!o&&ot({editor:e,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:i})}},isInputRules:!0});return i}function at(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function lt(t,e){const n={...t};return at(t)&&at(e)&&Object.keys(e).forEach((r=>{at(e[r])&&at(t[r])?n[r]=lt(t[r],e[r]):n[r]=e[r]})),n}class ct{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ct(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new ct(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const i=r.marks();if(!!!i.find((t=>(null==t?void 0:t.type.name)===e.name)))return!1;const o=i.find((t=>(null==t?void 0:t.type.name)===e.name));return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}}class dt{constructor(t){this.find=t.find,this.handler=t.handler}}const pt=(t,e,n)=>{if(nt(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]};let ht=null;const ut=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(e=n.clipboardData)||void 0===e||e.setData("text/html",t),n};function ft(t){const{editor:e,rules:n}=t;let i,o=null,a=!1,l=!1,c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}const d=({state:t,from:n,to:r,rule:o,pasteEvt:s})=>{const a=t.tr,l=D({state:t,transaction:a}),d=function(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new z({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,i,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const h=Math.max(r,e),u=Math.min(i,e+t.content.size),f=t.textBetween(h-e,u-e,void 0,"");pt(f,o.find,s).forEach((t=>{if(void 0===t.index)return;const e=h+t.index+1,r=e+t[0].length,i={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},u=o.handler({state:n,range:i,match:t,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});p.push(u)}))})),p.every((t=>null!==t))}({editor:e,state:l,from:Math.max(n-1,0),to:r.b-1,rule:o,pasteEvent:s,dropEvent:i});if(d&&a.steps.length){try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}return c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map((t=>new r.Sy({view(t){const n=n=>{var r;o=(null===(r=t.dom.parentElement)||void 0===r?void 0:r.contains(n.target))?t.dom.parentElement:null,o&&(ht=e)},r=()=>{ht&&(ht=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(l=o===t.dom.parentElement,i=e,!l){const t=ht;t&&setTimeout((()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})}),10)}return!1},paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return c=e,a=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,r)=>{const i=e[0],o="paste"===i.getMeta("uiEvent")&&!a,p="drop"===i.getMeta("uiEvent")&&!l,h=i.getMeta("applyPasteRules"),u=!!h;if(!o&&!p&&!u)return;if(u){let{text:e}=h;"string"==typeof e||(e=tt(s.HY.from(e),r.schema));const{from:n}=h,i=n+e.length,o=ut(e);return d({rule:t,state:r,from:n,to:{b:i},pasteEvt:o})}const f=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);return"number"==typeof f&&m&&f!==m.b?d({rule:t,state:r,from:f,to:m,pasteEvt:c}):void 0}})))}class mt{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=mt.resolve(t),this.schema=K(this.extensions,e),this.setupExtensions()}static resolve(t){const e=mt.sort(mt.flatten(t)),n=function(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return Array.from(new Set(e))}(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e=j(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=j(t,"priority")||100,r=j(e,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((t,e)=>{const n=j(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:J(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this,e=mt.sort([...this.extensions].reverse()),n=[],r=[],i=e.map((e=>{const i={name:e.name,options:e.options,storage:e.storage,editor:t,type:J(e.name,this.schema)},s=[],a=j(e,"addKeyboardShortcuts",i);let l={};if("mark"===e.type&&j(e,"exitable",i)&&(l.ArrowRight=()=>ct.handleExit({editor:t,mark:e})),a){const e=Object.fromEntries(Object.entries(a()).map((([e,n])=>[e,()=>n({editor:t})])));l={...l,...e}}const c=(0,o.h)(l);s.push(c);const d=j(e,"addInputRules",i);Q(e,t.options.enableInputRules)&&d&&n.push(...d());const p=j(e,"addPasteRules",i);Q(e,t.options.enablePasteRules)&&p&&r.push(...p());const h=j(e,"addProseMirrorPlugins",i);if(h){const t=h();s.push(...t)}return s})).flat();return[st({editor:t,rules:n}),...ft({editor:t,rules:r}),...i]}get attributes(){return Z(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=U(this.extensions);return Object.fromEntries(e.filter((t=>!!j(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:F(e.name,this.schema)},i=j(e,"addNodeView",r);if(!i)return[];return[e.name,(r,o,s,a,l)=>{const c=Y(r,n);return i()({node:r,view:o,getPos:s,decorations:a,innerDecorations:l,editor:t,extension:e,HTMLAttributes:c})}]})))}setupExtensions(){this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:J(t.name,this.schema)};if("mark"===t.type){(null===(e=q(j(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name)}const r=j(t,"onBeforeCreate",n),i=j(t,"onCreate",n),o=j(t,"onUpdate",n),s=j(t,"onSelectionUpdate",n),a=j(t,"onTransaction",n),l=j(t,"onFocus",n),c=j(t,"onBlur",n),d=j(t,"onDestroy",n);r&&this.editor.on("beforeCreate",r),i&&this.editor.on("create",i),o&&this.editor.on("update",o),s&&this.editor.on("selectionUpdate",s),a&&this.editor.on("transaction",a),l&&this.editor.on("focus",l),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)}))}}class gt{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new gt(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new gt({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}}function bt(t,e,n){const{from:r,to:i}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,i,((t,n,l,c)=>{var d;t.isBlock&&n>r&&(a+=o);const p=null==s?void 0:s[t.type.name];if(p)return l&&(a+=p({node:t,pos:n,parent:l,index:c,range:e})),!1;t.isText&&(a+=null===(d=null==t?void 0:t.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n))})),a}function yt(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const At=gt.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map((t=>t.$from.pos))),a=Math.max(...o.map((t=>t.$to.pos))),l=yt(n);return bt(r,{from:s,to:a},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});function wt(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:nt(e[r])?e[r].test(t[r]):e[r]===t[r]))}function vt(t,e,n={}){return t.find((t=>t.type===e&&wt(Object.fromEntries(Object.keys(n).map((e=>[e,t.attrs[e]]))),n)))}function xt(t,e,n={}){return!!vt(t,e,n)}function _t(t,e,n){var r;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if(i.node&&i.node.marks.some((t=>t.type===e))||(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some((t=>t.type===e)))return;n=n||(null===(r=i.node.marks[0])||void 0===r?void 0:r.attrs);if(!vt([...i.node.marks],e,n))return;let o=i.index,s=t.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(;o>0&&xt([...t.parent.child(o-1).marks],e,n);)o-=1,s-=t.parent.child(o).nodeSize;for(;a<t.parent.childCount&&xt([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function kt(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function Ct(t){return t instanceof r.Bs}function Et(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function St(t,e=null){if(!e)return null;const n=r.Y1.atStart(t),i=r.Y1.atEnd(t);if("start"===e||!0===e)return n;if("end"===e)return i;const o=n.from,s=i.to;return"all"===e?r.Bs.create(t,Et(0,o,s),Et(t.content.size,o,s)):r.Bs.create(t,Et(e,o,s),Et(e,o,s))}function Bt(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function Ot(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Mt=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):1===r.nodeType&&Mt(r)}return t};function It(t){const e=`<body>${t}</body>`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return Mt(n)}function $t(t,e,n){if(t instanceof s.NB||t instanceof s.HY)return t;n={slice:!0,parseOptions:{},...n};const r="string"==typeof t;if("object"==typeof t&&null!==t)try{if(Array.isArray(t)&&t.length>0)return s.HY.fromArray(t.map((t=>e.nodeFromJSON(t))));const r=e.nodeFromJSON(t);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:r});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),$t("",e,n)}if(r){if(n.errorOnInvalidContent){let r=!1,i="";const o=new s.V_({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(r=!0,i="string"==typeof t?t:t.outerHTML,null)}]}})});if(n.slice?s.aw.fromSchema(o).parseSlice(It(t),n.parseOptions):s.aw.fromSchema(o).parse(It(t),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${i}`)})}const r=s.aw.fromSchema(e);return n.slice?r.parseSlice(It(t),n.parseOptions).content:r.parse(It(t),n.parseOptions)}return $t("",e,n)}function Tt(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Lt(t,e,n={}){const{from:r,to:i,empty:o}=t.selection,s=e?F(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),o=Math.min(i,e+t.nodeSize);a.push({node:t,from:n,to:o})}));const l=i-r,c=a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>wt(t.node.attrs,n,{strict:!1})));if(o)return!!c.length;return c.reduce(((t,e)=>t+e.to-e.from),0)>=l}function Nt(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Rt(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}function Pt(t,e,n={},r={}){return $t(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function Dt(t,e){const n=kt(e,t.schema),{from:r,to:i,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,(t=>{s.push(...t.marks)}));const a=s.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function zt(t,e){const n=new a.wx(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function Ht(t,e){const n=[];return t.descendants(((t,r)=>{e(t)&&n.push({node:t,pos:r})})),n}function jt(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}function Ut(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Zt(t){return e=>Ut(e.$from,t)}function Ft(t,e){return bt(t,{from:0,to:t.content.size},e)}function Vt(t,e){const n=Nt("string"==typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=F(e,t.schema),{from:r,to:i}=t.selection,o=[];t.doc.nodesBetween(r,i,(t=>{o.push(t)}));const s=o.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}(t,e):"mark"===n?Dt(t,e):{}}function Yt(t){const e=function(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(t);return 1===e.length?e:e.filter(((t,n)=>!e.filter(((t,e)=>e!==n)).some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))))}function Wt(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,i)=>{const o=[];if(t.ranges.length)t.forEach(((t,e)=>{o.push({from:t,to:e})}));else{const{from:t,to:e}=n[i];if(void 0===t||void 0===e)return;o.push({from:t,to:e})}o.forEach((({from:t,to:n})=>{const o=e.slice(i).map(t,-1),s=e.slice(i).map(n),a=e.invert().map(o,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Yt(r)}function qt(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const i=_t(n.resolve(t),e.type);i&&r.push({mark:e,...i})})):n.nodesBetween(t,e,((t,e)=>{t&&void 0!==(null==t?void 0:t.nodeSize)&&r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}function Xt(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Gt(t,e,n={}){const{empty:r,ranges:i}=t.selection,o=e?kt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!o||o.name===t.type.name)).find((t=>wt(t.attrs,n,{strict:!1})));let s=0;const a=[];if(i.forEach((({$from:e,$to:n})=>{const r=e.pos,i=n.pos;t.doc.nodesBetween(r,i,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),o=Math.min(i,e+t.nodeSize);s+=o-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:o}))))}))})),0===s)return!1;const l=a.filter((t=>!o||o.name===t.mark.type.name)).filter((t=>wt(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),c=a.filter((t=>!o||t.mark.type!==o&&t.mark.type.excludes(o))).reduce(((t,e)=>t+e.to-e.from),0);return(l>0?l+c:l)>=s}function Kt(t,e){const{nodeExtensions:n}=U(e),r=n.find((e=>e.name===t));if(!r)return!1;const i=q(j(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof i&&i.split(" ").includes("list")}function Jt(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===t.type.name)return!0;if(t.isText)return/^\s*$/m.test(null!==(r=t.text)&&void 0!==r?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(e){let r=!0;return t.content.forEach((t=>{!1!==r&&(Jt(t,{ignoreWhitespace:n,checkChildren:e})||(r=!1))})),r}return!1}function Qt(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}const te=(t,e)=>{const n=Zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const i=t.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(t.doc,n.pos)||(t.join(n.pos),!0)},ee=(t,e)=>{const n=Zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const i=t.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(t.doc,r)||(t.join(r),!0)};var ne=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(t=!1)=>({commands:e})=>e.setContent("",t),clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return!n||(i.forEach((({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,((t,n)=>{if(t.type.isText)return;const{doc:r,mapping:i}=e,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+t.nodeSize)),l=o.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(t.type.isTextblock){const{defaultType:t}=o.parent.contentMatchAt(o.index());e.setNodeMarkup(l.start,t)}(c||0===c)&&e.lift(l,c)}))})),!0)},command:t=>e=>t(e),createParagraphNear:()=>({state:t,dispatch:e})=>x(t,e),cut:(t,e)=>({editor:n,tr:i})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);i.deleteRange(t.from,t.to);const a=i.mapping.map(e);return i.insert(a,s.content),i.setSelection(new r.Bs(i.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let n=i.depth;n>0;n-=1){if(i.node(n).type===r.type){if(e){const e=i.before(n),r=i.after(n);t.delete(e,r).scrollIntoView()}return!0}}return!1},deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const i=F(t,n.schema),o=e.selection.$anchor;for(let t=o.depth;t>0;t-=1){if(o.node(t).type===i){if(r){const n=o.before(t),r=o.after(t);e.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},deleteSelection:()=>({state:t,dispatch:e})=>l(t,e),enter:()=>({commands:t})=>t.keyboardShortcut("Enter"),exitCode:()=>({state:t,dispatch:e})=>v(t,e),extendMarkRange:(t,e={})=>({tr:n,state:i,dispatch:o})=>{const s=kt(t,i.schema),{doc:a,selection:l}=n,{$from:c,from:d,to:p}=l;if(o){const t=_t(c,s,e);if(t&&t.from<=d&&t.to>=p){const e=r.Bs.create(a,t.from,t.to);n.setSelection(e)}}return!0},first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t<n.length;t+=1)if(n[t](e))return!0;return!1},focus:(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{(Ot()||Bt())&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(o&&null===t&&!Ct(n.state.selection))return s(),!0;const a=St(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},forEach:(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),insertContentAt:(t,e,n)=>({tr:i,dispatch:o,editor:l})=>{var c;if(o){let o;n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};try{o=$t(e,l.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:null!==(c=n.errorOnInvalidContent)&&void 0!==c?c:l.options.enableContentCheck})}catch(t){return l.emit("contentError",{editor:l,error:t,disableCollaboration:()=>{l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}}),!1}let{from:d,to:p}="number"==typeof t?{from:t,to:t}:{from:t.from,to:t.to},h=!0,u=!0;if(("type"in o?[o]:o).forEach((t=>{t.check(),h=!!h&&(t.isText&&0===t.marks.length),u=!!u&&t.isBlock})),d===p&&u){const{parent:t}=i.doc.resolve(d);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(d-=1,p+=1)}let f;if(h){if(Array.isArray(e))f=e.map((t=>t.text||"")).join("");else if(e instanceof s.HY){let t="";e.forEach((e=>{e.text&&(t+=e.text)})),f=t}else f="object"==typeof e&&e&&e.text?e.text:e;i.insertText(f,d,p)}else f=o,i.replaceWith(d,p,f);n.updateSelection&&function(t,e,n){const i=t.steps.length-1;if(i<e)return;const o=t.steps[i];if(!(o instanceof a.Pu||o instanceof a.FC))return;const s=t.mapping.maps[i];let l=0;s.forEach(((t,e,n,r)=>{0===l&&(l=r)})),t.setSelection(r.Y1.near(t.doc.resolve(l),n))}(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:d,text:f}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:d,text:f})}return!0},joinBackward:()=>({state:t,dispatch:e})=>d(t,e),joinDown:()=>({state:t,dispatch:e})=>((t,e)=>{let n,i=t.selection;if(i instanceof r.qv){if(i.node.isTextblock||!(0,a.Mn)(t.doc,i.to))return!1;n=i.to}else if(n=(0,a.GJ)(t.doc,i.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0})(t,e),joinForward:()=>({state:t,dispatch:e})=>g(t,e),joinItemBackward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,-1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},joinItemForward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},joinTextblockBackward:()=>({state:t,dispatch:e})=>((t,e,n)=>{let r=c(t,n);if(!r)return!1;let i=f(r);return!!i&&p(t,i,e)})(t,e),joinTextblockForward:()=>({state:t,dispatch:e})=>((t,e,n)=>{let r=m(t,n);if(!r)return!1;let i=y(r);return!!i&&p(t,i,e)})(t,e),joinUp:()=>({state:t,dispatch:e})=>((t,e)=>{let n,i=t.selection,o=i instanceof r.qv;if(o){if(i.node.isTextblock||!(0,a.Mn)(t.doc,i.from))return!1;n=i.from}else if(n=(0,a.GJ)(t.doc,i.from,-1),null==n)return!1;if(e){let i=t.tr.join(n);o&&i.setSelection(r.qv.create(i.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0})(t,e),keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:i})=>{const o=function(t){const e=t.split(/-(?!$)/);let n,r,i,o,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t<e.length-1;t+=1){const s=e[t];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);Ot()||Tt()?o=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),o&&(s=`Meta-${s}`),i&&(s=`Shift-${s}`),s}(t).split(/-(?!$)/),s=o.find((t=>!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==l||l.steps.forEach((t=>{const e=t.map(r.mapping);e&&i&&r.maybeStep(e)})),!0},lift:(t,e={})=>({state:n,dispatch:r})=>!!Lt(n,F(t,n.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&(0,a.k9)(i);return null!=o&&(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:t,dispatch:e})=>_(t,e),liftListItem:t=>({state:e,dispatch:n})=>P(F(t,e.schema))(e,n),newlineInCode:()=>({state:t,dispatch:e})=>A(t,e),resetAttributes:(t,e)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Nt("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(o=F(t,r.schema)),"mark"===a&&(s=kt(t,r.schema)),i&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{o&&o===t.type&&n.setNodeMarkup(r,void 0,Rt(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((i=>{s===i.type&&n.addMark(r,r+t.nodeSize,s.create(Rt(i.attrs,e)))}))}))})),!0)},scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),selectAll:()=>({tr:t,dispatch:e})=>{if(e){const e=new r.C1(t.doc);t.setSelection(e)}return!0},selectNodeBackward:()=>({state:t,dispatch:e})=>u(t,e),selectNodeForward:()=>({state:t,dispatch:e})=>b(t,e),selectParentNode:()=>({state:t,dispatch:e})=>((t,e)=>{let n,{$from:i,to:o}=t.selection,s=i.sharedDepth(o);return 0!=s&&(n=i.before(s),e&&e(t.tr.setSelection(r.qv.create(t.doc,n))),!0)})(t,e),selectTextblockEnd:()=>({state:t,dispatch:e})=>O(t,e),selectTextblockStart:()=>({state:t,dispatch:e})=>B(t,e),setContent:(t,e=!1,n={},r={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{var l,c;const{doc:d}=o;if("full"!==n.preserveWhitespace){const a=Pt(t,i.schema,n,{errorOnInvalidContent:null!==(l=r.errorOnInvalidContent)&&void 0!==l?l:i.options.enableContentCheck});return s&&o.replaceWith(0,d.content.size,a).setMeta("preventUpdate",!e),!0}return s&&o.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:d.content.size},t,{parseOptions:n,errorOnInvalidContent:null!==(c=r.errorOnInvalidContent)&&void 0!==c?c:i.options.enableContentCheck})},setMark:(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=kt(t,r.schema);if(i)if(s){const t=Dt(r,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach((t=>{const i=t.$from.pos,o=t.$to.pos;r.doc.nodesBetween(i,o,((t,r)=>{const s=Math.max(r,i),a=Math.min(r+t.nodeSize,o);t.marks.find((t=>t.type===l))?t.marks.forEach((t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))})):n.addMark(s,a,l.create(e))}))}));return function(t,e,n){var r;const{selection:i}=e;let o=null;if(Ct(i)&&(o=i.$cursor),o){const e=null!==(r=t.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(e)||!e.some((t=>t.type.excludes(n)))}const{ranges:s}=i;return s.some((({$from:e,$to:r})=>{let i=0===e.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(e.pos,r.pos,((t,e,r)=>{if(i)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),o=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));i=e&&o}return!i})),i}))}(r,n,l)},setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),setNode:(t,e={})=>({state:n,dispatch:r,chain:i})=>{const o=F(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?i().command((({commands:t})=>!!M(o,{...s,...e})(n)||t.clearNodes())).command((({state:t})=>M(o,{...s,...e})(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,i=Et(t,0,n.content.size),o=r.qv.create(n,i);e.setSelection(o)}return!0},setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:i,to:o}="number"==typeof t?{from:t,to:t}:t,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=Et(i,s,a),c=Et(o,s,a),d=r.Bs.create(n,l,c);e.setSelection(d)}return!0},sinkListItem:t=>({state:e,dispatch:n})=>{const r=F(t,e.schema);return(i=r,function(t,e){let{$from:n,$to:r}=t.selection,o=n.blockRange(r,(t=>t.childCount>0&&t.firstChild.type==i));if(!o)return!1;let l=o.startIndex;if(0==l)return!1;let c=o.parent,d=c.child(l-1);if(d.type!=i)return!1;if(e){let n=d.lastChild&&d.lastChild.type==c.type,r=s.HY.from(n?i.create():null),l=new s.p2(s.HY.from(i.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),p=o.start,h=o.end;e(t.tr.step(new a.FC(p-(n?3:1),h,p,h,l,1,!0)).scrollIntoView())}return!0})(e,n);var i},splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:i,editor:o})=>{const{selection:s,doc:l}=e,{$from:c,$to:d}=s,p=Xt(o.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof r.qv&&s.node.isBlock)return!(!c.parentOffset||!(0,a.Ax)(l,c.pos))&&(i&&(t&&Qt(n,o.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const h=d.parentOffset===d.parent.content.size,u=0===c.depth?void 0:function(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(c.node(-1).contentMatchAt(c.indexAfter(-1)));let f=h&&u?[{type:u,attrs:p}]:void 0,m=(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,f);if(f||m||!(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,u?[{type:u}]:void 0)||(m=!0,f=u?[{type:u,attrs:p}]:void 0),i){if(m&&(s instanceof r.Bs&&e.deleteSelection(),e.split(e.mapping.map(c.pos),1,f),u&&!h&&!c.parentOffset&&c.parent.type!==u)){const t=e.mapping.map(c.before()),n=e.doc.resolve(t);c.node(-1).canReplaceWith(n.index(),n.index()+1,u)&&e.setNodeMarkup(e.mapping.map(c.before()),u)}t&&Qt(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},splitListItem:(t,e={})=>({tr:n,state:i,dispatch:o,editor:l})=>{var c;const d=F(t,i.schema),{$from:p,$to:h}=i.selection,u=i.selection.node;if(u&&u.isBlock||p.depth<2||!p.sameParent(h))return!1;const f=p.node(-1);if(f.type!==d)return!1;const m=l.extensionManager.attributes;if(0===p.parent.content.size&&p.node(-1).childCount===p.indexAfter(-1)){if(2===p.depth||p.node(-3).type!==d||p.index(-2)!==p.node(-2).childCount-1)return!1;if(o){let t=s.HY.empty;const i=p.index(-1)?1:p.index(-2)?2:3;for(let e=p.depth-i;e>=p.depth-3;e-=1)t=s.HY.from(p.node(e).copy(t));const o=p.indexAfter(-1)<p.node(-2).childCount?1:p.indexAfter(-2)<p.node(-3).childCount?2:3,a={...Xt(m,p.node().type.name,p.node().attrs),...e},l=(null===(c=d.contentMatch.defaultType)||void 0===c?void 0:c.createAndFill(a))||void 0;t=t.append(s.HY.from(d.createAndFill(null,l)||void 0));const h=p.before(p.depth-(i-1));n.replace(h,p.after(-o),new s.p2(t,4-i,0));let u=-1;n.doc.nodesBetween(h,n.doc.content.size,((t,e)=>{if(u>-1)return!1;t.isTextblock&&0===t.content.size&&(u=e+1)})),u>-1&&n.setSelection(r.Bs.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}const g=h.pos===p.end()?f.contentMatchAt(0).defaultType:null,b={...Xt(m,f.type.name,f.attrs),...e},y={...Xt(m,p.node().type.name,p.node().attrs),...e};n.delete(p.pos,h.pos);const A=g?[{type:d,attrs:b},{type:g,attrs:y}]:[{type:d,attrs:b}];if(!(0,a.Ax)(n.doc,p.pos,2))return!1;if(o){const{selection:t,storedMarks:e}=i,{splittableMarks:r}=l.extensionManager,s=e||t.$to.parentOffset&&t.$from.marks();if(n.split(p.pos,2,A).scrollIntoView(),!s||!o)return!0;const a=s.filter((t=>r.includes(t.type.name)));n.ensureMarks(a)}return!0},toggleList:(t,e,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:p,splittableMarks:h}=i.extensionManager,u=F(t,s.schema),f=F(e,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:y}=m,A=b.blockRange(y),w=g||m.$to.parentOffset&&m.$from.marks();if(!A)return!1;const v=Zt((t=>Kt(t.type.name,p)))(m);if(A.depth>=1&&v&&A.depth-v.depth<=1){if(v.node.type===u)return c.liftListItem(f);if(Kt(v.node.type.name,p)&&u.validContent(v.node.content)&&a)return l().command((()=>(o.setNodeMarkup(v.pos,u),!0))).command((()=>te(o,u))).command((()=>ee(o,u))).run()}return n&&w&&a?l().command((()=>{const t=d().wrapInList(u,r),e=w.filter((t=>h.includes(t.type.name)));return o.ensureMarks(e),!!t||c.clearNodes()})).wrapInList(u,r).command((()=>te(o,u))).command((()=>ee(o,u))).run():l().command((()=>!!d().wrapInList(u,r)||c.clearNodes())).wrapInList(u,r).command((()=>te(o,u))).command((()=>ee(o,u))).run()},toggleMark:(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=kt(t,r.schema);return Gt(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:i})=>{const o=F(t,r.schema),s=F(e,r.schema),a=Lt(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(s,l):i.setNode(o,{...l,...n})},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const i=F(t,n.schema);return Lt(n,i,e)?r.lift(i):r.wrapIn(i,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const e=t.tr,n=o.transform;for(let t=n.steps.length-1;t>=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(o.text){const n=e.doc.resolve(o.from).marks();e.replaceWith(o.from,o.to,t.schema.text(o.text,n))}else e.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=kt(t,r.schema),{$from:c,empty:d,ranges:p}=a;if(!i)return!0;if(d&&s){let{from:t,to:e}=a;const r=null===(o=c.marks().find((t=>t.type===l)))||void 0===o?void 0:o.attrs,i=_t(c,l,r);i&&(t=i.from,e=i.to),n.removeMark(t,e,l)}else p.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Nt("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(o=F(t,r.schema)),"mark"===a&&(s=kt(t,r.schema)),i&&n.selection.ranges.forEach((t=>{const i=t.$from.pos,a=t.$to.pos;let l,c,d,p;n.selection.empty?r.doc.nodesBetween(i,a,((t,e)=>{o&&o===t.type&&(d=Math.max(e,i),p=Math.min(e+t.nodeSize,a),l=e,c=t)})):r.doc.nodesBetween(i,a,((t,r)=>{r<i&&o&&o===t.type&&(d=Math.max(r,i),p=Math.min(r+t.nodeSize,a),l=r,c=t),r>=i&&r<=a&&(o&&o===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((o=>{if(s===o.type){const l=Math.max(r,i),c=Math.min(r+t.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...e}))}})))})),c&&(void 0!==l&&n.setNodeMarkup(l,void 0,{...c.attrs,...e}),s&&c.marks.length&&c.marks.forEach((t=>{s===t.type&&n.addMark(d,p,s.create({...t.attrs,...e}))})))})),!0)},wrapIn:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),l=s&&(0,a.nd)(s,t,e);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(F(t,n.schema),e)(n,r),wrapInList:(t,e={})=>({state:n,dispatch:r})=>R(F(t,n.schema),e)(n,r)});const re=gt.create({name:"commands",addCommands:()=>({...ne})}),ie=gt.create({name:"drop",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),oe=gt.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),se=new r.H$("focusEvents"),ae=gt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new r.Sy({key:se,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),le=gt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:i}=e,{empty:o,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock&&a>0?e.doc.resolve(a-1):s,d=c.parent.type.spec.isolating,p=s.pos-s.parentOffset,h=d&&1===c.parent.childCount?p===s.pos:r.Y1.atStart(i).from===a;return!(!o||!l.type.isTextblock||l.textContent.length||!h||h&&"paragraph"===s.parent.type.name)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},o={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ot()||Tt()?o:i},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some((t=>t.getMeta("composition"))))return;const i=t.some((t=>t.docChanged))&&!e.doc.eq(n.doc),o=t.some((t=>t.getMeta("preventClearDocument")));if(!i||o)return;const{empty:s,from:a,to:l}=e.selection,c=r.Y1.atStart(e.doc).from,d=r.Y1.atEnd(e.doc).to;if(s||!(a===c&&l===d))return;if(!Jt(n.doc))return;const p=n.tr,h=D({state:n,transaction:p}),{commands:u}=new z({editor:this.editor,state:h});return u.clearNodes(),p.steps.length?p:void 0}})]}}),ce=gt.create({name:"paste",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),de=gt.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class pe{get name(){return this.node.type.name}constructor(t,e,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!==(t=this.actualDepth)&&void 0!==t?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),e=this.resolvedPos.doc.resolve(t);return new pe(e,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new pe(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new pe(t,this.editor)}get children(){const t=[];return this.node.content.forEach(((e,n)=>{const r=e.isBlock&&!e.isTextblock,i=e.isAtom&&!e.isText,o=this.pos+n+(i?0:1),s=this.resolvedPos.doc.resolve(o);if(!r&&s.depth<=this.depth)return;const a=new pe(s,this.editor,r,r?e:null);r&&(a.actualDepth=this.depth+1),t.push(new pe(s,this.editor,r,r?e:null))})),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===t)if(Object.keys(e).length>0){const t=r.node.attrs,n=Object.keys(e);for(let r=0;r<n.length;r+=1){const i=n[r];if(t[i]!==e[i])break}}else n=r;r=r.parent}return n}querySelector(t,e={}){return this.querySelectorAll(t,e,!0)[0]||null}querySelectorAll(t,e={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const i=Object.keys(e);return this.children.forEach((o=>{if(!(n&&r.length>0)){if(o.node.type.name===t){i.every((t=>e[t]===o.node.attrs[t]))&&r.push(o)}n&&r.length>0||(r=r.concat(o.querySelectorAll(t,e,n)))}})),r}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}class he extends H{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",(({event:t,slice:e,moved:n})=>this.options.onDrop(t,e,n))),this.on("paste",(({event:t,slice:e})=>this.options.onPaste(t,e))),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=W(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach((t=>{const r="string"==typeof t?`${t}$`:t.key;n=e.filter((t=>!t.key.startsWith(r)))})),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[oe,At.configure({blockSeparator:null===(e=null===(t=this.options.coreExtensionOptions)||void 0===t?void 0:t.clipboardTextSerializer)||void 0===e?void 0:e.blockSeparator}),re,ae,le,de,ie,ce].filter((t=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name])):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new mt(n,this)}createCommandManager(){this.commandManager=new z({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let e;try{e=Pt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message)))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter((t=>"collaboration"!==t.name)),this.createExtensionManager()}}),e=Pt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=St(e,this.options.autofocus);this.view=new i.tk(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...null===(t=this.options.editorProps)||void 0===t?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:r.yy.create({doc:e,selection:n||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),i=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return Vt(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return function(t,e,n={}){if(!e)return Lt(t,null,n)||Gt(t,null,n);const r=Nt(e,t.schema);return"node"===r?Lt(t,e,n):"mark"===r&&Gt(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return tt(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return Ft(this.state.doc,{blockSeparator:e,textSerializers:{...yt(this.schema),...n}})}get isEmpty(){return Jt(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}$node(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new pe(e,this)}get $doc(){return this.$pos(0)}}function ue(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=q(t.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(qt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>l)).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+r,l);const d=n.from+r+s.length;o.addMark(n.from+r,d,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function fe(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=q(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const e=r[0][r[0].length-1];o.insertText(e,s+r[0].length-1),o.replaceWith(t,a,l)}else if(r[0]){const e=t.type.isInline?s:s-1;o.insert(e,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function me(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=q(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function ge(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{let i=t.replace,o=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);i+=r[0].slice(t+r[1].length),o+=t;const e=o-s;e>0&&(i=r[0].slice(t-e,t)+i,o=s)}e.tr.insertText(i,o,s)}})}function be(t){return new rt({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=q(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,t.type,o);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:i}=t.editor.extensionManager,o=r||n.$to.parentOffset&&n.$from.marks();if(o){const t=o.filter((t=>i.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";i().updateAttributes(e,o).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&(0,a.Mn)(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}class ye{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ye(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new ye(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}}function Ae(t){return new dt({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=q(t.getAttributes,void 0,r,i);if(!1===o||null===o)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),i=n.from+l.indexOf(a),d=i+a.length;if(qt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>i)).length)return null;d<n.to&&s.delete(d,n.to),i>n.from&&s.delete(n.from+r,i),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function we(t){return new dt({find:t.find,handler({match:e,chain:n,range:r,pasteEvent:i}){const o=q(t.getAttributes,void 0,e,i),s=q(t.getContent,void 0,o);if(!1===o||null===o)return null;const a={type:t.type.name,attrs:o};s&&(a.content=s),e.input&&n().deleteRange(r).insertContentAt(r.from,a)}})}},42626:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(88573).NB.create({name:"doc",topNode:!0,content:"block+"})},39615:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(88573).NB.create({name:"text",group:"inline"})},64652:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>i});var r=n(88573);const i=r.hj.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}),addInputRules(){const t=[];var e;return!1!==this.options.emDash&&t.push((e=this.options.emDash,(0,r.DS)({find:/--$/,replace:null!=e?e:"—"}))),!1!==this.options.ellipsis&&t.push((t=>(0,r.DS)({find:/\.\.\.$/,replace:null!=t?t:"…"}))(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&t.push((t=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=t?t:"“"}))(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&t.push((t=>(0,r.DS)({find:/"$/,replace:null!=t?t:"”"}))(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&t.push((t=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=t?t:"‘"}))(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&t.push((t=>(0,r.DS)({find:/'$/,replace:null!=t?t:"’"}))(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&t.push((t=>(0,r.DS)({find:/<-$/,replace:null!=t?t:"←"}))(this.options.leftArrow)),!1!==this.options.rightArrow&&t.push((t=>(0,r.DS)({find:/->$/,replace:null!=t?t:"→"}))(this.options.rightArrow)),!1!==this.options.copyright&&t.push((t=>(0,r.DS)({find:/\(c\)$/,replace:null!=t?t:"©"}))(this.options.copyright)),!1!==this.options.trademark&&t.push((t=>(0,r.DS)({find:/\(tm\)$/,replace:null!=t?t:"™"}))(this.options.trademark)),!1!==this.options.servicemark&&t.push((t=>(0,r.DS)({find:/\(sm\)$/,replace:null!=t?t:"℠"}))(this.options.servicemark)),!1!==this.options.registeredTrademark&&t.push((t=>(0,r.DS)({find:/\(r\)$/,replace:null!=t?t:"®"}))(this.options.registeredTrademark)),!1!==this.options.oneHalf&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(1\/2)\s$/,replace:null!=t?t:"½"}))(this.options.oneHalf)),!1!==this.options.plusMinus&&t.push((t=>(0,r.DS)({find:/\+\/-$/,replace:null!=t?t:"±"}))(this.options.plusMinus)),!1!==this.options.notEqual&&t.push((t=>(0,r.DS)({find:/!=$/,replace:null!=t?t:"≠"}))(this.options.notEqual)),!1!==this.options.laquo&&t.push((t=>(0,r.DS)({find:/<<$/,replace:null!=t?t:"«"}))(this.options.laquo)),!1!==this.options.raquo&&t.push((t=>(0,r.DS)({find:/>>$/,replace:null!=t?t:"»"}))(this.options.raquo)),!1!==this.options.multiplication&&t.push((t=>(0,r.DS)({find:/\d+\s?([*x])\s?\d+$/,replace:null!=t?t:"×"}))(this.options.multiplication)),!1!==this.options.superscriptTwo&&t.push((t=>(0,r.DS)({find:/\^2$/,replace:null!=t?t:"²"}))(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&t.push((t=>(0,r.DS)({find:/\^3$/,replace:null!=t?t:"³"}))(this.options.superscriptThree)),!1!==this.options.oneQuarter&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(1\/4)\s$/,replace:null!=t?t:"¼"}))(this.options.oneQuarter)),!1!==this.options.threeQuarters&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(3\/4)\s$/,replace:null!=t?t:"¾"}))(this.options.threeQuarters)),t}})},61456:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});const r="֑-߿יִ-﷽ﹰ-ﻼ",i="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",o=new RegExp("^[^"+i+"]*["+r+"]"),s=new RegExp("^[^"+r+"]*["+i+"]");function a(t){const e=String(t||"");return o.test(e)?"rtl":s.test(e)?"ltr":"neutral"}},68707:(t,e,n)=>{"use strict";n.d(e,{OR:()=>o,_Y:()=>a,fk:()=>l,hl:()=>d,i9:()=>p,ws:()=>h});var r=n(93311);const{I:i}=r.Al,o=t=>void 0===t.strings,s=()=>document.createComment(""),a=(t,e,n)=>{var r;const o=t._$AA.parentNode,a=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=o.insertBefore(s(),a),r=o.insertBefore(s(),a);n=new i(e,r,t,t.options)}else{const e=n._$AB.nextSibling,i=n._$AM,s=i!==t;if(s){let e;null===(r=n._$AQ)||void 0===r||r.call(n,t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==i._$AU&&n._$AP(e)}if(e!==a||s){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,a),t=e}}}return n},l=(t,e,n=t)=>(t._$AI(e,n),t),c={},d=(t,e=c)=>t._$AH=e,p=t=>t._$AH,h=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let n=t._$AA;const r=t._$AB.nextSibling;for(;n!==r;){const t=n.nextSibling;n.remove(),n=t}}},47514:(t,e,n)=>{"use strict";n.d(e,{XM:()=>i,Xe:()=>o,pX:()=>r});const r={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=t=>(...e)=>({_$litDirective$:t,values:e});class o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},93311:(t,e,n)=>{"use strict";var r;n.d(e,{Al:()=>j,Jb:()=>E,Ld:()=>S,dy:()=>C,sY:()=>Z});const i=window,o=i.trustedTypes,s=o?o.createPolicy("lit-html",{createHTML:t=>t}):void 0,a="$lit$",l=`lit$${(Math.random()+"").slice(9)}$`,c="?"+l,d=`<${c}>`,p=document,h=()=>p.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,m=t=>f(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),g="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,A=/>/g,w=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,x=/"/g,_=/^(?:script|style|textarea|title)$/i,k=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),C=k(1),E=(k(2),Symbol.for("lit-noChange")),S=Symbol.for("lit-nothing"),B=new WeakMap,O=p.createTreeWalker(p,129,null,!1),M=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":"",c=b;for(let e=0;e<n;e++){const n=t[e];let s,p,h=-1,u=0;for(;u<n.length&&(c.lastIndex=u,p=c.exec(n),null!==p);)u=c.lastIndex,c===b?"!--"===p[1]?c=y:void 0!==p[1]?c=A:void 0!==p[2]?(_.test(p[2])&&(i=RegExp("</"+p[2],"g")),c=w):void 0!==p[3]&&(c=w):c===w?">"===p[0]?(c=null!=i?i:b,h=-1):void 0===p[1]?h=-2:(h=c.lastIndex-p[2].length,s=p[1],c=void 0===p[3]?w:'"'===p[3]?x:v):c===x||c===v?c=w:c===y||c===A?c=b:(c=w,i=void 0);const f=c===w&&t[e+1].startsWith("/>")?" ":"";o+=c===b?n+d:h>=0?(r.push(s),n.slice(0,h)+a+n.slice(h)+l+f):n+l+(-2===h?(r.push(void 0),e):f)}const p=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(p):p,r]};class I{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,s=0;const d=t.length-1,p=this.parts,[u,f]=M(t,e);if(this.el=I.createElement(u,n),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=O.nextNode())&&p.length<d;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith(a)||e.startsWith(l)){const n=f[s++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+a).split(l),e=/([.?@])?(.*)/.exec(n);p.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?D:"@"===e[1]?z:N})}else p.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(_.test(r.tagName)){const t=r.textContent.split(l),e=t.length-1;if(e>0){r.textContent=o?o.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],h()),O.nextNode(),p.push({type:2,index:++i});r.append(t[e],h())}}}else if(8===r.nodeType)if(r.data===c)p.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(l,t+1));)p.push({type:7,index:i}),t+=l.length-1}i++}}static createElement(t,e){const n=p.createElement("template");return n.innerHTML=t,n}}function $(t,e,n=t,r){var i,o,s,a;if(e===E)return e;let l=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const c=u(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,n,r)),void 0!==r?(null!==(s=(a=n)._$Co)&&void 0!==s?s:a._$Co=[])[r]=l:n._$Cl=l),void 0!==l&&(e=$(t,l._$AS(t,e.values),l,r)),e}class T{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:p).importNode(n,!0);O.currentNode=i;let o=O.nextNode(),s=0,a=0,l=r[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new L(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new H(o,this,t)),this.u.push(e),l=r[++a]}s!==(null==l?void 0:l.index)&&(o=O.nextNode(),s++)}return i}p(t){let e=0;for(const n of this.u)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class L{constructor(t,e,n,r){var i;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cm=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$(this,t,e),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==E&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):m(t)?this.k(t):this.g(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}g(t){this._$AH!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(p.createTextNode(t)),this._$AH=t}$(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=I.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.p(n);else{const t=new T(i,this),e=t.v(this.options);t.p(n),this.T(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new I(t)),e}k(t){f(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new L(this.S(h()),this.S(h()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class N{constructor(t,e,n,r,i){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=$(this,t,e,0),o=!u(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=$(this,r[n+s],e,s),a===E&&(a=this._$AH[s]),o||(o=!u(a)||a!==this._$AH[s]),a===S?t=S:t!==S&&(t+=(null!=a?a:"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}const P=o?o.emptyScript:"";class D extends N{constructor(){super(...arguments),this.type=4}j(t){t&&t!==S?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class z extends N{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=$(this,t,e,0))&&void 0!==n?n:S)===E)return;const r=this._$AH,i=t===S&&r!==S||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==S&&(r===S||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class H{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){$(this,t)}}const j={P:a,A:l,M:c,C:1,L:M,D:T,R:m,V:$,I:L,H:N,N:D,U:z,F:R,B:H},U=i.litHtmlPolyfillSupport;null==U||U(I,L),(null!==(r=i.litHtmlVersions)&&void 0!==r?r:i.litHtmlVersions=[]).push("2.7.0");const Z=(t,e,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let s=o._$litPart$;if(void 0===s){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new L(e.insertBefore(h(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s}},61828:(t,e,n)=>{"use strict";n.d(e,{V:()=>u,i:()=>g});var r=n(93311),i=n(68707),o=n(47514);const s=(t,e)=>{var n,r;const i=t._$AN;if(void 0===i)return!1;for(const t of i)null===(r=(n=t)._$AO)||void 0===r||r.call(n,e,!1),s(t,e);return!0},a=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===(null==n?void 0:n.size))},l=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),p(e)}};function c(t){void 0!==this._$AN?(a(this),this._$AM=t,l(this)):this._$AM=t}function d(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)s(r[t],!1),a(r[t]);else null!=r&&(s(r,!1),a(r));else s(this,t)}const p=t=>{var e,n,r,i;t.type==o.pX.CHILD&&(null!==(e=(r=t)._$AP)&&void 0!==e||(r._$AP=d),null!==(n=(i=t)._$AQ)&&void 0!==n||(i._$AQ=c))};class h extends o.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),l(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,r;t!==this.isConnected&&(this.isConnected=t,t?null===(n=this.reconnected)||void 0===n||n.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),e&&(s(this,t),a(this))}setValue(t){if((0,i.OR)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const u=()=>new f;class f{}const m=new WeakMap,g=(0,o.XM)(class extends h{render(t){return r.Ld}update(t,[e]){var n;const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=e,this.dt=null===(n=t.options)||void 0===n?void 0:n.host,this.rt(this.ct=t.element)),r.Ld}rt(t){var e;if("function"==typeof this.Y){const n=null!==(e=this.dt)&&void 0!==e?e:globalThis;let r=m.get(n);void 0===r&&(r=new WeakMap,m.set(n,r)),void 0!==r.get(this.Y)&&this.Y.call(this.dt,void 0),r.set(this.Y,t),void 0!==t&&this.Y.call(this.dt,t)}else this.Y.value=t}get lt(){var t,e,n;return"function"==typeof this.Y?null===(e=m.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.Y):null===(n=this.Y)||void 0===n?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},8427:(t,e,n)=>{"use strict";n.d(e,{oi:()=>x,iv:()=>l,dy:()=>v.dy});const r=window,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t;var d;const p=window,h=p.trustedTypes,u=h?h.emptyScript:"",f=p.reactiveElementPolyfillSupport,m={toAttribute(t,e){switch(e){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},g=(t,e)=>e!==t&&(e==e||t==t),b={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const r=this._$Ep(n,e);void 0!==r&&(this._$Ev.set(r,n),t.push(r))})),t}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||b}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const n=document.createElement("style"),i=r.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,t.appendChild(n)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=b){var r;const i=this.constructor._$Ep(t,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:m).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=r.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:m;this._$El=i,this[i]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||g)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:y}),(null!==(d=p.reactiveElementVersions)&&void 0!==d?d:p.reactiveElementVersions=[]).push("1.6.1");var A,w,v=n(93311);class x extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,v.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return v.Jb}}x.finalized=!0,x._$litElement$=!0,null===(A=globalThis.litElementHydrateSupport)||void 0===A||A.call(globalThis,{LitElement:x});const _=globalThis.litElementPolyfillSupport;null==_||_({LitElement:x});(null!==(w=globalThis.litElementVersions)&&void 0!==w?w:globalThis.litElementVersions=[]).push("3.3.0")},38404:(t,e,n)=>{"use strict";n.d(e,{$:()=>g,h:()=>m});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),s=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),a="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=s||o&&+o[1]<57,c=0;c<10;c++)r[48+c]=r[96+c]=String(c);for(c=1;c<=24;c++)r[c+111]="F"+c;for(c=65;c<=90;c++)r[c]=String.fromCharCode(c+32),i[c]=String.fromCharCode(c);for(var d in r)i.hasOwnProperty(d)||(i[d]=r[d]);var p=n(27191);const h="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function u(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;t++){let s=o[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);h?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function f(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function m(t){return new p.Sy({props:{handleKeyDown:g(t)}})}function g(t){let e=function(t){let e=Object.create(null);for(let n in t)e[u(n)]=t[n];return e}(t);return function(t,n){let o,s=function(t){var e=!(l&&(t.ctrlKey||t.altKey||t.metaKey)||a&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?i:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),c=e[f(s,n)];if(c&&c(t.state,t.dispatch,t))return!0;if(1==s.length&&" "!=s){if(n.shiftKey){let r=e[f(s,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||s.charCodeAt(0)>127)&&(o=r[n.keyCode])&&o!=s){let r=e[f(o,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},52665:(t,e,n)=>{"use strict";function r(t){this.content=t}n.d(e,{aw:()=>J,PW:()=>pt,HY:()=>a,vc:()=>p,ZU:()=>X,NB:()=>I,Ts:()=>O,e4:()=>h,V_:()=>G,p2:()=>u}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,o=i.find(t),s=i.content.slice();return-1==o?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var i=this.remove(e),o=i.content.slice(),s=i.find(t);return o.splice(-1==s?o.length:s,0,e,n),new r(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach((function(e,n){t[e]=n})),t},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};const i=r;function o(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i!=s){if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let t=0;i.text[t]==s.text[t];t++)n++;return n}if(i.content.size||s.content.size){let t=o(i.content,s.content,n+1);if(null!=t)return t}n+=i.nodeSize}else n+=i.nodeSize}}function s(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let a=t.child(--i),l=e.child(--o),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let t=0,e=Math.min(a.text.length,l.text.length);for(;t<e&&a.text[a.text.length-t-1]==l.text[l.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let t=s(a.content,l.content,n-1,r-1);if(t)return t}n-=c,r-=c}else n-=c,r-=c}}class a{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let a=this.content[o],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,t-i),Math.min(a.content.size,e-i),n,r+i)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,((s,a)=>{let l=s.isText?s.text.slice(Math.max(t,a)-a,e-a):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=l}),0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new a(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],a=o+s.nodeSize;a>t&&((o<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=a}return new a(n,r)}cutByIndex(t,e){return t==e?a.empty:0==t&&e==this.content.length?this:new a(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new a(r,i)}addToStart(t){return new a([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new a(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return o(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return s(this,t,e,n)}findIndex(t,e=-1){if(0==t)return c(0,t);if(t==this.size)return c(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?c(n+1,i):c(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return a.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return a.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new a(e||t,n)}static from(t){if(!t)return a.empty;if(t instanceof a)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new a([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(t,e){return l.index=t,l.offset=e,l}function d(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!d(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!d(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class p{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&d(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return p.none;if(t instanceof p)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}p.none=[];class h extends Error{}class u{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=m(this.content,t+this.openStart,e);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(t,e){return new u(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return u.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new u(a.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new u(t,n,r)}}function f(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(f(o.content,e-i-1,n-i-1)))}function m(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=m(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function g(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return b(t,e,n,0)}function b(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=b(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:i,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(a.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return x(o,_(t,i,s,e,r))}{let r=t.parent,i=r.content;return x(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return x(o,k(t,e,r))}function y(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function A(t,e,n){let r=t.node(n);return y(r,e.node(n)),r}function w(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function v(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(w(t.nodeAfter,r),o++));for(let t=o;t<s;t++)w(i.child(t),r);e&&e.depth==n&&e.textOffset&&w(e.nodeBefore,r)}function x(t,e){return t.type.checkContent(e),t.copy(e)}function _(t,e,n,r,i){let o=t.depth>i&&A(t,e,i+1),s=r.depth>i&&A(n,r,i+1),l=[];return v(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(y(o,s),w(x(o,_(t,e,n,r,i+1)),l)):(o&&w(x(o,k(t,e,i+1)),l),v(e,n,i,l),s&&w(x(s,k(n,r,i+1)),l)),v(r,null,i,l),new a(l)}function k(t,e,n){let r=[];if(v(null,t,n,r),t.depth>n){w(x(A(t,e,n+1),k(t,e,n+1)),r)}return v(e,null,n,r),new a(r)}u.empty=new u(a.empty,0,0);class C{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return p.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new O(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(i),s=i-o;if(n.push(e,t,r+o),!s)break;if(e=e.child(t),e.isText)break;i=s-1,r+=o+1}return new C(e,n,i)}static resolveCached(t,e){let n=B.get(t);if(n)for(let t=0;t<n.elts.length;t++){let r=n.elts[t];if(r.pos==e)return r}else B.set(t,n=new E);let r=n.elts[n.i]=C.resolve(t,e);return n.i=(n.i+1)%S,r}}class E{constructor(){this.elts=[],this.i=0}}const S=12,B=new WeakMap;class O{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class I{constructor(t,e,n,r=p.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||a.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&d(this.attrs,e||t.defaultAttrs||M)&&p.sameSet(this.marks,n||p.none)}copy(t=null){return t==this.content?this:new I(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new I(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return u.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new u(a,r.depth-o,i.depth-o)}replace(t,e,n){return g(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return C.resolveCached(this,t)}resolveNoCache(t){return C.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),T(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=a.empty,r=0,i=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;t<i;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=p.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!p.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=a.fromJSON(t,e.content),i=t.nodeType(e.type).create(e.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}I.prototype.text=void 0;class $ extends I{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new $(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new $(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function T(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class L{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new N(t,e);if(null==n.next)return L.empty;let r=R(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=Object.create(null);return n(U(t,0));function n(r){let i=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);U(t,n).forEach((t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let o=e[r.join(",")]=new L(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(j);o.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return o}}(function(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((t=>t.to=e))}function o(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(o(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),i(o(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(o(t.expr,e),s),i(o(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(o(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();i(o(t.expr,s),e),s=e}if(-1==t.max)i(o(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),i(o(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=o(t.exprs[r],e);if(r==t.exprs.length-1)return s;i(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function i(o,s){let l=o.matchFragment(t,n);if(l&&(!e||l.validEnd))return a.from(s.map((t=>t.createAndFill())));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=i(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];o.isLeaf||o.hasRequiredAttrs()||o.name in e||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r})).join("\n")}}L.empty=new L(!0);class N{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function R(t){let e=[];do{e.push(P(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function P(t){let e=[];do{e.push(D(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function D(t){let e=function(t){if(t.eat("(")){let e=R(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.isInGroup(e)&&i.push(r)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=H(t,e)}return e}function z(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function H(t,e){let n=z(t),r=n;return t.eat(",")&&(r="}"!=t.next?z(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function j(t,e){return e-t}function U(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];r||-1!=n.indexOf(o)||e(o)}}(e),n.sort(j)}function Z(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function F(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function V(t,e,n,r){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function Y(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new q(t,r,e[r]);return n}class W{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Y(t,n.attrs),this.defaultAttrs=Z(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==L.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:F(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new I(this,this.computeAttrs(t),a.from(e),p.setFrom(n))}createChecked(t=null,e,n){return e=a.from(e),this.checkContent(e),new I(this,this.computeAttrs(t),e,p.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=a.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(a.empty,!0);return i?new I(this,t,e.append(i),p.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){V(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:p.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new W(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class q{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class X{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=Y(t,r.attrs),this.excluded=null;let i=Z(this.attrs);this.instance=i?new p(this,i):null}create(t=null){return!t&&this.instance?this.instance:new p(this,F(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,i)=>n[t]=new X(t,r++,e,i))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){V(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class G{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=i.from(t.nodes),e.marks=i.from(t.marks||{}),this.nodes=W.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=n[r]||(n[r]=L.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?K(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:K(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof W))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new $(n,n.defaultAttrs,t,p.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return I.fromJSON(this,t)}markFromJSON(t){return p.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function K(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class J{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach((t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new at(this,e,!1);return n.addAll(t,p.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new at(this,e,!0);return n.addAll(t,p.none,e.from,e.to),u.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(lt(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(t)||r.context&&!n.matchesContext(r.context)||o.length>t.length&&(61!=o.charCodeAt(t.length)||o.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach((t=>{n(t=ct(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=ct(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new J(t,J.schemaRules(t)))}}const Q={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},tt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},et={ol:!0,ul:!0},nt=1,rt=2,it=4;function ot(t,e,n){return null!=e?(e?nt:0)|("full"===e?rt:0):t&&"pre"==t.whitespace?nt|rt:n&~it}class st{constructor(t,e,n,r,i,o){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=p.none,this.match=i||(o&it?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(a.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&nt)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=a.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Q.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class at{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,i=e.topNode,o=ot(null,e.preserveWhitespace,0)|(n?it:0);r=i?new st(i.type,i.attrs,p.none,!0,e.topMatch||i.type.contentMatch,o):new st(n?null:t.schema.topNodeType,null,p.none,!0,null,o),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=r.options&rt?"full":this.localPreserveWS||(r.options&nt)>0;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)n="full"!==i?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o,s=t.nodeName.toLowerCase();et.hasOwnProperty(s)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&et.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let a=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));t:if(a?a.ignore:tt.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,e);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(t=a.skip);let n,r=this.needsBlock;if(Q.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let o=a&&a.skip?e:this.readStyles(t,e);o&&this.addAll(t,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],i=n.getPropertyValue(r);if(i)for(let t;;){let n=this.parser.matchStyle(r,i,this,t);if(!n)break;if(n.ignore)return null;if(e=n.clearMark?e.filter((t=>!n.clearMark(t))):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1!==n.consuming)break;t=n}}return e}addElementByRule(t,e,n,r){let i,o;if(e.node)if(o=this.parser.schema.nodes[e.node],o.isLeaf)this.insertNode(o.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(o,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t,n,!1)));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(s)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let e=this.open,o=0;e>=0;e--){let s=this.nodes[e],a=s.findWrapping(t);if(a&&(!r||r.length>a.length+o)&&(r=a,i=s,!a.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let t=0;t<r.length;t++)e=this.enterInner(r[t],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=p.none;for(let i of r.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):dt(i.type,t.type))&&(n=i.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=ot(t,i,o.options);o.options&it&&0==o.content.length&&(s|=it);let a=p.none;return n=n.filter((e=>!(o.type?o.type.allowsMarkType(e.type):dt(e.type,t))||(a=e.addToSet(a),!1))),this.nodes.push(new st(t,e,a,r,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=nt)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=a&&!t.isInGroup(a))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function lt(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function ct(t){let e={};for(let n in t)e[n]=t[n];return e}function dt(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class pt{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ut(e).createDocumentFragment());let r=n,i=[];return t.forEach((t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}else o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=gt(ut(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&gt(ut(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return gt(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new pt(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=ht(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return ht(t.marks)}}function ht(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ut(t){return t.document||window.document}const ft=new WeakMap;function mt(t){let e=ft.get(t);return void 0===e&&ft.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function gt(t,e,n,r){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i,o=e[0];if("string"!=typeof o)throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=mt(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],d=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){d=2;for(let t in c)if(null!=c[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):l.setAttribute(t,c[t])}}for(let i=d;i<e.length;i++){let o=e[i];if(0===o){if(i<e.length-1||i>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:i}=gt(t,o,n,r);if(l.appendChild(e),i){if(s)throw new RangeError("Multiple content holes");s=i}}}return{dom:l,contentDOM:s}}},27191:(t,e,n)=>{"use strict";n.d(e,{Bs:()=>d,C1:()=>f,H$:()=>B,Sy:()=>C,Y1:()=>s,qv:()=>h,xm:()=>a,yy:()=>_});var r=n(52665),i=n(26151);const o=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new a(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=r.p2.empty){let n=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=n,n=n.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],d=t.mapping.slice(o);t.replaceRange(d.map(l.pos),d.map(c.pos),a?r.p2.empty:e),0==a&&b(t,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),b(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new d(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in o)throw new RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(t,e){this.$from=t,this.$to=e}}let l=!1;function c(t){l||t.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class d extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof d&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new p(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new d(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0)&&(t=e),new d(t,e)}}s.jsonID("text",d);class p{constructor(t,e){this.anchor=t,this.head=e}map(t){return new p(t.map(this.anchor),t.map(this.head))}resolve(t){return d.between(t.resolve(this.anchor),t.resolve(this.head))}}class h extends s{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?s.near(i):new h(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(t){return t instanceof h&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new u(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new h(t.resolve(e.anchor))}static create(t,e){return new h(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}h.prototype.visible=!1,s.jsonID("node",h);class u{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new p(n,n):new u(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&h.isSelectable(n)?new h(e):s.near(e)}}class f extends s{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=r.p2.empty){if(e==r.p2.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}s.jsonID("all",f);const m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,o=!1){if(e.inlineContent)return d.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&h.isSelectable(r))return h.create(t,n-(i<0?r.nodeSize:0))}else{let e=g(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function b(t,e,n){let r=t.steps.length-1;if(r<e)return;let o,a=t.steps[r];(a instanceof i.Pu||a instanceof i.FC)&&(t.mapping.maps[r].forEach(((t,e,n,r)=>{null==o&&(o=r)})),t.setSelection(s.near(t.doc.resolve(o),n)))}class y extends i.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function A(t,e){return e&&t?t.bind(e):t}class w{constructor(t,e,n){this.name=t,this.init=A(e.init,n),this.apply=A(e.apply,n)}}const v=[new w("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new w("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new w("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class x{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=v.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new w(t.key,t.spec.state,t))}))}}class _{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new _(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new y(this)}static create(t){let e=new x(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new _(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new x(this.schema,t.plugins),n=e.fields,r=new _(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new x(t.schema,t.plugins),o=new _(i);return i.fields.forEach((i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,r))return void(o[i.name]=a.fromJSON.call(s,t,e[r],o))}o[i.name]=i.init(t,o)}})),o}}function k(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=k(i,e,{})),n[r]=i}return n}class C{constructor(t){this.spec=t,this.props={},t.props&&k(t.props,this,this.props),this.key=t.key?t.key.key:S("plugin")}getState(t){return t[this.key]}}const E=Object.create(null);function S(t){return t in E?t+"$"+ ++E[t]:(E[t]=0,t+"$")}class B{constructor(t="key"){this.key=S(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},26151:(t,e,n)=>{"use strict";n.d(e,{Ax:()=>O,FC:()=>w,GJ:()=>$,Mn:()=>M,Pu:()=>A,dR:()=>L,k9:()=>k,nd:()=>C,nj:()=>T,wx:()=>W});var r=n(52665);const i=65535,o=Math.pow(2,16);function s(t,e){return t+e*o}function a(t){return t&i}class l{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class c{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&c.empty)return c.empty}recover(t){let e=0,n=a(t);if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+function(t){return(t-(t&i))/o}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>t)break;let d=this.ranges[a+i],p=this.ranges[a+o],h=c+d;if(t<=h){let i=c+r+((d?t==c?-1:t==h?1:e:e)<0?0:p);if(n)return i;let o=t==(e<0?c:h)?null:s(a/3,t-c),u=t==c?2:t==h?1:4;return(e<0?t!=c:t!=h)&&(u|=8),new l(i,u,o)}r+=p-d}return n?t+r:new l(t+r,0,null)}touches(t,e){let n=0,r=a(e),i=this.inverted?2:1,o=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let a=this.ranges[e+i];if(t<=s+a&&e==3*r)return!0;n+=this.ranges[e+o]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+e],c=this.ranges[r+n];t(s,s+l,a,a+c),i+=c-l}}invert(){return new c(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?c.empty:new c(t<0?[0,-t,0]:[0,0,t])}}c.empty=new c([]);class d{constructor(t,e,n=0,r=(t?t.length:0)){this.mirror=e,this.from=n,this.to=r,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new d(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,n=this._maps.length;e<t._maps.length;e++){let r=t.getMirror(e);this.appendMap(t._maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this._maps.length+t._maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new d;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this._maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new l(t,r,null)}}const p=Object.create(null);class h{getMap(){return c.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=p[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in p)throw new RangeError("Duplicate use of step JSON ID "+t);return p[t]=e,e.prototype.jsonID=t,e}}class u{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new u(t,null)}static fail(t){return new u(null,t)}static fromReplace(t,e,n,i){try{return u.ok(t.replace(e,n,i))}catch(t){if(t instanceof r.e4)return u.fail(t.message);throw t}}}function f(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let o=t.child(r);o.content.size&&(o=o.copy(f(o.content,e,o))),o.isInline&&(o=e(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class m extends h{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.p2(f(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),i),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,o)}invert(){return new g(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new m(e.pos,n.pos,this.mark)}merge(t){return t instanceof m&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new m(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new m(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("addMark",m);class g extends h{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(f(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,n)}invert(){return new m(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new g(e.pos,n.pos,this.mark)}merge(t){return t instanceof g&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new g(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new g(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("removeMark",g);class b extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new b(this.pos,e.marks[n]);return new b(this.pos,this.mark)}}return new y(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new b(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new b(e.pos,t.markFromJSON(e.mark))}}h.jsonID("addNodeMark",b);class y extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new b(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new y(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new y(e.pos,t.markFromJSON(e.mark))}}h.jsonID("removeNodeMark",y);class A extends h{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&v(t,this.from,this.to)?u.fail("Structure replace would overwrite content"):u.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new c([this.from,this.to-this.from,this.slice.size])}invert(t){return new A(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new A(e.pos,Math.max(e.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof A)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new A(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new A(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new A(e.from,e.to,r.p2.fromJSON(t,e.slice),!!e.structure)}}h.jsonID("replace",A);class w extends h{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(v(t,this.from,this.gapFrom)||v(t,this.gapTo,this.to)))return u.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return u.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?u.fromReplace(t,this.from,this.to,n):u.fail("Content does not fit in gap")}getMap(){return new c([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new w(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new w(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new w(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function v(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function x(t,e,n,i=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),a=[],l=e+1;for(let e=0;e<s.childCount;e++){let c=s.child(e),d=l+c.nodeSize,p=i.matchType(c.type);if(p){i=p;for(let e=0;e<c.marks.length;e++)n.allowsMarkType(c.marks[e].type)||t.step(new g(l,d,c.marks[e]));if(o&&c.isText&&"pre"!=n.whitespace){let t,e,i=/\r?\n|\r/g;for(;t=i.exec(c.text);)e||(e=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new A(l+t.index,l+t.index+t[0].length,e))}}else a.push(new A(l,d,r.p2.empty));l=d}if(!i.validEnd){let e=i.fillBefore(r.HY.empty,!0);t.replace(l,l,new r.p2(e,0,0))}for(let e=a.length-1;e>=0;e--)t.step(a[e])}function _(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function k(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!_(r,i,o))break}return null}function C(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}(t,e),o=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;a&&t<i;t++)a=a.matchType(n.child(t).type);return a&&a.validEnd?s:null}(r,e);return o?i.map(E).concat({type:e,attrs:n}).concat(o.map(E)):null}function E(t){return{type:t,attrs:null}}function S(t,e,n,r){e.forEach(((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(i,i+1,e.type.schema.linebreakReplacement.create())}}}))}function B(t,e,n,r){e.forEach(((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text("\n"))}}))}function O(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>o;t--,e--){let n=i.node(t),o=i.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=r&&r[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[e]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function M(t,e){let n=t.resolve(e),r=n.index();return I(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function I(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n)return!1;if(!t.type.allowsMarks(o.marks))return!1}return n.validEnd}(t,e))}function $(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,o,s=r.index(t);if(t==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(t+1),s++,o=r.node(t).maybeChild(s)):(i=r.node(t).maybeChild(s-1),o=r.node(t+1)),i&&!i.isTextblock&&I(i,o)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function T(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,o=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(o,o,i);else{let t=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=t&&s.canReplaceWith(o,o,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function L(t,e,n=e,i=r.p2.empty){if(e==n&&!i.size)return null;let o=t.resolve(e),s=t.resolve(n);return N(o,s,i)?new A(e,n,i):new R(o,s,i).fit()}function N(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}h.jsonID("replaceAround",w);class R{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let o=this.placed,s=n.depth,a=i.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new r.p2(o,s,a);return t>-1?new w(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new A(n.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,i=null;n?(i=z(this.unplaced.content,n-1).firstChild,t=i.content):t=this.unplaced.content;let o=t.firstChild;for(let t=this.depth;t>=0;t--){let s,{type:a,match:l}=this.frontier[t],c=null;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(r.HY.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:t,parent:i,inject:c};if(2==e&&o&&(s=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:t,parent:i,wrap:s};if(i&&l.matchType(i.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=z(t,e);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.p2(t,e+1,Math.max(n,i.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=z(t,e);if(i.childCount<=1&&e>0){let o=t.size-e<=e+i.size;this.unplaced=new r.p2(P(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new r.p2(P(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-t,c=0,d=[],{match:p,type:h}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)d.push(i.child(t));p=p.matchFragment(i)}let u=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let t=a.child(c),e=p.matchType(t.type);if(!e)break;c++,(c>1||0==l||t.content.size)&&(p=e,d.push(H(t.mark(h.allowedMarks(t.marks)),1==c?l:0,c==a.childCount?u:-1)))}let f=c==a.childCount;f||(u=-1),this.placed=D(this.placed,e,r.HY.from(d)),this.frontier[e].match=p,f&&u<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=a;t<u;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?r.p2.empty:new r.p2(P(s.content,t-1,1),t-1,u<0?s.openEnd:t-1):new r.p2(P(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!j(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=j(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=j(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=D(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=D(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=D(this.placed,this.frontier.length,t))}}function P(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(P(t.firstChild.content,e-1,n)))}function D(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(D(t.lastChild.content,e-1,n)))}function z(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function H(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,H(i.firstChild,e-1,1==i.childCount?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(r.HY.empty,!0)))),t.copy(i)}function j(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?a:null}function U(t,e,n,i,o){if(e<n){let r=t.firstChild;t=t.replaceChild(0,r.copy(U(r.content,e+1,n,i,r)))}if(e>i){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}function Z(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}class F extends h{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let i=e.type.create(n,null,e.marks);return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,e.isLeaf?0:1))}getMap(){return c.empty}invert(t){return new F(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new F(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new F(e.pos,e.attr,e.value)}}h.jsonID("attr",F);class V extends h{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return u.ok(n)}getMap(){return c.empty}invert(t){return new V(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new V(e.attr,e.value)}}h.jsonID("docAttr",V);let Y=class extends Error{};Y=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Y.prototype=Object.create(Error.prototype)).constructor=Y,Y.prototype.name="TransformError";class W{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new d}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Y(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let i=L(this.doc,t,e,n);return i&&this.step(i),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(N(o,s,i))return t.step(new A(e,n,i));let a=Z(o,t.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(t)>-1?l=t:o.before(t)==e&&a.splice(1,0,-t)}let c=a.indexOf(l),d=[],p=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(d.push(n),e==i.openStart)break;t=n.content}for(let t=p-1;t>=0;t--){let e=d[t],n=(h=e.type).spec.defining||h.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(l)-1)))p=t;else if(n||!e.type.isTextblock)break}var h;for(let e=i.openStart;e>=0;e--){let l=(e+p+1)%(i.openStart+1),h=d[l];if(h)for(let e=0;e<a.length;e++){let d=a[(e+c)%a.length],p=!0;d<0&&(p=!1,d=-d);let u=o.node(d-1),f=o.index(d-1);if(u.canReplaceWith(f,f,h.type,h.marks))return t.replace(o.before(d),p?s.after(d):n,new r.p2(U(i.content,0,i.openStart,l),l,i.openEnd))}}let u=t.steps.length;for(let r=a.length-1;r>=0&&(t.replace(e,n,i),!(t.steps.length>u));r--){let t=a[r];t<0||(e=o.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)return null}return null}(t.doc,e,i.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.p2(r.HY.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=Z(r,i);for(let e=0;e<o.length;e++){let n=o[e],s=e==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:i,$to:o,depth:s}=e,a=i.before(s+1),l=o.after(s+1),c=a,d=l,p=r.HY.empty,h=0;for(let t=s,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,p=r.HY.from(i.node(t).copy(p)),h++):c--;let u=r.HY.empty,f=0;for(let t=s,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,u=r.HY.from(o.node(t).copy(u)),f++):d++;t.step(new w(c,d,a,l,new r.p2(p.append(u),h,f),p.size-h,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let i=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),a=s.node().type;if(o&&a.inlineContent){let t="pre"==a.whitespace,e=!!a.contentMatch.matchType(o);t&&!e?i=!1:!t&&e&&(i=!0)}let l=t.steps.length;if(!1===i){let r=t.doc.resolve(e+n);B(t,r.node(),r.before(),l)}a.inlineContent&&x(t,e+n-1,a,s.node().contentMatchAt(s.index()),null==i);let c=t.mapping.slice(l),d=c.map(e-n);if(t.step(new A(d,c.map(e+n,-1),r.p2.empty,!0)),!0===i){let e=t.doc.resolve(d);S(t,e.node(),e.before(),t.steps.length)}}(this,t,e),this}wrap(t,e){return function(t,e,n){let i=r.HY.empty;for(let t=n.length-1;t>=0;t--){if(i.size){let e=n[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[t].type.create(n[t].attrs,i))}let o=e.start,s=e.end;t.step(new w(o,s,o,s,new r.p2(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){return function(t,e,n,i,o){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{let a="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(i,a)&&function(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(t.doc,t.mapping.slice(s).map(n),i)){let o=null;if(i.schema.linebreakReplacement){let t="pre"==i.whitespace,e=!!i.contentMatch.matchType(i.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&B(t,e,n,s),x(t,t.mapping.slice(s).map(n,1),i,void 0,null===o);let l=t.mapping.slice(s),c=l.map(n,1),d=l.map(n+e.nodeSize,1);return t.step(new w(c,d,c+1,d-1,new r.p2(r.HY.from(i.create(a,null,e.marks)),0,0),1,!0)),!0===o&&S(t,e,n,s),!1}}))}(this,t,e,n,i),this}setNodeMarkup(t,e,n=null,i){return function(t,e,n,i,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(i,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new w(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,t,e,n,i),this}setNodeAttribute(t,e,n){return this.step(new F(t,e,n)),this}setDocAttribute(t,e){return this.step(new V(t,e)),this}addNodeMark(t,e){return this.step(new b(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof r.vc)e.isInSet(n.marks)&&this.step(new y(t,e));else{let r,i=n.marks,o=[];for(;r=e.isInSet(i);)o.push(new y(t,r)),i=r.removeFromSet(i);for(let t=o.length-1;t>=0;t--)this.step(o[t])}return this}split(t,e=1,n){return function(t,e,n=1,i){let o=t.doc.resolve(e),s=r.HY.empty,a=r.HY.empty;for(let t=o.depth,e=o.depth-n,l=n-1;t>e;t--,l--){s=r.HY.from(o.node(t).copy(s));let e=i&&i[l];a=r.HY.from(e?e.type.create(e.attrs,a):o.node(t).copy(a))}t.step(new A(e,e,new r.p2(s.append(a),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let i,o,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),p=Math.min(l+t.nodeSize,n),h=r.addToSet(d);for(let t=0;t<d.length;t++)d[t].isInSet(h)||(i&&i.to==c&&i.mark.eq(d[t])?i.to=p:s.push(i=new g(c,p,d[t])));o&&o.to==c?o.to=p:a.push(o=new m(c,p,r))}})),s.forEach((e=>t.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,i){let o=[],s=0;t.doc.nodesBetween(e,n,((t,a)=>{if(!t.isInline)return;s++;let l=null;if(i instanceof r.ZU){let e,n=t.marks;for(;e=i.isInSet(n);)(l||(l=[])).push(e),n=e.removeFromSet(n)}else i?i.isInSet(t.marks)&&(l=[i]):l=t.marks;if(l&&l.length){let r=Math.min(a+t.nodeSize,n);for(let t=0;t<l.length;t++){let n,i=l[t];for(let t=0;t<o.length;t++){let e=o[t];e.step==s-1&&i.eq(o[t].style)&&(n=e)}n?(n.to=r,n.step=s):o.push({style:i,from:Math.max(a,e),to:r,step:s})}}})),o.forEach((e=>t.step(new g(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return x(this,t,e,n),this}}},52780:(t,e,n)=>{"use strict";n.d(e,{EH:()=>Ve,p:()=>Ue,tk:()=>bn});var r=n(27191),i=n(52665),o=n(26151);const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},a=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let l=null;const c=function(t,e,n){let r=l||(l=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},d=function(t,e,n,r){return n&&(h(t,e,n,r,-1)||h(t,e,n,r,1))},p=/^(img|br|input|textarea|hr)$/i;function h(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:u(t))){let n=t.parentNode;if(!n||1!=n.nodeType||f(t)||p.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?u(t):0}}}function u(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const m=function(t){return t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function g(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const b="undefined"!=typeof navigator?navigator:null,y="undefined"!=typeof document?document:null,A=b&&b.userAgent||"",w=/Edge\/(\d+)/.exec(A),v=/MSIE \d/.exec(A),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(A),_=!!(v||x||w),k=v?document.documentMode:x?+x[1]:w?+w[1]:0,C=!_&&/gecko\/(\d+)/i.test(A);C&&(/Firefox\/(\d+)/.exec(A)||[0,0])[1];const E=!_&&/Chrome\/(\d+)/.exec(A),S=!!E,B=E?+E[1]:0,O=!_&&!!b&&/Apple Computer/.test(b.vendor),M=O&&(/Mobile\/\w+/.test(A)||!!b&&b.maxTouchPoints>2),I=M||!!b&&/Mac/.test(b.platform),$=!!b&&/Win/.test(b.platform),T=/Android \d/.test(A),L=!!y&&"webkitFontSmoothing"in y.documentElement.style,N=L?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function R(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function P(t,e){return"number"==typeof t?t:t[e]}function D(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function z(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(1!=s.nodeType){s=a(s);continue}let t=s,n=t==o.body,l=n?R(o):D(t),c=0,d=0;if(e.top<l.top+P(r,"top")?d=-(l.top-e.top+P(i,"top")):e.bottom>l.bottom-P(r,"bottom")&&(d=e.bottom-e.top>l.bottom-l.top?e.top+P(i,"top")-l.top:e.bottom-l.bottom+P(i,"bottom")),e.left<l.left+P(r,"left")?c=-(l.left-e.left+P(i,"left")):e.right>l.right-P(r,"right")&&(c=e.right-l.right+P(i,"right")),c||d)if(n)o.defaultView.scrollBy(c,d);else{let n=t.scrollLeft,r=t.scrollTop;d&&(t.scrollTop+=d),c&&(t.scrollLeft+=c);let i=t.scrollLeft-n,o=t.scrollTop-r;e={left:e.left-i,top:e.top-o,right:e.right-i,bottom:e.bottom-o}}let p=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(p))break;s="absolute"==p?s.offsetParent:a(s)}}function H(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=a(r));return e}function j(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let U=null;function Z(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,d=e.top;for(let p=t.firstChild,h=0;p;p=p.nextSibling,h++){let t;if(1==p.nodeType)t=p.getClientRects();else{if(3!=p.nodeType)continue;t=c(p).getClientRects()}for(let c=0;c<t.length;c++){let u=t[c];if(u.top<=l&&u.bottom>=d){l=Math.max(u.bottom,l),d=Math.min(u.top,d);let t=u.left>e.left?u.left-e.left:u.right<e.left?e.left-u.right:0;if(t<s){n=p,s=t,r=t&&3==n.nodeType?{left:u.right<e.left?u.right:u.left,top:e.top}:e,1==p.nodeType&&t&&(a=h+(e.left>=(u.left+u.right)/2?1:0));continue}}else u.top>e.top&&!i&&u.left<=e.left&&u.right>=e.left&&(i=p,o={left:Math.max(u.left,Math.min(u.right,e.left)),top:u.top});!n&&(e.left>=u.right&&e.top>=u.top||e.left>=u.left&&e.top>=u.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let n=q(r,1);if(n.top!=n.bottom&&F(e,n))return{node:t,offset:i+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:t,offset:a}:Z(n,r)}function F(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function V(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=t.childNodes[o];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let i=t[r];if(F(e,i))return V(n,e,i)}}if((o=(o+1)%r)==i)break}return t}function Y(t,e){let n,r=t.dom.ownerDocument,i=0,o=function(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(u(r.offsetNode),r.offset)}}catch(t){}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(u(r.startContainer),r.startOffset)}}}(r,e.left,e.top);o&&({node:n,offset:i}=o);let s,l=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!l||!t.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=t.dom.getBoundingClientRect();if(!F(e,n))return null;if(l=V(t.dom,e,n),!l)return null}if(O)for(let t=l;n&&t;t=a(t))t.draggable&&(n=void 0);if(l=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(l,e),n){if(C&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let t,r=n.childNodes[i];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&i++}let r;L&&i&&1==n.nodeType&&1==(r=n.childNodes[i-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(s=function(t,e,n,r){let i=-1;for(let n=e,o=!1;n!=t.dom;){let e,s=t.docView.nearestDesc(n,!0);if(!s)return null;if(1==s.dom.nodeType&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((e=s.dom.getBoundingClientRect()).width||e.height)&&(s.node.isBlock&&s.parent&&(!o&&e.left>r.left||e.top>r.top?i=s.posBefore:(!o&&e.right<r.left||e.bottom<r.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?s.posBefore:s.posAfter;n=s.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}(t,n,i,e))}null==s&&(s=function(t,e,n){let{node:r,offset:i}=Z(e,n),o=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();o=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}(t,l,e));let c=t.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function W(t){return t.top<t.bottom||t.left<t.right}function q(t,e){let n=t.getClientRects();if(n.length){let t=n[e<0?0:n.length-1];if(W(t))return t}return Array.prototype.find.call(n,W)||t.getBoundingClientRect()}const X=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function G(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=L||C;if(3==r.nodeType){if(!s||!X.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let t=i,e=i,o=n<0?1:-1;return n<0&&!i?(e++,o=-1):n>=0&&i==r.nodeValue.length?(t--,o=1):n<0?t--:e++,K(q(c(r,t,e),o),o<0)}{let t=q(c(r,i,i),n);if(C&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let e=q(c(r,i-1,i-1),-1);if(e.top==t.top){let n=q(c(r,i,i+1),-1);if(n.top!=t.top)return K(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==u(r))){let t=r.childNodes[i-1];if(1==t.nodeType)return J(t.getBoundingClientRect(),!1)}if(null==o&&i<u(r)){let t=r.childNodes[i];if(1==t.nodeType)return J(t.getBoundingClientRect(),!0)}return J(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==u(r))){let t=r.childNodes[i-1],e=3==t.nodeType?c(t,u(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return K(q(e,1),!1)}if(null==o&&i<u(r)){let t=r.childNodes[i];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?c(t,0,s?0:1):1==t.nodeType?t:null:null;if(e)return K(q(e,-1),!0)}return K(q(3==r.nodeType?c(r):r,-n),n>=0)}function K(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function J(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Q(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const tt=/[\u0590-\u08ac]/;let et=null,nt=null,rt=!1;function it(t,e,n){return et==e&&nt==n?rt:(et=e,nt=n,rt="up"==n||"down"==n?function(t,e,n){let r=e.selection,i="up"==n?r.$from:r.$to;return Q(t,e,(()=>{let{node:e}=t.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=G(t,i.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let i=e[t];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return a?tt.test(r.parent.textContent)&&a.modify?Q(t,e,(()=>{let{focusNode:e,focusOffset:i,anchorNode:o,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:p}=t.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||e==d&&i==p;try{a.collapse(o,s),e&&(e!=o||i!=s)&&a.extend&&a.extend(e,i)}catch(t){}return null!=l&&(a.caretBidiLevel=l),h})):"left"==n||"backward"==n?o:s:r.pos==r.start()||r.pos==r.end()}(t,e,n))}class ot{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==t.nodeType?t:t.parentNode):i==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],i=n+r.size;if(n==t&&i!=n){for(;!r.border&&r.children.length;)for(let t=0;t<r.children.length;t++){let e=r.children[t];if(e.size){r=e;break}}return r}if(t<i)return r.descAt(t-n-r.border);n=i}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,r=0;for(let e=0;n<this.children.length;n++){let i=this.children[n],o=e+i.size;if(o>t||i instanceof ht){r=t-e;break}e=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;n&&!(t=this.children[n-1]).size&&t instanceof st&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;t=n?this.children[n-1]:null,t&&t.dom.parentNode!=this.contentDOM;n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?s(t.dom)+1:0}}{let t,r=!0;for(;t=n<this.children.length?this.children[n]:null,t&&t.dom.parentNode!=this.contentDOM;n++,r=!1);return t&&r&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?s(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,a=0;;a++){let n=this.children[a],l=o+n.size;if(-1==r&&t<=l){let i=o+n.border;if(t>=i&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,i);t=o;for(let e=a;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||a==this.children.length-1)){e=l;for(let t=a+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=s(n.dom);break}e+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=l}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let i=Math.min(t,e),o=Math.max(t,e);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(t-a-l.border,e-a-l.border,n,r);a=c}let a=this.domFromPos(t,t?-1:1),l=e==t?a:this.domFromPos(e,e?-1:1),c=n.root.getSelection(),p=n.domSelectionRange(),h=!1;if((C||O)&&t==e){let{node:t,offset:e}=a;if(3==t.nodeType){if(h=!(!e||"\n"!=t.nodeValue[e-1]),h&&e==t.nodeValue.length)for(let e,n=t;n;n=n.parentNode){if(e=n.nextSibling){"BR"==e.nodeName&&(a=l={node:e.parentNode,offset:s(e)+1});break}let t=n.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];h=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(C&&p.focusNode&&p.focusNode!=l.node&&1==p.focusNode.nodeType){let t=p.focusNode.childNodes[p.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||h&&O)&&d(a.node,a.offset,p.anchorNode,p.anchorOffset)&&d(l.node,l.offset,p.focusNode,p.focusOffset))return;let u=!1;if((c.extend||t==e)&&!h){c.collapse(a.node,a.offset);try{t!=e&&c.extend(l.node,l.offset),u=!0}catch(t){}}if(!u){if(t>e){let t=a;a=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?t<=o&&e>=n:t<o&&e>n){let r=n+i.border,s=o-i.border;if(t>=r&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=r||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-r,e-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class st extends ot{constructor(t,e,n,r){let i,o=e.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!e.type.spec.raw){if(1!=o.nodeType){let t=document.createElement("span");t.appendChild(o),o=t}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=e,this.widget=e,i=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class at extends ot{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class lt extends ot{constructor(t,e,n,r,i){super(t,[],n,r),this.mark=e,this.spec=i}static create(t,e,n,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,n);return s&&s.dom||(s=i.PW.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new lt(t,e,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=lt.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;e<o&&(i=Ct(i,e,o,n)),t>0&&(i=Ct(i,0,t,n));for(let t=0;t<i.length;t++)i[t].parent=r;return r.children=i,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ct extends ot{constructor(t,e,n,r,i,o,s,a,l){super(t,[],i,o),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(t,e,n,r,o,s){let a,l=o.nodeViews[e.type.name],c=l&&l(e,o,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),d=c&&c.dom,p=c&&c.contentDOM;if(e.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(e.text);else if(!d){let t=i.PW.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs);({dom:d,contentDOM:p}=t)}p||e.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),e.type.spec.draggable&&(d.draggable=!0));let h=d;return d=wt(d,n,e),c?a=new ut(t,e,n,r,d,p||null,h,c,o,s+1):e.isText?new pt(t,e,n,r,d,h,o):new ct(t,e,n,r,d,p||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>i.HY.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&vt(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new _t(this,s&&s.node,t);!function(t,e,n,r){let i=e.locals(t),o=0;if(0==i.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,i,e.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,p,h,u;for(;s<i.length&&i[s].to==o;){let t=i[s++];t.widget&&(d?(p||(p=[d])).push(t):d=t)}if(d)if(p){p.sort(kt);for(let t=0;t<p.length;t++)n(p[t],c,!!l)}else n(d,c,!!l);if(l)u=-1,h=l,l=null;else{if(!(c<t.childCount))break;u=c,h=t.child(c++)}for(let t=0;t<a.length;t++)a[t].to<=o&&a.splice(t--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let f=o+h.nodeSize;if(h.isText){let t=f;s<i.length&&i[s].from<t&&(t=i[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<f&&(l=h.cut(t-o),h=h.cut(0,t-o),f=t,u=-1)}else for(;s<i.length&&i[s].to<f;)s++;r(h,h.isInline&&!h.isLeaf?a.filter((t=>!t.inline)):a.slice(),e.forChild(o,h),u),o=f}}(this.node,this.innerDeco,((e,o,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?i.vc.none:this.node.child(o).marks,n,t),l.placeWidget(e,t,r)}),((e,i,s,c)=>{let d;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,i,s,c)||a&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(d=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(e,i,s,d,t)||l.updateNextNode(e,i,s,t,c,r)||l.addNode(e,i,s,t,r),r+=e.nodeSize})),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),ft(this.contentDOM,this.children,t),M&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof r.Bs)||n<e||i>e+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let t=o.nodeValue,r=function(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let e=t.child(i++);if(o+=e.nodeSize,!e.isText)break;l+=e.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,i-e);return r<0?null:{node:o,pos:r,text:t}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let i=e;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new at(this,i,e,r);t.input.compositionNodes.push(o),this.children=Ct(this.children,n,n+r.length,t,o)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(vt(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=yt(this.dom,this.nodeDOM,bt(this.outerDeco,this.node,e),bt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function dt(t,e,n,r,i){wt(r,e,t);let o=new ct(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class pt extends ct{constructor(t,e,n,r,i,o,s){super(t,e,n,r,i,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),i=document.createTextNode(r.text);return new pt(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class ht extends ot{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ut extends ct{constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r,i,o,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,e,n);return i&&this.updateInner(t,e,n,r),i}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n.root):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function ft(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=xt(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof lt){let e=r?r.previousSibling:t.lastChild;ft(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=xt(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const mt=function(t){t&&(this.nodeName=t)};mt.prototype=Object.create(null);const gt=[new mt];function bt(t,e,n){if(0==t.length)return gt;let r=n?gt[0]:new mt,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new mt(s.nodeName));for(let t in s){let o=s[t];null!=o&&(n&&1==i.length&&i.push(r=new mt(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+o:"style"==t?r.style=(r.style?r.style+";":"")+o:"nodeName"!=t&&(r[t]=o))}}}return i}function yt(t,e,n,r){if(n==gt&&r==gt)return e;let i=e;for(let e=0;e<r.length;e++){let o=r[e],s=n[e];if(e){let e;s&&s.nodeName==o.nodeName&&i!=t&&(e=i.parentNode)&&e.nodeName.toLowerCase()==o.nodeName||(e=document.createElement(o.nodeName),e.pmIsDeco=!0,e.appendChild(i),s=gt[0]),i=e}At(i,s||gt[0],o)}return i}function At(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==i.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<i.length;e++)-1==r.indexOf(i[e])&&t.classList.add(i[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function wt(t,e,n){return yt(t,t,gt,bt(e,n,1!=t.nodeType))}function vt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function xt(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class _t{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];t:for(;i>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof lt)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,i=this.stack.length>>1,o=Math.min(i,t.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++){let n=this.top.children[e];if(n.matchesMark(t[i])&&!this.isLocked(n.dom)){r=e;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=lt.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(t,e,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(t,e,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,e,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(t,e,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,i,o){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof ct){let l=this.preMatch.matched.get(a);if(null!=l&&l!=i)return!1;let c,d=a.dom,p=this.isLocked(d)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&3!=a.dirty&&vt(e,a.outerDeco));if(!p&&a.update(t,e,n,r))return this.destroyBetween(this.index,s),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(c=this.recreateWrapper(a,t,e,n,r,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,o+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,e,n,r,i,o){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content)||!vt(n,t.outerDeco)||!r.eq(t.innerDeco))return null;let s=ct.create(this.top,e,n,r,i,o);if(s.contentDOM){s.children=t.children,t.children=[];for(let t of s.children)t.parent=s}return t.destroy(),s}addNode(t,e,n,r,i){let o=ct.create(this.top,t,e,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new st(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof lt;)e=t,t=e.children[e.children.length-1];(!t||!(t instanceof pt)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((O||S)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new ht(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||1==t.nodeType&&t.contains(this.lock.parentNode))}}function kt(t,e){return t.type.side-e.type.side}function Ct(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,d=a+=l.size;c>=n||d<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Et(t,e=null){let n=t.domSelectionRange(),i=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),a=o&&0==o.size,l=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,d,p=i.resolve(l);if(m(n)){for(c=l;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&r.qv.isSelectable(t)&&o.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,i=e==u(t);r||i;){if(t==n)return!0;let e=s(t);if(!(t=t.parentNode))return!1;r=r&&0==e,i=i&&e==u(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;d=new r.qv(l==t?p:i.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=l,r=l;for(let i=0;i<n.rangeCount;i++){let o=n.getRangeAt(i);e=Math.min(e,t.docView.posFromDOM(o.startContainer,o.startOffset,1)),r=Math.max(r,t.docView.posFromDOM(o.endContainer,o.endOffset,-1))}if(e<0)return null;[c,l]=r==t.state.selection.anchor?[r,e]:[e,r],p=i.resolve(l)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let h=i.resolve(c);if(!d){d=Nt(t,h,p,"pointer"==e||t.state.selection.head<p.pos&&!a?1:-1)}return d}function St(t){return t.editable?t.hasFocus():Pt(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Bt(t,e=!1){let n=t.state.selection;if(Tt(t,n),St(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&S){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&d(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setStart(r.parentNode,s(r)+1):n.setStart(r,0);n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&_&&k<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let i,o,{anchor:s,head:a}=n;!Ot||n instanceof r.Bs||(n.$from.parent.inlineContent||(i=Mt(t,n.from)),n.empty||n.$from.parent.inlineContent||(o=Mt(t,n.to))),t.docView.setSelection(s,a,t,e),Ot&&(i&&$t(i),o&&$t(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{St(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Ot=O||S&&B<63;function Mt(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(O&&i&&"false"==i.contentEditable)return It(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return It(i);if(o)return It(o)}}function It(t){return t.contentEditable="true",O&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $t(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Tt(t,e){if(e instanceof r.qv){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Lt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Lt(t)}function Lt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Nt(t,e,n,i){return t.someProp("createSelectionBetween",(r=>r(t,e,n)))||r.Bs.between(e,n,i)}function Rt(t){return!(t.editable&&!t.hasFocus())&&Pt(t)}function Pt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Dt(t,e){let{$anchor:n,$head:i}=t.selection,o=e>0?n.max(i):n.min(i),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&r.Y1.findFrom(s,e)}function zt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ht(t,e,n){let i=t.state.selection;if(!(i instanceof r.Bs)){if(i instanceof r.qv&&i.node.isInline)return zt(t,new r.Bs(e>0?i.$to:i.$from));{let n=Dt(t.state,e);return!!n&&zt(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=i,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+o.nodeSize*(e<0?-1:1));return zt(t,new r.Bs(i.$anchor,s))}if(!i.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Dt(t.state,e);return!!(n&&n instanceof r.qv)&&zt(t,n)}if(!(I&&n.indexOf("m")>-1)){let n,o=i.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(n=t.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?zt(t,new r.qv(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!L&&zt(t,new r.Bs(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function jt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Ut(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Zt(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,a=!1;C&&1==n.nodeType&&r<jt(n)&&Ut(n.childNodes[r],-1)&&(a=!0);for(;;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Ut(t,-1))i=n,o=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Ft(n))break;{let e=n.previousSibling;for(;e&&Ut(e,-1);)i=n.parentNode,o=s(e),e=e.previousSibling;if(e)n=e,r=jt(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?Vt(t,n,r):i&&Vt(t,i,o)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,a=jt(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Ut(n.childNodes[r],1))break;i=n,o=++r}else{if(Ft(n))break;{let e=n.nextSibling;for(;e&&Ut(e,1);)i=e.parentNode,o=s(e)+1,e=e.nextSibling;if(e)n=e,r=0,a=jt(n);else{if(n=n.parentNode,n==t.dom)break;r=a=0}}}i&&Vt(t,i,o)}(t)}function Ft(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Vt(t,e,n){if(3!=e.nodeType){let t,r;(r=function(t,e){for(;t&&e==t.childNodes.length&&!f(t);)e=s(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=n,e=0}}(e,n))?(e=r,n=0):(t=function(t,e){for(;t&&!e&&!f(t);)e=s(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=(t=n).childNodes.length}}(e,n))&&(e=t,n=t.nodeValue.length)}let r=t.domSelection();if(!r)return;if(m(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout((()=>{t.state==i&&Bt(t)}),50)}function Yt(t,e){let n=t.state.doc.resolve(e);if(!S&&!$&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(e<n.end()){let n=t.coordsAtPos(e+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Wt(t,e,n){let i=t.state.selection;if(i instanceof r.Bs&&!i.empty||n.indexOf("s")>-1)return!1;if(I&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Dt(t.state,e);if(n&&n instanceof r.qv)return zt(t,n)}if(!o.parent.inlineContent){let n=e<0?o:s,a=i instanceof r.C1?r.Y1.near(n,e):r.Y1.findFrom(n,e);return!!a&&zt(t,a)}return!1}function qt(t,e){if(!(t.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:i,empty:o}=t.state.selection;if(!n.sameParent(i))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Xt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Gt(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||I&&72==n&&"c"==r)return qt(t,-1)||Zt(t,-1);if(46==n&&!e.shiftKey||I&&68==n&&"c"==r)return qt(t,1)||Zt(t,1);if(13==n||27==n)return!0;if(37==n||I&&66==n&&"c"==r){let e=37==n?"ltr"==Yt(t,t.state.selection.from)?-1:1:-1;return Ht(t,e,r)||Zt(t,e)}if(39==n||I&&70==n&&"c"==r){let e=39==n?"ltr"==Yt(t,t.state.selection.from)?1:-1:1;return Ht(t,e,r)||Zt(t,e)}return 38==n||I&&80==n&&"c"==r?Wt(t,-1,r)||Zt(t,-1):40==n||I&&78==n&&"c"==r?function(t){if(!O||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Xt(t,n,"true"),setTimeout((()=>Xt(t,n,"false")),20)}return!1}(t)||Wt(t,1,r)||Zt(t,1):r==(I?"m":"c")&&(66==n||73==n||89==n||90==n)}function Kt(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,s--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let a=t.someProp("clipboardSerializer")||i.PW.fromSchema(t.state.schema),l=ae(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let d,p=c.firstChild,h=0;for(;p&&1==p.nodeType&&(d=oe[p.nodeName.toLowerCase()]);){for(let t=d.length-1;t>=0;t--){let e=l.createElement(d[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),h++}p=c.firstChild}return p&&1==p.nodeType&&p.setAttribute("data-pm-slice",`${o} ${s}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n"),slice:e}}function Jt(t,e,n,r,o){let s,a,l=o.parent.type.spec.code;if(!n&&!e)return null;let c=e&&(r||l||!n);if(c){if(t.someProp("transformPastedText",(n=>{e=n(e,l||r,t)})),l)return e?new i.p2(i.HY.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):i.p2.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,o,r,t)));if(n)a=n;else{let n=o.marks(),{schema:r}=t.state,a=i.PW.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(a.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),s=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=ae().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t);(n=i&&oe[i[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"</"+t+">")).reverse().join(""));if(r.innerHTML=function(t){let e=window.trustedTypes;if(!e)return t;le||(le=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t}));return le.createHTML(t)}(t),n)for(let t=0;t<n.length;t++)r=r.querySelector(n[t])||r;return r}(n),L&&function(t){let e=t.querySelectorAll(S?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(s);let d=s&&s.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let t=+p[3];t>0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(!a){let e=t.someProp("clipboardParser")||t.someProp("domParser")||i.aw.fromSchema(t.state.schema);a=e.parseSlice(s,{preserveWhitespace:!(!c&&!p),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Qt.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(p)a=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:o,openStart:s,openEnd:a}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;o=i.HY.from(e.create(n[t+1],o)),s++,a++}return new i.p2(o,s,a)}(ie(a,+p[1],+p[2]),p[4]);else if(a=i.p2.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,o=e.node(n).contentMatchAt(e.index(n)),s=[];if(t.forEach((t=>{if(!s)return;let e,n=o.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&r.length&&ee(n,r,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=ne(s[s.length-1],r.length));let e=te(t,n);s.push(e),o=o.matchType(e.type),r=n}})),s)return i.HY.from(s)}return t}(a.content,o),!0),a.openStart||a.openEnd){let t=0,e=0;for(let e=a.content.firstChild;t<a.openStart&&!e.type.spec.isolating;t++,e=e.firstChild);for(let t=a.content.lastChild;e<a.openEnd&&!t.type.spec.isolating;e++,t=t.lastChild);a=ie(a,t,e)}return t.someProp("transformPasted",(e=>{a=e(a,t)})),a}const Qt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function te(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,i.HY.from(t));return t}function ee(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=ee(t,e,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(i.HY.from(te(n,t,o+1))))}}function ne(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,ne(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(i.HY.empty,!0);return t.copy(n.append(r))}function re(t,e,n,r,o,s){let a=e<0?t.firstChild:t.lastChild,l=a.content;return t.childCount>1&&(s=0),o<r-1&&(l=re(l,e,n,r,o+1,s)),o>=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(i.HY.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function ie(t,e,n){return e<t.openStart&&(t=new i.p2(re(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new i.p2(re(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const oe={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let se=null;function ae(){return se||(se=document.implementation.createHTMLDocument("title"))}let le=null;const ce={},de={},pe={touchstart:!0,touchmove:!0};class he{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ue(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function fe(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>me(t,e))}))}function me(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function ge(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function be(t){return{left:t.clientX,top:t.clientY}}function ye(t,e,n,r,i){if(-1==r)return!1;let o=t.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,(e=>r>o.depth?e(t,n,o.nodeAfter,o.before(r),i,!0):e(t,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function Ae(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function we(t,e,n,i,o){return ye(t,"handleClickOn",e,n,i)||t.someProp("handleClick",(n=>n(t,e,i)))||(o?function(t,e){if(-1==e)return!1;let n,i,o=t.state.selection;o instanceof r.qv&&(n=o.node);let s=t.state.doc.resolve(e);for(let t=s.depth+1;t>0;t--){let e=t>s.depth?s.nodeAfter:s.node(t);if(r.qv.isSelectable(e)){i=n&&o.$from.depth>0&&t>=o.$from.depth&&s.before(o.$from.depth+1)==o.$from.pos?s.before(o.$from.depth):s.before(t);break}}return null!=i&&(Ae(t,r.qv.create(t.state.doc,i),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return!!(i&&i.isAtom&&r.qv.isSelectable(i))&&(Ae(t,new r.qv(n),"pointer"),!0)}(t,n))}function ve(t,e,n,r){return ye(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function xe(t,e,n,i){return ye(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",(n=>n(t,e,i)))||function(t,e,n){if(0!=n.button)return!1;let i=t.state.doc;if(-1==e)return!!i.inlineContent&&(Ae(t,r.Bs.create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(e);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e),s=o.before(e);if(n.inlineContent)Ae(t,r.Bs.create(i,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;Ae(t,r.qv.create(i,s),"pointer")}return!0}}(t,n,i)}function _e(t){return Ie(t)}de.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Ee(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!T||!S||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!M||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||Gt(t,n)?n.preventDefault():ue(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},de.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},de.keypress=(t,e)=>{let n=e;if(Ee(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||I&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let i=t.state.selection;if(!(i instanceof r.Bs&&i.$from.sameParent(i.$to))){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",(n=>n(t,i.$from.pos,i.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const ke=I?"metaKey":"ctrlKey";ce.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=_e(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[ke]&&("singleClick"==t.input.lastClick.type?o="doubleClick":"doubleClick"==t.input.lastClick.type&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(be(n));s&&("singleClick"==o?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Ce(t,s,n,!!r)):("doubleClick"==o?ve:xe)(t,s.pos,s.inside,n)?n.preventDefault():ue(t,"pointer"))};class Ce{constructor(t,e,n,i){let o,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[ke],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,s=n.depth?n.before():0}const a=i?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:c}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!C||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ue(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Bt(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(be(t))),this.updateAllowDefault(t),this.allowDefault||!e?ue(this.view,"pointer"):we(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||O&&this.mightDrag&&!this.mightDrag.node.isAtom||S&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Ae(this.view,r.Y1.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):ue(this.view,"pointer")}move(t){this.updateAllowDefault(t),ue(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function Ee(t,e){return!!t.composing||!!(O&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}ce.touchstart=t=>{t.input.lastTouch=Date.now(),_e(t),ue(t,"pointer")},ce.touchmove=t=>{t.input.lastTouch=Date.now(),ue(t,"pointer")},ce.contextmenu=t=>_e(t);const Se=T?5e3:-1;function Be(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Ie(t)),e))}function Oe(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Me(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;e=u(t=t.childNodes[e-1])}else{if(!t.parentNode||f(t))return null;e=s(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),r=function(t,e){for(;;){if(3==t.nodeType&&e<t.nodeValue.length)return t;if(1==t.nodeType&&e<t.childNodes.length){if("false"==t.contentEditable)return null;t=t.childNodes[e],e=0}else{if(!t.parentNode||f(t))return null;e=s(t)+1,t=t.parentNode}}}(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return r}}return n||r}function Ie(t,e=!1){if(!(T&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Oe(t),e||t.docView&&t.docView.dirty){let n=Et(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||t.state.selection.empty?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}de.compositionstart=de.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof r.Bs&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Ie(t,!0),t.markCursor=null;else if(Ie(t,!e.selection.empty),C&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Be(t,Se)},de.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then((()=>t.domObserver.flush())),t.input.compositionID++,Be(t,20))};const $e=_&&k<15||M&&N<604;function Te(t,e,n,r,o){let s=Jt(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,o,s||i.p2.empty))))return!0;if(!s)return!1;let a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),l=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Le(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ce.copy=de.cut=(t,e)=>{let n=e,r=t.state.selection,i="cut"==n.type;if(r.empty)return;let o=$e?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Kt(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},de.paste=(t,e)=>{let n=e;if(t.composing&&!T)return;let r=$e?null:n.clipboardData,i=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Te(t,Le(r),r.getData("text/html"),i,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Te(t,r.value,null,i,e):Te(t,r.textContent,r.innerHTML,i,e)}),50)}(t,n)};class Ne{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const Re=I?"altKey":"ctrlKey";function Pe(t,e){let n=t.someProp("dragCopies",(t=>!t(e)));return null!=n?n:!e[Re]}ce.dragstart=(t,e)=>{let n=e,i=t.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o,s=t.state.selection,a=s.empty?null:t.posAtCoords(be(n));if(a&&a.pos>=s.from&&a.pos<=(s instanceof r.qv?s.to-1:s.to));else if(i&&i.mightDrag)o=r.qv.create(t.state.doc,i.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(o=r.qv.create(t.state.doc,e.posBefore))}let l=(o||t.state.selection).content(),{dom:c,text:d,slice:p}=Kt(t,l);(!n.dataTransfer.files.length||!S||B>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData($e?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",$e||n.dataTransfer.setData("text/plain",d),t.dragging=new Ne(p,Pe(t,n),o)},ce.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},de.dragover=de.dragenter=(t,e)=>e.preventDefault(),de.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let a=t.posAtCoords(be(n));if(!a)return;let l=t.state.doc.resolve(a.pos),c=s&&s.slice;c?t.someProp("transformPasted",(e=>{c=e(c,t)})):c=Jt(t,Le(n.dataTransfer),$e?null:n.dataTransfer.getData("text/html"),!1,l);let d=!(!s||!Pe(t,n));if(t.someProp("handleDrop",(e=>e(t,n,c||i.p2.empty,d))))return void n.preventDefault();if(!c)return;n.preventDefault();let p=c?(0,o.nj)(t.state.doc,l.pos,c):l.pos;null==p&&(p=l.pos);let h=t.state.tr;if(d){let{node:t}=s;t?t.replace(h):h.deleteSelection()}let u=h.mapping.map(p),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=h.doc;if(f?h.replaceRangeWith(u,u,c.content.firstChild):h.replaceRange(u,u,c),h.doc.eq(m))return;let g=h.doc.resolve(u);if(f&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))h.setSelection(new r.qv(g));else{let e=h.mapping.map(p);h.mapping.maps[h.mapping.maps.length-1].forEach(((t,n,r,i)=>e=i)),h.setSelection(Nt(t,g,h.doc.resolve(e)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))},ce.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Bt(t)}),20))},ce.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},ce.beforeinput=(t,e)=>{if(S&&T&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let t in de)ce[t]=de[t];function De(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ze{constructor(t,e){this.toDOM=t,this.spec=e||Fe,this.side=this.spec.side||0}map(t,e,n,r){let{pos:i,deleted:o}=t.mapResult(e.from+r,this.side<0?-1:1);return o?null:new Ue(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof ze&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&De(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class He{constructor(t,e){this.attrs=t,this.spec=e||Fe}map(t,e,n,r){let i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Ue(i,o,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof He&&De(this.attrs,t.attrs)&&De(this.spec,t.spec)}static is(t){return t.type instanceof He}destroy(){}}class je{constructor(t,e){this.attrs=t,this.spec=e||Fe}map(t,e,n,r){let i=t.mapResult(e.from+r,1);if(i.deleted)return null;let o=t.mapResult(e.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Ue(i.pos-n,o.pos-n,this)}valid(t,e){let n,{index:r,offset:i}=t.content.findIndex(e.from);return i==e.from&&!(n=t.child(r)).isText&&i+n.nodeSize==e.to}eq(t){return this==t||t instanceof je&&De(this.attrs,t.attrs)&&De(this.spec,t.spec)}destroy(){}}class Ue{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Ue(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Ue(t,t,new ze(e,n))}static inline(t,e,n,r){return new Ue(t,e,new He(n,r))}static node(t,e,n,r){return new Ue(t,e,new je(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof He}get widget(){return this.type instanceof ze}}const Ze=[],Fe={};class Ve{constructor(t,e){this.local=t.length?t:Ze,this.children=e.length?e:Ze}static create(t,e){return e.length?Ke(e,t,0,Fe):Ye}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=e&&s.to>=t&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<e&&this.children[o+1]>t){let s=this.children[o]+1;this.children[o+2].findInner(t-s,e-s,n,r+s,i)}}map(t,e,n){return this==Ye||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Fe)}mapInner(t,e,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,i,o,s){let a=t.slice();for(let t=0,e=o;t<n.maps.length;t++){let r=0;n.maps[t].forEach(((t,n,i,o)=>{let s=o-i-(n-t);for(let i=0;i<a.length;i+=3){let o=a[i+1];if(o<0||t>o+e-r)continue;let l=a[i]+e-r;n>=l?a[i+1]=t<=l?-2:-1:t>=e&&s&&(a[i]+=s,a[i+1]+=s)}r+=s})),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e<a.length;e+=3)if(a[e+1]<0){if(-2==a[e+1]){l=!0,a[e+1]=-1;continue}let c=n.map(t[e]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let p=n.map(t[e+1]+o,-1)-i,{index:h,offset:u}=r.content.findIndex(d),f=r.maybeChild(h);if(f&&u==d&&u+f.nodeSize==p){let r=a[e+2].mapInner(n,f,c+1,t[e]+o+1,s);r!=Ye?(a[e]=d,a[e+1]=p,a[e+2]=r):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=function(t,e,n,r,i,o,s){function a(t,e){for(let o=0;o<t.local.length;o++){let a=t.local[o].map(r,i,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[o].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let n=0;n<t.length;n+=3)-1==t[n+1]&&a(t[n+2],e[n]+o+1);return n}(a,t,e,n,i,o,s),c=Ke(l,r,0,s);e=c.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<c.children.length;t+=3){let n=c.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,c.children[t],c.children[t+1],c.children[t+2])}}return new Ve(e.sort(Je),a)}(this.children,o||[],t,e,n,r,i):o?new Ve(o.sort(Je),Ze):Ye}add(t,e){return e.length?this==Ye?Ve.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,i=0;t.forEach(((t,o)=>{let s,a=o+n;if(s=Xe(e,t,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(t,s,a+1):r.splice(i,0,o,o+t.nodeSize,Ke(s,t,a+1,Fe)),i+=3}}));let o=qe(i?Ge(e):e,-n);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new Ve(o.length?this.local.concat(o).sort(Je):this.local,r||this.children)}remove(t){return 0==t.length||this==Ye?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+e,s=n[r+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>o&&e.to<s&&(t[n]=null,(i||(i=[])).push(e));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=Ye?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<t.length;i++)if(n=t[i])for(let t=0;t<r.length;t++)r[t].eq(n,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ve(r,n):Ye}forChild(t,e){if(this==Ye)return this;if(e.isLeaf)return Ve.empty;let n,r;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(n=this.children[e+2]);break}let i=t+1,o=i+e.content.size;for(let t=0;t<this.local.length;t++){let e=this.local[t];if(e.from<o&&e.to>i&&e.type instanceof He){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let t=new Ve(r.sort(Je),Ze);return n?new We([t,n]):t}return n||Ye}eq(t){if(this==t)return!0;if(!(t instanceof Ve)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Qe(this.localsInner(t))}localsInner(t){if(this==Ye)return Ze;if(t.inlineContent||!this.local.some(He.is))return this.local;let e=[];for(let t=0;t<this.local.length;t++)this.local[t].type instanceof He||e.push(this.local[t]);return e}forEachSet(t){t(this)}}Ve.empty=new Ve([],[]),Ve.removeOverlap=Qe;const Ye=Ve.empty;class We{constructor(t){this.members=t}map(t,e){const n=this.members.map((n=>n.map(t,e,Fe)));return We.from(n)}forChild(t,e){if(e.isLeaf)return Ve.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(t,e);i!=Ye&&(i instanceof We?n=n.concat(i.members):n.push(i))}return We.from(n)}eq(t){if(!(t instanceof We)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(t);if(i.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<i.length;t++)e.push(i[t])}else e=i}return e?Qe(n?e:e.sort(Je)):Ze}static from(t){switch(t.length){case 0:return Ye;case 1:return t[0];default:return new We(t.every((t=>t instanceof Ve))?t:t.reduce(((t,e)=>t.concat(e instanceof Ve?e:e.members)),[]))}}forEachSet(t){for(let e=0;e<this.members.length;e++)this.members[e].forEachSet(t)}}function qe(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Ue(i.from+e,i.to+e,i.type))}return n}function Xe(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let e,o=0;o<t.length;o++)(e=t[o])&&e.from>n&&e.to<r&&((i||(i=[])).push(e),t[o]=null);return i}function Ge(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Ke(t,e,n,r){let i=[],o=!1;e.forEach(((e,s)=>{let a=Xe(t,e,s+n);if(a){o=!0;let t=Ke(a,e,n+s+1,r);t!=Ye&&i.push(s,s+e.nodeSize,t)}}));let s=qe(o?Ge(t):t,-n).sort(Je);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||(r.onRemove&&r.onRemove(s[t].spec),s.splice(t--,1));return s.length||i.length?new Ve(s,i):Ye}function Je(t,e){return t.from-e.from||t.to-e.to}function Qe(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),tn(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),tn(e,i+1,o.copy(r.to,o.to)))}}return e}function tn(t,e,n){for(;e<t.length&&Je(n,t[e])>0;)e++;t.splice(e,0,n)}function en(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Ye&&e.push(r)})),t.cursorWrapper&&e.push(Ve.create(t.state.doc,[t.cursorWrapper.deco])),We.from(e)}const nn={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rn=_&&k<=11;class on{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class sn{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new on,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);_&&k<=11&&t.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),rn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,nn)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Rt(this.view)){if(this.suppressingSelectionUpdates)return Bt(this.view);if(_&&k<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=a(e))n.add(e);for(let r=t.anchorNode;r;r=a(r))if(n.has(r)){e=r;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Rt(t)&&!this.ignoreSelectionChange(n),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],l);n&&(o=o<0?n.from:Math.min(n.from,o),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(C&&l.length){let e=l.filter((t=>"BR"==t.nodeName));if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;!e||"LI"!=e.nodeName||n&&dn(t,n)==e||r.remove()}}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Et(t))&&c.eq(r.Y1.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Bt(t),this.currentSelection.set(n),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(t){if(an.has(t))return;if(an.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)){if(t.requiresGeckoHackNode=C,ln)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ln=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Bt(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++){let r=t.addedNodes[n];e.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,i=t.nextSibling;if(_&&k<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:o}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(t.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==t.target?s(r)+1:0,a=n.localPosFromDOM(t.target,o,-1),l=i&&i.parentNode==t.target?s(i):t.target.childNodes.length;return{from:a,to:n.localPosFromDOM(t.target,l,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let an=new WeakMap,ln=!1;function cn(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return d(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function dn(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let e=t.docView.nearestDesc(n,!0);if(e&&e.node.isBlock)return n}return null}function pn(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(O&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||O&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const hn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function un(t,e,n,o,s){let a=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Et(t,e);if(n&&!t.state.selection.eq(n)){if(S&&T&&13===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),a&&r.setMeta("composition",a),t.dispatch(r)}return}let l=t.state.doc.resolve(e),c=l.sharedDepth(n);e=l.before(c+1),n=t.state.doc.resolve(n).after(c+1);let d,p,h=t.state.selection,u=function(t,e,n){let r,{node:o,fromOffset:s,toOffset:a,from:l,to:c}=t.docView.parseRange(e,n),d=t.domSelectionRange(),p=d.anchorNode;if(p&&t.dom.contains(1==p.nodeType?p:p.parentNode)&&(r=[{node:p,offset:d.anchorOffset}],m(d)||r.push({node:d.focusNode,offset:d.focusOffset})),S&&8===t.input.lastKeyCode)for(let t=a;t>s;t--){let e=o.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){a=t;break}if(!n||n.size)break}let h=t.state.doc,u=t.someProp("domParser")||i.aw.fromSchema(t.state.schema),f=h.resolve(l),g=null,b=u.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:pn,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),g={anchor:t+l,head:e+l}}return{doc:b,sel:g,from:l,to:c}}(t,e,n),f=t.state.doc,b=f.slice(u.from,u.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(d=t.state.selection.to,p="end"):(d=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let y=function(t,e,n,r,i){let o=t.findDiffStart(e,n);if(null==o)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&t.size<e.size){let t=r<=o&&r>=s?o-r:0;o-=t,o&&o<e.size&&gn(e.textBetween(o-1,o+1))&&(o+=t?1:-1),a=o+(a-s),s=o}else if(a<o){let e=r<=o&&r>=a?o-r:0;o-=e,o&&o<t.size&&gn(t.textBetween(o-1,o+1))&&(o+=e?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(b.content,u.doc.content,u.from,d,p);if(y&&t.input.domChangeCount++,(M&&t.input.lastIOSEnter>Date.now()-225||T)&&s.some((t=>1==t.nodeType&&!hn.test(t.nodeName)))&&(!y||y.endA>=y.endB)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!y){if(!(o&&h instanceof r.Bs&&!h.empty&&h.$head.sameParent(h.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let e=fn(t,t.state.doc,u.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);a&&n.setMeta("composition",a),t.dispatch(n)}}return}y={start:h.from,endA:h.to,endB:h.to}}t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof r.Bs&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),_&&k<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&"  "==u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)&&(y.start--,y.endA--,y.endB--);let A,w=u.doc.resolveNoCache(y.start-u.from),v=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),C=w.sameParent(v)&&w.parent.inlineContent&&x.end()>=y.endA;if((M&&t.input.lastIOSEnter>Date.now()-225&&(!C||s.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!C&&w.pos<u.doc.content.size&&(!w.sameParent(v)||!w.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(w.pos,v.pos,"",""))&&(A=r.Y1.findFrom(u.doc.resolve(w.pos+1),1,!0))&&A.head>w.pos)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>y.start&&function(t,e,n,r,i){if(n-e<=i.pos-r.pos||mn(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let t=o.nodeAfter;return null!=t&&n==e+t.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(mn(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||mn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(f,y.start,y.endA,w,v)&&t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return void(T&&S&&t.domObserver.suppressSelectionUpdates());S&&y.endB==y.start&&(t.input.lastChromeDelete=Date.now()),T&&!C&&w.start()!=v.start()&&0==v.parentOffset&&w.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,v=u.doc.resolveNoCache(y.endB-u.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,g(13,"Enter"))}))}),20));let E,B,O,I=y.start,$=y.endA;if(C)if(w.pos==v.pos)_&&k<=11&&0==w.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>Bt(t)),20)),E=t.state.tr.delete(I,$),B=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(O=function(t,e){let n,r,o,s=t.firstChild.marks,a=e.firstChild.marks,l=s,c=a;for(let t=0;t<a.length;t++)l=a[t].removeFromSet(l);for(let t=0;t<s.length;t++)c=s[t].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=t=>t.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=t=>t.mark(r.removeFromSet(t.marks))}let d=[];for(let t=0;t<e.childCount;t++)d.push(o(e.child(t)));if(i.HY.from(d).eq(t))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,v.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))E=t.state.tr,"add"==O.type?E.addMark(I,$,O.mark):E.removeMark(I,$,O.mark);else if(w.parent.child(w.index()).isText&&w.index()==v.index()-(v.textOffset?0:1)){let e=w.parent.textBetween(w.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,I,$,e))))return;E=t.state.tr.insertText(e,I,$)}if(E||(E=t.state.tr.replace(I,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let e=fn(t,E.doc,u.sel);e&&!(S&&t.composing&&e.empty&&(y.start!=y.endB||t.input.lastChromeDelete<Date.now()-100)&&(e.head==I||e.head==E.mapping.map($)-1)||_&&e.empty&&e.head==I)&&E.setSelection(e)}B&&E.ensureMarks(B),a&&E.setMeta("composition",a),t.dispatch(E.scrollIntoView())}function fn(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Nt(t,e.resolve(n.anchor),e.resolve(n.head))}function mn(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,i++}return i}function gn(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class bn{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new he,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(xn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=wn(this),An(this),this.nodeViews=vn(this),this.docView=dt(this.state.doc,yn(this),en(this),this.dom,this),this.domObserver=new sn(this,((t,e,n,r)=>un(this,t,e,n,r))),this.domObserver.start(),function(t){for(let e in ce){let n=ce[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!ge(t,e)||me(t,e)||!t.editable&&e.type in de||n(t,e)},pe[e]?{passive:!0}:void 0)}O&&t.dom.addEventListener("input",(()=>null)),fe(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&fe(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(xn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,i=!1,o=!1;t.storedMarks&&this.composing&&(Oe(this),o=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=vn(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,i=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&fe(this),this.editable=wn(this),An(this);let a=en(this),l=yn(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",p=i||!this.docView.matchesNode(t.doc,l,a);!p&&t.selection.eq(r.selection)||(o=!0);let h="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(o,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:H(t.dom)}}(this);if(o){this.domObserver.stop();let e=p&&(_||S)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(r.selection,t.selection);if(p){let n=S?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Me(this)),!i&&this.docView.update(t.doc,l,a,this)||(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=dt(t.doc,l,a,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return d(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Bt(this,e):(Tt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():h&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;j(n,0==r?0:r-e)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(1==t.nodeType?t:t.parentNode))if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof r.qv){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&z(this,e.getBoundingClientRect(),t)}else z(this,this.coordsAtPos(this.state.selection.head,1),t);else;}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}updateDraggedNode(t,e){let n=t.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let t=n.from+(this.state.doc.content.size-e.doc.content.size);(t>0&&this.state.doc.nodeAt(t))==n.node&&(i=t)}this.dragging=new Ne(t.slice,t.move,i<0?void 0:r.qv.create(this.state.doc,i))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[t];if(null!=i&&(n=e?e(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[t];if(null!=o&&(n=e?e(o):o))return n}}hasFocus(){if(_){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(U)return t.focus(U);let e=H(t);t.focus(null==U?{get preventScroll(){return U={preventScroll:!0},!0}}:void 0),U||(U=!1,j(e,0))}(this.dom),Bt(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return Y(this,t)}coordsAtPos(t,e=1){return G(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return it(this,e||this.state,t)}pasteHTML(t,e){return Te(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Te(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return Kt(this,t)}destroy(){this.docView&&(!function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],en(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,l=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){me(t,e)||!ce[e.type]||!t.editable&&e.type in de||ce[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?O&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return cn(t,n)}let n;function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?cn(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function yn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),e.translate||(e.translate="no"),[Ue.node(0,t.state.doc.content.size,e)]}function An(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ue.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function wn(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function vn(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function xn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},77898:(t,e,n)=>{"use strict";n.d(e,{fl:()=>C,iv:()=>l,Ts:()=>x,Qu:()=>_});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),i=r.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=n.cssText,t.appendChild(e)}},d=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:p,defineProperty:h,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,b=globalThis,y=b.trustedTypes,A=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,v=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},_=(t,e)=>!p(t,e),k={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&h(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??k}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:x).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??_)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[v("elementProperties")]=new Map,C[v("finalized")]=new Map,w?.({ReactiveElement:C}),(b.reactiveElementVersions??=[]).push("2.1.1")},14232:(t,e,n)=>{"use strict";n.d(e,{OR:()=>o,_Y:()=>a,fk:()=>l,hl:()=>d,i9:()=>p,ws:()=>h});var r=n(33692);const{I:i}=r.Al,o=t=>void 0===t.strings,s=()=>document.createComment(""),a=(t,e,n)=>{const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=r.insertBefore(s(),o),a=r.insertBefore(s(),o);n=new i(e,a,t,t.options)}else{const e=n._$AB.nextSibling,i=n._$AM,s=i!==t;if(s){let e;n._$AQ?.(t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==i._$AU&&n._$AP(e)}if(e!==o||s){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return n},l=(t,e,n=t)=>(t._$AI(e,n),t),c={},d=(t,e=c)=>t._$AH=e,p=t=>t._$AH,h=t=>{t._$AR(),t._$AA.remove()}},50875:(t,e,n)=>{"use strict";n.d(e,{XM:()=>i,Xe:()=>o,pX:()=>r});const r={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=t=>(...e)=>({_$litDirective$:t,values:e});class o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},33692:(t,e,n)=>{"use strict";n.d(e,{Al:()=>H,Jb:()=>C,Ld:()=>E,dy:()=>k,sY:()=>U});const r=globalThis,i=r.trustedTypes,o=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+a,c=`<${l}>`,d=document,p=()=>d.createComment(""),h=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,f=t=>u(t)||"function"==typeof t?.[Symbol.iterator],m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,y=/>/g,A=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,v=/"/g,x=/^(?:script|style|textarea|title)$/i,_=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),k=_(1),C=(_(2),_(3),Symbol.for("lit-noChange")),E=Symbol.for("lit-nothing"),S=new WeakMap,B=d.createTreeWalker(d,129);function O(t,e){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(e):e}const M=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",l=g;for(let e=0;e<n;e++){const n=t[e];let d,p,h=-1,u=0;for(;u<n.length&&(l.lastIndex=u,p=l.exec(n),null!==p);)u=l.lastIndex,l===g?"!--"===p[1]?l=b:void 0!==p[1]?l=y:void 0!==p[2]?(x.test(p[2])&&(i=RegExp("</"+p[2],"g")),l=A):void 0!==p[3]&&(l=A):l===A?">"===p[0]?(l=i??g,h=-1):void 0===p[1]?h=-2:(h=l.lastIndex-p[2].length,d=p[1],l=void 0===p[3]?A:'"'===p[3]?v:w):l===v||l===w?l=A:l===b||l===y?l=g:(l=A,i=void 0);const f=l===A&&t[e+1].startsWith("/>")?" ":"";o+=l===g?n+c:h>=0?(r.push(d),n.slice(0,h)+s+n.slice(h)+a+f):n+a+(-2===h?e:f)}return[O(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class I{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,c=0;const d=t.length-1,h=this.parts,[u,f]=M(t,e);if(this.el=I.createElement(u,n),B.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=B.nextNode())&&h.length<d;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(s)){const e=f[c++],n=r.getAttribute(t).split(a),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:o,name:i[2],strings:n,ctor:"."===i[1]?R:"?"===i[1]?P:"@"===i[1]?D:N}),r.removeAttribute(t)}else t.startsWith(a)&&(h.push({type:6,index:o}),r.removeAttribute(t));if(x.test(r.tagName)){const t=r.textContent.split(a),e=t.length-1;if(e>0){r.textContent=i?i.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],p()),B.nextNode(),h.push({type:2,index:++o});r.append(t[e],p())}}}else if(8===r.nodeType)if(r.data===l)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(a,t+1));)h.push({type:7,index:o}),t+=a.length-1}o++}}static createElement(t,e){const n=d.createElement("template");return n.innerHTML=t,n}}function $(t,e,n=t,r){if(e===C)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=h(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=$(t,i._$AS(t,e.values),i,r)),e}class T{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??d).importNode(e,!0);B.currentNode=r;let i=B.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new L(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new z(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=B.nextNode(),o++)}return B.currentNode=d,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class L{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$(this,t,e),h(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==C&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):f(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&h(this._$AH)?this._$AA.nextSibling.data=t:this.T(d.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=I.createElement(O(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new T(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=S.get(t.strings);return void 0===e&&S.set(t.strings,e=new I(t)),e}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new L(this.O(p()),this.O(p()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=E}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=$(this,t,e,0),o=!h(t)||t!==this._$AH&&t!==C,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=$(this,r[n+s],e,s),a===C&&(a=this._$AH[s]),o||=!h(a)||a!==this._$AH[s],a===E?t=E:t!==E&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class R extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class P extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class D extends N{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=$(this,t,e,0)??E)===C)return;const n=this._$AH,r=t===E&&n!==E||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==E&&(n===E||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){$(this,t)}}const H={M:s,P:a,A:l,C:1,L:M,R:T,D:f,V:$,I:L,H:N,N:P,U:D,B:R,F:z},j=r.litHtmlPolyfillSupport;j?.(I,L),(r.litHtmlVersions??=[]).push("3.3.1");const U=(t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new L(e.insertBefore(p(),t),t,void 0,n??{})}return i._$AI(t),i}},27338:(t,e,n)=>{"use strict";n.d(e,{V:()=>u,i:()=>g});var r=n(33692),i=n(14232),o=n(50875);const s=(t,e)=>{const n=t._$AN;if(void 0===n)return!1;for(const t of n)t._$AO?.(e,!1),s(t,e);return!0},a=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===n?.size)},l=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),p(e)}};function c(t){void 0!==this._$AN?(a(this),this._$AM=t,l(this)):this._$AM=t}function d(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)s(r[t],!1),a(r[t]);else null!=r&&(s(r,!1),a(r));else s(this,t)}const p=t=>{t.type==o.pX.CHILD&&(t._$AP??=d,t._$AQ??=c)};class h extends o.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),l(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(s(this,t),a(this))}setValue(t){if((0,i.OR)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const u=()=>new f;class f{}const m=new WeakMap,g=(0,o.XM)(class extends h{render(t){return r.Ld}update(t,[e]){const n=e!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),r.Ld}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let n=m.get(e);void 0===n&&(n=new WeakMap,m.set(e,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},38036:(t,e,n)=>{"use strict";n.d(e,{r:()=>a});var r=n(33692),i=n(50875),o=n(14232);const s=(t,e,n)=>{const r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},a=(0,i.XM)(class extends i.Xe{constructor(t){if(super(t),t.type!==i.pX.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);const i=[],o=[];let s=0;for(const e of t)i[s]=r?r(e,s):s,o[s]=n(e,s),s++;return{values:o,keys:i}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,i]){const a=(0,o.i9)(t),{values:l,keys:c}=this.dt(e,n,i);if(!Array.isArray(a))return this.ut=c,l;const d=this.ut??=[],p=[];let h,u,f=0,m=a.length-1,g=0,b=l.length-1;for(;f<=m&&g<=b;)if(null===a[f])f++;else if(null===a[m])m--;else if(d[f]===c[g])p[g]=(0,o.fk)(a[f],l[g]),f++,g++;else if(d[m]===c[b])p[b]=(0,o.fk)(a[m],l[b]),m--,b--;else if(d[f]===c[b])p[b]=(0,o.fk)(a[f],l[b]),(0,o._Y)(t,p[b+1],a[f]),f++,b--;else if(d[m]===c[g])p[g]=(0,o.fk)(a[m],l[g]),(0,o._Y)(t,a[f],a[m]),m--,g++;else if(void 0===h&&(h=s(c,g,b),u=s(d,f,m)),h.has(d[f]))if(h.has(d[m])){const e=u.get(c[g]),n=void 0!==e?a[e]:null;if(null===n){const e=(0,o._Y)(t,a[f]);(0,o.fk)(e,l[g]),p[g]=e}else p[g]=(0,o.fk)(n,l[g]),(0,o._Y)(t,a[f],n),a[e]=null;g++}else(0,o.ws)(a[m]),m--;else(0,o.ws)(a[f]),f++;for(;g<=b;){const e=(0,o._Y)(t,p[b+1]);(0,o.fk)(e,l[g]),p[g++]=e}for(;f<=m;){const t=a[f++];null!==t&&(0,o.ws)(t)}return this.ut=c,(0,o.hl)(t,p),r.Jb}})},21293:(t,e,n)=>{"use strict";n.d(e,{oi:()=>s,iv:()=>r.iv,dy:()=>i.dy,sY:()=>i.sY});var r=n(77898),i=n(33692);const o=globalThis;class s extends r.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,i.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i.Jb}}s._$litElement$=!0,s.finalized=!0,o.litElementHydrateSupport?.({LitElement:s});const a=o.litElementPolyfillSupport;a?.({LitElement:s});(o.litElementVersions??=[]).push("4.2.1")},62623:(t,e,n)=>{"use strict";n.d(e,{oi:()=>ht,iv:()=>l,dy:()=>W,YP:()=>q});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),i=r.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=n.cssText,t.appendChild(e)}},d=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:p,defineProperty:h,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,b=globalThis,y=b.trustedTypes,A=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,v=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},_=(t,e)=>!p(t,e),k={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&h(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??k}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:x).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??_)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[v("elementProperties")]=new Map,C[v("finalized")]=new Map,w?.({ReactiveElement:C}),(b.reactiveElementVersions??=[]).push("2.1.1");const E=globalThis,S=E.trustedTypes,B=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,O="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,I="?"+M,$=`<${I}>`,T=document,L=()=>T.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,P=t=>R(t)||"function"==typeof t?.[Symbol.iterator],D="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,j=/>/g,U=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,F=/"/g,V=/^(?:script|style|textarea|title)$/i,Y=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),W=Y(1),q=Y(2),X=(Y(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),K=new WeakMap,J=T.createTreeWalker(T,129);function Q(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==B?B.createHTML(e):e}const tt=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=z;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===z?"!--"===l[1]?s=H:void 0!==l[1]?s=j:void 0!==l[2]?(V.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=U):void 0!==l[3]&&(s=U):s===U?">"===l[0]?(s=i??z,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?U:'"'===l[3]?F:Z):s===F||s===Z?s=U:s===H||s===j?s=z:(s=U,i=void 0);const p=s===U&&t[e+1].startsWith("/>")?" ":"";o+=s===z?n+$:c>=0?(r.push(a),n.slice(0,c)+O+n.slice(c)+M+p):n+M+(-2===c?e:p)}return[Q(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class et{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=tt(t,e);if(this.el=et.createElement(l,n),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=J.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(O)){const e=c[o++],n=r.getAttribute(t).split(M),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?st:"?"===s[1]?at:"@"===s[1]?lt:ot}),r.removeAttribute(t)}else t.startsWith(M)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(V.test(r.tagName)){const t=r.textContent.split(M),e=t.length-1;if(e>0){r.textContent=S?S.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],L()),J.nextNode(),a.push({type:2,index:++i});r.append(t[e],L())}}}else if(8===r.nodeType)if(r.data===I)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(M,t+1));)a.push({type:7,index:i}),t+=M.length-1}i++}}static createElement(t,e){const n=T.createElement("template");return n.innerHTML=t,n}}function nt(t,e,n=t,r){if(e===X)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=N(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=nt(t,i._$AS(t,e.values),i,r)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);J.currentNode=r;let i=J.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new it(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new ct(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=J.nextNode(),o++)}return J.currentNode=T,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),N(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):P(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=et.createElement(Q(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new rt(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new it(this.O(L()),this.O(L()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=nt(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==X,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=nt(this,r[n+s],e,s),a===X&&(a=this._$AH[s]),o||=!N(a)||a!==this._$AH[s],a===G?t=G:t!==G&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class st extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class at extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class lt extends ot{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??G)===X)return;const n=this._$AH,r=t===G&&n!==G||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==G&&(n===G||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const dt=E.litHtmlPolyfillSupport;dt?.(et,it),(E.litHtmlVersions??=[]).push("3.3.1");const pt=globalThis;class ht extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new it(e.insertBefore(L(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}ht._$litElement$=!0,ht.finalized=!0,pt.litElementHydrateSupport?.({LitElement:ht});const ut=pt.litElementPolyfillSupport;ut?.({LitElement:ht});(pt.litElementVersions??=[]).push("4.2.1")},84735:t=>{"use strict";t.exports={version:"1.0.34"}},4147:t=>{"use strict";t.exports={i8:"3.0.78"}}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var o={};t=t||[null,e({}),e([]),e(e)];for(var a=2&r&&n;"object"==typeof a&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((t=>o[t]=()=>n[t]));return o.default=()=>n,s.d(i,o),i},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+".creaditor.bundle.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="Creaditor:",s.l=(t,e,i,o)=>{if(n[t])n[t].push(e);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+i){a=p;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+i),a.src=t),n[t]=[e];var h=(e,r)=>{a.onerror=a.onload=null,clearTimeout(u);var i=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),e)return e(r)},u=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={4826:0};s.f.j=(e,n)=>{var r=s.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=t[e]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[o,a,l]=n,c=0;if(o.some((e=>0!==t[e]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)l(s)}for(e&&e(n);c<o.length;c++)i=o[c],s.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),s.nc=void 0;var a={};return(()=>{"use strict";s.r(a);var t=s(56666);const e={primary:"linear-gradient(319deg, #663dff 0%, #aa00ff 37%, #cc4499 100%)",primaryText:"#fff",bgPrimary:"#d7e4fe",secondary:"#A93C80",topNavbar:"#484554",breadcrumbs:"#424656",resizer:"#d7e4fe",alpha:"rgb(244, 250, 254)",backColor:"#f4f5f7",disabled:"#cdd1db",iconColor:"#586387",fontFamily:"Arial, Helvetica, sans-serif",direction:"rtl",textAlign:"right",justifyContent:"flex-start",rowDirection:"row-reverse"},n=t=>{if(t)for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];e[n]&&(e[n]=r)}const n=`\n #input-iframe--v1,:root {\n --radius: 20px;\n --sm-radius: .25rem;\n --secondary: #0a0a0a;\n --breadcrumbs:${e.breadcrumbs};\n --top-navbar:${e.topNavbar};\n --dark:${e.topNavbar};\n --sidebar-color:${e.primary};\n --sidebar-icon-color:#fff;\n --primary: ${e.primary};\n --primaryText:${e.primaryText};\n --primary-text:${e.primaryText};\n --resizer-color:${e.resizer};\n --alpha:${e.alpha};\n --micro-info-color:#7d7d7d;\n --bgPrimary:${e.bgPrimary};\n --secondary: ${e.secondary};\n --disabled:${e.disabled};\n --icon-color:${e.iconColor};\n --error-color: rgba(165, 16, 16, 0.877); \n --input-border-color: #9EADBD;\n --font-family: ${e.fontFamily};\n --cdtr-font-family: ${e.fontFamily};\n --layout-holder-color: ${e.backColor};\n --justify-content:${e.justifyContent};\n --row-direction:${e.rowDirection};\n --medium-box-shadow: 0 2px 10px 0 rgb(0 6 36 / 20%);\n --section-padding: 10px;\n --add-padding-row:25px 0 25px 0;\n --section-padding-top: 6px;\n --section-padding-bottom: 6px;\n --margin-top:1rem;\n --divider-color: #00000026;\n --focus-shadow: 0 0 0 0.15rem rgb(13 110 253 / 10%);\n --text-align-locale:${e.textAlign};\n --direction-locale:${e.direction};\n --direction:${e.direction};\n --section-hover: #f0f0f048;\n --spacing-sm: .1rem;\n --paper-font-subhead_-_font-size:13px;\n --editor-font-size:13px;\n --paper-item-min-height:30px;\n --alert: rgb(235, 48, 48);\n --section-height: 80px;\n --section: #fff;\n --element-border-color: rgba(0, 0, 0, 0.116);\n --editor-input-height: 30px;\n --title-block-height: 50px;\n --text-dark-color:#00000;\n }`,r=document.createElement("style");return r.id="theme-provider-vars",r.innerHTML=n,{theme:e,styleTag:r}};var r=s(40949),i=s(46062),o=s.n(i),l=s(32877),c=s.n(l),d=s(96793),p=s.n(d),h=s(17892),u=s.n(h),f=s(11173),m=s.n(f),g=s(67444),b={};b.setAttributes=u(),b.insert=p().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=m();o()(g.Z,b);const y=g.Z&&g.Z.locals?g.Z.locals:void 0;var A=s(7896),w=s(65283),v={};v.setAttributes=u(),v.insert=p().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=m();o()(w.Z,v);const x=w.Z&&w.Z.locals?w.Z.locals:void 0;var _=s(4147),k=s(35965);console.log("--\x3e Beta version",_.i8,"🚀");const C=t=>(0,r.Z)("div",{style:t.style,className:(0,k.Z)(x.root)},(0,r.Z)("cdtr-row",{alignItems:"center"},(0,r.Z)("cdtr-col",null,(0,r.Z)("cdtr-row",{style:{height:"35px",width:"150px",margin:"auto"},alignItems:"center",justify:"center"},(0,r.Z)("span",{style:{fontFamily:"var(--font-family)",fontSize:"13px"}},"Powered by"),(0,r.Z)("svg",{className:x.logo,width:"100",height:"34",viewBox:"0 0 152 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.Z)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.96 6.48749C13.7333 6.48749 15.5 6.99999 17 7.99999C18.381 9.11888 18.4975 9.4202 19.1214 11.0336C19.2293 11.3128 19.3525 11.6312 19.5 12L16.5 13.6125C16.5 11.8125 15.2287 11 13.6703 10.3125C12.6503 9.86249 11.8267 9.71249 10.52 9.71249C9.24 9.71249 8.21333 9.91249 7.44 10.3125C6.69333 10.6875 6.09333 11.1875 5.64 11.8125C5.21333 12.4375 4.88 13.275 4.64 14.325C4.26667 15.95 4.08 18.275 4.08 21.3C4.08 24.325 4.69333 26.6 5.92 28.125C6.28089 28.5737 6.69603 29.0505 7.16591 29.5H1.96534C1.64569 28.9808 1.36391 28.41 1.12 27.7875C0.373332 25.7875 0 23.5625 0 21.1125C0 18.6375 0.199999 16.6125 0.599999 15.0375C0.999999 13.4375 1.61333 11.9875 2.44 10.6875C3.29333 9.3625 4.44 8.33749 5.88 7.61249C7.34667 6.86249 9.04 6.48749 10.96 6.48749ZM2.68031 30.5C2.78393 30.6248 2.8905 30.7457 3 30.8625C3.77333 31.6625 4.82667 32.325 6.16 32.85C7.49333 33.375 9.06667 33.6375 10.88 33.6375C13.5733 33.6375 17.5 32.5 18 31.5V30.5L17.1236 30.5C17.0524 31.7047 13.7937 31.581 12.1668 31.5193C11.8889 31.5087 11.6586 31.5 11.5 31.5C10.3251 31.5 9.29305 31.0914 8.40174 30.5H2.68031ZM22.8797 30.5V33.1875H26.4797V30.5H22.8797ZM37.7715 30.5C39.1799 32.5917 41.4724 33.6375 44.6491 33.6375C46.3821 33.6375 48.2093 32.5077 49.9727 31.4175C50.4886 31.0985 50.999 30.7829 51.5 30.5L48.1897 30.5C47.9175 30.6241 47.5455 30.7818 47 31C44.717 31.9132 43.2679 31.1585 42.272 30.6399C42.1774 30.5906 42.0868 30.5434 42 30.5L37.7715 30.5ZM40.8521 29.5H37.2031C36.4604 27.9434 36.0891 25.9476 36.0891 23.5125C36.0891 20.3125 36.8357 17.775 38.3291 15.9C39.8491 14 42.0891 13.05 45.0491 13.05C47.3424 13.05 49.0357 13.7 50.1291 15C51.0357 16.05 51.5957 17.8125 51.8091 20.2875C51.8393 20.6553 51.8738 20.9181 51.9052 21.1565C51.957 21.5501 52 21.8772 52 22.5L51 23C49 24 40 24 40 24L39.9291 24.15C39.9291 26.4443 40.0799 28.3274 40.8521 29.5ZM50.0767 29.5H50.285L50.2091 29.4375C50.1632 29.459 50.1191 29.4798 50.0767 29.5ZM55.0663 30.5C55.7825 32.5916 57.5693 33.6375 60.4269 33.6375C63.0135 33.6375 65.0402 32.7 66.5069 30.825H66.6269C66.6706 30.948 66.6869 31.1327 66.7054 31.3434C66.7661 32.0325 66.8514 33 68 33C68.951 33 70.3038 32.799 71.2942 32.6519C71.866 32.567 72.317 32.5 72.5 32.5L73 31C71.2357 31.196 70.3302 30.9636 69.8813 30.5H62.8616C62.3984 30.5917 61.9068 30.6375 61.3869 30.6375C60.9108 30.6375 60.4946 30.5917 60.1383 30.5H55.0663ZM58.7645 29.5H54.8182C54.744 29.0529 54.7069 28.5696 54.7069 28.05C54.7069 24.75 57.1869 22.7625 62.1469 22.0875L65.9869 21.5625V19.4625C65.9869 17.1875 64.8802 16.05 62.6669 16.05C61.2535 16.05 59.3469 16.4 56.9469 17.1L55.6669 14.7375C57.9602 13.6125 60.4402 13.05 63.1069 13.05C66.3335 13.05 68.3069 13.95 69.0269 15.75C69.4002 16.675 69.5869 17.9 69.5869 19.425V27.4125C69.5869 27.7069 69.5578 28.0143 69.5289 28.3204C69.4904 28.7271 69.4522 29.1315 69.4826 29.5H65.1695C65.4609 29.2847 65.7333 29.0389 65.9869 28.7625V23.475C62.6669 23.2875 59.7733 24.425 59 25C58.3673 25.4784 58.4377 26.5352 58.5055 27.554C58.5263 27.8663 58.5469 28.1751 58.5469 28.4625C58.5469 28.8639 58.6194 29.2097 58.7645 29.5ZM75.9477 30.5C76.145 30.8458 76.364 31.1542 76.6047 31.425C77.938 32.9 79.7247 33.6375 81.9647 33.6375C84.2047 33.6375 86.4 32.7 88 31L88.5 33.5H91L90.9605 30.5H87.1153C86.8289 30.6362 86.427 30.734 85.7677 30.825C85.6033 30.8477 85.4543 30.8689 85.317 30.8885C84.3954 31.0197 83.9994 31.0761 83 31C82.0531 30.9278 81.4134 30.7549 80.9312 30.5H75.9477ZM79.801 29.5H75.4774C74.8956 27.9934 74.6047 25.9851 74.6047 23.475C74.6047 21.925 74.7914 20.525 75.1647 19.275C75.538 18.025 76.018 17.025 76.6047 16.275C77.1914 15.525 77.8714 14.9 78.6447 14.4C80.0047 13.5 81.5247 13.05 83.2047 13.05C84.8847 13.05 86.258 13.45 87.3247 14.25C87.3514 14.25 87.3914 14.2375 87.4447 14.2125L87.3247 13.2375L87.4447 3.49999L91.2447 -6.67572e-06L90.9247 27.7875L90.9473 29.5H87.7092L87.3247 17.1C86.2847 16.4 85.0314 16.05 83.5647 16.05C82.8447 16.05 82.2314 16.1375 81.7247 16.3125C81.218 16.4625 80.698 16.7625 80.1647 17.2125C79.018 18.1875 78.4447 20.175 78.4447 23.175C78.4447 26.15 78.8047 28.1375 79.5247 29.1375C79.6186 29.2633 79.7095 29.3843 79.801 29.5ZM106.671 30.5C106.821 31.0036 107.003 31.4369 107.216 31.8C107.936 33.025 109.469 33.6375 111.816 33.6375C112.509 33.6375 113.283 33.5125 114.136 33.2625C114.989 33.0125 116.18 32.3 116.5 32V30.5H116.223C115.284 30.7497 113.144 31 112.5 31C111.8 31 111.306 30.802 110.942 30.5H106.671ZM110.219 29.5H106.431C106.234 28.4603 106.136 27.202 106.136 25.725V16.35H102.696L103 14.4L108 8.43749H109.736V13.5H115.456L114.5 16.425L109.736 16.35V25.5C109.736 27.3786 109.897 28.7119 110.219 29.5ZM119.683 30.5C120.217 31.4497 120.988 32.1956 122 32.7375C123.147 33.3375 124.547 33.6375 126.2 33.6375C127.88 33.6375 129.334 33.35 130.56 32.775C131.777 32.2169 132.73 31.4586 133.418 30.5H129.855C129.407 30.8934 127.647 31.425 127 31.425C125.969 31.425 124.668 31.0651 123.903 30.5H119.683ZM123.257 29.5H119.211C118.484 27.7297 118.12 25.6089 118.12 23.1375C118.12 20.4375 118.787 18.1375 120.12 16.2375C120.814 15.2625 121.774 14.4875 123 13.9125C124.254 13.3375 125.707 13.05 127.36 13.05C129.04 13.05 130.44 13.35 131.56 13.95C132.707 14.55 133.547 15.3875 134.08 16.4625C135.014 18.3875 135.48 20.75 135.48 23.55C135.48 25.8266 135.007 27.8099 134.058 29.5H130.366C130.408 29.3841 130.459 29.2633 130.56 29.1375C130.88 28.7125 131.12 28.125 131.28 27.375C131.52 26.25 131.64 25.0375 131.64 23.7375C131.64 22.4375 131.614 21.4875 131.56 20.8875C131.507 20.2625 131.374 19.625 131.16 18.975C130.974 18.325 130.694 17.8 130.32 17.4C129.974 17 129.494 16.675 128.88 16.425C128.267 16.175 127.52 16.05 126.64 16.05C125.787 16.05 125.054 16.2 124.44 16.5C123.827 16.8 123.36 17.1625 123.04 17.5875C122.72 17.9875 122.48 18.5625 122.32 19.3125C122.08 20.4375 121.96 21.65 121.96 22.95C121.96 24.25 121.987 25.2125 122.04 25.8375C122.094 26.4375 122.214 27.0625 122.4 27.7125C122.614 28.3625 122.907 28.8875 123.28 29.2875C123.263 29.3594 123.256 29.4303 123.257 29.5ZM140.497 30.5V33.1875H144.097V30.5H140.497ZM144.097 29.5H140.497V18.9L140.177 13.6875L143.097 13.3125L143.537 17.1H143.697C144.15 15.875 144.83 14.9 145.737 14.175C146.67 13.425 147.764 13.05 149.017 13.05C149.71 13.05 150.23 13.1125 150.577 13.2375C150.95 13.3375 151.257 13.425 151.497 13.5C151.737 13.55 151.884 13.5875 151.937 13.6125L151.297 16.9875C150.497 16.7375 149.537 16.6125 148.417 16.6125C147.324 16.6125 146.324 17.0625 145.417 17.9625C144.537 18.8375 144.097 19.9 144.097 21.15V29.5ZM26.4797 29.5H22.8797V18.9L22.5597 13.6875L25.4797 13.3125L25.9197 17.1H26.0797C26.533 15.875 27.213 14.9 28.1197 14.175C29.053 13.425 30.1464 13.05 31.3997 13.05C32.093 13.05 32.613 13.1125 32.9597 13.2375C33.333 13.3375 33.6397 13.425 33.8797 13.5C34.1197 13.55 34.2664 13.5875 34.3197 13.6125L33.6797 16.9875C32.8797 16.7375 31.9197 16.6125 30.7997 16.6125C29.7064 16.6125 28.7064 17.0625 27.7997 17.9625C26.9197 18.8375 26.4797 19.9 26.4797 21.15V29.5ZM47.5309 17.4397C47.503 17.388 47.4757 17.3373 47.4491 17.2875C47.0224 16.4625 46.0357 16.05 44.4891 16.05C42.9691 16.05 41.8891 16.5375 41.2491 17.5125C40.6091 18.4625 40.2091 19.7875 40.0491 21.4875L48.5 21.1125C48.5 19.237 47.951 18.2188 47.5309 17.4397Z",fill:"black"}),(0,r.Z)("path",{d:"M99 12.5H95V29.5H99V12.5Z",fill:"black"}),(0,r.Z)("path",{d:"M97 6.5L99 11.4456H95L97 6.5Z",fill:"#5c5ce0"}),(0,r.Z)("path",{d:"M99 30.5H95V33.5H99V30.5Z",fill:"#5c5ce0"}),(0,r.Z)("path",{d:"M99 12.125H95V13.0625H99V12.125Z",fill:"#5c5ce0"})),(0,r.Z)("span",{style:{background:"#5c5ce0"},className:x.dot})))));var E=s(93042),S={};S.setAttributes=u(),S.insert=p().bind(null,"head"),S.domAPI=c(),S.insertStyleElement=m();o()(E.Z,S);const B=E.Z&&E.Z.locals?E.Z.locals:void 0,O=globalThis,M=O.ShadowRoot&&(void 0===O.ShadyCSS||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),$=new WeakMap;class T{constructor(t,e,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(M&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=$.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&$.set(e,t))}return t}toString(){return this.cssText}}const L=M?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new T("string"==typeof t?t:t+"",void 0,I))(e)})(t):t,{is:N,defineProperty:R,getOwnPropertyDescriptor:P,getOwnPropertyNames:D,getOwnPropertySymbols:z,getPrototypeOf:H}=Object,j=globalThis,U=j.trustedTypes,Z=U?U.emptyScript:"",F=j.reactiveElementPolyfillSupport,V=(t,e)=>t,Y={toAttribute(t,e){switch(e){case Boolean:t=t?Z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},W=(t,e)=>!N(t,e),q={attribute:!0,type:String,converter:Y,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;class X extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=q){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&R(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=P(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??q}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;const t=H(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){const t=this.properties,e=[...D(t),...z(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(L(t))}else void 0!==t&&e.push(L(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(M)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),r=O.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:Y).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Y;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??W)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}X.elementStyles=[],X.shadowRootOptions={mode:"open"},X[V("elementProperties")]=new Map,X[V("finalized")]=new Map,F?.({ReactiveElement:X}),(j.reactiveElementVersions??=[]).push("2.1.1");const G=globalThis,K=G.trustedTypes,J=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,Q="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,et="?"+tt,nt=`<${et}>`,rt=document,it=()=>rt.createComment(""),ot=t=>null===t||"object"!=typeof t&&"function"!=typeof t,st=Array.isArray,at=t=>st(t)||"function"==typeof t?.[Symbol.iterator],lt="[ \t\n\f\r]",ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dt=/-->/g,pt=/>/g,ht=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,ft=/"/g,mt=/^(?:script|style|textarea|title)$/i,gt=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),bt=gt(1),yt=(gt(2),gt(3),Symbol.for("lit-noChange")),At=Symbol.for("lit-nothing"),wt=new WeakMap,vt=rt.createTreeWalker(rt,129);function xt(t,e){if(!st(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==J?J.createHTML(e):e}const _t=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=ct;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===ct?"!--"===l[1]?s=dt:void 0!==l[1]?s=pt:void 0!==l[2]?(mt.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=ht):void 0!==l[3]&&(s=ht):s===ht?">"===l[0]?(s=i??ct,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?ht:'"'===l[3]?ft:ut):s===ft||s===ut?s=ht:s===dt||s===pt?s=ct:(s=ht,i=void 0);const p=s===ht&&t[e+1].startsWith("/>")?" ":"";o+=s===ct?n+nt:c>=0?(r.push(a),n.slice(0,c)+Q+n.slice(c)+tt+p):n+tt+(-2===c?e:p)}return[xt(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class kt{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=_t(t,e);if(this.el=kt.createElement(l,n),vt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=vt.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Q)){const e=c[o++],n=r.getAttribute(t).split(tt),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?Ot:"?"===s[1]?Mt:"@"===s[1]?It:Bt}),r.removeAttribute(t)}else t.startsWith(tt)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(mt.test(r.tagName)){const t=r.textContent.split(tt),e=t.length-1;if(e>0){r.textContent=K?K.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],it()),vt.nextNode(),a.push({type:2,index:++i});r.append(t[e],it())}}}else if(8===r.nodeType)if(r.data===et)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(tt,t+1));)a.push({type:7,index:i}),t+=tt.length-1}i++}}static createElement(t,e){const n=rt.createElement("template");return n.innerHTML=t,n}}function Ct(t,e,n=t,r){if(e===yt)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=ot(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=Ct(t,i._$AS(t,e.values),i,r)),e}class Et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??rt).importNode(e,!0);vt.currentNode=r;let i=vt.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new St(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new $t(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=vt.nextNode(),o++)}return vt.currentNode=rt,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class St{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=At,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ct(this,t,e),ot(t)?t===At||null==t||""===t?(this._$AH!==At&&this._$AR(),this._$AH=At):t!==this._$AH&&t!==yt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):at(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==At&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(rt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=kt.createElement(xt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new Et(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=wt.get(t.strings);return void 0===e&&wt.set(t.strings,e=new kt(t)),e}k(t){st(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new St(this.O(it()),this.O(it()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Bt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=At,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=At}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=Ct(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==yt,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=Ct(this,r[n+s],e,s),a===yt&&(a=this._$AH[s]),o||=!ot(a)||a!==this._$AH[s],a===At?t=At:t!==At&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===At?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ot extends Bt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===At?void 0:t}}class Mt extends Bt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==At)}}class It extends Bt{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=Ct(this,t,e,0)??At)===yt)return;const n=this._$AH,r=t===At&&n!==At||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==At&&(n===At||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class $t{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Ct(this,t)}}const Tt={M:Q,P:tt,A:et,C:1,L:_t,R:Et,D:at,V:Ct,I:St,H:Bt,N:Mt,U:It,B:Ot,F:$t},Lt=G.litHtmlPolyfillSupport;Lt?.(kt,St),(G.litHtmlVersions??=[]).push("3.3.1");const Nt=globalThis;class Rt extends X{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new St(e.insertBefore(it(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return yt}}Rt._$litElement$=!0,Rt.finalized=!0,Nt.litElementHydrateSupport?.({LitElement:Rt});const Pt=Nt.litElementPolyfillSupport;Pt?.({LitElement:Rt});(Nt.litElementVersions??=[]).push("4.2.1");var Dt=s(61456),zt=s(62623),Ht=s(50629);class jt extends zt.oi{constructor(){super(),this.icon="add",this.width=24,this.height=24}render(){const t=Ht[this.icon]||"no icon";return zt.dy`<svg style="display: block; margin: auto;"
2050
+ </div>`,f),document.body.appendChild(f)}}},59320:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(56666);class i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;(0,r.Z)(this,"callback",void 0),(0,r.Z)(this,"timeout",void 0),(0,r.Z)(this,"delay",void 0),this.delay=t,this.run=this.run.bind(this)}run(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;this.callback=t,"number"==typeof e&&(this.delay=e),clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.callback()}),this.delay)}}},70143:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=t=>{if(!t||"string"!=typeof t)return;const e="$%^$%^";return 0===t.replace(/[^\P{L}a-z][^a-z]*/giu,e).indexOf(e)||(t=(t=t.replace(/[0-9]/g,"")).replace(/\n/g,""),new RegExp(/^[\u0590-\u05FF ,.,!,?,/,*,#,@,&,(,)'-]+$/i).test(t))}},1670:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});const r=JSON.parse('["ase","art","bmp","blp","cd5","cit","cpt","cr2","cut","dds","dib","djvu","egt","exif","gif","gpl","grf","icns","ico","iff","jng","jpeg","jpg","jfif","jp2","jps","lbm","max","miff","mng","msp","nef","nitf","ota","pbm","pc1","pc2","pc3","pcf","pcx","pdn","pgm","PI1","PI2","PI3","pict","pct","pnm","pns","ppm","psb","psd","pdd","psp","px","pxm","pxr","qfx","raw","rle","sct","sgi","rgb","int","bw","tga","tiff","tif","vtf","xbm","xcf","xpm","3dv","amf","ai","awg","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","gbr","odg","svg","stl","vrml","x3d","sxd","v2d","vnd","wmf","emf","art","xar","png","webp","jxr","hdp","wdp","cur","ecw","iff","lbm","liff","nrrd","pam","pcx","pgf","sgi","rgb","rgba","bw","int","inta","sid","ras","sun","tga","heic","heif"]');function i(t){const e=/(?:\.([^.]+))?$/.exec(t.toLowerCase())[1]||"",n=e.includes("&")?e.split("&")[0]:e;return-1!==r.findIndex((t=>t===n))}},21009:(t,e,n)=>{"use strict";n.d(e,{KL:()=>s,rZ:()=>o,v7:()=>a});var r=n(97278),i=n(66248);n(70235);const o=t=>{const e={id:t};return(0,i.v_)(`${r.W7.api_url+r._j.components}/getParent`,e)},s=(t,e,n)=>{const o={key:e,value:n};return(0,i.r$)(r.W7.api_url+r._j.components+`/${t}`,o)},a=(t,e)=>(0,i.ZJ)(r.W7.api_url+r._j.components+`/${t}`,{parentId:e})},43824:(t,e,n)=>{"use strict";n.d(e,{Pn:()=>o,TL:()=>i});n(97278),n(66248);var r=n(70235);async function i(t){let{cssRule:e,name:n,id:r,url:i}=t;if(!i){const t=(await o()).find((t=>t.id===r||t.cssRule===e||t.name===n));t&&(i=t.url)}if(!i)return null;if(!document.querySelector(`link[href="${i}"]`)){const t=document.createElement("link");t.href=i,t.rel="stylesheet",t.type="text/css",document.head.appendChild(t)}}const o=async()=>new Promise((t=>{const e=r.h.get("config","editor","configure","editorProps","fonts");e&&t(e)}))},27017:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var r=n(97278),i=n(70235),o=n(66248),s=n(4147);const a=t=>{const e=i.h.get("config")._id;return t.siteId=e,t.v=s.i8,console.log(t),(0,o.v_)(r.W7.api_url+r._j.log,t)}},36546:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});let r=function(t){return t.PATCH="PATCH",t.REMOVE="REMOVE",t.CLONE="CLONE",t.ADD="ADD",t.MOVE="MOVE",t.CREATE="CREATE",t}({})},81929:(t,e,n)=>{"use strict";n.d(e,{F:()=>d,Z:()=>c});var r=n(56666),i=n(64603),o=n(9571),s=n(70235);const a=n(96206),l=t=>{const e=typeof t;return Array.isArray(t)||"object"===e?JSON.parse(JSON.stringify(t)):t};const c=new class{constructor(){(0,r.Z)(this,"emitter",void 0),(0,r.Z)(this,"state",void 0),this.emitter=new i.Z,this.state={past:[],present:null,future:[]}}setHistory(t){t&&"object"==typeof t&&Array.isArray(t.past)&&Array.isArray(t.future)&&t.present&&(this.state=t,this.onAnyChange(),this.emitter.dispatch("ON_SNAPSHOT",this.dispatchValue(this.state.present)))}onAnyChange(){s.h.set({history:this.state})}hasRedo(){return this.state.future.length>0||"oldValue"===this.state.present?.currectValue}hasUndo(){return this.state.past.length>0||"newValue"===this.state.present?.currectValue}hasPresent(){return!!this.state.present}undo(){if(!this.hasUndo()&&!this.state.present)return;let t,e;"newValue"===this.state.present.currectValue?(t=this.state.present,e=l(this.state.present),this.state.present.currectValue="oldValue"):(t=this.state.past.pop(),t&&(this.state.future.unshift(this.state.present),this.state.present=t,e=l(this.state.present),this.state.present.currectValue="oldValue")),e&&(this.emitter.dispatch("ON_UNDO",this.dispatchValue(e)),this.onAnyChange())}redo(){if(!this.hasRedo()&&!this.state.present)return;let t,e;"oldValue"===this.state.present.currectValue?(t=this.state.present,e=l(this.state.present),this.state.present.currectValue="newValue"):(t=this.state.future.shift(),t&&(this.state.past.push(this.state.present),this.state.present=t,e=l(this.state.present),this.state.present.currectValue="newValue")),e&&(this.emitter.dispatch("ON_REDO",this.dispatchValue(e)),this.onAnyChange())}create(t){let e=[];this.state.present&&"newValue"===this.state.present.currectValue&&0===this.state.future.length?(this.state.present.currectValue="newValue",this.state.past.push(this.state.present),this.state.present=null):this.state.present&&"oldValue"===this.state.present.currectValue&&this.state.future.length>0&&(this.state.present=null),e=JSON.parse(JSON.stringify(this.state.future)),this.state.future=[];const n=a(t),r={id:(0,o.Z)(),stack:n.stack,options:n.options,created_at:Date.now(),currectValue:"newValue",deletedSteps:e};this.state.present=r,this.emitter.dispatch("ON_SNAPSHOT",this.dispatchValue(r)),this.onAnyChange()}dispatchValue(t){return{currectValue:t.currectValue,stack:t.stack,options:t.options,hasUndo:this.hasUndo(),hasRedo:this.hasRedo(),__state:this.state,pastLength:this.state.past.length+1,futureLength:this.state.future.length,deletedSteps:t.deletedSteps}}on(t,e){this.emitter.subscribe(t,e)}off(t,e){this.emitter.unSubscribe(t,e)}},d={ON_UNDO:"ON_UNDO",ON_REDO:"ON_REDO",ON_SNAPSHOT:"ON_SNAPSHOT"}},50939:(t,e,n)=>{"use strict";function r(t){return t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}n.d(e,{Z:()=>r})},52278:(t,e,n)=>{"use strict";n.d(e,{au:()=>c,b$:()=>a,io:()=>u});var r=n(76828),i=n(70235),o=n(9669),s=n.n(o);const a=t=>{const e=t,n=t.element.getBoundingClientRect(),r={id:e.id,_id:e.id,type:e.type,props:JSON.parse(JSON.stringify(e.props)),children:e.children,width:e.width,height:e.height,renderedHTML:null};return"function"==typeof e.getRenderedHTML&&(r.renderedHTML=e.getRenderedHTML({props:e.props})),n.width&&n.height?(r.width=n.width,r.height=n.height,r):(console.warn("The Editor is must be visible to get the correct width and height of the components"),r)},l=t=>Array.isArray(t)?t.filter((t=>"string"==typeof t||!(!t||!Array.isArray(t.children))&&(t.children=l(t.children),!0))):[],c=()=>{const t=i.h.get("components"),e=[];return t.forEach((t=>{const n=a(t);if(n&&Array.isArray(n.children)&&(n.children=l(n.children)),"root"===n.type){const t=i.h.get("config","editor","configure","editorProps","fonts"),e=Array.from(document.querySelectorAll("[data-cdtr-font-name]")).map((t=>t.getAttribute("data-cdtr-font-name"))),r=[...new Set(e)],o=[],s={};Array.isArray(t)&&r.forEach((e=>{const n=t.find((t=>t.cssRule===e));n&&!s[e]&&n&&(o.push(n),s[e]=!0)})),n.props.fonts=o}e.push(n)})),e.forEach((t=>{try{JSON.stringify(t)}catch(t){console.error("Error serializing component",t)}})),e};let d=!1,p=[];const h=async()=>{if(0===p.length)return void(d=!1);const{resolve:t,reject:e,components:n}=p[0];try{t((await s().post(`${r.W7.api_url.replace("v1","v2")}/render/newsletter/build`,{components:n})).data)}catch(t){e(t)}p.shift(),h()},u=async t=>{const e=c();return new Promise(((t,n)=>{p.push({resolve:t,reject:n,components:e}),d||(d=!0,h())}))}},47798:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=(t,e)=>{const n=document.head.querySelector(`script[src='${t}']`);if(n){const t=parseInt(n.dataset.requested)||1;return n.setAttribute("data-requested",String(t+1)),n.getAttribute("data-loaded"),void("function"==typeof e&&e())}const r=document.createElement("script");r.type="text/javascript",r.setAttribute("data-loaded","false"),r.async=!0,r.defer=!0,-1!==t.indexOf("?module")&&(r.type="module"),r.src=t,function(t){t.addEventListener("load",(()=>{t.setAttribute("data-loaded","true");const n=parseInt(t.dataset.requested)||0;t.setAttribute("data-requested",String(n+1)),"function"==typeof e&&e()}),{once:!0})}(r),r.addEventListener("error",(()=>{r.setAttribute("data-error","true")}),{once:!0}),document.getElementsByTagName("head")[0].appendChild(r)}},4164:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(56666);const i=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));const s=t=>t?t=(t=(t=t.replace(/^[^:]+:(?:\/\/)?/,"")).replace(/^\/+/,"")).split("?")[0]:"";class a{static getProtocol(t){if(!t)return"";if(-1!==t.indexOf("wa.me"))return"whatsapp:";const e=t.split(":");return e.length>1?e[0]:""}constructor(t,e){if((0,r.Z)(this,"protocol",""),(0,r.Z)(this,"href",""),(0,r.Z)(this,"fullHref",""),(0,r.Z)(this,"target","_self"),(0,r.Z)(this,"isEmail",!1),(0,r.Z)(this,"isPhone",!1),(0,r.Z)(this,"isAnchor",!1),(0,r.Z)(this,"url",""),(0,r.Z)(this,"isValid",!0),(0,r.Z)(this,"params",{}),"string"==typeof t?this.href=t:"object"==typeof t&&Object.assign(this,t),this.isValid=this.isValidUrl(this.href),e&&e.protocol?this.protocol=e.protocol:this.protocol=a.getProtocol(this.href),this.isEmail=i(s(this.href)),this.isPhone=o(s(this.href)),this.protocol||(this.isEmail&&(this.protocol="mailto:"),this.isPhone&&(this.protocol="tel:")),!this.protocol&&this.isValid&&(this.protocol="https:"),this.isAnchor=this.url.startsWith("#"),e&&e.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Invalid target: ${e.target}`);this.target=e.target}e&&e.params&&(this.params=e.params);const n=function(t){const e={},n=/([^&=]+)=?([^&]*)/g,r=t=>decodeURIComponent(t.replace(/\+/g," ")),i=t.indexOf("?");let o,s=-1!==i?t.substring(i+1):"";for(;null!==(o=n.exec(s));){const t=r(o[1]),n=r(o[2]);t&&(e[t]=n)}return e}(this.href);this.params={...this.params,...n},this.url=s(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":"),!this.protocol||"http:"!==this.protocol&&"https:"!==this.protocol?this.href=this.protocol+this.url:this.href=this.protocol+"//"+this.url,"whatsapp:"===this.protocol&&this.href.indexOf("wa.me"),this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t="",e=s(this.href);if(Object.keys(this.params).length>0){e+="?",t="?";for(const n in this.params){const r=this.params[n];r?(e+=`${n}=${r}&`,t+=`${n}=${r}&`):(e+=`${n}&`,t+=`${n}&`)}e=e.slice(0,-1)}if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return this.protocol+"//"+e;if("whatsapp:"===this.protocol){const n=this.extractPhoneFromTextUsingRegex(e);if(n.length>0)return"https://wa.me/"+n[0]+t;console.warn("No phone number found in the url")}return this.protocol+e}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map((t=>t[1]||t[0])).filter((t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15})).map((t=>t.trim()))))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}(0,r.Z)(a,"resetURL",s)},9571:(t,e,n)=>{"use strict";var r;n.d(e,{Z:()=>p});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(t){return"string"==typeof t&&s.test(t)};for(var l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));const d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[t[e+0]]+l[t[e+1]]+l[t[e+2]]+l[t[e+3]]+"-"+l[t[e+4]]+l[t[e+5]]+"-"+l[t[e+6]]+l[t[e+7]]+"-"+l[t[e+8]]+l[t[e+9]]+"-"+l[t[e+10]]+l[t[e+11]]+l[t[e+12]]+l[t[e+13]]+l[t[e+14]]+l[t[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};const p=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return d(r)}},85731:(t,e,n)=>{var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(99742)}catch(t){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,o=n(27755);function s(t,e){return e?new i(t,e):new i(t)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(t){Object.defineProperty(s,t,{get:function(){return i[t]}})})),t.exports={w3cwebsocket:i?s:null,version:o}},27755:(t,e,n)=>{t.exports=n(84735).version},66627:(t,e,n)=>{"use strict";var r=n(26302),i=n(26550),o=n(38104),s=n(88705),a=n(64134);t.exports=function(t){return null==t||"object"!=typeof t&&"function"!=typeof t?null:r(t)?"String":i(t)?"Number":o(t)?"Boolean":s(t)?"Symbol":a(t)?"BigInt":void 0}},32094:(t,e,n)=>{"use strict";var r=n(83243),i=n(62191),o=n(62680),s=n(50326),a=o("Object.prototype.toString"),l=n(67226)(),c="undefined"==typeof globalThis?n.g:globalThis,d=i(),p=o("String.prototype.slice"),h={},u=Object.getPrototypeOf;l&&s&&u&&r(d,(function(t){if("function"==typeof c[t]){var e=new c[t];if(Symbol.toStringTag in e){var n=u(e),r=s(n,Symbol.toStringTag);if(!r){var i=u(n);r=s(i,Symbol.toStringTag)}h[t]=r.get}}}));var f=n(50198);t.exports=function(t){return!!f(t)&&(l&&Symbol.toStringTag in t?function(t){var e=!1;return r(h,(function(n,r){if(!e)try{var i=n.call(t);i===r&&(e=i)}catch(t){}})),e}(t):p(a(t),8,-1))}},9669:(t,e,n)=>{t.exports=n(51609)},55448:(t,e,n)=>{"use strict";var r=n(64867),i=n(36026),o=n(4372),s=n(15327),a=n(94097),l=n(84109),c=n(67985),d=n(85061),p=n(45655),h=n(65263);t.exports=function(t){return new Promise((function(e,n){var u,f=t.data,m=t.headers,g=t.responseType;function b(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}r.isFormData(f)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(t.auth){var A=t.auth.username||"",w=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(A+":"+w)}var v=a(t.baseURL,t.url);function x(){if(y){var r="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:r,config:t,request:y};i((function(t){e(t),b()}),(function(t){n(t),b()}),o),y=null}}if(y.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),y.timeout=t.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(d("Request aborted",t,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(d("Network Error",t,null,y)),y=null},y.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||p.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(d(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},r.isStandardBrowserEnv()){var _=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;_&&(m[t.xsrfHeaderName]=_)}"setRequestHeader"in y&&r.forEach(m,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete m[e]:y.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(y.withCredentials=!!t.withCredentials),g&&"json"!==g&&(y.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&y.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(u=function(t){y&&(n(!t||t&&t.type?new h("canceled"):t),y.abort(),y=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u))),f||(f=null),y.send(f)}))}},51609:(t,e,n)=>{"use strict";var r=n(64867),i=n(91849),o=n(30321),s=n(47185);var a=function t(e){var n=new o(e),a=i(o.prototype.request,n);return r.extend(a,o.prototype,n),r.extend(a,n),a.create=function(n){return t(s(e,n))},a}(n(45655));a.Axios=o,a.Cancel=n(65263),a.CancelToken=n(14972),a.isCancel=n(26502),a.VERSION=n(97288).version,a.all=function(t){return Promise.all(t)},a.spread=n(8713),a.isAxiosError=n(16268),t.exports=a,t.exports.default=a},65263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},14972:(t,e,n)=>{"use strict";var r=n(65263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},26502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},30321:(t,e,n)=>{"use strict";var r=n(64867),i=n(15327),o=n(80782),s=n(13572),a=n(47185),l=n(54875),c=l.validators;function d(t){this.defaults=t,this.interceptors={request:new o,response:new o}}d.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&l.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(t){o.push(t.fulfilled,t.rejected)})),!r){var d=[s,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(o),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var p=t;n.length;){var h=n.shift(),u=n.shift();try{p=h(p)}catch(t){u(t);break}}try{i=s(p)}catch(t){return Promise.reject(t)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},d.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){d.prototype[t]=function(e,n){return this.request(a(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){d.prototype[t]=function(e,n,r){return this.request(a(r||{},{method:t,url:e,data:n}))}})),t.exports=d},80782:(t,e,n)=>{"use strict";var r=n(64867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},94097:(t,e,n)=>{"use strict";var r=n(91793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},85061:(t,e,n)=>{"use strict";var r=n(80481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},13572:(t,e,n)=>{"use strict";var r=n(64867),i=n(18527),o=n(26502),s=n(45655),a=n(65263);function l(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a("canceled")}t.exports=function(t){return l(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return l(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(l(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},80481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},47185:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function s(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function a(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function l(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,i=e(t);r.isUndefined(i)&&e!==l||(n[t]=i)})),n}},36026:(t,e,n)=>{"use strict";var r=n(85061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},18527:(t,e,n)=>{"use strict";var r=n(64867),i=n(45655);t.exports=function(t,e,n){var o=this||i;return r.forEach(n,(function(n){t=n.call(o,t,e)})),t}},45655:(t,e,n)=>{"use strict";var r=n(64867),i=n(16016),o=n(80481),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(l=n(55448)),l),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(a(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(e||JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(s)})),t.exports=c},97288:t=>{t.exports={version:"0.24.0"}},91849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},15327:(t,e,n)=>{"use strict";var r=n(64867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},16268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},67985:(t,e,n)=>{"use strict";var r=n(64867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},16016:(t,e,n)=>{"use strict";var r=n(64867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},84109:(t,e,n)=>{"use strict";var r=n(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},54875:(t,e,n)=>{"use strict";var r=n(97288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var o={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,s){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var o=r[i],s=e[o];if(s){var a=t[o],l=void 0===a||s(a,o,t);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},64867:(t,e,n)=>{"use strict";var r=n(91849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function l(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function d(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:l,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return a(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:d,merge:function t(){var e={};function n(n,r){l(e[r])&&l(n)?e[r]=t(e[r],n):l(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)d(arguments[r],n);return e},extend:function(t,e,n){return d(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},26831:(t,e,n)=>{var r={"./cdtr-background-video":[54455,3691,4455],"./cdtr-background-video/":[54455,3691,4455],"./cdtr-background-video/index":[54455,3691,4455],"./cdtr-background-video/index.js":[54455,3691,4455],"./cdtr-glows-preset":[63727,3727],"./cdtr-glows-preset/":[63727,3727],"./cdtr-glows-preset/index":[63727,3727],"./cdtr-glows-preset/index.js":[63727,3727],"./cdtr-halo-preset":[56080,6080],"./cdtr-halo-preset/":[56080,6080],"./cdtr-halo-preset/index":[56080,6080],"./cdtr-halo-preset/index.js":[56080,6080],"./cdtr-images-preset":[47511,7511],"./cdtr-images-preset/":[47511,7511],"./cdtr-images-preset/index":[47511,7511],"./cdtr-images-preset/index.js":[47511,7511],"./cdtr-particlesjs":[52757,2757],"./cdtr-particlesjs/":[52757,2757],"./cdtr-particlesjs/index":[52757,2757],"./cdtr-particlesjs/index.js":[52757,2757]};function i(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return Promise.all(e.slice(1).map(n.e)).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=26831,t.exports=i},70717:(t,e,n)=>{var r={"./401":[68642,8642],"./401.js":[68642,8642],"./404":[45090,5090],"./404.js":[45090,5090],"./500":[42475,2977],"./500.js":[42475,2977],"./504":[81731,1731],"./504.js":[81731,1731]};function i(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],i=e[0];return n.e(e[1]).then((()=>n(i)))}i.keys=()=>Object.keys(r),i.id=70717,t.exports=i},75054:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return l.default}});var r=h(n(54925)),i=h(n(91915)),o=h(n(76480)),s=h(n(64340)),a=h(n(91036)),l=h(n(66430)),c=h(n(12601)),d=h(n(87593)),p=h(n(69551));function h(t){return t&&t.__esModule?t:{default:t}}},13759:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(l=o)|a>>>32-l,n);var a,l}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function l(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var c=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n)}return function(t){const e=[],n=32*t.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=t[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<<e%32,t[n(e)-1]=e;let i=1732584193,c=-271733879,d=-1732584194,p=271733878;for(let e=0;e<t.length;e+=16){const n=i,h=c,u=d,f=p;i=o(i,c,d,p,t[e],7,-680876936),p=o(p,i,c,d,t[e+1],12,-389564586),d=o(d,p,i,c,t[e+2],17,606105819),c=o(c,d,p,i,t[e+3],22,-1044525330),i=o(i,c,d,p,t[e+4],7,-176418897),p=o(p,i,c,d,t[e+5],12,1200080426),d=o(d,p,i,c,t[e+6],17,-1473231341),c=o(c,d,p,i,t[e+7],22,-45705983),i=o(i,c,d,p,t[e+8],7,1770035416),p=o(p,i,c,d,t[e+9],12,-1958414417),d=o(d,p,i,c,t[e+10],17,-42063),c=o(c,d,p,i,t[e+11],22,-1990404162),i=o(i,c,d,p,t[e+12],7,1804603682),p=o(p,i,c,d,t[e+13],12,-40341101),d=o(d,p,i,c,t[e+14],17,-1502002290),c=o(c,d,p,i,t[e+15],22,1236535329),i=s(i,c,d,p,t[e+1],5,-165796510),p=s(p,i,c,d,t[e+6],9,-1069501632),d=s(d,p,i,c,t[e+11],14,643717713),c=s(c,d,p,i,t[e],20,-373897302),i=s(i,c,d,p,t[e+5],5,-701558691),p=s(p,i,c,d,t[e+10],9,38016083),d=s(d,p,i,c,t[e+15],14,-660478335),c=s(c,d,p,i,t[e+4],20,-405537848),i=s(i,c,d,p,t[e+9],5,568446438),p=s(p,i,c,d,t[e+14],9,-1019803690),d=s(d,p,i,c,t[e+3],14,-187363961),c=s(c,d,p,i,t[e+8],20,1163531501),i=s(i,c,d,p,t[e+13],5,-1444681467),p=s(p,i,c,d,t[e+2],9,-51403784),d=s(d,p,i,c,t[e+7],14,1735328473),c=s(c,d,p,i,t[e+12],20,-1926607734),i=a(i,c,d,p,t[e+5],4,-378558),p=a(p,i,c,d,t[e+8],11,-2022574463),d=a(d,p,i,c,t[e+11],16,1839030562),c=a(c,d,p,i,t[e+14],23,-35309556),i=a(i,c,d,p,t[e+1],4,-1530992060),p=a(p,i,c,d,t[e+4],11,1272893353),d=a(d,p,i,c,t[e+7],16,-155497632),c=a(c,d,p,i,t[e+10],23,-1094730640),i=a(i,c,d,p,t[e+13],4,681279174),p=a(p,i,c,d,t[e],11,-358537222),d=a(d,p,i,c,t[e+3],16,-722521979),c=a(c,d,p,i,t[e+6],23,76029189),i=a(i,c,d,p,t[e+9],4,-640364487),p=a(p,i,c,d,t[e+12],11,-421815835),d=a(d,p,i,c,t[e+15],16,530742520),c=a(c,d,p,i,t[e+2],23,-995338651),i=l(i,c,d,p,t[e],6,-198630844),p=l(p,i,c,d,t[e+7],10,1126891415),d=l(d,p,i,c,t[e+14],15,-1416354905),c=l(c,d,p,i,t[e+5],21,-57434055),i=l(i,c,d,p,t[e+12],6,1700485571),p=l(p,i,c,d,t[e+3],10,-1894986606),d=l(d,p,i,c,t[e+10],15,-1051523),c=l(c,d,p,i,t[e+1],21,-2054922799),i=l(i,c,d,p,t[e+8],6,1873313359),p=l(p,i,c,d,t[e+15],10,-30611744),d=l(d,p,i,c,t[e+6],15,-1560198380),c=l(c,d,p,i,t[e+13],21,1309151649),i=l(i,c,d,p,t[e+4],6,-145523070),p=l(p,i,c,d,t[e+11],10,-1120210379),d=l(d,p,i,c,t[e+2],15,718787259),c=l(c,d,p,i,t[e+9],21,-343485551),i=r(i,n),c=r(c,h),d=r(d,u),p=r(p,f)}return[i,c,d,p]}(function(t){if(0===t.length)return[];const e=8*t.length,r=new Uint32Array(n(e));for(let n=0;n<e;n+=8)r[n>>5]|=(255&t[n/8])<<n%32;return r}(t),8*t.length))};e.default=c},95668:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},91036:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default="00000000-0000-0000-0000-000000000000"},69551:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};var o=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};e.default=o},89305:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},33893:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},34298:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<<e|t>>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const o=t.length/4+2,s=Math.ceil(o/16),a=new Array(s);for(let e=0;e<s;++e){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=t[64*e+4*r]<<24|t[64*e+4*r+1]<<16|t[64*e+4*r+2]<<8|t[64*e+4*r+3];a[e]=n}a[s-1][14]=8*(t.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<s;++t){const o=new Uint32Array(80);for(let e=0;e<16;++e)o[e]=a[t][e];for(let t=16;t<80;++t)o[t]=r(o[t-3]^o[t-8]^o[t-14]^o[t-16],1);let s=i[0],l=i[1],c=i[2],d=i[3],p=i[4];for(let t=0;t<80;++t){const i=Math.floor(t/20),a=r(s,5)+n(i,l,c,d)+p+e[i]+o[t]>>>0;p=d,d=c,c=r(l,30)>>>0,l=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+l>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+d>>>0,i[4]=i[4]+p>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]};e.default=i},87593:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}var a=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n};e.default=a},54925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(33893))&&r.__esModule?r:{default:r},o=n(87593);let s,a,l=0,c=0;var d=function(t,e,n){let r=e&&n||0;const d=e||new Array(16);let p=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==p||null==h){const e=t.random||(t.rng||i.default)();null==p&&(p=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let u=void 0!==t.msecs?t.msecs:Date.now(),f=void 0!==t.nsecs?t.nsecs:c+1;const m=u-l+(f-c)/1e4;if(m<0&&void 0===t.clockseq&&(h=h+1&16383),(m<0||u>l)&&void 0===t.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=u,c=f,a=h,u+=122192928e5;const g=(1e4*(268435455&u)+f)%4294967296;d[r++]=g>>>24&255,d[r++]=g>>>16&255,d[r++]=g>>>8&255,d[r++]=255&g;const b=u/4294967296*1e4&268435455;d[r++]=b>>>8&255,d[r++]=255&b,d[r++]=b>>>24&15|16,d[r++]=b>>>16&255,d[r++]=h>>>8|128,d[r++]=255&h;for(let t=0;t<6;++t)d[r+t]=p[t];return e||(0,o.unsafeStringify)(d)};e.default=d},91915:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(87154)),i=o(n(13759));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},87154:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var l;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n));return e}(t)),"string"==typeof r&&(r=(0,o.default)(r)),16!==(null===(l=r)||void 0===l?void 0:l.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+t.length);if(c.set(r),c.set(t,r.length),c=n(c),c[6]=15&c[6]|e,c[8]=63&c[8]|128,s){a=a||0;for(let t=0;t<16;++t)s[a+t]=c[t];return s}return(0,i.unsafeStringify)(c)}try{r.name=t}catch(t){}return r.DNS=s,r.URL=a,r};var r,i=n(87593),o=(r=n(69551))&&r.__esModule?r:{default:r};const s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";e.DNS=s;const a="6ba7b811-9dad-11d1-80b4-00c04fd430c8";e.URL=a},76480:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(95668)),i=s(n(33893)),o=n(87593);function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)};e.default=a},64340:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(87154)),i=o(n(34298));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},12601:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(89305))&&r.__esModule?r:{default:r};var o=function(t){return"string"==typeof t&&i.default.test(t)};e.default=o},66430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(12601))&&r.__esModule?r:{default:r};var o=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)};e.default=o},92538:t=>{"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=="},4577:t=>{"use strict";t.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+"},53260:()=>{},62191:(t,e,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;t.exports=function(){for(var t=[],e=0;e<r.length;e++)"function"==typeof i[r[e]]&&(t[t.length]=r[e]);return t}},60014:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),t=>{const e=i.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const l=t=>(t=t.toLowerCase(),e=>s(e)===t),c=t=>e=>typeof e===t,{isArray:d}=Array,p=c("undefined");const h=l("ArrayBuffer");const u=c("string"),f=c("function"),m=c("number"),g=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==s(t))return!1;const e=o(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},y=l("Date"),A=l("File"),w=l("Blob"),v=l("FileList"),x=l("URLSearchParams");function _(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,i;if("object"!=typeof t&&(t=[t]),d(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}function k(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,E=t=>!p(t)&&t!==C;const S=(B="undefined"!=typeof Uint8Array&&o(Uint8Array),t=>B&&t instanceof B);var B;const O=l("HTMLFormElement"),M=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),I=l("RegExp"),$=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};_(n,((n,i)=>{!1!==e(n,i,t)&&(r[i]=n)})),Object.defineProperties(t,r)},T="abcdefghijklmnopqrstuvwxyz",L="0123456789",N={DIGIT:L,ALPHA:T,ALPHA_DIGIT:T+T.toUpperCase()+L};var R={isArray:d,isArrayBuffer:h,isBuffer:function(t){return null!==t&&!p(t)&&null!==t.constructor&&!p(t.constructor)&&f(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||i.call(t)===e||f(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&h(t.buffer),e},isString:u,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:g,isPlainObject:b,isUndefined:p,isDate:y,isFile:A,isBlob:w,isRegExp:I,isFunction:f,isStream:t=>g(t)&&f(t.pipe),isURLSearchParams:x,isTypedArray:S,isFileList:v,forEach:_,merge:function t(){const{caseless:e}=E(this)&&this||{},n={},r=(r,i)=>{const o=e&&k(n,i)||i;b(n[o])&&b(r)?n[o]=t(n[o],r):b(r)?n[o]=t({},r):d(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&_(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:i}={})=>(_(e,((e,i)=>{n&&f(e)?t[i]=r(e,n):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let i,s,a;const l={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],r&&!r(a,t,e)||l[a]||(e[a]=t[a],l[a]=!0);t=!1!==n&&o(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:l,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(d(t))return t;let e=t.length;if(!m(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:O,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:$,freezeMethods:t=>{$(t,((e,n)=>{if(f(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];f(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return d(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:k,global:C,isContextDefined:E,ALPHABET:N,generateString:(t=16,e=N.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&f(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=d(t)?[]:{};return _(t,((t,e)=>{const o=n(t,r+1);!p(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)}};function P(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}R.inherits(P,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const D=P.prototype,z={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{z[t]={value:t}})),Object.defineProperties(P,z),Object.defineProperty(D,"isAxiosError",{value:!0}),P.from=(t,e,n,r,i,o)=>{const s=Object.create(D);return R.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),P.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};function H(t){return R.isPlainObject(t)||R.isArray(t)}function j(t){return R.endsWith(t,"[]")?t.slice(0,-2):t}function U(t,e,n){return t?t.concat(e).map((function(t,e){return t=j(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Z=R.toFlatObject(R,{},null,(function(t){return/^is[A-Z]/.test(t)}));function F(t,e,n){if(!R.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!R.isUndefined(e[t])}))).metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(R.isDate(t))return t.toISOString();if(!a&&R.isBlob(t))throw new P("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(t)||R.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,i){let a=t;if(t&&!i&&"object"==typeof t)if(R.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(R.isArray(t)&&function(t){return R.isArray(t)&&!t.some(H)}(t)||(R.isFileList(t)||R.endsWith(n,"[]"))&&(a=R.toArray(t)))return n=j(n),a.forEach((function(t,r){!R.isUndefined(t)&&null!==t&&e.append(!0===s?U([n],r,o):null===s?n:n+"[]",l(t))})),!1;return!!H(t)||(e.append(U(i,n,o),l(t)),!1)}const d=[],p=Object.assign(Z,{defaultVisitor:c,convertValue:l,isVisitable:H});if(!R.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!R.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+r.join("."));d.push(n),R.forEach(n,(function(n,o){!0===(!(R.isUndefined(n)||null===n)&&i.call(e,n,R.isString(o)?o.trim():o,r,p))&&t(n,r?r.concat(o):[o])})),d.pop()}}(t),e}function V(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Y(t,e){this._pairs=[],t&&F(t,this,e)}const W=Y.prototype;function q(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const r=n&&n.encode||q,i=n&&n.serialize;let o;if(o=i?i(e,n):R.isURLSearchParams(e)?e.toString():new Y(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}W.append=function(t,e){this._pairs.push([t,e])},W.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var G=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},K={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var J={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Y,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Q(t){function e(t,n,r,i){let o=t[i++];const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&R.isArray(r)?r.length:o,a)return R.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&R.isObject(r[o])||(r[o]=[]);return e(t,n,r[o],i)&&R.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}(r[o])),!s}if(R.isFormData(t)&&R.isFunction(t.entries)){const n={};return R.forEachEntry(t,((t,r)=>{e(function(t){return R.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const tt={"Content-Type":void 0};const et={transitional:K,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=R.isObject(t);i&&R.isHTMLForm(t)&&(t=new FormData(t));if(R.isFormData(t))return r&&r?JSON.stringify(Q(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return F(t,new J.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return J.isNode&&R.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=R.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return F(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),function(t,e,n){if(R.isString(t))try{return(e||JSON.parse)(t),R.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||et.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&R.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw P.from(t,P.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(t){et.headers[t]={}})),R.forEach(["post","put","patch"],(function(t){et.headers[t]=R.merge(tt)}));var nt=et;const rt=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const it=Symbol("internals");function ot(t){return t&&String(t).trim().toLowerCase()}function st(t){return!1===t||null==t?t:R.isArray(t)?t.map(st):String(t)}function at(t,e,n,r,i){return R.isFunction(r)?r.call(this,e,n):(i&&(e=n),R.isString(e)?R.isString(r)?-1!==e.indexOf(r):R.isRegExp(r)?r.test(e):void 0:void 0)}class lt{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=ot(e);if(!i)throw new Error("header name must be a non-empty string");const o=R.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=st(t))}const o=(t,e)=>R.forEach(t,((t,n)=>i(t,n,e)));return R.isPlainObject(t)||t instanceof this.constructor?o(t,e):R.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?o((t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&rt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&i(e,t,n),this}get(t,e){if(t=ot(t)){const n=R.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(R.isFunction(e))return e.call(this,t,n);if(R.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ot(t)){const n=R.findKey(this,t);return!(!n||void 0===this[n]||e&&!at(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=ot(t)){const i=R.findKey(n,t);!i||e&&!at(0,n[i],i,e)||(delete n[i],r=!0)}}return R.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];t&&!at(0,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return R.forEach(this,((r,i)=>{const o=R.findKey(n,i);if(o)return e[o]=st(r),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(i):String(i).trim();s!==i&&delete e[i],e[s]=st(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return R.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&R.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[it]=this[it]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=ot(t);e[r]||(!function(t,e){const n=R.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}(n,t),e[r]=!0)}return R.isArray(t)?t.forEach(r):r(t),this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.freezeMethods(lt.prototype),R.freezeMethods(lt);var ct=lt;function dt(t,e){const n=this||nt,r=e||n,i=ct.from(r.headers);let o=r.data;return R.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function pt(t){return!(!t||!t.__CANCEL__)}function ht(t,e,n){P.call(this,null==t?"canceled":t,P.ERR_CANCELED,e,n),this.name="CanceledError"}R.inherits(ht,P,{__CANCEL__:!0});var ut=J.isStandardBrowserEnv?{write:function(t,e,n,r,i,o){const s=[];s.push(t+"="+encodeURIComponent(e)),R.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),R.isString(r)&&s.push("path="+r),R.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ft(t,e){return t&&!function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var mt=J.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=R.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function gt(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=r[s];i||(i=l),n[o]=a,r[o]=l;let d=s,p=0;for(;d!==o;)p+=n[d++],d%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-i<e)return;const h=c&&l-c;return h?Math.round(1e3*p/h):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a);n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}const bt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const i=ct.from(t.headers).normalize(),o=t.responseType;let s;function a(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}R.isFormData(r)&&(J.isStandardBrowserEnv||J.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const c=ft(t.baseURL,t.url);function d(){if(!l)return;const r=ct.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),a()}),(function(t){n(t),a()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(c,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new P("Request aborted",P.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new P("Network Error",P.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||K;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new P(e,r.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,t,l)),l=null},J.isStandardBrowserEnv){const e=(t.withCredentials||mt(c))&&t.xsrfCookieName&&ut.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in l&&R.forEach(i.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),R.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&"json"!==o&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",gt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",gt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=e=>{l&&(n(!e||e.type?new ht(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(c);p&&-1===J.protocols.indexOf(p)?n(new P("Unsupported protocol "+p+":",P.ERR_BAD_REQUEST,t)):l.send(r||null)}))}};R.forEach(bt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));var yt={getAdapter:t=>{t=R.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let i=0;i<e&&(n=t[i],!(r=R.isString(n)?bt[n.toLowerCase()]:n));i++);if(!r){if(!1===r)throw new P(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(R.hasOwnProp(bt,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!R.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:bt};function At(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ht(null,t)}function wt(t){At(t),t.headers=ct.from(t.headers),t.data=dt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return yt.getAdapter(t.adapter||nt.adapter)(t).then((function(e){return At(t),e.data=dt.call(t,t.transformResponse,e),e.headers=ct.from(e.headers),e}),(function(e){return pt(e)||(At(t),e&&e.response&&(e.response.data=dt.call(t,t.transformResponse,e.response),e.response.headers=ct.from(e.response.headers))),Promise.reject(e)}))}const vt=t=>t instanceof ct?t.toJSON():t;function xt(t,e){e=e||{};const n={};function r(t,e,n){return R.isPlainObject(t)&&R.isPlainObject(e)?R.merge.call({caseless:n},t,e):R.isPlainObject(e)?R.merge({},e):R.isArray(e)?e.slice():e}function i(t,e,n){return R.isUndefined(e)?R.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!R.isUndefined(e))return r(void 0,e)}function s(t,e){return R.isUndefined(e)?R.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>i(vt(t),vt(e),!0)};return R.forEach(Object.keys(t).concat(Object.keys(e)),(function(r){const o=l[r]||i,s=o(t[r],e[r],r);R.isUndefined(s)&&o!==a||(n[r]=s)})),n}const _t="1.3.4",kt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{kt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ct={};kt.transitional=function(t,e,n){function r(t,e){return"[Axios v"+_t+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new P(r(i," has been removed"+(e?" in "+e:"")),P.ERR_DEPRECATED);return e&&!Ct[i]&&(Ct[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};var Et={assertOptions:function(t,e,n){if("object"!=typeof t)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new P("option "+o+" must be "+n,P.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new P("Unknown option "+o,P.ERR_BAD_OPTION)}},validators:kt};const St=Et.validators;class Bt{constructor(t){this.defaults=t,this.interceptors={request:new G,response:new G}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=xt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;let o;void 0!==n&&Et.assertOptions(n,{silentJSONParsing:St.transitional(St.boolean),forcedJSONParsing:St.transitional(St.boolean),clarifyTimeoutError:St.transitional(St.boolean)},!1),void 0!==r&&Et.assertOptions(r,{encode:St.function,serialize:St.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),o=i&&R.merge(i.common,i[e.method]),o&&R.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=ct.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let d,p=0;if(!a){const t=[wt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,l),d=t.length,c=Promise.resolve(e);p<d;)c=c.then(t[p++],t[p++]);return c}d=s.length;let h=e;for(p=0;p<d;){const t=s[p++],e=s[p++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=wt.call(this,h)}catch(t){return Promise.reject(t)}for(p=0,d=l.length;p<d;)c=c.then(l[p++],l[p++]);return c}getUri(t){return X(ft((t=xt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}R.forEach(["delete","get","head","options"],(function(t){Bt.prototype[t]=function(e,n){return this.request(xt(n||{},{method:t,url:e,data:(n||{}).data}))}})),R.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(xt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Bt.prototype[t]=e(),Bt.prototype[t+"Form"]=e(!0)}));var Ot=Bt;class Mt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,i){n.reason||(n.reason=new ht(t,r,i),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Mt((function(e){t=e})),cancel:t}}}var It=Mt;const $t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($t).forEach((([t,e])=>{$t[e]=t}));var Tt=$t;const Lt=function t(e){const n=new Ot(e),i=r(Ot.prototype.request,n);return R.extend(i,Ot.prototype,n,{allOwnKeys:!0}),R.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(xt(e,n))},i}(nt);Lt.Axios=Ot,Lt.CanceledError=ht,Lt.CancelToken=It,Lt.isCancel=pt,Lt.VERSION=_t,Lt.toFormData=F,Lt.AxiosError=P,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=function(t){return function(e){return t.apply(null,e)}},Lt.isAxiosError=function(t){return R.isObject(t)&&!0===t.isAxiosError},Lt.mergeConfig=xt,Lt.AxiosHeaders=ct,Lt.formToJSON=t=>Q(R.isHTMLForm(t)?new FormData(t):t),Lt.HttpStatusCode=Tt,Lt.default=Lt,t.exports=Lt},97291:(t,e,n)=>{"use strict";var r=n(52635),i=n(28672);if(n(32636)()||n(66679)()){var o=Symbol.iterator;t.exports=function(t){return null!=t&&void 0!==t[o]?t[o]():r(t)?Array.prototype[o].call(t):void 0}}else{var s=n(77906),a=n(26302),l=n(67286),c=l("%Map%",!0),d=l("%Set%",!0),p=n(62680),h=p("Array.prototype.push"),u=p("String.prototype.charCodeAt"),f=p("String.prototype.slice"),m=function(t){var e=0;return{next:function(){var n,r=e>=t.length;return r||(n=t[e],e+=1),{done:r,value:n}}}},g=function(t,e){if(s(t)||r(t))return m(t);if(a(t)){var n=0;return{next:function(){var e=function(t,e){if(e+1>=t.length)return e+1;var n=u(t,e);if(n<55296||n>56319)return e+1;var r=u(t,e+1);return r<56320||r>57343?e+1:e+2}(t,n),r=f(t,n,e);return n=e,{done:e>t.length,value:r}}}}return e&&void 0!==t["_es6-shim iterator_"]?t["_es6-shim iterator_"]():void 0};if(c||d){var b=n(7968),y=n(13328),A=p("Map.prototype.forEach",!0),w=p("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var v=p("Map.prototype.iterator",!0),x=p("Set.prototype.iterator",!0);var _=p("Map.prototype.@@iterator",!0)||p("Map.prototype._es6-shim iterator_",!0),k=p("Set.prototype.@@iterator",!0)||p("Set.prototype._es6-shim iterator_",!0);t.exports=function(t){return function(t){if(b(t)){if(v)return i(v(t));if(_)return _(t);if(A){var e=[];return A(t,(function(t,n){h(e,[n,t])})),m(e)}}if(y(t)){if(x)return i(x(t));if(k)return k(t);if(w){var n=[];return w(t,(function(t){h(n,t)})),m(n)}}}(t)||g(t)}}else t.exports=function(t){if(null!=t)return g(t,!0)}}},2947:t=>{var e={exports:{}};function n(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((function(e){var r=t[e];"object"!=typeof r||Object.isFrozen(r)||n(r)})),t}e.exports=n,e.exports.default=n;class r{constructor(t){void 0===t.data&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function o(t,...e){const n=Object.create(null);for(const e in t)n[e]=t[e];return e.forEach((function(t){for(const e in t)n[e]=t[e]})),n}const s=t=>!!t.scope||t.sublanguage&&t.language;class a{constructor(t,e){this.buffer="",this.classPrefix=e.classPrefix,t.walk(this)}addText(t){this.buffer+=i(t)}openNode(t){if(!s(t))return;let e="";e=t.sublanguage?`language-${t.language}`:((t,{prefix:e})=>{if(t.includes(".")){const n=t.split(".");return[`${e}${n.shift()}`,...n.map(((t,e)=>`${t}${"_".repeat(e+1)}`))].join(" ")}return`${e}${t}`})(t.scope,{prefix:this.classPrefix}),this.span(e)}closeNode(t){s(t)&&(this.buffer+="</span>")}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const l=(t={})=>{const e={children:[]};return Object.assign(e,t),e};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const e=l({scope:t});this.add(e),this.stack.push(e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,e){return"string"==typeof e?t.addText(e):e.children&&(t.openNode(e),e.children.forEach((e=>this._walk(t,e))),t.closeNode(e)),t}static _collapse(t){"string"!=typeof t&&t.children&&(t.children.every((t=>"string"==typeof t))?t.children=[t.children.join("")]:t.children.forEach((t=>{c._collapse(t)})))}}class d extends c{constructor(t){super(),this.options=t}addKeyword(t,e){""!==t&&(this.openNode(e),this.addText(t),this.closeNode())}addText(t){""!==t&&this.add(t)}addSublanguage(t,e){const n=t.root;n.sublanguage=!0,n.language=e,this.add(n)}toHTML(){return new a(this,this.options).value()}finalize(){return!0}}function p(t){return t?"string"==typeof t?t:t.source:null}function h(t){return m("(?=",t,")")}function u(t){return m("(?:",t,")*")}function f(t){return m("(?:",t,")?")}function m(...t){return t.map((t=>p(t))).join("")}function g(...t){const e=function(t){const e=t[t.length-1];return"object"==typeof e&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}(t);return"("+(e.capture?"":"?:")+t.map((t=>p(t))).join("|")+")"}function b(t){return new RegExp(t.toString()+"|").exec("").length-1}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function A(t,{joinWith:e}){let n=0;return t.map((t=>{n+=1;const e=n;let r=p(t),i="";for(;r.length>0;){const t=y.exec(r);if(!t){i+=r;break}i+=r.substring(0,t.index),r=r.substring(t.index+t[0].length),"\\"===t[0][0]&&t[1]?i+="\\"+String(Number(t[1])+e):(i+=t[0],"("===t[0]&&n++)}return i})).map((t=>`(${t})`)).join(e)}const w="[a-zA-Z]\\w*",v="[a-zA-Z_]\\w*",x="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",k="\\b(0b[01]+)",C={begin:"\\\\[\\s\\S]",relevance:0},E={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[C]},S={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[C]},B=function(t,e,n={}){const r=o({scope:"comment",begin:t,end:e,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=g("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:m(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},O=B("//","$"),M=B("/\\*","\\*/"),I=B("#","$"),$={scope:"number",begin:x,relevance:0},T={scope:"number",begin:_,relevance:0},L={scope:"number",begin:k,relevance:0},N={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[C,{begin:/\[/,end:/\]/,relevance:0,contains:[C]}]}]},R={scope:"title",begin:w,relevance:0},P={scope:"title",begin:v,relevance:0},D={begin:"\\.\\s*"+v,relevance:0};var z=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:w,UNDERSCORE_IDENT_RE:v,NUMBER_RE:x,C_NUMBER_RE:_,BINARY_NUMBER_RE:k,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(t={})=>{const e=/^#![ ]*\//;return t.binary&&(t.begin=m(e,/.*\b/,t.binary,/\b.*/)),o({scope:"meta",begin:e,end:/$/,relevance:0,"on:begin":(t,e)=>{0!==t.index&&e.ignoreMatch()}},t)},BACKSLASH_ESCAPE:C,APOS_STRING_MODE:E,QUOTE_STRING_MODE:S,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:B,C_LINE_COMMENT_MODE:O,C_BLOCK_COMMENT_MODE:M,HASH_COMMENT_MODE:I,NUMBER_MODE:$,C_NUMBER_MODE:T,BINARY_NUMBER_MODE:L,REGEXP_MODE:N,TITLE_MODE:R,UNDERSCORE_TITLE_MODE:P,METHOD_GUARD:D,END_SAME_AS_BEGIN:function(t){return Object.assign(t,{"on:begin":(t,e)=>{e.data._beginMatch=t[1]},"on:end":(t,e)=>{e.data._beginMatch!==t[1]&&e.ignoreMatch()}})}});function H(t,e){"."===t.input[t.index-1]&&e.ignoreMatch()}function j(t,e){void 0!==t.className&&(t.scope=t.className,delete t.className)}function U(t,e){e&&t.beginKeywords&&(t.begin="\\b("+t.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",t.__beforeBegin=H,t.keywords=t.keywords||t.beginKeywords,delete t.beginKeywords,void 0===t.relevance&&(t.relevance=0))}function Z(t,e){Array.isArray(t.illegal)&&(t.illegal=g(...t.illegal))}function F(t,e){if(t.match){if(t.begin||t.end)throw new Error("begin & end are not supported with match");t.begin=t.match,delete t.match}}function V(t,e){void 0===t.relevance&&(t.relevance=1)}const Y=(t,e)=>{if(!t.beforeMatch)return;if(t.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},t);Object.keys(t).forEach((e=>{delete t[e]})),t.keywords=n.keywords,t.begin=m(n.beforeMatch,h(n.begin)),t.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},t.relevance=0,delete n.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"],q="keyword";function X(t,e,n=q){const r=Object.create(null);return"string"==typeof t?i(n,t.split(" ")):Array.isArray(t)?i(n,t):Object.keys(t).forEach((function(n){Object.assign(r,X(t[n],e,n))})),r;function i(t,n){e&&(n=n.map((t=>t.toLowerCase()))),n.forEach((function(e){const n=e.split("|");r[n[0]]=[t,G(n[0],n[1])]}))}}function G(t,e){return e?Number(e):function(t){return W.includes(t.toLowerCase())}(t)?0:1}const K={},J=t=>{console.error(t)},Q=(t,...e)=>{console.log(`WARN: ${t}`,...e)},tt=(t,e)=>{K[`${t}/${e}`]||(console.log(`Deprecated as of ${t}. ${e}`),K[`${t}/${e}`]=!0)},et=new Error;function nt(t,e,{key:n}){let r=0;const i=t[n],o={},s={};for(let t=1;t<=e.length;t++)s[t+r]=i[t],o[t+r]=!0,r+=b(e[t-1]);t[n]=s,t[n]._emit=o,t[n]._multi=!0}function rt(t){!function(t){t.scope&&"object"==typeof t.scope&&null!==t.scope&&(t.beginScope=t.scope,delete t.scope)}(t),"string"==typeof t.beginScope&&(t.beginScope={_wrap:t.beginScope}),"string"==typeof t.endScope&&(t.endScope={_wrap:t.endScope}),function(t){if(Array.isArray(t.begin)){if(t.skip||t.excludeBegin||t.returnBegin)throw J("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),et;if("object"!=typeof t.beginScope||null===t.beginScope)throw J("beginScope must be object"),et;nt(t,t.begin,{key:"beginScope"}),t.begin=A(t.begin,{joinWith:""})}}(t),function(t){if(Array.isArray(t.end)){if(t.skip||t.excludeEnd||t.returnEnd)throw J("skip, excludeEnd, returnEnd not compatible with endScope: {}"),et;if("object"!=typeof t.endScope||null===t.endScope)throw J("endScope must be object"),et;nt(t,t.end,{key:"endScope"}),t.end=A(t.end,{joinWith:""})}}(t)}function it(t){function e(e,n){return new RegExp(p(e),"m"+(t.case_insensitive?"i":"")+(t.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(t,e){e.position=this.position++,this.matchIndexes[this.matchAt]=e,this.regexes.push([e,t]),this.matchAt+=b(t)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const t=this.regexes.map((t=>t[1]));this.matcherRe=e(A(t,{joinWith:"|"}),!0),this.lastIndex=0}exec(t){this.matcherRe.lastIndex=this.lastIndex;const e=this.matcherRe.exec(t);if(!e)return null;const n=e.findIndex(((t,e)=>e>0&&void 0!==t)),r=this.matchIndexes[n];return e.splice(0,n),Object.assign(e,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(t){if(this.multiRegexes[t])return this.multiRegexes[t];const e=new n;return this.rules.slice(t).forEach((([t,n])=>e.addRule(t,n))),e.compile(),this.multiRegexes[t]=e,e}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(t,e){this.rules.push([t,e]),"begin"===e.type&&this.count++}exec(t){const e=this.getMatcher(this.regexIndex);e.lastIndex=this.lastIndex;let n=e.exec(t);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const e=this.getMatcher(0);e.lastIndex=this.lastIndex+1,n=e.exec(t)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(t.compilerExtensions||(t.compilerExtensions=[]),t.contains&&t.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return t.classNameAliases=o(t.classNameAliases||{}),function n(i,s){const a=i;if(i.isCompiled)return a;[j,F,rt,Y].forEach((t=>t(i,s))),t.compilerExtensions.forEach((t=>t(i,s))),i.__beforeBegin=null,[U,Z,V].forEach((t=>t(i,s))),i.isCompiled=!0;let l=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),l=i.keywords.$pattern,delete i.keywords.$pattern),l=l||/\w+/,i.keywords&&(i.keywords=X(i.keywords,t.case_insensitive)),a.keywordPatternRe=e(l,!0),s&&(i.begin||(i.begin=/\B|\b/),a.beginRe=e(a.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(a.endRe=e(a.end)),a.terminatorEnd=p(a.end)||"",i.endsWithParent&&s.terminatorEnd&&(a.terminatorEnd+=(i.end?"|":"")+s.terminatorEnd)),i.illegal&&(a.illegalRe=e(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(t){return function(t){t.variants&&!t.cachedVariants&&(t.cachedVariants=t.variants.map((function(e){return o(t,{variants:null},e)})));if(t.cachedVariants)return t.cachedVariants;if(ot(t))return o(t,{starts:t.starts?o(t.starts):null});if(Object.isFrozen(t))return o(t);return t}("self"===t?i:t)}))),i.contains.forEach((function(t){n(t,a)})),i.starts&&n(i.starts,s),a.matcher=function(t){const e=new r;return t.contains.forEach((t=>e.addRule(t.begin,{rule:t,type:"begin"}))),t.terminatorEnd&&e.addRule(t.terminatorEnd,{type:"end"}),t.illegal&&e.addRule(t.illegal,{type:"illegal"}),e}(a),a}(t)}function ot(t){return!!t&&(t.endsWithParent||ot(t.starts))}class st extends Error{constructor(t,e){super(t),this.name="HTMLInjectionError",this.html=e}}const at=i,lt=o,ct=Symbol("nomatch"),dt=7;var pt=function(t){const n=Object.create(null),i=Object.create(null),o=[];let s=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let c={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function p(t){return c.noHighlightRe.test(t)}function b(t,e,n){let r="",i="";"object"==typeof e?(r=t,n=e.ignoreIllegals,i=e.language):(tt("10.7.0","highlight(lang, code, ...args) has been deprecated."),tt("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=t,r=e),void 0===n&&(n=!0);const o={code:r,language:i};E("before:highlight",o);const s=o.result?o.result:y(o.language,o.code,n);return s.code=o.code,E("after:highlight",s),s}function y(t,e,i,o){const l=Object.create(null);function d(){if(!C.keywords)return void S.addText(B);let t=0;C.keywordPatternRe.lastIndex=0;let e=C.keywordPatternRe.exec(B),n="";for(;e;){n+=B.substring(t,e.index);const i=v.case_insensitive?e[0].toLowerCase():e[0],o=(r=i,C.keywords[r]);if(o){const[t,r]=o;if(S.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=dt&&(O+=r),t.startsWith("_"))n+=e[0];else{const n=v.classNameAliases[t]||t;S.addKeyword(e[0],n)}}else n+=e[0];t=C.keywordPatternRe.lastIndex,e=C.keywordPatternRe.exec(B)}var r;n+=B.substring(t),S.addText(n)}function p(){null!=C.subLanguage?function(){if(""===B)return;let t=null;if("string"==typeof C.subLanguage){if(!n[C.subLanguage])return void S.addText(B);t=y(C.subLanguage,B,!0,E[C.subLanguage]),E[C.subLanguage]=t._top}else t=A(B,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(O+=t.relevance),S.addSublanguage(t._emitter,t.language)}():d(),B=""}function h(t,e){let n=1;const r=e.length-1;for(;n<=r;){if(!t._emit[n]){n++;continue}const r=v.classNameAliases[t[n]]||t[n],i=e[n];r?S.addKeyword(i,r):(B=i,d(),B=""),n++}}function u(t,e){return t.scope&&"string"==typeof t.scope&&S.openNode(v.classNameAliases[t.scope]||t.scope),t.beginScope&&(t.beginScope._wrap?(S.addKeyword(B,v.classNameAliases[t.beginScope._wrap]||t.beginScope._wrap),B=""):t.beginScope._multi&&(h(t.beginScope,e),B="")),C=Object.create(t,{parent:{value:C}}),C}function f(t,e,n){let i=function(t,e){const n=t&&t.exec(e);return n&&0===n.index}(t.endRe,n);if(i){if(t["on:end"]){const n=new r(t);t["on:end"](e,n),n.isMatchIgnored&&(i=!1)}if(i){for(;t.endsParent&&t.parent;)t=t.parent;return t}}if(t.endsWithParent)return f(t.parent,e,n)}function m(t){return 0===C.matcher.regexIndex?(B+=t[0],1):($=!0,0)}function g(t){const n=t[0],r=e.substring(t.index),i=f(C,t,r);if(!i)return ct;const o=C;C.endScope&&C.endScope._wrap?(p(),S.addKeyword(n,C.endScope._wrap)):C.endScope&&C.endScope._multi?(p(),h(C.endScope,t)):o.skip?B+=n:(o.returnEnd||o.excludeEnd||(B+=n),p(),o.excludeEnd&&(B=n));do{C.scope&&S.closeNode(),C.skip||C.subLanguage||(O+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&u(i.starts,t),o.returnEnd?0:n.length}let b={};function w(n,o){const a=o&&o[0];if(B+=n,null==a)return p(),0;if("begin"===b.type&&"end"===o.type&&b.index===o.index&&""===a){if(B+=e.slice(o.index,o.index+1),!s){const e=new Error(`0 width match regex (${t})`);throw e.languageName=t,e.badRule=b.rule,e}return 1}if(b=o,"begin"===o.type)return function(t){const e=t[0],n=t.rule,i=new r(n),o=[n.__beforeBegin,n["on:begin"]];for(const n of o)if(n&&(n(t,i),i.isMatchIgnored))return m(e);return n.skip?B+=e:(n.excludeBegin&&(B+=e),p(),n.returnBegin||n.excludeBegin||(B=e)),u(n,t),n.returnBegin?0:e.length}(o);if("illegal"===o.type&&!i){const t=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw t.mode=C,t}if("end"===o.type){const t=g(o);if(t!==ct)return t}if("illegal"===o.type&&""===a)return 1;if(I>1e5&&I>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return B+=a,a.length}const v=_(t);if(!v)throw J(a.replace("{}",t)),new Error('Unknown language: "'+t+'"');const x=it(v);let k="",C=o||x;const E={},S=new c.__emitter(c);!function(){const t=[];for(let e=C;e!==v;e=e.parent)e.scope&&t.unshift(e.scope);t.forEach((t=>S.openNode(t)))}();let B="",O=0,M=0,I=0,$=!1;try{for(C.matcher.considerAll();;){I++,$?$=!1:C.matcher.considerAll(),C.matcher.lastIndex=M;const t=C.matcher.exec(e);if(!t)break;const n=w(e.substring(M,t.index),t);M=t.index+n}return w(e.substring(M)),S.closeAllNodes(),S.finalize(),k=S.toHTML(),{language:t,value:k,relevance:O,illegal:!1,_emitter:S,_top:C}}catch(n){if(n.message&&n.message.includes("Illegal"))return{language:t,value:at(e),illegal:!0,relevance:0,_illegalBy:{message:n.message,index:M,context:e.slice(M-100,M+100),mode:n.mode,resultSoFar:k},_emitter:S};if(s)return{language:t,value:at(e),illegal:!1,relevance:0,errorRaised:n,_emitter:S,_top:C};throw n}}function A(t,e){e=e||c.languages||Object.keys(n);const r=function(t){const e={value:at(t),illegal:!1,relevance:0,_top:l,_emitter:new c.__emitter(c)};return e._emitter.addText(t),e}(t),i=e.filter(_).filter(C).map((e=>y(e,t,!1)));i.unshift(r);const o=i.sort(((t,e)=>{if(t.relevance!==e.relevance)return e.relevance-t.relevance;if(t.language&&e.language){if(_(t.language).supersetOf===e.language)return 1;if(_(e.language).supersetOf===t.language)return-1}return 0})),[s,a]=o,d=s;return d.secondBest=a,d}function w(t){let e=null;const n=function(t){let e=t.className+" ";e+=t.parentNode?t.parentNode.className:"";const n=c.languageDetectRe.exec(e);if(n){const e=_(n[1]);return e||(Q(a.replace("{}",n[1])),Q("Falling back to no-highlight mode for this block.",t)),e?n[1]:"no-highlight"}return e.split(/\s+/).find((t=>p(t)||_(t)))}(t);if(p(n))return;if(E("before:highlightElement",{el:t,language:n}),t.children.length>0&&(c.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(t)),c.throwUnescapedHTML)){throw new st("One of your code blocks includes unescaped HTML.",t.innerHTML)}e=t;const r=e.textContent,o=n?b(r,{language:n,ignoreIllegals:!0}):A(r);t.innerHTML=o.value,function(t,e,n){const r=e&&i[e]||n;t.classList.add("hljs"),t.classList.add(`language-${r}`)}(t,n,o.language),t.result={language:o.language,re:o.relevance,relevance:o.relevance},o.secondBest&&(t.secondBest={language:o.secondBest.language,relevance:o.secondBest.relevance}),E("after:highlightElement",{el:t,result:o,text:r})}let v=!1;function x(){if("loading"===document.readyState)return void(v=!0);document.querySelectorAll(c.cssSelector).forEach(w)}function _(t){return t=(t||"").toLowerCase(),n[t]||n[i[t]]}function k(t,{languageName:e}){"string"==typeof t&&(t=[t]),t.forEach((t=>{i[t.toLowerCase()]=e}))}function C(t){const e=_(t);return e&&!e.disableAutodetect}function E(t,e){const n=t;o.forEach((function(t){t[n]&&t[n](e)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){v&&x()}),!1),Object.assign(t,{highlight:b,highlightAuto:A,highlightAll:x,highlightElement:w,highlightBlock:function(t){return tt("10.7.0","highlightBlock will be removed entirely in v12.0"),tt("10.7.0","Please use highlightElement now."),w(t)},configure:function(t){c=lt(c,t)},initHighlighting:()=>{x(),tt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){x(),tt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(e,r){let i=null;try{i=r(t)}catch(t){if(J("Language definition for '{}' could not be registered.".replace("{}",e)),!s)throw t;J(t),i=l}i.name||(i.name=e),n[e]=i,i.rawDefinition=r.bind(null,t),i.aliases&&k(i.aliases,{languageName:e})},unregisterLanguage:function(t){delete n[t];for(const e of Object.keys(i))i[e]===t&&delete i[e]},listLanguages:function(){return Object.keys(n)},getLanguage:_,registerAliases:k,autoDetection:C,inherit:lt,addPlugin:function(t){!function(t){t["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=e=>{t["before:highlightBlock"](Object.assign({block:e.el},e))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=e=>{t["after:highlightBlock"](Object.assign({block:e.el},e))})}(t),o.push(t)}}),t.debugMode=function(){s=!1},t.safeMode=function(){s=!0},t.versionString="11.7.0",t.regex={concat:m,lookahead:h,either:g,optional:f,anyNumberOfTimes:u};for(const t in z)"object"==typeof z[t]&&e.exports(z[t]);return Object.assign(t,z),t}({});t.exports=pt,pt.HighlightJS=pt,pt.default=pt},1887:t=>{"use strict";var e,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={};function a(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}((t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})})(s,{Hooks:()=>mt,Lexer:()=>pt,Marked:()=>gt,Parser:()=>ft,Renderer:()=>ht,TextRenderer:()=>ut,Tokenizer:()=>dt,defaults:()=>l,getDefaults:()=>a,lexer:()=>Et,marked:()=>yt,options:()=>At,parse:()=>kt,parseInline:()=>_t,parser:()=>Ct,setOptions:()=>wt,use:()=>vt,walkTokens:()=>xt}),t.exports=(e=s,((t,e,s,a)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let l of i(e))o.call(t,l)||l===s||n(t,l,{get:()=>e[l],enumerable:!(a=r(e,l))||a.enumerable});return t})(n({},"__esModule",{value:!0}),e));var l={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function c(t){l=t}var d={exec:()=>null};function p(t,e=""){let n="string"==typeof t?t:t.source;const r={replace:(t,e)=>{let i="string"==typeof e?e:e.source;return i=i.replace(h.caret,"$1"),n=n.replace(t,i),r},getRegex:()=>new RegExp(n,e)};return r}var h={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,f=/(?:[*+-]|\d{1,9}[.)])/,m=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g=p(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),b=p(m).replace(/bull/g,f).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,A=/(?!\s*\])(?:\\.|[^\[\]\\])+/,w=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",A).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),v=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f).getRegex(),x="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),C=p(y).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),E={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",C).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:w,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:k,lheading:g,list:v,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:C,table:d,text:/^[^\n]+/},S=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),B={...E,lheading:b,table:S,paragraph:p(y).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",S).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},O={...E,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:d,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(y).replace("hr",u).replace("heading"," *#{1,6} *[^\n]").replace("lheading",g).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},M=/^( {2,}|\\)\n(?!\s*$)/,I=/[\p{P}\p{S}]/u,$=/[\s\p{P}\p{S}]/u,T=/[^\s\p{P}\p{S}]/u,L=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$).getRegex(),N=/(?!~)[\p{P}\p{S}]/u,R=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,P=p(R,"u").replace(/punct/g,I).getRegex(),D=p(R,"u").replace(/punct/g,N).getRegex(),z="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H=p(z,"gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,$).replace(/punct/g,I).getRegex(),j=p(z,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,N).getRegex(),U=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,T).replace(/punctSpace/g,$).replace(/punct/g,I).getRegex(),Z=p(/\\(punct)/,"gu").replace(/punct/g,I).getRegex(),F=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),V=p(_).replace("(?:--\x3e|$)","--\x3e").getRegex(),Y=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),W=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",W).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),X=p(/^!?\[(label)\]\[(ref)\]/).replace("label",W).replace("ref",A).getRegex(),G=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",A).getRegex(),K={_backpedal:d,anyPunctuation:Z,autolink:F,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:M,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:d,emStrongLDelim:P,emStrongRDelimAst:H,emStrongRDelimUnd:U,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:q,nolink:G,punctuation:L,reflink:X,reflinkSearch:p("reflink|nolink(?!\\()","g").replace("reflink",X).replace("nolink",G).getRegex(),tag:Y,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:d},J={...K,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",W).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W).getRegex()},Q={...K,emStrongRDelimAst:j,emStrongLDelim:D,url:p(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tt={...Q,br:p(M).replace("{2,}","*").getRegex(),text:p(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},et={normal:E,gfm:B,pedantic:O},nt={normal:K,gfm:Q,breaks:tt,pedantic:J},rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},it=t=>rt[t];function ot(t,e){if(e){if(h.escapeTest.test(t))return t.replace(h.escapeReplace,it)}else if(h.escapeTestNoEncode.test(t))return t.replace(h.escapeReplaceNoEncode,it);return t}function st(t){try{t=encodeURI(t).replace(h.percentDecode,"%")}catch{return null}return t}function at(t,e){const n=t.replace(h.findPipe,((t,e,n)=>{let r=!1,i=e;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(h.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(h.slashPipe,"|");return n}function lt(t,e,n){const r=t.length;if(0===r)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o!==e||n){if(o===e||!n)break;i++}else i++}return t.slice(0,r-i)}function ct(t,e,n,r,i){const o=e.href,s=e.title||null,a=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===t[0].charAt(0)?"image":"link",raw:n,href:o,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var dt=class{options;rules;lexer;constructor(t){this.options=t||l}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:lt(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(n.other.beginningSpace);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){const e=lt(t,"#");this.options.pedantic?t=e.trim():e&&!this.rules.other.endingSpaceChar.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:lt(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=lt(e[0],"\n").split("\n"),n="",r="";const i=[];for(;t.length>0;){let e=!1;const o=[];let s;for(s=0;s<t.length;s++)if(this.rules.other.blockquoteStart.test(t[s]))o.push(t[s]),e=!0;else{if(e)break;o.push(t[s])}t=t.slice(s);const a=o.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,0===t.length)break;const d=i.at(-1);if("code"===d?.type)break;if("blockquote"===d?.type){const e=d,o=e.raw+"\n"+t.join("\n"),s=this.blockquote(o);i[i.length-1]=s,n=n.substring(0,n.length-e.raw.length)+s.raw,r=r.substring(0,r.length-e.text.length)+s.text;break}if("list"!==d?.type);else{const e=d,o=e.raw+"\n"+t.join("\n"),s=this.list(o);i[i.length-1]=s,n=n.substring(0,n.length-d.raw.length)+s.raw,r=r.substring(0,r.length-e.raw.length)+s.raw,t=o.substring(i.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let s=!1;for(;t;){let n=!1,r="",a="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;r=e[0],t=t.substring(r.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],d=!l.trim(),p=0;if(this.options.pedantic?(p=2,a=l.trimStart()):d?p=e[1].length+1:(p=e[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=l.slice(p),p+=e[1].length),d&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",t=t.substring(c.length+1),n=!0),!n){const e=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),o=this.rules.other.headingBeginRegex(p),s=this.rules.other.htmlBeginRegex(p);for(;t;){const h=t.split("\n",1)[0];let u;if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),u=c):u=c.replace(this.rules.other.tabCharGlobal," "),i.test(c))break;if(o.test(c))break;if(s.test(c))break;if(e.test(c))break;if(n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+u.slice(p);else{if(d)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(i.test(l))break;if(o.test(l))break;if(n.test(l))break;a+="\n"+c}d||c.trim()||(d=!0),r+=h+"\n",t=t.substring(h.length+1),l=u.slice(p)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(s=!0));let h,u=null;this.options.gfm&&(u=this.rules.other.listIsTask.exec(a),u&&(h="[ ] "!==u[0],a=a.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:r,task:!!u,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=r}const a=i.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),i.raw=i.raw.trimEnd();for(let t=0;t<i.items.length;t++)if(this.lexer.state.top=!1,i.items[t].tokens=this.lexer.blockTokens(i.items[t].text,[]),!i.loose){const e=i.items[t].tokens.filter((t=>"space"===t.type)),n=e.length>0&&e.some((t=>this.rules.other.anyLine.test(t.raw)));i.loose=n}if(i.loose)for(let t=0;t<i.items.length;t++)i.items[t].loose=!0;return i}}html(t){const e=this.rules.block.html.exec(t);if(e){return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}}def(t){const e=this.rules.block.def.exec(t);if(e){const t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!this.rules.other.tableDelimiter.test(e[2]))return;const n=at(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const t of r)this.rules.other.tableAlignRight.test(t)?o.align.push("right"):this.rules.other.tableAlignCenter.test(t)?o.align.push("center"):this.rules.other.tableAlignLeft.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t<n.length;t++)o.header.push({text:n[t],tokens:this.lexer.inline(n[t]),header:!0,align:o.align[t]});for(const t of i)o.rows.push(at(t,o.header.length).map(((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;const e=lt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let n=0;for(let r=0;r<t.length;r++)if("\\"===t[r])r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=this.rules.other.pedanticHrefTitle.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n.slice(1):n.slice(1,-1)),ct(e,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const t=e[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return ct(n,t,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=l.exec(e));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const e=[...r[0]][0].length,l=t.slice(0,n+r.index+e+o);if(Math.min(n,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,n;return"@"===e[2]?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,n;if("@"===e[2])t=e[0],n="mailto:"+t;else{let r;do{r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(r!==e[0]);t=e[0],n="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},pt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||l,this.options.tokenizer=this.options.tokenizer||new dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={other:h,block:et.normal,inline:nt.normal};this.options.pedantic?(e.block=et.pedantic,e.inline=nt.pedantic):this.options.gfm&&(e.block=et.gfm,this.options.breaks?e.inline=nt.breaks:e.inline=nt.gfm),this.tokenizer.rules=e}static get rules(){return{block:et,inline:nt}}static lex(e,n){return new t(n).lex(e)}static lexInline(e,n){return new t(n).inlineTokens(e)}lex(t){t=t.replace(h.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],n=!1){for(this.options.pedantic&&(t=t.replace(h.tabCharGlobal," ").replace(h.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);const n=e.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);const n=e.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(i=t.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){const o=e.at(-1);n&&"paragraph"===o?.type?(o.raw+="\n"+r.raw,o.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(r),n=i.length!==t.length,t=t.substring(r.raw.length)}else if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===n?.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n=t,r=null;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(n));)t.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(r=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(r=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,o="";for(;t;){let r;if(i||(o=""),i=!1,this.options.extensions?.inline?.some((n=>!!(r=n.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0))))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);const n=e.at(-1);"text"===r.type&&"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,n,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let s=t;if(this.options.extensions?.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((t=>{r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(s=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(s)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),i=!0;const n=e.at(-1);"text"===n?.type?(n.raw+=r.raw,n.text+=r.text):e.push(r)}else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},ht=class{options;parser;constructor(t){this.options=t||l}space(t){return""}code({text:t,lang:e,escaped:n}){const r=(e||"").match(h.notSpaceStart)?.[0],i=t.replace(h.endingNewline,"")+"\n";return r?'<pre><code class="language-'+ot(r)+'">'+(n?i:ot(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:ot(i,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){const e=t.ordered,n=t.start;let r="";for(let e=0;e<t.items.length;e++){const n=t.items[e];r+=this.listitem(n)}const i=e?"ol":"ul";return"<"+i+(e&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+i+">\n"}listitem(t){let e="";if(t.task){const n=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=n+" "+ot(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):e+=n+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",n="";for(let e=0;e<t.header.length;e++)n+=this.tablecell(t.header[e]);e+=this.tablerow({text:n});let r="";for(let e=0;e<t.rows.length;e++){const i=t.rows[e];n="";for(let t=0;t<i.length;t++)n+=this.tablecell(i[t]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+r+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ot(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const r=this.parser.parseInline(n),i=st(t);if(null===i)return r;let o='<a href="'+(t=i)+'"';return e&&(o+=' title="'+ot(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const i=st(t);if(null===i)return ot(n);let o=`<img src="${t=i}" alt="${n}"`;return e&&(o+=` title="${ot(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ot(t.text)}},ut=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ft=class t{options;renderer;textRenderer;constructor(t){this.options=t||l,this.options.renderer=this.options.renderer||new ht,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ut}static parse(e,n){return new t(n).parse(e)}static parseInline(e,n){return new t(n).parseInline(e)}parse(t,e=!0){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=i,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(t.type)){n+=e||"";continue}}const o=i;switch(o.type){case"space":n+=this.renderer.space(o);continue;case"hr":n+=this.renderer.hr(o);continue;case"heading":n+=this.renderer.heading(o);continue;case"code":n+=this.renderer.code(o);continue;case"table":n+=this.renderer.table(o);continue;case"blockquote":n+=this.renderer.blockquote(o);continue;case"list":n+=this.renderer.list(o);continue;case"html":n+=this.renderer.html(o);continue;case"paragraph":n+=this.renderer.paragraph(o);continue;case"text":{let i=o,s=this.renderer.text(i);for(;r+1<t.length&&"text"===t[r+1].type;)i=t[++r],s+="\n"+this.renderer.text(i);n+=e?this.renderer.paragraph({type:"paragraph",raw:s,text:s,tokens:[{type:"text",raw:s,text:s,escaped:!0}]}):s;continue}default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}parseInline(t,e=this.renderer){let n="";for(let r=0;r<t.length;r++){const i=t[r];if(this.options.extensions?.renderers?.[i.type]){const t=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=t||"";continue}}const o=i;switch(o.type){case"escape":case"text":n+=e.text(o);break;case"html":n+=e.html(o);break;case"link":n+=e.link(o);break;case"image":n+=e.image(o);break;case"strong":n+=e.strong(o);break;case"em":n+=e.em(o);break;case"codespan":n+=e.codespan(o);break;case"br":n+=e.br(o);break;case"del":n+=e.del(o);break;default:{const t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}},mt=class{options;block;constructor(t){this.options=t||l}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?pt.lex:pt.lexInline}provideParser(){return this.block?ft.parse:ft.parseInline}},gt=class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ft;Renderer=ht;TextRenderer=ut;Lexer=pt;Tokenizer=dt;Hooks=mt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(const r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{const t=r;for(const r of t.header)n=n.concat(this.walkTokens(r.tokens,e));for(const r of t.rows)for(const t of r)n=n.concat(this.walkTokens(t.tokens,e));break}case"list":{const t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{const t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach((r=>{const i=t[r].flat(1/0);n=n.concat(this.walkTokens(i,e))})):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const n=e.renderers[t.name];e.renderers[t.name]=n?function(...e){let r=t.renderer.apply(this,e);return!1===r&&(r=n.apply(this,e)),r}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const n=e[t.level];n?n.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),n.extensions=e),t.renderer){const e=this.defaults.renderer||new ht(this.defaults);for(const n in t.renderer){if(!(n in e))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,i=t.renderer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n||""}}n.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new dt(this.defaults);for(const n in t.tokenizer){if(!(n in e))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=t.tokenizer[r],o=e[r];e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new mt;for(const n in t.hooks){if(!(n in e))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,i=t.hooks[r],o=e[r];mt.passThroughHooks.has(n)?e[r]=t=>{if(this.defaults.async)return Promise.resolve(i.call(e,t)).then((t=>o.call(e,t)));const n=i.call(e,t);return o.call(e,n)}:e[r]=(...t)=>{let n=i.apply(e,t);return!1===n&&(n=o.apply(e,t)),n}}n.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,r=t.walkTokens;n.walkTokens=function(t){let n=[];return n.push(r.call(this,t)),e&&(n=n.concat(e.call(this,t))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return pt.lex(t,e??this.defaults)}parser(t,e){return ft.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{const r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);const s=i.hooks?i.hooks.provideLexer():t?pt.lex:pt.lexInline,a=i.hooks?i.hooks.provideParser():t?ft.parse:ft.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(e):e).then((t=>s(t,i))).then((t=>i.hooks?i.hooks.processAllTokens(t):t)).then((t=>i.walkTokens?Promise.all(this.walkTokens(t,i.walkTokens)).then((()=>t)):t)).then((t=>a(t,i))).then((t=>i.hooks?i.hooks.postprocess(t):t)).catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let t=s(e,i);i.hooks&&(t=i.hooks.processAllTokens(t)),i.walkTokens&&this.walkTokens(t,i.walkTokens);let n=a(t,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(t){return o(t)}}}onError(t,e){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="<p>An error occurred:</p><pre>"+ot(n.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(n);throw n}}},bt=new gt;function yt(t,e){return bt.parse(t,e)}yt.options=yt.setOptions=function(t){return bt.setOptions(t),yt.defaults=bt.defaults,c(yt.defaults),yt},yt.getDefaults=a,yt.defaults=l,yt.use=function(...t){return bt.use(...t),yt.defaults=bt.defaults,c(yt.defaults),yt},yt.walkTokens=function(t,e){return bt.walkTokens(t,e)},yt.parseInline=bt.parseInline,yt.Parser=ft,yt.parser=ft.parse,yt.Renderer=ht,yt.TextRenderer=ut,yt.Lexer=pt,yt.lexer=pt.lex,yt.Tokenizer=dt,yt.Hooks=mt,yt.parse=yt;var At=yt.options,wt=yt.setOptions,vt=yt.use,xt=yt.walkTokens,_t=yt.parseInline,kt=yt,Ct=ft.parse,Et=pt.lex},80184:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,n=/\s+$/;function r(t,e){if(e=e||{},(t=t||"")instanceof r)return t;if(!(this instanceof r))return new r(t,e);var n=i(t);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=e.format||n.format,this._gradientType=e.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 i(e){var n={r:0,g:0,b:0},r=1,i=null,s=null,l=null,d=!1,p=!1;return"string"==typeof e&&(e=Z(e)),"object"==t(e)&&(U(e.r)&&U(e.g)&&U(e.b)?(n=o(e.r,e.g,e.b),d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(i=N(e.s),s=N(e.v),n=c(e.h,i,s),d=!0,p="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(i=N(e.s),l=N(e.l),n=a(e.h,i,l),d=!0,p="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=B(r),{ok:d,format:e.format||p,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function o(t,e,n){return{r:255*O(t,255),g:255*O(e,255),b:255*O(n,255)}}function s(t,e,n){t=O(t,255),e=O(e,255),n=O(n,255);var r,i,o=Math.max(t,e,n),s=Math.min(t,e,n),a=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=a>.5?l/(2-o-s):l/(o+s),o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,l:a}}function a(t,e,n){var r,i,o;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=O(t,360),e=O(e,100),n=O(n,100),0===e)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:255*r,g:255*i,b:255*o}}function l(t,e,n){t=O(t,255),e=O(e,255),n=O(n,255);var r,i,o=Math.max(t,e,n),s=Math.min(t,e,n),a=o,l=o-s;if(i=0===o?0:l/o,o==s)r=0;else{switch(o){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:i,v:a}}function c(t,e,n){t=6*O(t,360),e=O(e,100),n=O(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6;return{r:255*[n,s,o,o,a,n][l],g:255*[a,n,n,s,o,o][l],b:255*[o,o,a,n,n,s][l]}}function d(t,e,n,r){var i=[L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(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 p(t,e,n,r,i){var o=[L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(Math.round(n).toString(16)),L(R(r))];return i&&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("")}function h(t,e,n,r){return[L(R(r)),L(Math.round(t).toString(16)),L(Math.round(e).toString(16)),L(Math.round(n).toString(16))].join("")}function u(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s-=e/100,n.s=M(n.s),r(n)}function f(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.s+=e/100,n.s=M(n.s),r(n)}function m(t){return r(t).desaturate(100)}function g(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l+=e/100,n.l=M(n.l),r(n)}function b(t,e){e=0===e?0:e||10;var n=r(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-e/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-e/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-e/100*255))),r(n)}function y(t,e){e=0===e?0:e||10;var n=r(t).toHsl();return n.l-=e/100,n.l=M(n.l),r(n)}function A(t,e){var n=r(t).toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,r(n)}function w(t){var e=r(t).toHsl();return e.h=(e.h+180)%360,r(e)}function v(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=r(t).toHsl(),i=[r(t)],o=360/e,s=1;s<e;s++)i.push(r({h:(n.h+s*o)%360,s:n.s,l:n.l}));return i}function x(t){var e=r(t).toHsl(),n=e.h;return[r(t),r({h:(n+72)%360,s:e.s,l:e.l}),r({h:(n+216)%360,s:e.s,l:e.l})]}function _(t,e,n){e=e||6,n=n||30;var i=r(t).toHsl(),o=360/n,s=[r(t)];for(i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,s.push(r(i));return s}function k(t,e){e=e||6;for(var n=r(t).toHsv(),i=n.h,o=n.s,s=n.v,a=[],l=1/e;e--;)a.push(r({h:i,s:o,v:s})),s=(s+l)%1;return a}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,r=this.toRgb();return t=r.r/255,e=r.g/255,n=r.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=B(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=s(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=s(this._r,this._g,this._b),e=Math.round(360*t.h),n=Math.round(100*t.s),r=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return d(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return p(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 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)&&(E[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=r(t);n="#"+h(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(A,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(v,[3])},tetrad:function(){return this._applyCombination(v,[4])}},r.fromRatio=function(e,n){if("object"==t(e)){var i={};for(var o in e)e.hasOwnProperty(o)&&(i[o]="a"===o?e[o]:N(e[o]));e=i}return r(e,n)},r.equals=function(t,e){return!(!t||!e)&&r(t).toRgbString()==r(e).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(t,e,n){n=0===n?0:n||50;var i=r(t).toRgb(),o=r(e).toRgb(),s=n/100;return r({r:(o.r-i.r)*s+i.r,g:(o.g-i.g)*s+i.g,b:(o.b-i.b)*s+i.b,a:(o.a-i.a)*s+i.a})},r.readability=function(t,e){var n=r(t),i=r(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)},r.isReadable=function(t,e,n){var i,o,s=r.readability(t,e);switch(o=!1,(i=F(n)).level+i.size){case"AAsmall":case"AAAlarge":o=s>=4.5;break;case"AAlarge":o=s>=3;break;case"AAAsmall":o=s>=7}return o},r.mostReadable=function(t,e,n){var i,o,s,a,l=null,c=0;o=(n=n||{}).includeFallbackColors,s=n.level,a=n.size;for(var d=0;d<e.length;d++)(i=r.readability(t,e[d]))>c&&(c=i,l=r(e[d]));return r.isReadable(t,l,{level:s,size:a})||!o?l:(n.includeFallbackColors=!1,r.mostReadable(t,["#fff","#000"],n))};var C=r.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"},E=r.hexNames=S(C);function S(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function B(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function O(t,e){$(t)&&(t="100%");var n=T(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return Math.min(1,Math.max(0,t))}function I(t){return parseInt(t,16)}function $(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function T(t){return"string"==typeof t&&-1!=t.indexOf("%")}function L(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}function R(t){return Math.round(255*parseFloat(t)).toString(16)}function P(t){return I(t)/255}var D,z,H,j=(z="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",H="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+H),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 U(t){return!!j.CSS_UNIT.exec(t)}function Z(t){t=t.replace(e,"").replace(n,"").toLowerCase();var r,i=!1;if(C[t])t=C[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(r=j.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=j.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=j.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=j.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=j.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=j.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=j.hex8.exec(t))?{r:I(r[1]),g:I(r[2]),b:I(r[3]),a:P(r[4]),format:i?"name":"hex8"}:(r=j.hex6.exec(t))?{r:I(r[1]),g:I(r[2]),b:I(r[3]),format:i?"name":"hex"}:(r=j.hex4.exec(t))?{r:I(r[1]+""+r[1]),g:I(r[2]+""+r[2]),b:I(r[3]+""+r[3]),a:P(r[4]+""+r[4]),format:i?"name":"hex8"}:!!(r=j.hex3.exec(t))&&{r:I(r[1]+""+r[1]),g:I(r[2]+""+r[2]),b:I(r[3]+""+r[3]),format:i?"name":"hex"}}function F(t){var e,n;return"AA"!==(e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==e&&(e="AA"),"small"!==(n=(t.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:e,size:n}}return r}()},94732:(t,e,n)=>{"use strict";var r=n(7968),i=n(13328),o=n(56927),s=n(7938);t.exports=function(t){if(t&&"object"==typeof t){if(r(t))return"Map";if(i(t))return"Set";if(o(t))return"WeakMap";if(s(t))return"WeakSet"}return!1}},56666:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(34952);function i(t,e,n){return(e=(0,r.Z)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},7896:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{Z:()=>r})},34952:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===r(e)?e:String(e)}n.d(e,{Z:()=>i})},88573:(t,e,n)=>{"use strict";n.d(e,{ML:()=>he,hj:()=>gt,vc:()=>ct,NB:()=>ye,nU:()=>q,XP:()=>zt,N2:()=>Ht,b5:()=>jt,qv:()=>Ut,u9:()=>Vt,QC:()=>Wt,Nl:()=>j,Jo:()=>Dt,tI:()=>qt,bR:()=>Jt,Cf:()=>ue,K9:()=>Ae,P1:()=>V,x2:()=>fe,Ss:()=>we,DS:()=>ge,zK:()=>me,S0:()=>be});var r=n(27191),i=n(52780),o=n(38404),s=n(52665),a=n(26151);const l=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function c(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const d=(t,e,n)=>{let i=c(t,n);if(!i)return!1;let o=f(i);if(!o){let n=i.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let l=o.nodeBefore;if(E(t,o,e,-1))return!0;if(0==i.parent.content.size&&(h(l,"end")||r.qv.isSelectable(l)))for(let n=i.depth;;n--){let c=(0,a.dR)(t.doc,i.before(n),i.after(n),s.p2.empty);if(c&&c.slice.size<c.to-c.from){if(e){let n=t.tr.step(c);n.setSelection(h(l,"end")?r.Y1.findFrom(n.doc.resolve(n.mapping.map(o.pos,-1)),-1):r.qv.create(n.doc,o.pos-l.nodeSize)),e(n.scrollIntoView())}return!0}if(1==n||i.node(n-1).childCount>1)break}return!(!l.isAtom||o.depth!=i.depth-1)&&(e&&e(t.tr.delete(o.pos-l.nodeSize,o.pos).scrollIntoView()),!0)};function p(t,e,n){let i=e.nodeBefore,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let t=i.lastChild;if(!t)return!1;i=t}let l=e.nodeAfter,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let t=l.firstChild;if(!t)return!1;l=t}let d=(0,a.dR)(t.doc,o,c,s.p2.empty);if(!d||d.from!=o||d instanceof a.Pu&&d.slice.size>=c-o)return!1;if(n){let e=t.tr.step(d);e.setSelection(r.Bs.create(e.doc,o)),n(e.scrollIntoView())}return!0}function h(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const u=(t,e,n)=>{let{$head:i,empty:o}=t.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;s=f(i)}let a=s&&s.nodeBefore;return!(!a||!r.qv.isSelectable(a))&&(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const g=(t,e,n)=>{let i=m(t,n);if(!i)return!1;let o=y(i);if(!o)return!1;let l=o.nodeAfter;if(E(t,o,e,1))return!0;if(0==i.parent.content.size&&(h(l,"start")||r.qv.isSelectable(l))){let n=(0,a.dR)(t.doc,i.before(),i.after(),s.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let i=t.tr.step(n);i.setSelection(h(l,"start")?r.Y1.findFrom(i.doc.resolve(i.mapping.map(o.pos)),1):r.qv.create(i.doc,i.mapping.map(o.pos))),e(i.scrollIntoView())}return!0}}return!(!l.isAtom||o.depth!=i.depth-1)&&(e&&e(t.tr.delete(o.pos,o.pos+l.nodeSize).scrollIntoView()),!0)},b=(t,e,n)=>{let{$head:i,empty:o}=t.selection,s=i;if(!o)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;s=y(i)}let a=s&&s.nodeAfter;return!(!a||!r.qv.isSelectable(a))&&(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos)).scrollIntoView()),!0)};function y(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const A=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function w(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const v=(t,e)=>{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let o=n.node(-1),s=n.indexAfter(-1),a=w(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(e){let i=n.after(),o=t.tr.replaceWith(i,i,a.createAndFill());o.setSelection(r.Y1.near(o.doc.resolve(i),1)),e(o.scrollIntoView())}return!0},x=(t,e)=>{let n=t.selection,{$from:i,$to:o}=n;if(n instanceof r.C1||i.parent.inlineContent||o.parent.inlineContent)return!1;let s=w(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!i.parentOffset&&o.index()<o.parent.childCount?i:o).pos,a=t.tr.insert(n,s.createAndFill());a.setSelection(r.Bs.create(a.doc,n+1)),e(a.scrollIntoView())}return!0},_=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,a.Ax)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&(0,a.k9)(r);return null!=i&&(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};const k=(t,e)=>{let{$from:n,$to:i}=t.selection;if(t.selection instanceof r.qv&&t.selection.node.isBlock)return!(!n.parentOffset||!(0,a.Ax)(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.depth)return!1;let o,s,l=[],c=!1,d=!1;for(let t=n.depth;;t--){if(n.node(t).isBlock){c=n.end(t)==n.pos+(n.depth-t),d=n.start(t)==n.pos-(n.depth-t),s=w(n.node(t-1).contentMatchAt(n.indexAfter(t-1)));let e=C&&C(i.parent,c,n);l.unshift(e||(c&&s?{type:s}:null)),o=t;break}if(1==t)return!1;l.unshift(null)}let p=t.tr;(t.selection instanceof r.Bs||t.selection instanceof r.C1)&&p.deleteSelection();let h=p.mapping.map(n.pos),u=(0,a.Ax)(p.doc,h,l.length,l);if(u||(l[0]=s?{type:s}:null,u=(0,a.Ax)(p.doc,h,l.length,l)),!u)return!1;if(p.split(h,l.length,l),!c&&d&&n.node(o).type!=s){let t=p.mapping.map(n.before(o)),e=p.doc.resolve(t);s&&n.node(o-1).canReplaceWith(e.index(),e.index()+1,s)&&p.setNodeMarkup(p.mapping.map(n.before(o)),s)}return e&&e(p.scrollIntoView()),!0};var C;function E(t,e,n,i){let o,l,c=e.nodeBefore,d=e.nodeAfter,p=c.type.spec.isolating||d.type.spec.isolating;if(!p&&function(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!(!(r&&i&&r.type.compatibleContent(i.type))||(!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(o,o+1)||!i.isTextblock&&!(0,a.Mn)(t.doc,e.pos)||(n&&n(t.tr.join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let u=!p&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(l=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&l.matchType(o[0]||d.type).validEnd){if(n){let r=e.pos+d.nodeSize,i=s.HY.empty;for(let t=o.length-1;t>=0;t--)i=s.HY.from(o[t].create(null,i));i=s.HY.from(c.copy(i));let l=t.tr.step(new a.FC(e.pos-1,r,e.pos,r,new s.p2(i,1,0),o.length,!0)),p=l.doc.resolve(r+2*o.length);p.nodeAfter&&p.nodeAfter.type==c.type&&(0,a.Mn)(l.doc,p.pos)&&l.join(p.pos),n(l.scrollIntoView())}return!0}let f=d.type.spec.isolating||i>0&&p?null:r.Y1.findFrom(e,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,a.k9)(m);if(null!=g&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(u&&h(d,"start",!0)&&h(c,"end")){let r=c,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let o=d,l=1;for(;!o.isTextblock;o=o.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,o.content)){if(n){let r=s.HY.empty;for(let t=i.length-1;t>=0;t--)r=s.HY.from(i[t].copy(r));n(t.tr.step(new a.FC(e.pos-i.length,e.pos+d.nodeSize,e.pos+l,e.pos+d.nodeSize-l,new s.p2(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function S(t){return function(e,n){let i=e.selection,o=t<0?i.$from:i.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return!!o.node(s).isTextblock&&(n&&n(e.tr.setSelection(r.Bs.create(e.doc,t<0?o.start(s):o.end(s)))),!0)}}const B=S(-1),O=S(1);function M(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,((r,o)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)i=!0;else{let e=n.doc.resolve(o),r=e.index();i=e.parent.canReplaceWith(r,r+1,t)}}))}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,t,e)}r(i.scrollIntoView())}return!0}}function I(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let $=I(l,d,u),T=I(l,g,b);const L={Enter:I(A,x,_,k),"Mod-Enter":v,Backspace:$,"Mod-Backspace":$,"Shift-Backspace":$,Delete:T,"Mod-Delete":T,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new r.C1(t.doc))),!0)},N={"Ctrl-h":L.Backspace,"Alt-Backspace":L["Mod-Backspace"],"Ctrl-d":L.Delete,"Ctrl-Alt-Backspace":L["Mod-Delete"],"Alt-Delete":L["Mod-Delete"],"Alt-d":L["Mod-Delete"],"Ctrl-a":B,"Ctrl-e":O};for(let t in L)N[t]=L[t];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function R(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,l=i.blockRange(o);if(!l)return!1;let c=r?n.tr:null;return!!function(t,e,n,r=null){let i=!1,o=e,l=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){if(0==e.$from.index(e.depth-1))return!1;let t=l.resolve(e.start-2);o=new s.Ts(t,t,e.depth),e.endIndex<e.parent.childCount&&(e=new s.Ts(e.$from,l.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let c=(0,a.nd)(o,n,r,e);if(!c)return!1;t&&function(t,e,n,r,i){let o=s.HY.empty;for(let t=n.length-1;t>=0;t--)o=s.HY.from(n[t].type.create(n[t].attrs,o));t.step(new a.FC(e.start-(r?2:0),e.end,e.start,e.end,new s.p2(o,0,0),n.length,!0));let l=0;for(let t=0;t<n.length;t++)n[t].type==i&&(l=t+1);let c=n.length-l,d=e.start+n.length-(r?2:0),p=e.parent;for(let n=e.startIndex,r=e.endIndex,i=!0;n<r;n++,i=!1)!i&&(0,a.Ax)(t.doc,d,c)&&(t.split(d,c),d+=2*c),d+=p.child(n).nodeSize}(t,e,c,i,n);return!0}(c,l,t,e)&&(r&&r(c.scrollIntoView()),!0)}}function P(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,(e=>e.childCount>0&&e.firstChild.type==t));return!!o&&(!n||(r.node(o.depth-1).type==t?function(t,e,n,r){let i=t.tr,o=r.end,l=r.$to.end(r.depth);o<l&&(i.step(new a.FC(o-1,l,o,l,new s.p2(s.HY.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.Ts(i.doc.resolve(r.$from.pos),i.doc.resolve(l),r.depth));const c=(0,a.k9)(r);if(null==c)return!1;i.lift(r,c);let d=i.doc.resolve(i.mapping.map(o,-1)-1);(0,a.Mn)(i.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&i.join(d.pos);return e(i.scrollIntoView()),!0}(e,n,t,o):function(t,e,n){let r=t.tr,i=n.parent;for(let t=n.end,e=n.endIndex-1,o=n.startIndex;e>o;e--)t-=i.child(e).nodeSize,r.delete(t-1,t+1);let o=r.doc.resolve(n.start),l=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==i.childCount,p=o.node(-1),h=o.index(-1);if(!p.canReplace(h+(c?0:1),h+1,l.content.append(d?s.HY.empty:s.HY.from(i))))return!1;let u=o.pos,f=u+l.nodeSize;return r.step(new a.FC(u-(c?1:0),f+(d?1:0),u+1,f-1,new s.p2((c?s.HY.empty:s.HY.from(i.copy(s.HY.empty))).append(d?s.HY.empty:s.HY.from(i.copy(s.HY.empty))),c?0:1,d?0:1),c?0:1)),e(r.scrollIntoView()),!0}(e,n,o)))}}function D(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class z{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(o);return i.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(i),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!t,l=t||i.tr,c={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(l,e),i=n(...t)(r);return s.push(i),c}]))),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||o.dispatch(l),s.every((t=>!0===t)))};return c}createCan(t){const{rawCommands:e,state:n}=this,r=t||n.tr,i=this.buildProps(r,false),o=Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:void 0})])));return{...o,chain:()=>this.createChain(r,false)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:t,editor:r,view:o,state:D({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}class H{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}}function j(t,e,n){if(void 0===t.config[e]&&t.parent)return j(t.parent,e,n);if("function"==typeof t.config[e]){return t.config[e].bind({...n,parent:t.parent?j(t.parent,e,n):null})}return t.config[e]}function U(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function Z(t){const e=[],{nodeExtensions:n,markExtensions:r}=U(t),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=j(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage,extensions:i});if(!n)return;n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...o,...r}})}))}))}))})),i.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=j(t,"addAttributes",n);if(!r)return;const i=r();Object.entries(i).forEach((([n,r])=>{const i={...o,...r};"function"==typeof(null==i?void 0:i.default)&&(i.default=i.default()),(null==i?void 0:i.isRequired)&&void 0===(null==i?void 0:i.default)&&delete i.default,e.push({type:t.name,name:n,attribute:i})}))})),e}function F(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function V(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{if(n[t])if("class"===t){const r=e?String(e).split(" "):[],i=n[t]?n[t].split(" "):[],o=r.filter((t=>!i.includes(t)));n[t]=[...i,...o].join(" ")}else if("style"===t){const r=e?e.split(";").map((t=>t.trim())).filter(Boolean):[],i=n[t]?n[t].split(";").map((t=>t.trim())).filter(Boolean):[],o=new Map;i.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));o.set(e,n)})),r.forEach((t=>{const[e,n]=t.split(":").map((t=>t.trim()));o.set(e,n)})),n[t]=Array.from(o.entries()).map((([t,e])=>`${t}: ${e}`)).join("; ")}else n[t]=e;else n[t]=e})),n}),{})}function Y(t,e){return e.filter((e=>e.type===t.type.name)).filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>V(t,e)),{})}function W(t){return"function"==typeof t}function q(t,e=undefined,...n){return W(t)?e?t.bind(e)(...n):t(...n):t}function X(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const i=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):function(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null==r?t:{...t,[e.name]:r}}),{});return{...r,...i}}}}function G(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!function(t={}){return 0===Object.keys(t).length&&t.constructor===Object}(e))&&null!=e)))}function K(t,e){var n;const r=Z(t),{nodeExtensions:i,markExtensions:o}=U(t),a=null===(n=i.find((t=>j(t,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(i.map((n=>{const i=r.filter((t=>t.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=G({...t.reduce(((t,e)=>{const r=j(e,"extendNodeSchema",o);return{...t,...r?r(n):{}}}),{}),content:q(j(n,"content",o)),marks:q(j(n,"marks",o)),group:q(j(n,"group",o)),inline:q(j(n,"inline",o)),atom:q(j(n,"atom",o)),selectable:q(j(n,"selectable",o)),draggable:q(j(n,"draggable",o)),code:q(j(n,"code",o)),whitespace:q(j(n,"whitespace",o)),linebreakReplacement:q(j(n,"linebreakReplacement",o)),defining:q(j(n,"defining",o)),isolating:q(j(n,"isolating",o)),attrs:Object.fromEntries(i.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=q(j(n,"parseHTML",o));a&&(s.parseDOM=a.map((t=>X(t,i))));const l=j(n,"renderHTML",o);l&&(s.toDOM=t=>l({node:t,HTMLAttributes:Y(t,i)}));const c=j(n,"renderText",o);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(o.map((n=>{const i=r.filter((t=>t.type===n.name)),o={name:n.name,options:n.options,storage:n.storage,editor:e},s=G({...t.reduce(((t,e)=>{const r=j(e,"extendMarkSchema",o);return{...t,...r?r(n):{}}}),{}),inclusive:q(j(n,"inclusive",o)),excludes:q(j(n,"excludes",o)),group:q(j(n,"group",o)),spanning:q(j(n,"spanning",o)),code:q(j(n,"code",o)),attrs:Object.fromEntries(i.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=q(j(n,"parseHTML",o));a&&(s.parseDOM=a.map((t=>X(t,i))));const l=j(n,"renderHTML",o);return l&&(s.toDOM=t=>l({mark:t,HTMLAttributes:Y(t,i)})),[n.name,s]})));return new s.V_({topNode:a,nodes:l,marks:c})}function J(t,e){return e.nodes[t]||e.marks[t]||null}function Q(t,e){return Array.isArray(e)?e.some((e=>("string"==typeof e?e:e.name)===t.name)):e}function tt(t,e){const n=s.PW.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}const et=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,((t,e,i,o)=>{var s,a;const l=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:e,parent:i,index:o}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?l:l.slice(0,Math.max(0,r-e))})),n};function nt(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class rt{constructor(t){this.find=t.find,this.handler=t.handler}}const it=(t,e)=>{if(nt(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function ot(t){var e;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let d=!1;const p=et(c)+o;return s.forEach((t=>{if(d)return;const e=it(p,t.find);if(!e)return;const s=l.state.tr,c=D({state:l.state,transaction:s}),h={from:r-(e[0].length-o.length),to:i},{commands:u,chain:f,can:m}=new z({editor:n,state:c});null!==t.handler({state:c,range:h,match:e,commands:u,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:i,text:o}),l.dispatch(s),d=!0)})),d}function st(t){const{editor:e,rules:n}=t,i=new r.Sy({state:{init:()=>null,apply(t,r,o){const a=t.getMeta(i);if(a)return a;const l=t.getMeta("applyInputRules");return!!l&&setTimeout((()=>{let{text:t}=l;"string"==typeof t||(t=tt(s.HY.from(t),o.schema));const{from:r}=l,a=r+t.length;ot({editor:e,from:r,to:a,text:t,rules:n,plugin:i})})),t.selectionSet||t.docChanged?null:r}},props:{handleTextInput:(t,r,o,s)=>ot({editor:e,from:r,to:o,text:s,rules:n,plugin:i}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:r}=t.state.selection;r&&ot({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:i})})),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:o}=t.state.selection;return!!o&&ot({editor:e,from:o.pos,to:o.pos,text:"\n",rules:n,plugin:i})}},isInputRules:!0});return i}function at(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function lt(t,e){const n={...t};return at(t)&&at(e)&&Object.keys(e).forEach((r=>{at(e[r])&&at(t[r])?n[r]=lt(t[r],e[r]):n[r]=e[r]})),n}class ct{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ct(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new ct(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const i=r.marks();if(!!!i.find((t=>(null==t?void 0:t.type.name)===e.name)))return!1;const o=i.find((t=>(null==t?void 0:t.type.name)===e.name));return o&&n.removeStoredMark(o),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}}class dt{constructor(t){this.find=t.find,this.handler=t.handler}}const pt=(t,e,n)=>{if(nt(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]};let ht=null;const ut=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(e=n.clipboardData)||void 0===e||e.setData("text/html",t),n};function ft(t){const{editor:e,rules:n}=t;let i,o=null,a=!1,l=!1,c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}const d=({state:t,from:n,to:r,rule:o,pasteEvt:s})=>{const a=t.tr,l=D({state:t,transaction:a}),d=function(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new z({editor:e,state:n}),p=[];return n.doc.nodesBetween(r,i,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const h=Math.max(r,e),u=Math.min(i,e+t.content.size),f=t.textBetween(h-e,u-e,void 0,"");pt(f,o.find,s).forEach((t=>{if(void 0===t.index)return;const e=h+t.index+1,r=e+t[0].length,i={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},u=o.handler({state:n,range:i,match:t,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});p.push(u)}))})),p.every((t=>null!==t))}({editor:e,state:l,from:Math.max(n-1,0),to:r.b-1,rule:o,pasteEvent:s,dropEvent:i});if(d&&a.steps.length){try{i="undefined"!=typeof DragEvent?new DragEvent("drop"):null}catch{i=null}return c="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map((t=>new r.Sy({view(t){const n=n=>{var r;o=(null===(r=t.dom.parentElement)||void 0===r?void 0:r.contains(n.target))?t.dom.parentElement:null,o&&(ht=e)},r=()=>{ht&&(ht=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(l=o===t.dom.parentElement,i=e,!l){const t=ht;t&&setTimeout((()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})}),10)}return!1},paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return c=e,a=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,r)=>{const i=e[0],o="paste"===i.getMeta("uiEvent")&&!a,p="drop"===i.getMeta("uiEvent")&&!l,h=i.getMeta("applyPasteRules"),u=!!h;if(!o&&!p&&!u)return;if(u){let{text:e}=h;"string"==typeof e||(e=tt(s.HY.from(e),r.schema));const{from:n}=h,i=n+e.length,o=ut(e);return d({rule:t,state:r,from:n,to:{b:i},pasteEvt:o})}const f=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);return"number"==typeof f&&m&&f!==m.b?d({rule:t,state:r,from:f,to:m,pasteEvt:c}):void 0}})))}class mt{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=mt.resolve(t),this.schema=K(this.extensions,e),this.setupExtensions()}static resolve(t){const e=mt.sort(mt.flatten(t)),n=function(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return Array.from(new Set(e))}(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e=j(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=j(t,"priority")||100,r=j(e,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((t,e)=>{const n=j(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:J(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this,e=mt.sort([...this.extensions].reverse()),n=[],r=[],i=e.map((e=>{const i={name:e.name,options:e.options,storage:e.storage,editor:t,type:J(e.name,this.schema)},s=[],a=j(e,"addKeyboardShortcuts",i);let l={};if("mark"===e.type&&j(e,"exitable",i)&&(l.ArrowRight=()=>ct.handleExit({editor:t,mark:e})),a){const e=Object.fromEntries(Object.entries(a()).map((([e,n])=>[e,()=>n({editor:t})])));l={...l,...e}}const c=(0,o.h)(l);s.push(c);const d=j(e,"addInputRules",i);Q(e,t.options.enableInputRules)&&d&&n.push(...d());const p=j(e,"addPasteRules",i);Q(e,t.options.enablePasteRules)&&p&&r.push(...p());const h=j(e,"addProseMirrorPlugins",i);if(h){const t=h();s.push(...t)}return s})).flat();return[st({editor:t,rules:n}),...ft({editor:t,rules:r}),...i]}get attributes(){return Z(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=U(this.extensions);return Object.fromEntries(e.filter((t=>!!j(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:F(e.name,this.schema)},i=j(e,"addNodeView",r);if(!i)return[];return[e.name,(r,o,s,a,l)=>{const c=Y(r,n);return i()({node:r,view:o,getPos:s,decorations:a,innerDecorations:l,editor:t,extension:e,HTMLAttributes:c})}]})))}setupExtensions(){this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:J(t.name,this.schema)};if("mark"===t.type){(null===(e=q(j(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name)}const r=j(t,"onBeforeCreate",n),i=j(t,"onCreate",n),o=j(t,"onUpdate",n),s=j(t,"onSelectionUpdate",n),a=j(t,"onTransaction",n),l=j(t,"onFocus",n),c=j(t,"onBlur",n),d=j(t,"onDestroy",n);r&&this.editor.on("beforeCreate",r),i&&this.editor.on("create",i),o&&this.editor.on("update",o),s&&this.editor.on("selectionUpdate",s),a&&this.editor.on("transaction",a),l&&this.editor.on("focus",l),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)}))}}class gt{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new gt(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new gt({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}}function bt(t,e,n){const{from:r,to:i}=e,{blockSeparator:o="\n\n",textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,i,((t,n,l,c)=>{var d;t.isBlock&&n>r&&(a+=o);const p=null==s?void 0:s[t.type.name];if(p)return l&&(a+=p({node:t,pos:n,parent:l,index:c,range:e})),!1;t.isText&&(a+=null===(d=null==t?void 0:t.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,i-n))})),a}function yt(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const At=gt.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map((t=>t.$from.pos))),a=Math.max(...o.map((t=>t.$to.pos))),l=yt(n);return bt(r,{from:s,to:a},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}});function wt(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:nt(e[r])?e[r].test(t[r]):e[r]===t[r]))}function vt(t,e,n={}){return t.find((t=>t.type===e&&wt(Object.fromEntries(Object.keys(n).map((e=>[e,t.attrs[e]]))),n)))}function xt(t,e,n={}){return!!vt(t,e,n)}function _t(t,e,n){var r;if(!t||!e)return;let i=t.parent.childAfter(t.parentOffset);if(i.node&&i.node.marks.some((t=>t.type===e))||(i=t.parent.childBefore(t.parentOffset)),!i.node||!i.node.marks.some((t=>t.type===e)))return;n=n||(null===(r=i.node.marks[0])||void 0===r?void 0:r.attrs);if(!vt([...i.node.marks],e,n))return;let o=i.index,s=t.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(;o>0&&xt([...t.parent.child(o-1).marks],e,n);)o-=1,s-=t.parent.child(o).nodeSize;for(;a<t.parent.childCount&&xt([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function kt(t,e){if("string"==typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}function Ct(t){return t instanceof r.Bs}function Et(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function St(t,e=null){if(!e)return null;const n=r.Y1.atStart(t),i=r.Y1.atEnd(t);if("start"===e||!0===e)return n;if("end"===e)return i;const o=n.from,s=i.to;return"all"===e?r.Bs.create(t,Et(0,o,s),Et(t.content.size,o,s)):r.Bs.create(t,Et(e,o,s),Et(e,o,s))}function Bt(){return"Android"===navigator.platform||/android/i.test(navigator.userAgent)}function Ot(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Mt=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):1===r.nodeType&&Mt(r)}return t};function It(t){const e=`<body>${t}</body>`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return Mt(n)}function $t(t,e,n){if(t instanceof s.NB||t instanceof s.HY)return t;n={slice:!0,parseOptions:{},...n};const r="string"==typeof t;if("object"==typeof t&&null!==t)try{if(Array.isArray(t)&&t.length>0)return s.HY.fromArray(t.map((t=>e.nodeFromJSON(t))));const r=e.nodeFromJSON(t);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:r});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),$t("",e,n)}if(r){if(n.errorOnInvalidContent){let r=!1,i="";const o=new s.V_({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(r=!0,i="string"==typeof t?t:t.outerHTML,null)}]}})});if(n.slice?s.aw.fromSchema(o).parseSlice(It(t),n.parseOptions):s.aw.fromSchema(o).parse(It(t),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${i}`)})}const r=s.aw.fromSchema(e);return n.slice?r.parseSlice(It(t),n.parseOptions).content:r.parse(It(t),n.parseOptions)}return $t("",e,n)}function Tt(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Lt(t,e,n={}){const{from:r,to:i,empty:o}=t.selection,s=e?F(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),o=Math.min(i,e+t.nodeSize);a.push({node:t,from:n,to:o})}));const l=i-r,c=a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>wt(t.node.attrs,n,{strict:!1})));if(o)return!!c.length;return c.reduce(((t,e)=>t+e.to-e.from),0)>=l}function Nt(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Rt(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}function Pt(t,e,n={},r={}){return $t(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function Dt(t,e){const n=kt(e,t.schema),{from:r,to:i,empty:o}=t.selection,s=[];o?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,(t=>{s.push(...t.marks)}));const a=s.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function zt(t,e){const n=new a.wx(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function Ht(t,e){const n=[];return t.descendants(((t,r)=>{e(t)&&n.push({node:t,pos:r})})),n}function jt(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}function Ut(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Zt(t){return e=>Ut(e.$from,t)}function Ft(t,e){return bt(t,{from:0,to:t.content.size},e)}function Vt(t,e){const n=Nt("string"==typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=F(e,t.schema),{from:r,to:i}=t.selection,o=[];t.doc.nodesBetween(r,i,(t=>{o.push(t)}));const s=o.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}(t,e):"mark"===n?Dt(t,e):{}}function Yt(t){const e=function(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(t);return 1===e.length?e:e.filter(((t,n)=>!e.filter(((t,e)=>e!==n)).some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))))}function Wt(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,i)=>{const o=[];if(t.ranges.length)t.forEach(((t,e)=>{o.push({from:t,to:e})}));else{const{from:t,to:e}=n[i];if(void 0===t||void 0===e)return;o.push({from:t,to:e})}o.forEach((({from:t,to:n})=>{const o=e.slice(i).map(t,-1),s=e.slice(i).map(n),a=e.invert().map(o,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:o,to:s}})}))})),Yt(r)}function qt(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const i=_t(n.resolve(t),e.type);i&&r.push({mark:e,...i})})):n.nodesBetween(t,e,((t,e)=>{t&&void 0!==(null==t?void 0:t.nodeSize)&&r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}function Xt(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Gt(t,e,n={}){const{empty:r,ranges:i}=t.selection,o=e?kt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!o||o.name===t.type.name)).find((t=>wt(t.attrs,n,{strict:!1})));let s=0;const a=[];if(i.forEach((({$from:e,$to:n})=>{const r=e.pos,i=n.pos;t.doc.nodesBetween(r,i,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),o=Math.min(i,e+t.nodeSize);s+=o-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:o}))))}))})),0===s)return!1;const l=a.filter((t=>!o||o.name===t.mark.type.name)).filter((t=>wt(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),c=a.filter((t=>!o||t.mark.type!==o&&t.mark.type.excludes(o))).reduce(((t,e)=>t+e.to-e.from),0);return(l>0?l+c:l)>=s}function Kt(t,e){const{nodeExtensions:n}=U(e),r=n.find((e=>e.name===t));if(!r)return!1;const i=q(j(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof i&&i.split(" ").includes("list")}function Jt(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if("hardBreak"===t.type.name)return!0;if(t.isText)return/^\s*$/m.test(null!==(r=t.text)&&void 0!==r?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;if(e){let r=!0;return t.content.forEach((t=>{!1!==r&&(Jt(t,{ignoreWhitespace:n,checkChildren:e})||(r=!1))})),r}return!1}function Qt(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}const te=(t,e)=>{const n=Zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const i=t.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(t.doc,n.pos)||(t.join(n.pos),!0)},ee=(t,e)=>{const n=Zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const i=t.doc.nodeAt(r);return n.node.type!==(null==i?void 0:i.type)||!(0,a.Mn)(t.doc,r)||(t.join(r),!0)};var ne=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(t=!1)=>({commands:e})=>e.setContent("",t),clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return!n||(i.forEach((({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,((t,n)=>{if(t.type.isText)return;const{doc:r,mapping:i}=e,o=r.resolve(i.map(n)),s=r.resolve(i.map(n+t.nodeSize)),l=o.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(t.type.isTextblock){const{defaultType:t}=o.parent.contentMatchAt(o.index());e.setNodeMarkup(l.start,t)}(c||0===c)&&e.lift(l,c)}))})),!0)},command:t=>e=>t(e),createParagraphNear:()=>({state:t,dispatch:e})=>x(t,e),cut:(t,e)=>({editor:n,tr:i})=>{const{state:o}=n,s=o.doc.slice(t.from,t.to);i.deleteRange(t.from,t.to);const a=i.mapping.map(e);return i.insert(a,s.content),i.setSelection(new r.Bs(i.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let n=i.depth;n>0;n-=1){if(i.node(n).type===r.type){if(e){const e=i.before(n),r=i.after(n);t.delete(e,r).scrollIntoView()}return!0}}return!1},deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const i=F(t,n.schema),o=e.selection.$anchor;for(let t=o.depth;t>0;t-=1){if(o.node(t).type===i){if(r){const n=o.before(t),r=o.after(t);e.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},deleteSelection:()=>({state:t,dispatch:e})=>l(t,e),enter:()=>({commands:t})=>t.keyboardShortcut("Enter"),exitCode:()=>({state:t,dispatch:e})=>v(t,e),extendMarkRange:(t,e={})=>({tr:n,state:i,dispatch:o})=>{const s=kt(t,i.schema),{doc:a,selection:l}=n,{$from:c,from:d,to:p}=l;if(o){const t=_t(c,s,e);if(t&&t.from<=d&&t.to>=p){const e=r.Bs.create(a,t.from,t.to);n.setSelection(e)}}return!0},first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t<n.length;t+=1)if(n[t](e))return!0;return!1},focus:(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{(Ot()||Bt())&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(o&&null===t&&!Ct(n.state.selection))return s(),!0;const a=St(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},forEach:(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),insertContentAt:(t,e,n)=>({tr:i,dispatch:o,editor:l})=>{var c;if(o){let o;n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};try{o=$t(e,l.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:null!==(c=n.errorOnInvalidContent)&&void 0!==c?c:l.options.enableContentCheck})}catch(t){return l.emit("contentError",{editor:l,error:t,disableCollaboration:()=>{l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}}),!1}let{from:d,to:p}="number"==typeof t?{from:t,to:t}:{from:t.from,to:t.to},h=!0,u=!0;if(("type"in o?[o]:o).forEach((t=>{t.check(),h=!!h&&(t.isText&&0===t.marks.length),u=!!u&&t.isBlock})),d===p&&u){const{parent:t}=i.doc.resolve(d);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(d-=1,p+=1)}let f;if(h){if(Array.isArray(e))f=e.map((t=>t.text||"")).join("");else if(e instanceof s.HY){let t="";e.forEach((e=>{e.text&&(t+=e.text)})),f=t}else f="object"==typeof e&&e&&e.text?e.text:e;i.insertText(f,d,p)}else f=o,i.replaceWith(d,p,f);n.updateSelection&&function(t,e,n){const i=t.steps.length-1;if(i<e)return;const o=t.steps[i];if(!(o instanceof a.Pu||o instanceof a.FC))return;const s=t.mapping.maps[i];let l=0;s.forEach(((t,e,n,r)=>{0===l&&(l=r)})),t.setSelection(r.Y1.near(t.doc.resolve(l),n))}(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:d,text:f}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:d,text:f})}return!0},joinBackward:()=>({state:t,dispatch:e})=>d(t,e),joinDown:()=>({state:t,dispatch:e})=>((t,e)=>{let n,i=t.selection;if(i instanceof r.qv){if(i.node.isTextblock||!(0,a.Mn)(t.doc,i.to))return!1;n=i.to}else if(n=(0,a.GJ)(t.doc,i.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0})(t,e),joinForward:()=>({state:t,dispatch:e})=>g(t,e),joinItemBackward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,-1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},joinItemForward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch{return!1}},joinTextblockBackward:()=>({state:t,dispatch:e})=>((t,e,n)=>{let r=c(t,n);if(!r)return!1;let i=f(r);return!!i&&p(t,i,e)})(t,e),joinTextblockForward:()=>({state:t,dispatch:e})=>((t,e,n)=>{let r=m(t,n);if(!r)return!1;let i=y(r);return!!i&&p(t,i,e)})(t,e),joinUp:()=>({state:t,dispatch:e})=>((t,e)=>{let n,i=t.selection,o=i instanceof r.qv;if(o){if(i.node.isTextblock||!(0,a.Mn)(t.doc,i.from))return!1;n=i.from}else if(n=(0,a.GJ)(t.doc,i.from,-1),null==n)return!1;if(e){let i=t.tr.join(n);o&&i.setSelection(r.qv.create(i.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0})(t,e),keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:i})=>{const o=function(t){const e=t.split(/-(?!$)/);let n,r,i,o,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t<e.length-1;t+=1){const s=e[t];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);Ot()||Tt()?o=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),o&&(s=`Meta-${s}`),i&&(s=`Shift-${s}`),s}(t).split(/-(?!$)/),s=o.find((t=>!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==l||l.steps.forEach((t=>{const e=t.map(r.mapping);e&&i&&r.maybeStep(e)})),!0},lift:(t,e={})=>({state:n,dispatch:r})=>!!Lt(n,F(t,n.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&(0,a.k9)(i);return null!=o&&(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:t,dispatch:e})=>_(t,e),liftListItem:t=>({state:e,dispatch:n})=>P(F(t,e.schema))(e,n),newlineInCode:()=>({state:t,dispatch:e})=>A(t,e),resetAttributes:(t,e)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Nt("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(o=F(t,r.schema)),"mark"===a&&(s=kt(t,r.schema)),i&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{o&&o===t.type&&n.setNodeMarkup(r,void 0,Rt(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((i=>{s===i.type&&n.addMark(r,r+t.nodeSize,s.create(Rt(i.attrs,e)))}))}))})),!0)},scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),selectAll:()=>({tr:t,dispatch:e})=>{if(e){const e=new r.C1(t.doc);t.setSelection(e)}return!0},selectNodeBackward:()=>({state:t,dispatch:e})=>u(t,e),selectNodeForward:()=>({state:t,dispatch:e})=>b(t,e),selectParentNode:()=>({state:t,dispatch:e})=>((t,e)=>{let n,{$from:i,to:o}=t.selection,s=i.sharedDepth(o);return 0!=s&&(n=i.before(s),e&&e(t.tr.setSelection(r.qv.create(t.doc,n))),!0)})(t,e),selectTextblockEnd:()=>({state:t,dispatch:e})=>O(t,e),selectTextblockStart:()=>({state:t,dispatch:e})=>B(t,e),setContent:(t,e=!1,n={},r={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{var l,c;const{doc:d}=o;if("full"!==n.preserveWhitespace){const a=Pt(t,i.schema,n,{errorOnInvalidContent:null!==(l=r.errorOnInvalidContent)&&void 0!==l?l:i.options.enableContentCheck});return s&&o.replaceWith(0,d.content.size,a).setMeta("preventUpdate",!e),!0}return s&&o.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:d.content.size},t,{parseOptions:n,errorOnInvalidContent:null!==(c=r.errorOnInvalidContent)&&void 0!==c?c:i.options.enableContentCheck})},setMark:(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=kt(t,r.schema);if(i)if(s){const t=Dt(r,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach((t=>{const i=t.$from.pos,o=t.$to.pos;r.doc.nodesBetween(i,o,((t,r)=>{const s=Math.max(r,i),a=Math.min(r+t.nodeSize,o);t.marks.find((t=>t.type===l))?t.marks.forEach((t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))})):n.addMark(s,a,l.create(e))}))}));return function(t,e,n){var r;const{selection:i}=e;let o=null;if(Ct(i)&&(o=i.$cursor),o){const e=null!==(r=t.storedMarks)&&void 0!==r?r:o.marks();return!!n.isInSet(e)||!e.some((t=>t.type.excludes(n)))}const{ranges:s}=i;return s.some((({$from:e,$to:r})=>{let i=0===e.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(e.pos,r.pos,((t,e,r)=>{if(i)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),o=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));i=e&&o}return!i})),i}))}(r,n,l)},setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),setNode:(t,e={})=>({state:n,dispatch:r,chain:i})=>{const o=F(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?i().command((({commands:t})=>!!M(o,{...s,...e})(n)||t.clearNodes())).command((({state:t})=>M(o,{...s,...e})(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,i=Et(t,0,n.content.size),o=r.qv.create(n,i);e.setSelection(o)}return!0},setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:i,to:o}="number"==typeof t?{from:t,to:t}:t,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=Et(i,s,a),c=Et(o,s,a),d=r.Bs.create(n,l,c);e.setSelection(d)}return!0},sinkListItem:t=>({state:e,dispatch:n})=>{const r=F(t,e.schema);return(i=r,function(t,e){let{$from:n,$to:r}=t.selection,o=n.blockRange(r,(t=>t.childCount>0&&t.firstChild.type==i));if(!o)return!1;let l=o.startIndex;if(0==l)return!1;let c=o.parent,d=c.child(l-1);if(d.type!=i)return!1;if(e){let n=d.lastChild&&d.lastChild.type==c.type,r=s.HY.from(n?i.create():null),l=new s.p2(s.HY.from(i.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),p=o.start,h=o.end;e(t.tr.step(new a.FC(p-(n?3:1),h,p,h,l,1,!0)).scrollIntoView())}return!0})(e,n);var i},splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:i,editor:o})=>{const{selection:s,doc:l}=e,{$from:c,$to:d}=s,p=Xt(o.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof r.qv&&s.node.isBlock)return!(!c.parentOffset||!(0,a.Ax)(l,c.pos))&&(i&&(t&&Qt(n,o.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const h=d.parentOffset===d.parent.content.size,u=0===c.depth?void 0:function(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(c.node(-1).contentMatchAt(c.indexAfter(-1)));let f=h&&u?[{type:u,attrs:p}]:void 0,m=(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,f);if(f||m||!(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,u?[{type:u}]:void 0)||(m=!0,f=u?[{type:u,attrs:p}]:void 0),i){if(m&&(s instanceof r.Bs&&e.deleteSelection(),e.split(e.mapping.map(c.pos),1,f),u&&!h&&!c.parentOffset&&c.parent.type!==u)){const t=e.mapping.map(c.before()),n=e.doc.resolve(t);c.node(-1).canReplaceWith(n.index(),n.index()+1,u)&&e.setNodeMarkup(e.mapping.map(c.before()),u)}t&&Qt(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},splitListItem:(t,e={})=>({tr:n,state:i,dispatch:o,editor:l})=>{var c;const d=F(t,i.schema),{$from:p,$to:h}=i.selection,u=i.selection.node;if(u&&u.isBlock||p.depth<2||!p.sameParent(h))return!1;const f=p.node(-1);if(f.type!==d)return!1;const m=l.extensionManager.attributes;if(0===p.parent.content.size&&p.node(-1).childCount===p.indexAfter(-1)){if(2===p.depth||p.node(-3).type!==d||p.index(-2)!==p.node(-2).childCount-1)return!1;if(o){let t=s.HY.empty;const i=p.index(-1)?1:p.index(-2)?2:3;for(let e=p.depth-i;e>=p.depth-3;e-=1)t=s.HY.from(p.node(e).copy(t));const o=p.indexAfter(-1)<p.node(-2).childCount?1:p.indexAfter(-2)<p.node(-3).childCount?2:3,a={...Xt(m,p.node().type.name,p.node().attrs),...e},l=(null===(c=d.contentMatch.defaultType)||void 0===c?void 0:c.createAndFill(a))||void 0;t=t.append(s.HY.from(d.createAndFill(null,l)||void 0));const h=p.before(p.depth-(i-1));n.replace(h,p.after(-o),new s.p2(t,4-i,0));let u=-1;n.doc.nodesBetween(h,n.doc.content.size,((t,e)=>{if(u>-1)return!1;t.isTextblock&&0===t.content.size&&(u=e+1)})),u>-1&&n.setSelection(r.Bs.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}const g=h.pos===p.end()?f.contentMatchAt(0).defaultType:null,b={...Xt(m,f.type.name,f.attrs),...e},y={...Xt(m,p.node().type.name,p.node().attrs),...e};n.delete(p.pos,h.pos);const A=g?[{type:d,attrs:b},{type:g,attrs:y}]:[{type:d,attrs:b}];if(!(0,a.Ax)(n.doc,p.pos,2))return!1;if(o){const{selection:t,storedMarks:e}=i,{splittableMarks:r}=l.extensionManager,s=e||t.$to.parentOffset&&t.$from.marks();if(n.split(p.pos,2,A).scrollIntoView(),!s||!o)return!0;const a=s.filter((t=>r.includes(t.type.name)));n.ensureMarks(a)}return!0},toggleList:(t,e,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:p,splittableMarks:h}=i.extensionManager,u=F(t,s.schema),f=F(e,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:y}=m,A=b.blockRange(y),w=g||m.$to.parentOffset&&m.$from.marks();if(!A)return!1;const v=Zt((t=>Kt(t.type.name,p)))(m);if(A.depth>=1&&v&&A.depth-v.depth<=1){if(v.node.type===u)return c.liftListItem(f);if(Kt(v.node.type.name,p)&&u.validContent(v.node.content)&&a)return l().command((()=>(o.setNodeMarkup(v.pos,u),!0))).command((()=>te(o,u))).command((()=>ee(o,u))).run()}return n&&w&&a?l().command((()=>{const t=d().wrapInList(u,r),e=w.filter((t=>h.includes(t.type.name)));return o.ensureMarks(e),!!t||c.clearNodes()})).wrapInList(u,r).command((()=>te(o,u))).command((()=>ee(o,u))).run():l().command((()=>!!d().wrapInList(u,r)||c.clearNodes())).wrapInList(u,r).command((()=>te(o,u))).command((()=>ee(o,u))).run()},toggleMark:(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=kt(t,r.schema);return Gt(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:i})=>{const o=F(t,r.schema),s=F(e,r.schema),a=Lt(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(s,l):i.setNode(o,{...l,...n})},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const i=F(t,n.schema);return Lt(n,i,e)?r.lift(i):r.wrapIn(i,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const e=t.tr,n=o.transform;for(let t=n.steps.length-1;t>=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(o.text){const n=e.doc.resolve(o.from).marks();e.replaceWith(o.from,o.to,t.schema.text(o.text,n))}else e.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=kt(t,r.schema),{$from:c,empty:d,ranges:p}=a;if(!i)return!0;if(d&&s){let{from:t,to:e}=a;const r=null===(o=c.marks().find((t=>t.type===l)))||void 0===o?void 0:o.attrs,i=_t(c,l,r);i&&(t=i.from,e=i.to),n.removeMark(t,e,l)}else p.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=Nt("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(o=F(t,r.schema)),"mark"===a&&(s=kt(t,r.schema)),i&&n.selection.ranges.forEach((t=>{const i=t.$from.pos,a=t.$to.pos;let l,c,d,p;n.selection.empty?r.doc.nodesBetween(i,a,((t,e)=>{o&&o===t.type&&(d=Math.max(e,i),p=Math.min(e+t.nodeSize,a),l=e,c=t)})):r.doc.nodesBetween(i,a,((t,r)=>{r<i&&o&&o===t.type&&(d=Math.max(r,i),p=Math.min(r+t.nodeSize,a),l=r,c=t),r>=i&&r<=a&&(o&&o===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((o=>{if(s===o.type){const l=Math.max(r,i),c=Math.min(r+t.nodeSize,a);n.addMark(l,c,s.create({...o.attrs,...e}))}})))})),c&&(void 0!==l&&n.setNodeMarkup(l,void 0,{...c.attrs,...e}),s&&c.marks.length&&c.marks.forEach((t=>{s===t.type&&n.addMark(d,p,s.create({...t.attrs,...e}))})))})),!0)},wrapIn:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),l=s&&(0,a.nd)(s,t,e);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(F(t,n.schema),e)(n,r),wrapInList:(t,e={})=>({state:n,dispatch:r})=>R(F(t,n.schema),e)(n,r)});const re=gt.create({name:"commands",addCommands:()=>({...ne})}),ie=gt.create({name:"drop",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),oe=gt.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),se=new r.H$("focusEvents"),ae=gt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new r.Sy({key:se,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),le=gt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:i}=e,{empty:o,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock&&a>0?e.doc.resolve(a-1):s,d=c.parent.type.spec.isolating,p=s.pos-s.parentOffset,h=d&&1===c.parent.childCount?p===s.pos:r.Y1.atStart(i).from===a;return!(!o||!l.type.isTextblock||l.textContent.length||!h||h&&"paragraph"===s.parent.type.name)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},o={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ot()||Tt()?o:i},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some((t=>t.getMeta("composition"))))return;const i=t.some((t=>t.docChanged))&&!e.doc.eq(n.doc),o=t.some((t=>t.getMeta("preventClearDocument")));if(!i||o)return;const{empty:s,from:a,to:l}=e.selection,c=r.Y1.atStart(e.doc).from,d=r.Y1.atEnd(e.doc).to;if(s||!(a===c&&l===d))return;if(!Jt(n.doc))return;const p=n.tr,h=D({state:n,transaction:p}),{commands:u}=new z({editor:this.editor,state:h});return u.clearNodes(),p.steps.length?p:void 0}})]}}),ce=gt.create({name:"paste",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),de=gt.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class pe{get name(){return this.node.type.name}constructor(t,e,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!==(t=this.actualDepth)&&void 0!==t?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),e=this.resolvedPos.doc.resolve(t);return new pe(e,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new pe(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new pe(t,this.editor)}get children(){const t=[];return this.node.content.forEach(((e,n)=>{const r=e.isBlock&&!e.isTextblock,i=e.isAtom&&!e.isText,o=this.pos+n+(i?0:1),s=this.resolvedPos.doc.resolve(o);if(!r&&s.depth<=this.depth)return;const a=new pe(s,this.editor,r,r?e:null);r&&(a.actualDepth=this.depth+1),t.push(new pe(s,this.editor,r,r?e:null))})),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===t)if(Object.keys(e).length>0){const t=r.node.attrs,n=Object.keys(e);for(let r=0;r<n.length;r+=1){const i=n[r];if(t[i]!==e[i])break}}else n=r;r=r.parent}return n}querySelector(t,e={}){return this.querySelectorAll(t,e,!0)[0]||null}querySelectorAll(t,e={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const i=Object.keys(e);return this.children.forEach((o=>{if(!(n&&r.length>0)){if(o.node.type.name===t){i.every((t=>e[t]===o.node.attrs[t]))&&r.push(o)}n&&r.length>0||(r=r.concat(o.querySelectorAll(t,e,n)))}})),r}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}class he extends H{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",(({event:t,slice:e,moved:n})=>this.options.onDrop(t,e,n))),this.on("paste",(({event:t,slice:e})=>this.options.onPaste(t,e))),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 0 !important;\n height: 0 !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=W(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach((t=>{const r="string"==typeof t?`${t}$`:t.key;n=e.filter((t=>!t.key.startsWith(r)))})),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[oe,At.configure({blockSeparator:null===(e=null===(t=this.options.coreExtensionOptions)||void 0===t?void 0:t.clipboardTextSerializer)||void 0===e?void 0:e.blockSeparator}),re,ae,le,de,ie,ce].filter((t=>"object"!=typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name])):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new mt(n,this)}createCommandManager(){this.commandManager=new z({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let e;try{e=Pt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message)))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter((t=>"collaboration"!==t.name)),this.createExtensionManager()}}),e=Pt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=St(e,this.options.autofocus);this.view=new i.tk(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...null===(t=this.options.editorProps)||void 0===t?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:r.yy.create({doc:e,selection:n||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),i=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return Vt(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return function(t,e,n={}){if(!e)return Lt(t,null,n)||Gt(t,null,n);const r=Nt(e,t.schema);return"node"===r?Lt(t,e,n):"mark"===r&&Gt(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return tt(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return Ft(this.state.doc,{blockSeparator:e,textSerializers:{...yt(this.schema),...n}})}get isEmpty(){return Jt(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}$node(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new pe(e,this)}get $doc(){return this.$pos(0)}}function ue(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=q(t.getAttributes,void 0,r);if(!1===i||null===i)return null;const{tr:o}=e,s=r[r.length-1],a=r[0];if(s){const r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(qt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>l)).length)return null;c<n.to&&o.delete(c,n.to),l>n.from&&o.delete(n.from+r,l);const d=n.from+r+s.length;o.addMark(n.from+r,d,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function fe(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=q(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const e=r[0][r[0].length-1];o.insertText(e,s+r[0].length-1),o.replaceWith(t,a,l)}else if(r[0]){const e=t.type.isInline?s:s-1;o.insert(e,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function me(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=q(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function ge(t){return new rt({find:t.find,handler:({state:e,range:n,match:r})=>{let i=t.replace,o=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);i+=r[0].slice(t+r[1].length),o+=t;const e=o-s;e>0&&(i=r[0].slice(t-e,t)+i,o=s)}e.tr.insertText(i,o,s)}})}function be(t){return new rt({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=q(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,t.type,o);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:i}=t.editor.extensionManager,o=r||n.$to.parentOffset&&n.$from.marks();if(o){const t=o.filter((t=>i.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";i().updateAttributes(e,o).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&(0,a.Mn)(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}class ye{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=q(j(this,"addOptions",{name:this.name}))),this.storage=q(j(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ye(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>lt(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new ye(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=q(j(e,"addOptions",{name:e.name})),e.storage=q(j(e,"addStorage",{name:e.name,options:e.options})),e}}function Ae(t){return new dt({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=q(t.getAttributes,void 0,r,i);if(!1===o||null===o)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),i=n.from+l.indexOf(a),d=i+a.length;if(qt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>i)).length)return null;d<n.to&&s.delete(d,n.to),i>n.from&&s.delete(n.from+r,i),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}function we(t){return new dt({find:t.find,handler({match:e,chain:n,range:r,pasteEvent:i}){const o=q(t.getAttributes,void 0,e,i),s=q(t.getContent,void 0,o);if(!1===o||null===o)return null;const a={type:t.type.name,attrs:o};s&&(a.content=s),e.input&&n().deleteRange(r).insertContentAt(r.from,a)}})}},42626:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(88573).NB.create({name:"doc",topNode:!0,content:"block+"})},39615:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(88573).NB.create({name:"text",group:"inline"})},64652:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>i});var r=n(88573);const i=r.hj.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}),addInputRules(){const t=[];var e;return!1!==this.options.emDash&&t.push((e=this.options.emDash,(0,r.DS)({find:/--$/,replace:null!=e?e:"—"}))),!1!==this.options.ellipsis&&t.push((t=>(0,r.DS)({find:/\.\.\.$/,replace:null!=t?t:"…"}))(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&t.push((t=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=t?t:"“"}))(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&t.push((t=>(0,r.DS)({find:/"$/,replace:null!=t?t:"”"}))(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&t.push((t=>(0,r.DS)({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=t?t:"‘"}))(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&t.push((t=>(0,r.DS)({find:/'$/,replace:null!=t?t:"’"}))(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&t.push((t=>(0,r.DS)({find:/<-$/,replace:null!=t?t:"←"}))(this.options.leftArrow)),!1!==this.options.rightArrow&&t.push((t=>(0,r.DS)({find:/->$/,replace:null!=t?t:"→"}))(this.options.rightArrow)),!1!==this.options.copyright&&t.push((t=>(0,r.DS)({find:/\(c\)$/,replace:null!=t?t:"©"}))(this.options.copyright)),!1!==this.options.trademark&&t.push((t=>(0,r.DS)({find:/\(tm\)$/,replace:null!=t?t:"™"}))(this.options.trademark)),!1!==this.options.servicemark&&t.push((t=>(0,r.DS)({find:/\(sm\)$/,replace:null!=t?t:"℠"}))(this.options.servicemark)),!1!==this.options.registeredTrademark&&t.push((t=>(0,r.DS)({find:/\(r\)$/,replace:null!=t?t:"®"}))(this.options.registeredTrademark)),!1!==this.options.oneHalf&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(1\/2)\s$/,replace:null!=t?t:"½"}))(this.options.oneHalf)),!1!==this.options.plusMinus&&t.push((t=>(0,r.DS)({find:/\+\/-$/,replace:null!=t?t:"±"}))(this.options.plusMinus)),!1!==this.options.notEqual&&t.push((t=>(0,r.DS)({find:/!=$/,replace:null!=t?t:"≠"}))(this.options.notEqual)),!1!==this.options.laquo&&t.push((t=>(0,r.DS)({find:/<<$/,replace:null!=t?t:"«"}))(this.options.laquo)),!1!==this.options.raquo&&t.push((t=>(0,r.DS)({find:/>>$/,replace:null!=t?t:"»"}))(this.options.raquo)),!1!==this.options.multiplication&&t.push((t=>(0,r.DS)({find:/\d+\s?([*x])\s?\d+$/,replace:null!=t?t:"×"}))(this.options.multiplication)),!1!==this.options.superscriptTwo&&t.push((t=>(0,r.DS)({find:/\^2$/,replace:null!=t?t:"²"}))(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&t.push((t=>(0,r.DS)({find:/\^3$/,replace:null!=t?t:"³"}))(this.options.superscriptThree)),!1!==this.options.oneQuarter&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(1\/4)\s$/,replace:null!=t?t:"¼"}))(this.options.oneQuarter)),!1!==this.options.threeQuarters&&t.push((t=>(0,r.DS)({find:/(?:^|\s)(3\/4)\s$/,replace:null!=t?t:"¾"}))(this.options.threeQuarters)),t}})},61456:(t,e,n)=>{"use strict";n.d(e,{o:()=>a});const r="֑-߿יִ-﷽ﹰ-ﻼ",i="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",o=new RegExp("^[^"+i+"]*["+r+"]"),s=new RegExp("^[^"+r+"]*["+i+"]");function a(t){const e=String(t||"");return o.test(e)?"rtl":s.test(e)?"ltr":"neutral"}},68707:(t,e,n)=>{"use strict";n.d(e,{OR:()=>o,_Y:()=>a,fk:()=>l,hl:()=>d,i9:()=>p,ws:()=>h});var r=n(93311);const{I:i}=r.Al,o=t=>void 0===t.strings,s=()=>document.createComment(""),a=(t,e,n)=>{var r;const o=t._$AA.parentNode,a=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=o.insertBefore(s(),a),r=o.insertBefore(s(),a);n=new i(e,r,t,t.options)}else{const e=n._$AB.nextSibling,i=n._$AM,s=i!==t;if(s){let e;null===(r=n._$AQ)||void 0===r||r.call(n,t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==i._$AU&&n._$AP(e)}if(e!==a||s){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;o.insertBefore(t,a),t=e}}}return n},l=(t,e,n=t)=>(t._$AI(e,n),t),c={},d=(t,e=c)=>t._$AH=e,p=t=>t._$AH,h=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let n=t._$AA;const r=t._$AB.nextSibling;for(;n!==r;){const t=n.nextSibling;n.remove(),n=t}}},47514:(t,e,n)=>{"use strict";n.d(e,{XM:()=>i,Xe:()=>o,pX:()=>r});const r={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=t=>(...e)=>({_$litDirective$:t,values:e});class o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},93311:(t,e,n)=>{"use strict";var r;n.d(e,{Al:()=>j,Jb:()=>E,Ld:()=>S,dy:()=>C,sY:()=>Z});const i=window,o=i.trustedTypes,s=o?o.createPolicy("lit-html",{createHTML:t=>t}):void 0,a="$lit$",l=`lit$${(Math.random()+"").slice(9)}$`,c="?"+l,d=`<${c}>`,p=document,h=()=>p.createComment(""),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,m=t=>f(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),g="[ \t\n\f\r]",b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,A=/>/g,w=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,x=/"/g,_=/^(?:script|style|textarea|title)$/i,k=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),C=k(1),E=(k(2),Symbol.for("lit-noChange")),S=Symbol.for("lit-nothing"),B=new WeakMap,O=p.createTreeWalker(p,129,null,!1),M=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":"",c=b;for(let e=0;e<n;e++){const n=t[e];let s,p,h=-1,u=0;for(;u<n.length&&(c.lastIndex=u,p=c.exec(n),null!==p);)u=c.lastIndex,c===b?"!--"===p[1]?c=y:void 0!==p[1]?c=A:void 0!==p[2]?(_.test(p[2])&&(i=RegExp("</"+p[2],"g")),c=w):void 0!==p[3]&&(c=w):c===w?">"===p[0]?(c=null!=i?i:b,h=-1):void 0===p[1]?h=-2:(h=c.lastIndex-p[2].length,s=p[1],c=void 0===p[3]?w:'"'===p[3]?x:v):c===x||c===v?c=w:c===y||c===A?c=b:(c=w,i=void 0);const f=c===w&&t[e+1].startsWith("/>")?" ":"";o+=c===b?n+d:h>=0?(r.push(s),n.slice(0,h)+a+n.slice(h)+l+f):n+l+(-2===h?(r.push(void 0),e):f)}const p=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(p):p,r]};class I{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,s=0;const d=t.length-1,p=this.parts,[u,f]=M(t,e);if(this.el=I.createElement(u,n),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=O.nextNode())&&p.length<d;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith(a)||e.startsWith(l)){const n=f[s++];if(t.push(e),void 0!==n){const t=r.getAttribute(n.toLowerCase()+a).split(l),e=/([.?@])?(.*)/.exec(n);p.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?R:"?"===e[1]?D:"@"===e[1]?z:N})}else p.push({type:6,index:i})}for(const e of t)r.removeAttribute(e)}if(_.test(r.tagName)){const t=r.textContent.split(l),e=t.length-1;if(e>0){r.textContent=o?o.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],h()),O.nextNode(),p.push({type:2,index:++i});r.append(t[e],h())}}}else if(8===r.nodeType)if(r.data===c)p.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(l,t+1));)p.push({type:7,index:i}),t+=l.length-1}i++}}static createElement(t,e){const n=p.createElement("template");return n.innerHTML=t,n}}function $(t,e,n=t,r){var i,o,s,a;if(e===E)return e;let l=void 0!==r?null===(i=n._$Co)||void 0===i?void 0:i[r]:n._$Cl;const c=u(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,n,r)),void 0!==r?(null!==(s=(a=n)._$Co)&&void 0!==s?s:a._$Co=[])[r]=l:n._$Cl=l),void 0!==l&&(e=$(t,l._$AS(t,e.values),l,r)),e}class T{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:n},parts:r}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:p).importNode(n,!0);O.currentNode=i;let o=O.nextNode(),s=0,a=0,l=r[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new L(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new H(o,this,t)),this.u.push(e),l=r[++a]}s!==(null==l?void 0:l.index)&&(o=O.nextNode(),s++)}return i}p(t){let e=0;for(const n of this.u)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class L{constructor(t,e,n,r){var i;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cm=null===(i=null==r?void 0:r.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$(this,t,e),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==E&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):m(t)?this.k(t):this.g(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}g(t){this._$AH!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(p.createTextNode(t)),this._$AH=t}$(t){var e;const{values:n,_$litType$:r}=t,i="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=I.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.p(n);else{const t=new T(i,this),e=t.v(this.options);t.p(n),this.T(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new I(t)),e}k(t){f(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new L(this.S(h()),this.S(h()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class N{constructor(t,e,n,r,i){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=$(this,t,e,0),o=!u(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=$(this,r[n+s],e,s),a===E&&(a=this._$AH[s]),o||(o=!u(a)||a!==this._$AH[s]),a===S?t=S:t!==S&&(t+=(null!=a?a:"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class R extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}const P=o?o.emptyScript:"";class D extends N{constructor(){super(...arguments),this.type=4}j(t){t&&t!==S?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class z extends N{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=$(this,t,e,0))&&void 0!==n?n:S)===E)return;const r=this._$AH,i=t===S&&r!==S||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==S&&(r===S||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class H{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){$(this,t)}}const j={P:a,A:l,M:c,C:1,L:M,D:T,R:m,V:$,I:L,H:N,N:D,U:z,F:R,B:H},U=i.litHtmlPolyfillSupport;null==U||U(I,L),(null!==(r=i.litHtmlVersions)&&void 0!==r?r:i.litHtmlVersions=[]).push("2.7.0");const Z=(t,e,n)=>{var r,i;const o=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:e;let s=o._$litPart$;if(void 0===s){const t=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:null;o._$litPart$=s=new L(e.insertBefore(h(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s}},61828:(t,e,n)=>{"use strict";n.d(e,{V:()=>u,i:()=>g});var r=n(93311),i=n(68707),o=n(47514);const s=(t,e)=>{var n,r;const i=t._$AN;if(void 0===i)return!1;for(const t of i)null===(r=(n=t)._$AO)||void 0===r||r.call(n,e,!1),s(t,e);return!0},a=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===(null==n?void 0:n.size))},l=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),p(e)}};function c(t){void 0!==this._$AN?(a(this),this._$AM=t,l(this)):this._$AM=t}function d(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)s(r[t],!1),a(r[t]);else null!=r&&(s(r,!1),a(r));else s(this,t)}const p=t=>{var e,n,r,i;t.type==o.pX.CHILD&&(null!==(e=(r=t)._$AP)&&void 0!==e||(r._$AP=d),null!==(n=(i=t)._$AQ)&&void 0!==n||(i._$AQ=c))};class h extends o.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),l(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,r;t!==this.isConnected&&(this.isConnected=t,t?null===(n=this.reconnected)||void 0===n||n.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),e&&(s(this,t),a(this))}setValue(t){if((0,i.OR)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const u=()=>new f;class f{}const m=new WeakMap,g=(0,o.XM)(class extends h{render(t){return r.Ld}update(t,[e]){var n;const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=e,this.dt=null===(n=t.options)||void 0===n?void 0:n.host,this.rt(this.ct=t.element)),r.Ld}rt(t){var e;if("function"==typeof this.Y){const n=null!==(e=this.dt)&&void 0!==e?e:globalThis;let r=m.get(n);void 0===r&&(r=new WeakMap,m.set(n,r)),void 0!==r.get(this.Y)&&this.Y.call(this.dt,void 0),r.set(this.Y,t),void 0!==t&&this.Y.call(this.dt,t)}else this.Y.value=t}get lt(){var t,e,n;return"function"==typeof this.Y?null===(e=m.get(null!==(t=this.dt)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.Y):null===(n=this.Y)||void 0===n?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},8427:(t,e,n)=>{"use strict";n.d(e,{oi:()=>x,iv:()=>l,dy:()=>v.dy});const r=window,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t;var d;const p=window,h=p.trustedTypes,u=h?h.emptyScript:"",f=p.reactiveElementPolyfillSupport,m={toAttribute(t,e){switch(e){case Boolean:t=t?u:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},g=(t,e)=>e!==t&&(e==e||t==t),b={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:g};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const r=this._$Ep(n,e);void 0!==r&&(this._$Ev.set(r,n),t.push(r))})),t}static createProperty(t,e=b){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const i=this[t];this[e]=r,this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||b}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const n=document.createElement("style"),i=r.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,t.appendChild(n)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=b){var r;const i=this.constructor._$Ep(t,n);if(void 0!==i&&!0===n.reflect){const o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:m).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,i=r._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=r.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:m;this._$El=i,this[i]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||g)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:y}),(null!==(d=p.reactiveElementVersions)&&void 0!==d?d:p.reactiveElementVersions=[]).push("1.6.1");var A,w,v=n(93311);class x extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,v.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return v.Jb}}x.finalized=!0,x._$litElement$=!0,null===(A=globalThis.litElementHydrateSupport)||void 0===A||A.call(globalThis,{LitElement:x});const _=globalThis.litElementPolyfillSupport;null==_||_({LitElement:x});(null!==(w=globalThis.litElementVersions)&&void 0!==w?w:globalThis.litElementVersions=[]).push("3.3.0")},38404:(t,e,n)=>{"use strict";n.d(e,{$:()=>g,h:()=>m});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),s=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),a="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=s||o&&+o[1]<57,c=0;c<10;c++)r[48+c]=r[96+c]=String(c);for(c=1;c<=24;c++)r[c+111]="F"+c;for(c=65;c<=90;c++)r[c]=String.fromCharCode(c+32),i[c]=String.fromCharCode(c);for(var d in r)i.hasOwnProperty(d)||(i[d]=r[d]);var p=n(27191);const h="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function u(t){let e,n,r,i,o=t.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let t=0;t<o.length-1;t++){let s=o[t];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);h?i=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function f(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function m(t){return new p.Sy({props:{handleKeyDown:g(t)}})}function g(t){let e=function(t){let e=Object.create(null);for(let n in t)e[u(n)]=t[n];return e}(t);return function(t,n){let o,s=function(t){var e=!(l&&(t.ctrlKey||t.altKey||t.metaKey)||a&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?i:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),c=e[f(s,n)];if(c&&c(t.state,t.dispatch,t))return!0;if(1==s.length&&" "!=s){if(n.shiftKey){let r=e[f(s,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||s.charCodeAt(0)>127)&&(o=r[n.keyCode])&&o!=s){let r=e[f(o,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},52665:(t,e,n)=>{"use strict";function r(t){this.content=t}n.d(e,{aw:()=>J,PW:()=>pt,HY:()=>a,vc:()=>p,ZU:()=>X,NB:()=>I,Ts:()=>O,e4:()=>h,V_:()=>G,p2:()=>u}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,o=i.find(t),s=i.content.slice();return-1==o?s.push(n||t,e):(s[o+1]=e,n&&(s[o]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var i=this.remove(e),o=i.content.slice(),s=i.find(t);return o.splice(-1==s?o.length:s,0,e,n),new r(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach((function(e,n){t[e]=n})),t},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};const i=r;function o(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i!=s){if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let t=0;i.text[t]==s.text[t];t++)n++;return n}if(i.content.size||s.content.size){let t=o(i.content,s.content,n+1);if(null!=t)return t}n+=i.nodeSize}else n+=i.nodeSize}}function s(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let a=t.child(--i),l=e.child(--o),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let t=0,e=Math.min(a.text.length,l.text.length);for(;t<e&&a.text[a.text.length-t-1]==l.text[l.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(a.content.size||l.content.size){let t=s(a.content,l.content,n-1,r-1);if(t)return t}n-=c,r-=c}else n-=c,r-=c}}class a{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let o=0,s=0;s<e;o++){let a=this.content[o],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,i||null,o)&&a.content.size){let i=s+1;a.nodesBetween(Math.max(0,t-i),Math.min(a.content.size,e-i),n,r+i)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",o=!0;return this.nodesBetween(t,e,((s,a)=>{let l=s.isText?s.text.slice(Math.max(t,a)-a,e-a):s.isLeaf?r?"function"==typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&l||s.isTextblock)&&n&&(o?o=!1:i+=n),i+=l}),0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<t.content.length;i++)r.push(t.content[i]);return new a(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,o=0;o<e;i++){let s=this.content[i],a=o+s.nodeSize;a>t&&((o<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-o),Math.min(s.text.length,e-o)):s.cut(Math.max(0,t-o-1),Math.min(s.content.size,e-o-1))),n.push(s),r+=s.nodeSize),o=a}return new a(n,r)}cutByIndex(t,e){return t==e?a.empty:0==t&&e==this.content.length?this:new a(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new a(r,i)}addToStart(t){return new a([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new a(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return o(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return s(this,t,e,n)}findIndex(t,e=-1){if(0==t)return c(0,t);if(t==this.size)return c(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?c(n+1,i):c(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return a.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return a.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new a(e||t,n)}static from(t){if(!t)return a.empty;if(t instanceof a)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new a([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}a.empty=new a([],0);const l={index:0,offset:0};function c(t,e){return l.index=t,l.offset=e,l}function d(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!d(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!d(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class p{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&d(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return p.none;if(t instanceof p)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}p.none=[];class h extends Error{}class u{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=m(this.content,t+this.openStart,e);return n&&new u(n,this.openStart,this.openEnd)}removeBetween(t,e){return new u(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return u.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new u(a.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new u(t,n,r)}}function f(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(i==e||o.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(f(o.content,e-i-1,n-i-1)))}function m(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=m(s.content,e-o-1,n);return a&&t.replaceChild(i,s.copy(a))}function g(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return b(t,e,n,0)}function b(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=b(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:i,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(a.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return x(o,_(t,i,s,e,r))}{let r=t.parent,i=r.content;return x(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return x(o,k(t,e,r))}function y(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function A(t,e,n){let r=t.node(n);return y(r,e.node(n)),r}function w(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function v(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(w(t.nodeAfter,r),o++));for(let t=o;t<s;t++)w(i.child(t),r);e&&e.depth==n&&e.textOffset&&w(e.nodeBefore,r)}function x(t,e){return t.type.checkContent(e),t.copy(e)}function _(t,e,n,r,i){let o=t.depth>i&&A(t,e,i+1),s=r.depth>i&&A(n,r,i+1),l=[];return v(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(y(o,s),w(x(o,_(t,e,n,r,i+1)),l)):(o&&w(x(o,k(t,e,i+1)),l),v(e,n,i,l),s&&w(x(s,k(n,r,i+1)),l)),v(r,null,i,l),new a(l)}function k(t,e,n){let r=[];if(v(null,t,n,r),t.depth>n){w(x(A(t,e,n+1),k(t,e,n+1)),r)}return v(e,null,n,r),new a(r)}u.empty=new u(a.empty,0,0);class C{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return p.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new O(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:o}=e.content.findIndex(i),s=i-o;if(n.push(e,t,r+o),!s)break;if(e=e.child(t),e.isText)break;i=s-1,r+=o+1}return new C(e,n,i)}static resolveCached(t,e){let n=B.get(t);if(n)for(let t=0;t<n.elts.length;t++){let r=n.elts[t];if(r.pos==e)return r}else B.set(t,n=new E);let r=n.elts[n.i]=C.resolve(t,e);return n.i=(n.i+1)%S,r}}class E{constructor(){this.elts=[],this.i=0}}const S=12,B=new WeakMap;class O{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const M=Object.create(null);class I{constructor(t,e,n,r=p.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||a.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&d(this.attrs,e||t.defaultAttrs||M)&&p.sameSet(this.marks,n||p.none)}copy(t=null){return t==this.content?this:new I(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new I(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return u.empty;let r=this.resolve(t),i=this.resolve(e),o=n?0:r.sharedDepth(e),s=r.start(o),a=r.node(o).content.cut(r.pos-s,i.pos-s);return new u(a,r.depth-o,i.depth-o)}replace(t,e,n){return g(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return C.resolveCached(this,t)}resolveNoCache(t){return C.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),T(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=a.empty,r=0,i=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,r,i),s=o&&o.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;t<i;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),o=i&&i.matchFragment(this.content,e);return!!o&&o.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=p.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!p.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=a.fromJSON(t,e.content),i=t.nodeType(e.type).create(e.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}I.prototype.text=void 0;class $ extends I{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):T(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new $(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new $(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function T(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class L{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new N(t,e);if(null==n.next)return L.empty;let r=R(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=Object.create(null);return n(U(t,0));function n(r){let i=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);U(t,n).forEach((t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let o=e[r.join(",")]=new L(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(j);o.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return o}}(function(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((t=>t.to=e))}function o(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(o(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),i(o(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return i(o(t.expr,e),s),i(o(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(o(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();i(o(t.expr,s),e),s=e}if(-1==t.max)i(o(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),i(o(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=o(t.exprs[r],e);if(r==t.exprs.length-1)return s;i(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,o=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];o.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function i(o,s){let l=o.matchFragment(t,n);if(l&&(!e||l.validEnd))return a.from(s.map((t=>t.createAndFill())));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=i(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:o,next:s}=i.next[t];o.isLeaf||o.hasRequiredAttrs()||o.name in e||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),e[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r})).join("\n")}}L.empty=new L(!0);class N{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function R(t){let e=[];do{e.push(P(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function P(t){let e=[];do{e.push(D(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function D(t){let e=function(t){if(t.eat("(")){let e=R(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.isInGroup(e)&&i.push(r)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=H(t,e)}return e}function z(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function H(t,e){let n=z(t),r=n;return t.eat(",")&&(r="}"!=t.next?z(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function j(t,e){return e-t}function U(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:o}=i[t];r||-1!=n.indexOf(o)||e(o)}}(e),n.sort(j)}function Z(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function F(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function V(t,e,n,r){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function Y(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new q(t,r,e[r]);return n}class W{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Y(t,n.attrs),this.defaultAttrs=Z(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==L.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:F(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new I(this,this.computeAttrs(t),a.from(e),p.setFrom(n))}createChecked(t=null,e,n){return e=a.from(e),this.checkContent(e),new I(this,this.computeAttrs(t),e,p.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=a.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(a.empty,!0);return i?new I(this,t,e.append(i),p.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){V(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:p.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new W(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class q{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class X{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=Y(t,r.attrs),this.excluded=null;let i=Z(this.attrs);this.instance=i?new p(this,i):null}create(t=null){return!t&&this.instance?this.instance:new p(this,F(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,i)=>n[t]=new X(t,r++,e,i))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){V(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class G{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=i.from(t.nodes),e.marks=i.from(t.marks||{}),this.nodes=W.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=n[r]||(n[r]=L.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?K(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:K(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof W))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new $(n,n.defaultAttrs,t,p.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return I.fromJSON(this,t)}markFromJSON(t){return p.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function K(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class J{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach((t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new at(this,e,!1);return n.addAll(t,p.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new at(this,e,!0);return n.addAll(t,p.none,e.from,e.to),u.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(lt(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(!(0!=o.indexOf(t)||r.context&&!n.matchesContext(r.context)||o.length>t.length&&(61!=o.charCodeAt(t.length)||o.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach((t=>{n(t=ct(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=ct(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new J(t,J.schemaRules(t)))}}const Q={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},tt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},et={ol:!0,ul:!0},nt=1,rt=2,it=4;function ot(t,e,n){return null!=e?(e?nt:0)|("full"===e?rt:0):t&&"pre"==t.whitespace?nt|rt:n&~it}class st{constructor(t,e,n,r,i,o){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=p.none,this.match=i||(o&it?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(a.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&nt)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=a.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Q.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class at{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,i=e.topNode,o=ot(null,e.preserveWhitespace,0)|(n?it:0);r=i?new st(i.type,i.attrs,p.none,!0,e.topMatch||i.type.contentMatch,o):new st(n?null:t.schema.topNodeType,null,p.none,!0,null,o),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=r.options&rt?"full":this.localPreserveWS||(r.options&nt)>0;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)n="full"!==i?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let o,s=t.nodeName.toLowerCase();et.hasOwnProperty(s)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&et.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let a=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(o=this.parser.matchTag(t,this,n));t:if(a?a.ignore:tt.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,e);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(t=a.skip);let n,r=this.needsBlock;if(Q.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let o=a&&a.skip?e:this.readStyles(t,e);o&&this.addAll(t,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,a,n,!1===a.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],i=n.getPropertyValue(r);if(i)for(let t;;){let n=this.parser.matchStyle(r,i,this,t);if(!n)break;if(n.ignore)return null;if(e=n.clearMark?e.filter((t=>!n.clearMark(t))):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1!==n.consuming)break;t=n}}return e}addElementByRule(t,e,n,r){let i,o;if(e.node)if(o=this.parser.schema.nodes[e.node],o.isLeaf)this.insertNode(o.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(o,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t,n,!1)));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(s)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let e=this.open,o=0;e>=0;e--){let s=this.nodes[e],a=s.findWrapping(t);if(a&&(!r||r.length>a.length+o)&&(r=a,i=s,!a.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let t=0;t<r.length;t++)e=this.enterInner(r[t],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=p.none;for(let i of r.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):dt(i.type,t.type))&&(n=i.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(t);let s=ot(t,i,o.options);o.options&it&&0==o.content.length&&(s|=it);let a=p.none;return n=n.filter((e=>!(o.type?o.type.allowsMarkType(e.type):dt(e.type,t))||(a=e.addToSet(a),!1))),this.nodes.push(new st(t,e,a,r,null,s)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=nt)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=i;s--)if(o(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!t||t.name!=a&&!t.isInGroup(a))return!1;s--}}return!0};return o(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function lt(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function ct(t){let e={};for(let n in t)e[n]=t[n];return e}function dt(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=t=>{o.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e)return!0;if(o.indexOf(i)<0&&s(i))return!0}};if(s(i.contentMatch))return!0}}class pt{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ut(e).createDocumentFragment());let r=n,i=[];return t.forEach((t=>{if(i.length||t.marks.length){let n=0,o=0;for(;n<i.length&&o<t.marks.length;){let e=t.marks[o];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,o++}else o++}for(;n<i.length;)r=i.pop()[1];for(;o<t.marks.length;){let n=t.marks[o++],s=this.serializeMark(n,t.isInline,e);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=gt(ut(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&gt(ut(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return gt(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new pt(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=ht(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return ht(t.marks)}}function ht(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ut(t){return t.document||window.document}const ft=new WeakMap;function mt(t){let e=ft.get(t);return void 0===e&&ft.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function gt(t,e,n,r){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i,o=e[0];if("string"!=typeof o)throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=mt(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],d=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){d=2;for(let t in c)if(null!=c[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):l.setAttribute(t,c[t])}}for(let i=d;i<e.length;i++){let o=e[i];if(0===o){if(i<e.length-1||i>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:i}=gt(t,o,n,r);if(l.appendChild(e),i){if(s)throw new RangeError("Multiple content holes");s=i}}}return{dom:l,contentDOM:s}}},27191:(t,e,n)=>{"use strict";n.d(e,{Bs:()=>d,C1:()=>f,H$:()=>B,Sy:()=>C,Y1:()=>s,qv:()=>h,xm:()=>a,yy:()=>_});var r=n(52665),i=n(26151);const o=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new a(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=r.p2.empty){let n=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=n,n=n.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],d=t.mapping.slice(o);t.replaceRange(d.map(l.pos),d.map(c.pos),a?r.p2.empty:e),0==a&&b(t,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],a=t.mapping.slice(n),l=a.map(o.pos),c=a.map(s.pos);i?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),b(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new d(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in o)throw new RangeError("Duplicate use of selection JSON ID "+t);return o[t]=e,e.prototype.jsonID=t,e}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(t,e){this.$from=t,this.$to=e}}let l=!1;function c(t){l||t.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class d extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof d&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new p(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new d(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0)&&(t=e),new d(t,e)}}s.jsonID("text",d);class p{constructor(t,e){this.anchor=t,this.head=e}map(t){return new p(t.map(this.anchor),t.map(this.head))}resolve(t){return d.between(t.resolve(this.anchor),t.resolve(this.head))}}class h extends s{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?s.near(i):new h(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(t){return t instanceof h&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new u(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new h(t.resolve(e.anchor))}static create(t,e){return new h(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}h.prototype.visible=!1,s.jsonID("node",h);class u{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new p(n,n):new u(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&h.isSelectable(n)?new h(e):s.near(e)}}class f extends s{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=r.p2.empty){if(e==r.p2.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}s.jsonID("all",f);const m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,o=!1){if(e.inlineContent)return d.create(t,n);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let r=e.child(s);if(r.isAtom){if(!o&&h.isSelectable(r))return h.create(t,n-(i<0?r.nodeSize:0))}else{let e=g(t,r,n+i,i<0?r.childCount:0,i,o);if(e)return e}n+=r.nodeSize*i}return null}function b(t,e,n){let r=t.steps.length-1;if(r<e)return;let o,a=t.steps[r];(a instanceof i.Pu||a instanceof i.FC)&&(t.mapping.maps[r].forEach(((t,e,n,r)=>{null==o&&(o=r)})),t.setSelection(s.near(t.doc.resolve(o),n)))}class y extends i.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function A(t,e){return e&&t?t.bind(e):t}class w{constructor(t,e,n){this.name=t,this.init=A(e.init,n),this.apply=A(e.apply,n)}}const v=[new w("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new w("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new w("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class x{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=v.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new w(t.key,t.spec.state,t))}))}}class _{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let a=r?r[o].n:0,l=r?r[o].state:this,c=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<o?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new _(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new y(this)}static create(t){let e=new x(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new _(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new x(this.schema,t.plugins),n=e.fields,r=new _(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new x(t.schema,t.plugins),o=new _(i);return i.fields.forEach((i=>{if("doc"==i.name)o.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,r))return void(o[i.name]=a.fromJSON.call(s,t,e[r],o))}o[i.name]=i.init(t,o)}})),o}}function k(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):"handleDOMEvents"==r&&(i=k(i,e,{})),n[r]=i}return n}class C{constructor(t){this.spec=t,this.props={},t.props&&k(t.props,this,this.props),this.key=t.key?t.key.key:S("plugin")}getState(t){return t[this.key]}}const E=Object.create(null);function S(t){return t in E?t+"$"+ ++E[t]:(E[t]=0,t+"$")}class B{constructor(t="key"){this.key=S(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},26151:(t,e,n)=>{"use strict";n.d(e,{Ax:()=>O,FC:()=>w,GJ:()=>$,Mn:()=>M,Pu:()=>A,dR:()=>L,k9:()=>k,nd:()=>C,nj:()=>T,wx:()=>W});var r=n(52665);const i=65535,o=Math.pow(2,16);function s(t,e){return t+e*o}function a(t){return t&i}class l{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class c{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&c.empty)return c.empty}recover(t){let e=0,n=a(t);if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+function(t){return(t-(t&i))/o}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>t)break;let d=this.ranges[a+i],p=this.ranges[a+o],h=c+d;if(t<=h){let i=c+r+((d?t==c?-1:t==h?1:e:e)<0?0:p);if(n)return i;let o=t==(e<0?c:h)?null:s(a/3,t-c),u=t==c?2:t==h?1:4;return(e<0?t!=c:t!=h)&&(u|=8),new l(i,u,o)}r+=p-d}return n?t+r:new l(t+r,0,null)}touches(t,e){let n=0,r=a(e),i=this.inverted?2:1,o=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let s=this.ranges[e]-(this.inverted?n:0);if(s>t)break;let a=this.ranges[e+i];if(t<=s+a&&e==3*r)return!0;n+=this.ranges[e+o]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),a=o+(this.inverted?0:i),l=this.ranges[r+e],c=this.ranges[r+n];t(s,s+l,a,a+c),i+=c-l}}invert(){return new c(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?c.empty:new c(t<0?[0,-t,0]:[0,0,t])}}c.empty=new c([]);class d{constructor(t,e,n=0,r=(t?t.length:0)){this.mirror=e,this.from=n,this.to=r,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(t=0,e=this.maps.length){return new d(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,n=this._maps.length;e<t._maps.length;e++){let r=t.getMirror(e);this.appendMap(t._maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this._maps.length+t._maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t._maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new d;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this._maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new l(t,r,null)}}const p=Object.create(null);class h{getMap(){return c.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=p[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in p)throw new RangeError("Duplicate use of step JSON ID "+t);return p[t]=e,e.prototype.jsonID=t,e}}class u{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new u(t,null)}static fail(t){return new u(null,t)}static fromReplace(t,e,n,i){try{return u.ok(t.replace(e,n,i))}catch(t){if(t instanceof r.e4)return u.fail(t.message);throw t}}}function f(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let o=t.child(r);o.content.size&&(o=o.copy(f(o.content,e,o))),o.isInline&&(o=e(o,n,r)),i.push(o)}return r.HY.fromArray(i)}class m extends h{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.p2(f(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),i),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,o)}invert(){return new g(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new m(e.pos,n.pos,this.mark)}merge(t){return t instanceof m&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new m(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new m(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("addMark",m);class g extends h{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(f(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,n)}invert(){return new m(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new g(e.pos,n.pos,this.mark)}merge(t){return t instanceof g&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new g(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new g(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("removeMark",g);class b extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new b(this.pos,e.marks[n]);return new b(this.pos,this.mark)}}return new y(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new b(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new b(e.pos,t.markFromJSON(e.mark))}}h.jsonID("addNodeMark",b);class y extends h{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new b(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new y(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new y(e.pos,t.markFromJSON(e.mark))}}h.jsonID("removeNodeMark",y);class A extends h{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&v(t,this.from,this.to)?u.fail("Structure replace would overwrite content"):u.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new c([this.from,this.to-this.from,this.slice.size])}invert(t){return new A(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new A(e.pos,Math.max(e.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof A)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new A(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new A(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new A(e.from,e.to,r.p2.fromJSON(t,e.slice),!!e.structure)}}h.jsonID("replace",A);class w extends h{constructor(t,e,n,r,i,o,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(t){if(this.structure&&(v(t,this.from,this.gapFrom)||v(t,this.gapTo,this.to)))return u.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return u.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?u.fromReplace(t,this.from,this.to,n):u.fail("Content does not fit in gap")}getMap(){return new c([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new w(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new w(e.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new w(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function v(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let t=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function x(t,e,n,i=n.contentMatch,o=!0){let s=t.doc.nodeAt(e),a=[],l=e+1;for(let e=0;e<s.childCount;e++){let c=s.child(e),d=l+c.nodeSize,p=i.matchType(c.type);if(p){i=p;for(let e=0;e<c.marks.length;e++)n.allowsMarkType(c.marks[e].type)||t.step(new g(l,d,c.marks[e]));if(o&&c.isText&&"pre"!=n.whitespace){let t,e,i=/\r?\n|\r/g;for(;t=i.exec(c.text);)e||(e=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new A(l+t.index,l+t.index+t[0].length,e))}}else a.push(new A(l,d,r.p2.empty));l=d}if(!i.validEnd){let e=i.fillBefore(r.HY.empty,!0);t.replace(l,l,new r.p2(e,0,0))}for(let e=a.length-1;e>=0;e--)t.step(a[e])}function _(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function k(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),o=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,o,e))return n;if(0==n||r.type.spec.isolating||!_(r,i,o))break}return null}function C(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}(t,e),o=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let t=r;a&&t<i;t++)a=a.matchType(n.child(t).type);return a&&a.validEnd?s:null}(r,e);return o?i.map(E).concat({type:e,attrs:n}).concat(o.map(E)):null}function E(t){return{type:t,attrs:null}}function S(t,e,n,r){e.forEach(((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let i=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(i,i+1,e.type.schema.linebreakReplacement.create())}}}))}function B(t,e,n,r){e.forEach(((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text("\n"))}}))}function O(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>o;t--,e--){let n=i.node(t),o=i.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),a=r&&r[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[e]||n;if(!n.canReplace(o+1,n.childCount)||!l.type.validContent(s))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function M(t,e){let n=t.resolve(e),r=n.index();return I(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function I(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),s=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n)return!1;if(!t.type.allowsMarks(o.marks))return!1}return n.validEnd}(t,e))}function $(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,o,s=r.index(t);if(t==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(t+1),s++,o=r.node(t).maybeChild(s)):(i=r.node(t).maybeChild(s-1),o=r.node(t+1)),i&&!i.isTextblock&&I(i,o)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function T(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,o=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(o,o,i);else{let t=s.contentMatchAt(o).findWrapping(i.firstChild.type);a=t&&s.canReplaceWith(o,o,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function L(t,e,n=e,i=r.p2.empty){if(e==n&&!i.size)return null;let o=t.resolve(e),s=t.resolve(n);return N(o,s,i)?new A(e,n,i):new R(o,s,i).fit()}function N(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}h.jsonID("replaceAround",w);class R{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let o=this.placed,s=n.depth,a=i.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new r.p2(o,s,a);return t>-1?new w(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new A(n.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,i=null;n?(i=z(this.unplaced.content,n-1).firstChild,t=i.content):t=this.unplaced.content;let o=t.firstChild;for(let t=this.depth;t>=0;t--){let s,{type:a,match:l}=this.frontier[t],c=null;if(1==e&&(o?l.matchType(o.type)||(c=l.fillBefore(r.HY.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:t,parent:i,inject:c};if(2==e&&o&&(s=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:t,parent:i,wrap:s};if(i&&l.matchType(i.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=z(t,e);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.p2(t,e+1,Math.max(n,i.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=z(t,e);if(i.childCount<=1&&e>0){let o=t.size-e<=e+i.size;this.unplaced=new r.p2(P(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new r.p2(P(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let t=0;t<o.length;t++)this.openFrontierNode(o[t]);let s=this.unplaced,a=n?n.content:s.content,l=s.openStart-t,c=0,d=[],{match:p,type:h}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)d.push(i.child(t));p=p.matchFragment(i)}let u=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let t=a.child(c),e=p.matchType(t.type);if(!e)break;c++,(c>1||0==l||t.content.size)&&(p=e,d.push(H(t.mark(h.allowedMarks(t.marks)),1==c?l:0,c==a.childCount?u:-1)))}let f=c==a.childCount;f||(u=-1),this.placed=D(this.placed,e,r.HY.from(d)),this.frontier[e].match=p,f&&u<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=a;t<u;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?r.p2.empty:new r.p2(P(s.content,t-1,1),t-1,u<0?s.openEnd:t-1):new r.p2(P(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!j(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),o=j(t,e,r,n,i);if(o){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=j(t,n,r,e,!0);if(!i||i.childCount)continue t}return{depth:e,fit:o,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=D(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=D(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=D(this.placed,this.frontier.length,t))}}function P(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(P(t.firstChild.content,e-1,n)))}function D(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(D(t.lastChild.content,e-1,n)))}function z(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function H(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,H(i.firstChild,e-1,1==i.childCount?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(r.HY.empty,!0)))),t.copy(i)}function j(t,e,n,r,i){let o=t.node(e),s=i?t.indexAfter(e):t.index(e);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,o.content,s)?a:null}function U(t,e,n,i,o){if(e<n){let r=t.firstChild;t=t.replaceChild(0,r.copy(U(r.content,e+1,n,i,r)))}if(e>i){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}function Z(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let i=t.start(r);if(i<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&n.push(r)}return n}class F extends h{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let i=e.type.create(n,null,e.marks);return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,e.isLeaf?0:1))}getMap(){return c.empty}invert(t){return new F(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new F(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new F(e.pos,e.attr,e.value)}}h.jsonID("attr",F);class V extends h{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return u.ok(n)}getMap(){return c.empty}invert(t){return new V(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new V(e.attr,e.value)}}h.jsonID("docAttr",V);let Y=class extends Error{};Y=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Y.prototype=Object.create(Error.prototype)).constructor=Y,Y.prototype.name="TransformError";class W{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new d}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Y(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let i=L(this.doc,t,e,n);return i&&this.step(i),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),s=t.doc.resolve(n);if(N(o,s,i))return t.step(new A(e,n,i));let a=Z(o,t.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(o.depth+1);a.unshift(l);for(let t=o.depth,e=o.pos-1;t>0;t--,e--){let n=o.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(t)>-1?l=t:o.before(t)==e&&a.splice(1,0,-t)}let c=a.indexOf(l),d=[],p=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(d.push(n),e==i.openStart)break;t=n.content}for(let t=p-1;t>=0;t--){let e=d[t],n=(h=e.type).spec.defining||h.spec.definingForContent;if(n&&!e.sameMarkup(o.node(Math.abs(l)-1)))p=t;else if(n||!e.type.isTextblock)break}var h;for(let e=i.openStart;e>=0;e--){let l=(e+p+1)%(i.openStart+1),h=d[l];if(h)for(let e=0;e<a.length;e++){let d=a[(e+c)%a.length],p=!0;d<0&&(p=!1,d=-d);let u=o.node(d-1),f=o.index(d-1);if(u.canReplaceWith(f,f,h.type,h.marks))return t.replace(o.before(d),p?s.after(d):n,new r.p2(U(i.content,0,i.openStart,l),l,i.openEnd))}}let u=t.steps.length;for(let r=a.length-1;r>=0&&(t.replace(e,n,i),!(t.steps.length>u));r--){let t=a[r];t<0||(e=o.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)return null}return null}(t.doc,e,i.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.p2(r.HY.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),o=Z(r,i);for(let e=0;e<o.length;e++){let n=o[e],s=e==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:i,$to:o,depth:s}=e,a=i.before(s+1),l=o.after(s+1),c=a,d=l,p=r.HY.empty,h=0;for(let t=s,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,p=r.HY.from(i.node(t).copy(p)),h++):c--;let u=r.HY.empty,f=0;for(let t=s,e=!1;t>n;t--)e||o.after(t+1)<o.end(t)?(e=!0,u=r.HY.from(o.node(t).copy(u)),f++):d++;t.step(new w(c,d,a,l,new r.p2(p.append(u),h,f),p.size-h,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let i=null,{linebreakReplacement:o}=t.doc.type.schema,s=t.doc.resolve(e-n),a=s.node().type;if(o&&a.inlineContent){let t="pre"==a.whitespace,e=!!a.contentMatch.matchType(o);t&&!e?i=!1:!t&&e&&(i=!0)}let l=t.steps.length;if(!1===i){let r=t.doc.resolve(e+n);B(t,r.node(),r.before(),l)}a.inlineContent&&x(t,e+n-1,a,s.node().contentMatchAt(s.index()),null==i);let c=t.mapping.slice(l),d=c.map(e-n);if(t.step(new A(d,c.map(e+n,-1),r.p2.empty,!0)),!0===i){let e=t.doc.resolve(d);S(t,e.node(),e.before(),t.steps.length)}}(this,t,e),this}wrap(t,e){return function(t,e,n){let i=r.HY.empty;for(let t=n.length-1;t>=0;t--){if(i.size){let e=n[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[t].type.create(n[t].attrs,i))}let o=e.start,s=e.end;t.step(new w(o,s,o,s,new r.p2(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){return function(t,e,n,i,o){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{let a="function"==typeof o?o(e):o;if(e.isTextblock&&!e.hasMarkup(i,a)&&function(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(t.doc,t.mapping.slice(s).map(n),i)){let o=null;if(i.schema.linebreakReplacement){let t="pre"==i.whitespace,e=!!i.contentMatch.matchType(i.schema.linebreakReplacement);t&&!e?o=!1:!t&&e&&(o=!0)}!1===o&&B(t,e,n,s),x(t,t.mapping.slice(s).map(n,1),i,void 0,null===o);let l=t.mapping.slice(s),c=l.map(n,1),d=l.map(n+e.nodeSize,1);return t.step(new w(c,d,c+1,d-1,new r.p2(r.HY.from(i.create(a,null,e.marks)),0,0),1,!0)),!0===o&&S(t,e,n,s),!1}}))}(this,t,e,n,i),this}setNodeMarkup(t,e,n=null,i){return function(t,e,n,i,o){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(i,null,o||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new w(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,t,e,n,i),this}setNodeAttribute(t,e,n){return this.step(new F(t,e,n)),this}setDocAttribute(t,e){return this.step(new V(t,e)),this}addNodeMark(t,e){return this.step(new b(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof r.vc)e.isInSet(n.marks)&&this.step(new y(t,e));else{let r,i=n.marks,o=[];for(;r=e.isInSet(i);)o.push(new y(t,r)),i=r.removeFromSet(i);for(let t=o.length-1;t>=0;t--)this.step(o[t])}return this}split(t,e=1,n){return function(t,e,n=1,i){let o=t.doc.resolve(e),s=r.HY.empty,a=r.HY.empty;for(let t=o.depth,e=o.depth-n,l=n-1;t>e;t--,l--){s=r.HY.from(o.node(t).copy(s));let e=i&&i[l];a=r.HY.from(e?e.type.create(e.attrs,a):o.node(t).copy(a))}t.step(new A(e,e,new r.p2(s.append(a),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let i,o,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),p=Math.min(l+t.nodeSize,n),h=r.addToSet(d);for(let t=0;t<d.length;t++)d[t].isInSet(h)||(i&&i.to==c&&i.mark.eq(d[t])?i.to=p:s.push(i=new g(c,p,d[t])));o&&o.to==c?o.to=p:a.push(o=new m(c,p,r))}})),s.forEach((e=>t.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,i){let o=[],s=0;t.doc.nodesBetween(e,n,((t,a)=>{if(!t.isInline)return;s++;let l=null;if(i instanceof r.ZU){let e,n=t.marks;for(;e=i.isInSet(n);)(l||(l=[])).push(e),n=e.removeFromSet(n)}else i?i.isInSet(t.marks)&&(l=[i]):l=t.marks;if(l&&l.length){let r=Math.min(a+t.nodeSize,n);for(let t=0;t<l.length;t++){let n,i=l[t];for(let t=0;t<o.length;t++){let e=o[t];e.step==s-1&&i.eq(o[t].style)&&(n=e)}n?(n.to=r,n.step=s):o.push({style:i,from:Math.max(a,e),to:r,step:s})}}})),o.forEach((e=>t.step(new g(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return x(this,t,e,n),this}}},52780:(t,e,n)=>{"use strict";n.d(e,{EH:()=>Ve,p:()=>Ue,tk:()=>bn});var r=n(27191),i=n(52665),o=n(26151);const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},a=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let l=null;const c=function(t,e,n){let r=l||(l=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},d=function(t,e,n,r){return n&&(h(t,e,n,r,-1)||h(t,e,n,r,1))},p=/^(img|br|input|textarea|hr)$/i;function h(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:u(t))){let n=t.parentNode;if(!n||1!=n.nodeType||f(t)||p.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(i<0?-1:0)]).contentEditable)return!1;e=i<0?u(t):0}}}function u(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const m=function(t){return t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function g(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const b="undefined"!=typeof navigator?navigator:null,y="undefined"!=typeof document?document:null,A=b&&b.userAgent||"",w=/Edge\/(\d+)/.exec(A),v=/MSIE \d/.exec(A),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(A),_=!!(v||x||w),k=v?document.documentMode:x?+x[1]:w?+w[1]:0,C=!_&&/gecko\/(\d+)/i.test(A);C&&(/Firefox\/(\d+)/.exec(A)||[0,0])[1];const E=!_&&/Chrome\/(\d+)/.exec(A),S=!!E,B=E?+E[1]:0,O=!_&&!!b&&/Apple Computer/.test(b.vendor),M=O&&(/Mobile\/\w+/.test(A)||!!b&&b.maxTouchPoints>2),I=M||!!b&&/Mac/.test(b.platform),$=!!b&&/Win/.test(b.platform),T=/Android \d/.test(A),L=!!y&&"webkitFontSmoothing"in y.documentElement.style,N=L?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function R(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function P(t,e){return"number"==typeof t?t:t[e]}function D(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function z(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(1!=s.nodeType){s=a(s);continue}let t=s,n=t==o.body,l=n?R(o):D(t),c=0,d=0;if(e.top<l.top+P(r,"top")?d=-(l.top-e.top+P(i,"top")):e.bottom>l.bottom-P(r,"bottom")&&(d=e.bottom-e.top>l.bottom-l.top?e.top+P(i,"top")-l.top:e.bottom-l.bottom+P(i,"bottom")),e.left<l.left+P(r,"left")?c=-(l.left-e.left+P(i,"left")):e.right>l.right-P(r,"right")&&(c=e.right-l.right+P(i,"right")),c||d)if(n)o.defaultView.scrollBy(c,d);else{let n=t.scrollLeft,r=t.scrollTop;d&&(t.scrollTop+=d),c&&(t.scrollLeft+=c);let i=t.scrollLeft-n,o=t.scrollTop-r;e={left:e.left-i,top:e.top-o,right:e.right-i,bottom:e.bottom-o}}let p=n?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(p))break;s="absolute"==p?s.offsetParent:a(s)}}function H(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=a(r));return e}function j(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let U=null;function Z(t,e){let n,r,i,o,s=2e8,a=0,l=e.top,d=e.top;for(let p=t.firstChild,h=0;p;p=p.nextSibling,h++){let t;if(1==p.nodeType)t=p.getClientRects();else{if(3!=p.nodeType)continue;t=c(p).getClientRects()}for(let c=0;c<t.length;c++){let u=t[c];if(u.top<=l&&u.bottom>=d){l=Math.max(u.bottom,l),d=Math.min(u.top,d);let t=u.left>e.left?u.left-e.left:u.right<e.left?e.left-u.right:0;if(t<s){n=p,s=t,r=t&&3==n.nodeType?{left:u.right<e.left?u.right:u.left,top:e.top}:e,1==p.nodeType&&t&&(a=h+(e.left>=(u.left+u.right)/2?1:0));continue}}else u.top>e.top&&!i&&u.left<=e.left&&u.right>=e.left&&(i=p,o={left:Math.max(u.left,Math.min(u.right,e.left)),top:u.top});!n&&(e.left>=u.right&&e.top>=u.top||e.left>=u.left&&e.top>=u.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let n=q(r,1);if(n.top!=n.bottom&&F(e,n))return{node:t,offset:i+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:t,offset:a}:Z(n,r)}function F(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function V(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let n=t.childNodes[o];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let i=t[r];if(F(e,i))return V(n,e,i)}}if((o=(o+1)%r)==i)break}return t}function Y(t,e){let n,r=t.dom.ownerDocument,i=0,o=function(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(u(r.offsetNode),r.offset)}}catch(t){}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(u(r.startContainer),r.startOffset)}}}(r,e.left,e.top);o&&({node:n,offset:i}=o);let s,l=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!l||!t.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=t.dom.getBoundingClientRect();if(!F(e,n))return null;if(l=V(t.dom,e,n),!l)return null}if(O)for(let t=l;n&&t;t=a(t))t.draggable&&(n=void 0);if(l=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(l,e),n){if(C&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let t,r=n.childNodes[i];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&i++}let r;L&&i&&1==n.nodeType&&1==(r=n.childNodes[i-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&i--,n==t.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(s=function(t,e,n,r){let i=-1;for(let n=e,o=!1;n!=t.dom;){let e,s=t.docView.nearestDesc(n,!0);if(!s)return null;if(1==s.dom.nodeType&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((e=s.dom.getBoundingClientRect()).width||e.height)&&(s.node.isBlock&&s.parent&&(!o&&e.left>r.left||e.top>r.top?i=s.posBefore:(!o&&e.right<r.left||e.bottom<r.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?s.posBefore:s.posAfter;n=s.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}(t,n,i,e))}null==s&&(s=function(t,e,n){let{node:r,offset:i}=Z(e,n),o=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();o=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}(t,l,e));let c=t.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function W(t){return t.top<t.bottom||t.left<t.right}function q(t,e){let n=t.getClientRects();if(n.length){let t=n[e<0?0:n.length-1];if(W(t))return t}return Array.prototype.find.call(n,W)||t.getBoundingClientRect()}const X=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function G(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),s=L||C;if(3==r.nodeType){if(!s||!X.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let t=i,e=i,o=n<0?1:-1;return n<0&&!i?(e++,o=-1):n>=0&&i==r.nodeValue.length?(t--,o=1):n<0?t--:e++,K(q(c(r,t,e),o),o<0)}{let t=q(c(r,i,i),n);if(C&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let e=q(c(r,i-1,i-1),-1);if(e.top==t.top){let n=q(c(r,i,i+1),-1);if(n.top!=t.top)return K(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(null==o&&i&&(n<0||i==u(r))){let t=r.childNodes[i-1];if(1==t.nodeType)return J(t.getBoundingClientRect(),!1)}if(null==o&&i<u(r)){let t=r.childNodes[i];if(1==t.nodeType)return J(t.getBoundingClientRect(),!0)}return J(r.getBoundingClientRect(),n>=0)}if(null==o&&i&&(n<0||i==u(r))){let t=r.childNodes[i-1],e=3==t.nodeType?c(t,u(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return K(q(e,1),!1)}if(null==o&&i<u(r)){let t=r.childNodes[i];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?c(t,0,s?0:1):1==t.nodeType?t:null:null;if(e)return K(q(e,-1),!0)}return K(q(3==r.nodeType?c(r):r,-n),n>=0)}function K(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function J(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Q(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}const tt=/[\u0590-\u08ac]/;let et=null,nt=null,rt=!1;function it(t,e,n){return et==e&&nt==n?rt:(et=e,nt=n,rt="up"==n||"down"==n?function(t,e,n){let r=e.selection,i="up"==n?r.$from:r.$to;return Q(t,e,(()=>{let{node:e}=t.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=G(t,i.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let i=e[t];if(i.bottom>i.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=t.domSelection();return a?tt.test(r.parent.textContent)&&a.modify?Q(t,e,(()=>{let{focusNode:e,focusOffset:i,anchorNode:o,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:p}=t.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||e==d&&i==p;try{a.collapse(o,s),e&&(e!=o||i!=s)&&a.extend&&a.extend(e,i)}catch(t){}return null!=l&&(a.caretBidiLevel=l),h})):"left"==n||"backward"==n?o:s:r.pos==r.start()||r.pos==r.end()}(t,e,n))}class ot{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!e||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==t.nodeType?t:t.parentNode):i==t))return o;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],i=n+r.size;if(n==t&&i!=n){for(;!r.border&&r.children.length;)for(let t=0;t<r.children.length;t++){let e=r.children[t];if(e.size){r=e;break}}return r}if(t<i)return r.descAt(t-n-r.border);n=i}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,r=0;for(let e=0;n<this.children.length;n++){let i=this.children[n],o=e+i.size;if(o>t||i instanceof ht){r=t-e;break}e=o}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;n&&!(t=this.children[n-1]).size&&t instanceof st&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;t=n?this.children[n-1]:null,t&&t.dom.parentNode!=this.contentDOM;n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?s(t.dom)+1:0}}{let t,r=!0;for(;t=n<this.children.length?this.children[n]:null,t&&t.dom.parentNode!=this.contentDOM;n++,r=!1);return t&&r&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?s(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let o=n,a=0;;a++){let n=this.children[a],l=o+n.size;if(-1==r&&t<=l){let i=o+n.border;if(t>=i&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,i);t=o;for(let e=a;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||a==this.children.length-1)){e=l;for(let t=a+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=s(n.dom);break}e+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}o=l}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let i=Math.min(t,e),o=Math.max(t,e);for(let s=0,a=0;s<this.children.length;s++){let l=this.children[s],c=a+l.size;if(i>a&&o<c)return l.setSelection(t-a-l.border,e-a-l.border,n,r);a=c}let a=this.domFromPos(t,t?-1:1),l=e==t?a:this.domFromPos(e,e?-1:1),c=n.root.getSelection(),p=n.domSelectionRange(),h=!1;if((C||O)&&t==e){let{node:t,offset:e}=a;if(3==t.nodeType){if(h=!(!e||"\n"!=t.nodeValue[e-1]),h&&e==t.nodeValue.length)for(let e,n=t;n;n=n.parentNode){if(e=n.nextSibling){"BR"==e.nodeName&&(a=l={node:e.parentNode,offset:s(e)+1});break}let t=n.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];h=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(C&&p.focusNode&&p.focusNode!=l.node&&1==p.focusNode.nodeType){let t=p.focusNode.childNodes[p.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||h&&O)&&d(a.node,a.offset,p.anchorNode,p.anchorOffset)&&d(l.node,l.offset,p.focusNode,p.focusOffset))return;let u=!1;if((c.extend||t==e)&&!h){c.collapse(a.node,a.offset);try{t!=e&&c.extend(l.node,l.offset),u=!0}catch(t){}}if(!u){if(t>e){let t=a;a=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],o=n+i.size;if(n==o?t<=o&&e>=n:t<o&&e>n){let r=n+i.border,s=o-i.border;if(t>=r&&e<=s)return this.dirty=t==n||e==o?2:1,void(t!=r||e!=s||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(t-r,e-r):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=o}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class st extends ot{constructor(t,e,n,r){let i,o=e.type.toDOM;if("function"==typeof o&&(o=o(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:r))),!e.type.spec.raw){if(1!=o.nodeType){let t=document.createElement("span");t.appendChild(o),o=t}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=e,this.widget=e,i=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class at extends ot{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class lt extends ot{constructor(t,e,n,r,i){super(t,[],n,r),this.mark=e,this.spec=i}static create(t,e,n,r){let o=r.nodeViews[e.type.name],s=o&&o(e,r,n);return s&&s.dom||(s=i.PW.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new lt(t,e,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=lt.create(this.parent,this.mark,!0,n),i=this.children,o=this.size;e<o&&(i=Ct(i,e,o,n)),t>0&&(i=Ct(i,0,t,n));for(let t=0;t<i.length;t++)i[t].parent=r;return r.children=i,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ct extends ot{constructor(t,e,n,r,i,o,s,a,l){super(t,[],i,o),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(t,e,n,r,o,s){let a,l=o.nodeViews[e.type.name],c=l&&l(e,o,(()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),d=c&&c.dom,p=c&&c.contentDOM;if(e.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(e.text);else if(!d){let t=i.PW.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs);({dom:d,contentDOM:p}=t)}p||e.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),e.type.spec.draggable&&(d.draggable=!0));let h=d;return d=wt(d,n,e),c?a=new ut(t,e,n,r,d,p||null,h,c,o,s+1):e.isText?new pt(t,e,n,r,d,h,o):new ct(t,e,n,r,d,p||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>i.HY.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&vt(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new _t(this,s&&s.node,t);!function(t,e,n,r){let i=e.locals(t),o=0;if(0==i.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,i,e.forChild(o,s),n),o+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,p,h,u;for(;s<i.length&&i[s].to==o;){let t=i[s++];t.widget&&(d?(p||(p=[d])).push(t):d=t)}if(d)if(p){p.sort(kt);for(let t=0;t<p.length;t++)n(p[t],c,!!l)}else n(d,c,!!l);if(l)u=-1,h=l,l=null;else{if(!(c<t.childCount))break;u=c,h=t.child(c++)}for(let t=0;t<a.length;t++)a[t].to<=o&&a.splice(t--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let f=o+h.nodeSize;if(h.isText){let t=f;s<i.length&&i[s].from<t&&(t=i[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<f&&(l=h.cut(t-o),h=h.cut(0,t-o),f=t,u=-1)}else for(;s<i.length&&i[s].to<f;)s++;r(h,h.isInline&&!h.isLeaf?a.filter((t=>!t.inline)):a.slice(),e.forChild(o,h),u),o=f}}(this.node,this.innerDeco,((e,o,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(o==this.node.childCount?i.vc.none:this.node.child(o).marks,n,t),l.placeWidget(e,t,r)}),((e,i,s,c)=>{let d;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,i,s,c)||a&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(d=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(e,i,s,d,t)||l.updateNextNode(e,i,s,t,c,r)||l.addNode(e,i,s,t,r),r+=e.nodeSize})),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),ft(this.contentDOM,this.children,t),M&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof r.Bs)||n<e||i>e+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let t=o.nodeValue,r=function(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<t.childCount;){let e=t.child(i++);if(o+=e.nodeSize,!e.isText)break;l+=e.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,i-e);return r<0?null:{node:o,pos:r,text:t}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let i=e;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new at(this,i,e,r);t.input.compositionNodes.push(o),this.children=Ct(this.children,n,n+r.length,t,o)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(vt(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=yt(this.dom,this.nodeDOM,bt(this.outerDeco,this.node,e),bt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function dt(t,e,n,r,i){wt(r,e,t);let o=new ct(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class pt extends ct{constructor(t,e,n,r,i,o,s){super(t,e,n,r,i,null,o,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),i=document.createTextNode(r.text);return new pt(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class ht extends ot{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ut extends ct{constructor(t,e,n,r,i,o,s,a,l,c){super(t,e,n,r,i,o,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,e,n);return i&&this.updateInner(t,e,n,r),i}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n.root):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function ft(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=xt(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(s instanceof lt){let e=r?r.previousSibling:t.lastChild;ft(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=xt(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const mt=function(t){t&&(this.nodeName=t)};mt.prototype=Object.create(null);const gt=[new mt];function bt(t,e,n){if(0==t.length)return gt;let r=n?gt[0]:new mt,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new mt(s.nodeName));for(let t in s){let o=s[t];null!=o&&(n&&1==i.length&&i.push(r=new mt(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+o:"style"==t?r.style=(r.style?r.style+";":"")+o:"nodeName"!=t&&(r[t]=o))}}}return i}function yt(t,e,n,r){if(n==gt&&r==gt)return e;let i=e;for(let e=0;e<r.length;e++){let o=r[e],s=n[e];if(e){let e;s&&s.nodeName==o.nodeName&&i!=t&&(e=i.parentNode)&&e.nodeName.toLowerCase()==o.nodeName||(e=document.createElement(o.nodeName),e.pmIsDeco=!0,e.appendChild(i),s=gt[0]),i=e}At(i,s||gt[0],o)}return i}function At(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==i.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<i.length;e++)-1==r.indexOf(i[e])&&t.classList.add(i[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function wt(t,e,n){return yt(t,t,gt,bt(e,n,1!=t.nodeType))}function vt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function xt(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class _t{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];t:for(;i>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof lt)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,i=this.stack.length>>1,o=Math.min(i,t.length);for(;r<o&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++){let n=this.top.children[e];if(n.matchesMark(t[i])&&!this.isLocked(n.dom)){r=e;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=lt.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(t,e,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,e,n))o=this.top.children.indexOf(i,this.index);else for(let r=this.index,i=Math.min(this.top.children.length,r+5);r<i;r++){let i=this.top.children[r];if(i.matchesNode(t,e,n)&&!this.preMatch.matched.has(i)){o=r;break}}return!(o<0)&&(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,e,n,r,i){let o=this.top.children[r];return 3==o.dirty&&o.dom==o.contentDOM&&(o.dirty=2),!!o.update(t,e,n,i)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,i,o){for(let s=this.index;s<this.top.children.length;s++){let a=this.top.children[s];if(a instanceof ct){let l=this.preMatch.matched.get(a);if(null!=l&&l!=i)return!1;let c,d=a.dom,p=this.isLocked(d)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&3!=a.dirty&&vt(e,a.outerDeco));if(!p&&a.update(t,e,n,r))return this.destroyBetween(this.index,s),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(c=this.recreateWrapper(a,t,e,n,r,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,o+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,e,n,r,i,o){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content)||!vt(n,t.outerDeco)||!r.eq(t.innerDeco))return null;let s=ct.create(this.top,e,n,r,i,o);if(s.contentDOM){s.children=t.children,t.children=[];for(let t of s.children)t.parent=s}return t.destroy(),s}addNode(t,e,n,r,i){let o=ct.create(this.top,t,e,n,r,i);o.contentDOM&&o.updateChildren(r,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new st(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof lt;)e=t,t=e.children[e.children.length-1];(!t||!(t instanceof pt)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((O||S)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new ht(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||1==t.nodeType&&t.contains(this.lock.parentNode))}}function kt(t,e){return t.type.side-e.type.side}function Ct(t,e,n,r,i){let o=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,d=a+=l.size;c>=n||d<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Et(t,e=null){let n=t.domSelectionRange(),i=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),a=o&&0==o.size,l=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,d,p=i.resolve(l);if(m(n)){for(c=l;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&r.qv.isSelectable(t)&&o.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,i=e==u(t);r||i;){if(t==n)return!0;let e=s(t);if(!(t=t.parentNode))return!1;r=r&&0==e,i=i&&e==u(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;d=new r.qv(l==t?p:i.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=l,r=l;for(let i=0;i<n.rangeCount;i++){let o=n.getRangeAt(i);e=Math.min(e,t.docView.posFromDOM(o.startContainer,o.startOffset,1)),r=Math.max(r,t.docView.posFromDOM(o.endContainer,o.endOffset,-1))}if(e<0)return null;[c,l]=r==t.state.selection.anchor?[r,e]:[e,r],p=i.resolve(l)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let h=i.resolve(c);if(!d){d=Nt(t,h,p,"pointer"==e||t.state.selection.head<p.pos&&!a?1:-1)}return d}function St(t){return t.editable?t.hasFocus():Pt(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Bt(t,e=!1){let n=t.state.selection;if(Tt(t,n),St(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&S){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&d(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setStart(r.parentNode,s(r)+1):n.setStart(r,0);n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&_&&k<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let i,o,{anchor:s,head:a}=n;!Ot||n instanceof r.Bs||(n.$from.parent.inlineContent||(i=Mt(t,n.from)),n.empty||n.$from.parent.inlineContent||(o=Mt(t,n.to))),t.docView.setSelection(s,a,t,e),Ot&&(i&&$t(i),o&&$t(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==i||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{St(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Ot=O||S&&B<63;function Mt(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(O&&i&&"false"==i.contentEditable)return It(i);if(!(i&&"false"!=i.contentEditable||o&&"false"!=o.contentEditable)){if(i)return It(i);if(o)return It(o)}}function It(t){return t.contentEditable="true",O&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $t(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Tt(t,e){if(e instanceof r.qv){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Lt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Lt(t)}function Lt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Nt(t,e,n,i){return t.someProp("createSelectionBetween",(r=>r(t,e,n)))||r.Bs.between(e,n,i)}function Rt(t){return!(t.editable&&!t.hasFocus())&&Pt(t)}function Pt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Dt(t,e){let{$anchor:n,$head:i}=t.selection,o=e>0?n.max(i):n.min(i),s=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return s&&r.Y1.findFrom(s,e)}function zt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ht(t,e,n){let i=t.state.selection;if(!(i instanceof r.Bs)){if(i instanceof r.qv&&i.node.isInline)return zt(t,new r.Bs(e>0?i.$to:i.$from));{let n=Dt(t.state,e);return!!n&&zt(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=i,o=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+o.nodeSize*(e<0?-1:1));return zt(t,new r.Bs(i.$anchor,s))}if(!i.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Dt(t.state,e);return!!(n&&n instanceof r.qv)&&zt(t,n)}if(!(I&&n.indexOf("m")>-1)){let n,o=i.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(n=t.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?zt(t,new r.qv(e<0?t.state.doc.resolve(o.pos-s.nodeSize):o)):!!L&&zt(t,new r.Bs(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function jt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Ut(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Zt(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,a=!1;C&&1==n.nodeType&&r<jt(n)&&Ut(n.childNodes[r],-1)&&(a=!0);for(;;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Ut(t,-1))i=n,o=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Ft(n))break;{let e=n.previousSibling;for(;e&&Ut(e,-1);)i=n.parentNode,o=s(e),e=e.previousSibling;if(e)n=e,r=jt(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?Vt(t,n,r):i&&Vt(t,i,o)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,a=jt(n);for(;;)if(r<a){if(1!=n.nodeType)break;if(!Ut(n.childNodes[r],1))break;i=n,o=++r}else{if(Ft(n))break;{let e=n.nextSibling;for(;e&&Ut(e,1);)i=e.parentNode,o=s(e)+1,e=e.nextSibling;if(e)n=e,r=0,a=jt(n);else{if(n=n.parentNode,n==t.dom)break;r=a=0}}}i&&Vt(t,i,o)}(t)}function Ft(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Vt(t,e,n){if(3!=e.nodeType){let t,r;(r=function(t,e){for(;t&&e==t.childNodes.length&&!f(t);)e=s(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=n,e=0}}(e,n))?(e=r,n=0):(t=function(t,e){for(;t&&!e&&!f(t);)e=s(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=(t=n).childNodes.length}}(e,n))&&(e=t,n=t.nodeValue.length)}let r=t.domSelection();if(!r)return;if(m(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout((()=>{t.state==i&&Bt(t)}),50)}function Yt(t,e){let n=t.state.doc.resolve(e);if(!S&&!$&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(e<n.end()){let n=t.coordsAtPos(e+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Wt(t,e,n){let i=t.state.selection;if(i instanceof r.Bs&&!i.empty||n.indexOf("s")>-1)return!1;if(I&&n.indexOf("m")>-1)return!1;let{$from:o,$to:s}=i;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Dt(t.state,e);if(n&&n instanceof r.qv)return zt(t,n)}if(!o.parent.inlineContent){let n=e<0?o:s,a=i instanceof r.C1?r.Y1.near(n,e):r.Y1.findFrom(n,e);return!!a&&zt(t,a)}return!1}function qt(t,e){if(!(t.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:i,empty:o}=t.state.selection;if(!n.sameParent(i))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Xt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Gt(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||I&&72==n&&"c"==r)return qt(t,-1)||Zt(t,-1);if(46==n&&!e.shiftKey||I&&68==n&&"c"==r)return qt(t,1)||Zt(t,1);if(13==n||27==n)return!0;if(37==n||I&&66==n&&"c"==r){let e=37==n?"ltr"==Yt(t,t.state.selection.from)?-1:1:-1;return Ht(t,e,r)||Zt(t,e)}if(39==n||I&&70==n&&"c"==r){let e=39==n?"ltr"==Yt(t,t.state.selection.from)?1:-1:1;return Ht(t,e,r)||Zt(t,e)}return 38==n||I&&80==n&&"c"==r?Wt(t,-1,r)||Zt(t,-1):40==n||I&&78==n&&"c"==r?function(t){if(!O||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Xt(t,n,"true"),setTimeout((()=>Xt(t,n,"false")),20)}return!1}(t)||Wt(t,1,r)||Zt(t,1):r==(I?"m":"c")&&(66==n||73==n||89==n||90==n)}function Kt(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,s--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let a=t.someProp("clipboardSerializer")||i.PW.fromSchema(t.state.schema),l=ae(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let d,p=c.firstChild,h=0;for(;p&&1==p.nodeType&&(d=oe[p.nodeName.toLowerCase()]);){for(let t=d.length-1;t>=0;t--){let e=l.createElement(d[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),h++}p=c.firstChild}return p&&1==p.nodeType&&p.setAttribute("data-pm-slice",`${o} ${s}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n"),slice:e}}function Jt(t,e,n,r,o){let s,a,l=o.parent.type.spec.code;if(!n&&!e)return null;let c=e&&(r||l||!n);if(c){if(t.someProp("transformPastedText",(n=>{e=n(e,l||r,t)})),l)return e?new i.p2(i.HY.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):i.p2.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,o,r,t)));if(n)a=n;else{let n=o.marks(),{schema:r}=t.state,a=i.PW.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(a.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),s=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=ae().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t);(n=i&&oe[i[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"</"+t+">")).reverse().join(""));if(r.innerHTML=function(t){let e=window.trustedTypes;if(!e)return t;le||(le=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t}));return le.createHTML(t)}(t),n)for(let t=0;t<n.length;t++)r=r.querySelector(n[t])||r;return r}(n),L&&function(t){let e=t.querySelectorAll(S?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(s);let d=s&&s.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let t=+p[3];t>0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(!a){let e=t.someProp("clipboardParser")||t.someProp("domParser")||i.aw.fromSchema(t.state.schema);a=e.parseSlice(s,{preserveWhitespace:!(!c&&!p),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Qt.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(p)a=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:o,openStart:s,openEnd:a}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;o=i.HY.from(e.create(n[t+1],o)),s++,a++}return new i.p2(o,s,a)}(ie(a,+p[1],+p[2]),p[4]);else if(a=i.p2.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,o=e.node(n).contentMatchAt(e.index(n)),s=[];if(t.forEach((t=>{if(!s)return;let e,n=o.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&r.length&&ee(n,r,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=ne(s[s.length-1],r.length));let e=te(t,n);s.push(e),o=o.matchType(e.type),r=n}})),s)return i.HY.from(s)}return t}(a.content,o),!0),a.openStart||a.openEnd){let t=0,e=0;for(let e=a.content.firstChild;t<a.openStart&&!e.type.spec.isolating;t++,e=e.firstChild);for(let t=a.content.lastChild;e<a.openEnd&&!t.type.spec.isolating;e++,t=t.lastChild);a=ie(a,t,e)}return t.someProp("transformPasted",(e=>{a=e(a,t)})),a}const Qt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function te(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,i.HY.from(t));return t}function ee(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let s=ee(t,e,n,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(i.HY.from(te(n,t,o+1))))}}function ne(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,ne(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(i.HY.empty,!0);return t.copy(n.append(r))}function re(t,e,n,r,o,s){let a=e<0?t.firstChild:t.lastChild,l=a.content;return t.childCount>1&&(s=0),o<r-1&&(l=re(l,e,n,r,o+1,s)),o>=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(i.HY.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function ie(t,e,n){return e<t.openStart&&(t=new i.p2(re(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new i.p2(re(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const oe={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let se=null;function ae(){return se||(se=document.implementation.createHTMLDocument("title"))}let le=null;const ce={},de={},pe={touchstart:!0,touchmove:!0};class he{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ue(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function fe(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>me(t,e))}))}function me(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function ge(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function be(t){return{left:t.clientX,top:t.clientY}}function ye(t,e,n,r,i){if(-1==r)return!1;let o=t.state.doc.resolve(r);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,(e=>r>o.depth?e(t,n,o.nodeAfter,o.before(r),i,!0):e(t,n,o.node(r),o.before(r),i,!1))))return!0;return!1}function Ae(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function we(t,e,n,i,o){return ye(t,"handleClickOn",e,n,i)||t.someProp("handleClick",(n=>n(t,e,i)))||(o?function(t,e){if(-1==e)return!1;let n,i,o=t.state.selection;o instanceof r.qv&&(n=o.node);let s=t.state.doc.resolve(e);for(let t=s.depth+1;t>0;t--){let e=t>s.depth?s.nodeAfter:s.node(t);if(r.qv.isSelectable(e)){i=n&&o.$from.depth>0&&t>=o.$from.depth&&s.before(o.$from.depth+1)==o.$from.pos?s.before(o.$from.depth):s.before(t);break}}return null!=i&&(Ae(t,r.qv.create(t.state.doc,i),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return!!(i&&i.isAtom&&r.qv.isSelectable(i))&&(Ae(t,new r.qv(n),"pointer"),!0)}(t,n))}function ve(t,e,n,r){return ye(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function xe(t,e,n,i){return ye(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",(n=>n(t,e,i)))||function(t,e,n){if(0!=n.button)return!1;let i=t.state.doc;if(-1==e)return!!i.inlineContent&&(Ae(t,r.Bs.create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(e);for(let e=o.depth+1;e>0;e--){let n=e>o.depth?o.nodeAfter:o.node(e),s=o.before(e);if(n.inlineContent)Ae(t,r.Bs.create(i,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;Ae(t,r.qv.create(i,s),"pointer")}return!0}}(t,n,i)}function _e(t){return Ie(t)}de.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Ee(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!T||!S||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!M||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||Gt(t,n)?n.preventDefault():ue(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},de.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},de.keypress=(t,e)=>{let n=e;if(Ee(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||I&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let i=t.state.selection;if(!(i instanceof r.Bs&&i.$from.sameParent(i.$to))){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",(n=>n(t,i.$from.pos,i.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const ke=I?"metaKey":"ctrlKey";ce.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=_e(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[ke]&&("singleClick"==t.input.lastClick.type?o="doubleClick":"doubleClick"==t.input.lastClick.type&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(be(n));s&&("singleClick"==o?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Ce(t,s,n,!!r)):("doubleClick"==o?ve:xe)(t,s.pos,s.inside,n)?n.preventDefault():ue(t,"pointer"))};class Ce{constructor(t,e,n,i){let o,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[ke],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,s=n.depth?n.before():0}const a=i?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:c}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!C||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ue(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Bt(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(be(t))),this.updateAllowDefault(t),this.allowDefault||!e?ue(this.view,"pointer"):we(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||O&&this.mightDrag&&!this.mightDrag.node.isAtom||S&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(Ae(this.view,r.Y1.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):ue(this.view,"pointer")}move(t){this.updateAllowDefault(t),ue(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function Ee(t,e){return!!t.composing||!!(O&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}ce.touchstart=t=>{t.input.lastTouch=Date.now(),_e(t),ue(t,"pointer")},ce.touchmove=t=>{t.input.lastTouch=Date.now(),ue(t,"pointer")},ce.contextmenu=t=>_e(t);const Se=T?5e3:-1;function Be(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Ie(t)),e))}function Oe(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Me(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(3==t.nodeType&&e)return t;if(1==t.nodeType&&e>0){if("false"==t.contentEditable)return null;e=u(t=t.childNodes[e-1])}else{if(!t.parentNode||f(t))return null;e=s(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),r=function(t,e){for(;;){if(3==t.nodeType&&e<t.nodeValue.length)return t;if(1==t.nodeType&&e<t.childNodes.length){if("false"==t.contentEditable)return null;t=t.childNodes[e],e=0}else{if(!t.parentNode||f(t))return null;e=s(t)+1,t=t.parentNode}}}(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return r}}return n||r}function Ie(t,e=!1){if(!(T&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Oe(t),e||t.docView&&t.docView.dirty){let n=Et(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||t.state.selection.empty?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}de.compositionstart=de.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof r.Bs&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Ie(t,!0),t.markCursor=null;else if(Ie(t,!e.selection.empty),C&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Be(t,Se)},de.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then((()=>t.domObserver.flush())),t.input.compositionID++,Be(t,20))};const $e=_&&k<15||M&&N<604;function Te(t,e,n,r,o){let s=Jt(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,o,s||i.p2.empty))))return!0;if(!s)return!1;let a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),l=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Le(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ce.copy=de.cut=(t,e)=>{let n=e,r=t.state.selection,i="cut"==n.type;if(r.empty)return;let o=$e?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Kt(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},de.paste=(t,e)=>{let n=e;if(t.composing&&!T)return;let r=$e?null:n.clipboardData,i=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Te(t,Le(r),r.getData("text/html"),i,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Te(t,r.value,null,i,e):Te(t,r.textContent,r.innerHTML,i,e)}),50)}(t,n)};class Ne{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const Re=I?"altKey":"ctrlKey";function Pe(t,e){let n=t.someProp("dragCopies",(t=>!t(e)));return null!=n?n:!e[Re]}ce.dragstart=(t,e)=>{let n=e,i=t.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o,s=t.state.selection,a=s.empty?null:t.posAtCoords(be(n));if(a&&a.pos>=s.from&&a.pos<=(s instanceof r.qv?s.to-1:s.to));else if(i&&i.mightDrag)o=r.qv.create(t.state.doc,i.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(o=r.qv.create(t.state.doc,e.posBefore))}let l=(o||t.state.selection).content(),{dom:c,text:d,slice:p}=Kt(t,l);(!n.dataTransfer.files.length||!S||B>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData($e?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",$e||n.dataTransfer.setData("text/plain",d),t.dragging=new Ne(p,Pe(t,n),o)},ce.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},de.dragover=de.dragenter=(t,e)=>e.preventDefault(),de.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let a=t.posAtCoords(be(n));if(!a)return;let l=t.state.doc.resolve(a.pos),c=s&&s.slice;c?t.someProp("transformPasted",(e=>{c=e(c,t)})):c=Jt(t,Le(n.dataTransfer),$e?null:n.dataTransfer.getData("text/html"),!1,l);let d=!(!s||!Pe(t,n));if(t.someProp("handleDrop",(e=>e(t,n,c||i.p2.empty,d))))return void n.preventDefault();if(!c)return;n.preventDefault();let p=c?(0,o.nj)(t.state.doc,l.pos,c):l.pos;null==p&&(p=l.pos);let h=t.state.tr;if(d){let{node:t}=s;t?t.replace(h):h.deleteSelection()}let u=h.mapping.map(p),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=h.doc;if(f?h.replaceRangeWith(u,u,c.content.firstChild):h.replaceRange(u,u,c),h.doc.eq(m))return;let g=h.doc.resolve(u);if(f&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))h.setSelection(new r.qv(g));else{let e=h.mapping.map(p);h.mapping.maps[h.mapping.maps.length-1].forEach(((t,n,r,i)=>e=i)),h.setSelection(Nt(t,g,h.doc.resolve(e)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))},ce.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Bt(t)}),20))},ce.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},ce.beforeinput=(t,e)=>{if(S&&T&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let t in de)ce[t]=de[t];function De(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class ze{constructor(t,e){this.toDOM=t,this.spec=e||Fe,this.side=this.spec.side||0}map(t,e,n,r){let{pos:i,deleted:o}=t.mapResult(e.from+r,this.side<0?-1:1);return o?null:new Ue(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof ze&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&De(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class He{constructor(t,e){this.attrs=t,this.spec=e||Fe}map(t,e,n,r){let i=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,o=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new Ue(i,o,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof He&&De(this.attrs,t.attrs)&&De(this.spec,t.spec)}static is(t){return t.type instanceof He}destroy(){}}class je{constructor(t,e){this.attrs=t,this.spec=e||Fe}map(t,e,n,r){let i=t.mapResult(e.from+r,1);if(i.deleted)return null;let o=t.mapResult(e.to+r,-1);return o.deleted||o.pos<=i.pos?null:new Ue(i.pos-n,o.pos-n,this)}valid(t,e){let n,{index:r,offset:i}=t.content.findIndex(e.from);return i==e.from&&!(n=t.child(r)).isText&&i+n.nodeSize==e.to}eq(t){return this==t||t instanceof je&&De(this.attrs,t.attrs)&&De(this.spec,t.spec)}destroy(){}}class Ue{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Ue(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Ue(t,t,new ze(e,n))}static inline(t,e,n,r){return new Ue(t,e,new He(n,r))}static node(t,e,n,r){return new Ue(t,e,new je(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof He}get widget(){return this.type instanceof ze}}const Ze=[],Fe={};class Ve{constructor(t,e){this.local=t.length?t:Ze,this.children=e.length?e:Ze}static create(t,e){return e.length?Ke(e,t,0,Fe):Ye}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,i){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=e&&s.to>=t&&(!i||i(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<e&&this.children[o+1]>t){let s=this.children[o]+1;this.children[o+2].findInner(t-s,e-s,n,r+s,i)}}map(t,e,n){return this==Ye||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Fe)}mapInner(t,e,n,r,i){let o;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,i,o,s){let a=t.slice();for(let t=0,e=o;t<n.maps.length;t++){let r=0;n.maps[t].forEach(((t,n,i,o)=>{let s=o-i-(n-t);for(let i=0;i<a.length;i+=3){let o=a[i+1];if(o<0||t>o+e-r)continue;let l=a[i]+e-r;n>=l?a[i+1]=t<=l?-2:-1:t>=e&&s&&(a[i]+=s,a[i+1]+=s)}r+=s})),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e<a.length;e+=3)if(a[e+1]<0){if(-2==a[e+1]){l=!0,a[e+1]=-1;continue}let c=n.map(t[e]+o),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let p=n.map(t[e+1]+o,-1)-i,{index:h,offset:u}=r.content.findIndex(d),f=r.maybeChild(h);if(f&&u==d&&u+f.nodeSize==p){let r=a[e+2].mapInner(n,f,c+1,t[e]+o+1,s);r!=Ye?(a[e]=d,a[e+1]=p,a[e+2]=r):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=function(t,e,n,r,i,o,s){function a(t,e){for(let o=0;o<t.local.length;o++){let a=t.local[o].map(r,i,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[o].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let n=0;n<t.length;n+=3)-1==t[n+1]&&a(t[n+2],e[n]+o+1);return n}(a,t,e,n,i,o,s),c=Ke(l,r,0,s);e=c.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<c.children.length;t+=3){let n=c.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,c.children[t],c.children[t+1],c.children[t+2])}}return new Ve(e.sort(Je),a)}(this.children,o||[],t,e,n,r,i):o?new Ve(o.sort(Je),Ze):Ye}add(t,e){return e.length?this==Ye?Ve.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,i=0;t.forEach(((t,o)=>{let s,a=o+n;if(s=Xe(e,t,a)){for(r||(r=this.children.slice());i<r.length&&r[i]<o;)i+=3;r[i]==o?r[i+2]=r[i+2].addInner(t,s,a+1):r.splice(i,0,o,o+t.nodeSize,Ke(s,t,a+1,Fe)),i+=3}}));let o=qe(i?Ge(e):e,-n);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new Ve(o.length?this.local.concat(o).sort(Je):this.local,r||this.children)}remove(t){return 0==t.length||this==Ye?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let i,o=n[r]+e,s=n[r+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>o&&e.to<s&&(t[n]=null,(i||(i=[])).push(e));if(!i)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(i,o+1);a!=Ye?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,i=0;i<t.length;i++)if(n=t[i])for(let t=0;t<r.length;t++)r[t].eq(n,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ve(r,n):Ye}forChild(t,e){if(this==Ye)return this;if(e.isLeaf)return Ve.empty;let n,r;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(n=this.children[e+2]);break}let i=t+1,o=i+e.content.size;for(let t=0;t<this.local.length;t++){let e=this.local[t];if(e.from<o&&e.to>i&&e.type instanceof He){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let t=new Ve(r.sort(Je),Ze);return n?new We([t,n]):t}return n||Ye}eq(t){if(this==t)return!0;if(!(t instanceof Ve)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Qe(this.localsInner(t))}localsInner(t){if(this==Ye)return Ze;if(t.inlineContent||!this.local.some(He.is))return this.local;let e=[];for(let t=0;t<this.local.length;t++)this.local[t].type instanceof He||e.push(this.local[t]);return e}forEachSet(t){t(this)}}Ve.empty=new Ve([],[]),Ve.removeOverlap=Qe;const Ye=Ve.empty;class We{constructor(t){this.members=t}map(t,e){const n=this.members.map((n=>n.map(t,e,Fe)));return We.from(n)}forChild(t,e){if(e.isLeaf)return Ve.empty;let n=[];for(let r=0;r<this.members.length;r++){let i=this.members[r].forChild(t,e);i!=Ye&&(i instanceof We?n=n.concat(i.members):n.push(i))}return We.from(n)}eq(t){if(!(t instanceof We)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(t);if(i.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<i.length;t++)e.push(i[t])}else e=i}return e?Qe(n?e:e.sort(Je)):Ze}static from(t){switch(t.length){case 0:return Ye;case 1:return t[0];default:return new We(t.every((t=>t instanceof Ve))?t:t.reduce(((t,e)=>t.concat(e instanceof Ve?e:e.members)),[]))}}forEachSet(t){for(let e=0;e<this.members.length;e++)this.members[e].forEachSet(t)}}function qe(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Ue(i.from+e,i.to+e,i.type))}return n}function Xe(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let e,o=0;o<t.length;o++)(e=t[o])&&e.from>n&&e.to<r&&((i||(i=[])).push(e),t[o]=null);return i}function Ge(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Ke(t,e,n,r){let i=[],o=!1;e.forEach(((e,s)=>{let a=Xe(t,e,s+n);if(a){o=!0;let t=Ke(a,e,n+s+1,r);t!=Ye&&i.push(s,s+e.nodeSize,t)}}));let s=qe(o?Ge(t):t,-n).sort(Je);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||(r.onRemove&&r.onRemove(s[t].spec),s.splice(t--,1));return s.length||i.length?new Ve(s,i):Ye}function Je(t,e){return t.from-e.from||t.to-e.to}function Qe(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),tn(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),tn(e,i+1,o.copy(r.to,o.to)))}}return e}function tn(t,e,n){for(;e<t.length&&Je(n,t[e])>0;)e++;t.splice(e,0,n)}function en(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Ye&&e.push(r)})),t.cursorWrapper&&e.push(Ve.create(t.state.doc,[t.cursorWrapper.deco])),We.from(e)}const nn={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rn=_&&k<=11;class on{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class sn{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new on,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);_&&k<=11&&t.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),rn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,nn)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Rt(this.view)){if(this.suppressingSelectionUpdates)return Bt(this.view);if(_&&k<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=a(e))n.add(e);for(let r=t.anchorNode;r;r=a(r))if(n.has(r)){e=r;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Rt(t)&&!this.ignoreSelectionChange(n),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let t=0;t<e.length;t++){let n=this.registerMutation(e[t],l);n&&(o=o<0?n.from:Math.min(n.from,o),s=s<0?n.to:Math.max(n.to,s),n.typeOver&&(a=!0))}if(C&&l.length){let e=l.filter((t=>"BR"==t.nodeName));if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;!e||"LI"!=e.nodeName||n&&dn(t,n)==e||r.remove()}}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&m(n)&&(c=Et(t))&&c.eq(r.Y1.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Bt(t),this.currentSelection.set(n),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(t){if(an.has(t))return;if(an.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)){if(t.requiresGeckoHackNode=C,ln)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ln=!0}}(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Bt(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++){let r=t.addedNodes[n];e.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,i=t.nextSibling;if(_&&k<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:o}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!o||Array.prototype.indexOf.call(t.addedNodes,o)<0)&&(i=o)}let o=r&&r.parentNode==t.target?s(r)+1:0,a=n.localPosFromDOM(t.target,o,-1),l=i&&i.parentNode==t.target?s(i):t.target.childNodes.length;return{from:a,to:n.localPosFromDOM(t.target,l,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let an=new WeakMap,ln=!1;function cn(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return d(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function dn(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let e=t.docView.nearestDesc(n,!0);if(e&&e.node.isBlock)return n}return null}function pn(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(O&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||O&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const hn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function un(t,e,n,o,s){let a=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Et(t,e);if(n&&!t.state.selection.eq(n)){if(S&&T&&13===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),a&&r.setMeta("composition",a),t.dispatch(r)}return}let l=t.state.doc.resolve(e),c=l.sharedDepth(n);e=l.before(c+1),n=t.state.doc.resolve(n).after(c+1);let d,p,h=t.state.selection,u=function(t,e,n){let r,{node:o,fromOffset:s,toOffset:a,from:l,to:c}=t.docView.parseRange(e,n),d=t.domSelectionRange(),p=d.anchorNode;if(p&&t.dom.contains(1==p.nodeType?p:p.parentNode)&&(r=[{node:p,offset:d.anchorOffset}],m(d)||r.push({node:d.focusNode,offset:d.focusOffset})),S&&8===t.input.lastKeyCode)for(let t=a;t>s;t--){let e=o.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){a=t;break}if(!n||n.size)break}let h=t.state.doc,u=t.someProp("domParser")||i.aw.fromSchema(t.state.schema),f=h.resolve(l),g=null,b=u.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:pn,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),g={anchor:t+l,head:e+l}}return{doc:b,sel:g,from:l,to:c}}(t,e,n),f=t.state.doc,b=f.slice(u.from,u.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(d=t.state.selection.to,p="end"):(d=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let y=function(t,e,n,r,i){let o=t.findDiffStart(e,n);if(null==o)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==i){r-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&t.size<e.size){let t=r<=o&&r>=s?o-r:0;o-=t,o&&o<e.size&&gn(e.textBetween(o-1,o+1))&&(o+=t?1:-1),a=o+(a-s),s=o}else if(a<o){let e=r<=o&&r>=a?o-r:0;o-=e,o&&o<t.size&&gn(t.textBetween(o-1,o+1))&&(o+=e?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}(b.content,u.doc.content,u.from,d,p);if(y&&t.input.domChangeCount++,(M&&t.input.lastIOSEnter>Date.now()-225||T)&&s.some((t=>1==t.nodeType&&!hn.test(t.nodeName)))&&(!y||y.endA>=y.endB)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!y){if(!(o&&h instanceof r.Bs&&!h.empty&&h.$head.sameParent(h.$anchor))||t.composing||u.sel&&u.sel.anchor!=u.sel.head){if(u.sel){let e=fn(t,t.state.doc,u.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);a&&n.setMeta("composition",a),t.dispatch(n)}}return}y={start:h.from,endA:h.to,endB:h.to}}t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof r.Bs&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),_&&k<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&"  "==u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)&&(y.start--,y.endA--,y.endB--);let A,w=u.doc.resolveNoCache(y.start-u.from),v=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),C=w.sameParent(v)&&w.parent.inlineContent&&x.end()>=y.endA;if((M&&t.input.lastIOSEnter>Date.now()-225&&(!C||s.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!C&&w.pos<u.doc.content.size&&(!w.sameParent(v)||!w.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(w.pos,v.pos,"",""))&&(A=r.Y1.findFrom(u.doc.resolve(w.pos+1),1,!0))&&A.head>w.pos)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>y.start&&function(t,e,n,r,i){if(n-e<=i.pos-r.pos||mn(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let t=o.nodeAfter;return null!=t&&n==e+t.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(mn(o,!0,!0));return!(!s.parent.isTextblock||s.pos>n||mn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(f,y.start,y.endA,w,v)&&t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return void(T&&S&&t.domObserver.suppressSelectionUpdates());S&&y.endB==y.start&&(t.input.lastChromeDelete=Date.now()),T&&!C&&w.start()!=v.start()&&0==v.parentOffset&&w.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,v=u.doc.resolveNoCache(y.endB-u.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,g(13,"Enter"))}))}),20));let E,B,O,I=y.start,$=y.endA;if(C)if(w.pos==v.pos)_&&k<=11&&0==w.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>Bt(t)),20)),E=t.state.tr.delete(I,$),B=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(O=function(t,e){let n,r,o,s=t.firstChild.marks,a=e.firstChild.marks,l=s,c=a;for(let t=0;t<a.length;t++)l=a[t].removeFromSet(l);for(let t=0;t<s.length;t++)c=s[t].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=t=>t.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=t=>t.mark(r.removeFromSet(t.marks))}let d=[];for(let t=0;t<e.childCount;t++)d.push(o(e.child(t)));if(i.HY.from(d).eq(t))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,v.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))E=t.state.tr,"add"==O.type?E.addMark(I,$,O.mark):E.removeMark(I,$,O.mark);else if(w.parent.child(w.index()).isText&&w.index()==v.index()-(v.textOffset?0:1)){let e=w.parent.textBetween(w.parentOffset,v.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,I,$,e))))return;E=t.state.tr.insertText(e,I,$)}if(E||(E=t.state.tr.replace(I,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let e=fn(t,E.doc,u.sel);e&&!(S&&t.composing&&e.empty&&(y.start!=y.endB||t.input.lastChromeDelete<Date.now()-100)&&(e.head==I||e.head==E.mapping.map($)-1)||_&&e.empty&&e.head==I)&&E.setSelection(e)}B&&E.ensureMarks(B),a&&E.setMeta("composition",a),t.dispatch(E.scrollIntoView())}function fn(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Nt(t,e.resolve(n.anchor),e.resolve(n.head))}function mn(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,i++}return i}function gn(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class bn{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new he,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(xn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=wn(this),An(this),this.nodeViews=vn(this),this.docView=dt(this.state.doc,yn(this),en(this),this.dom,this),this.domObserver=new sn(this,((t,e,n,r)=>un(this,t,e,n,r))),this.domObserver.start(),function(t){for(let e in ce){let n=ce[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!ge(t,e)||me(t,e)||!t.editable&&e.type in de||n(t,e)},pe[e]?{passive:!0}:void 0)}O&&t.dom.addEventListener("input",(()=>null)),fe(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&fe(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(xn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,i=!1,o=!1;t.storedMarks&&this.composing&&(Oe(this),o=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=vn(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,i=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&fe(this),this.editable=wn(this),An(this);let a=en(this),l=yn(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",p=i||!this.docView.matchesNode(t.doc,l,a);!p&&t.selection.eq(r.selection)||(o=!0);let h="preserve"==c&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,s=i+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(o,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=i-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:H(t.dom)}}(this);if(o){this.domObserver.stop();let e=p&&(_||S)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(r.selection,t.selection);if(p){let n=S?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Me(this)),!i&&this.docView.update(t.doc,l,a,this)||(this.docView.updateOuterDeco(l),this.docView.destroy(),this.docView=dt(t.doc,l,a,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return d(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Bt(this,e):(Tt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():h&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;j(n,0==r?0:r-e)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(1==t.nodeType?t:t.parentNode))if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof r.qv){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&z(this,e.getBoundingClientRect(),t)}else z(this,this.coordsAtPos(this.state.selection.head,1),t);else;}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}updateDraggedNode(t,e){let n=t.node,i=-1;if(this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let t=n.from+(this.state.doc.content.size-e.doc.content.size);(t>0&&this.state.doc.nodeAt(t))==n.node&&(i=t)}this.dragging=new Ne(t.slice,t.move,i<0?void 0:r.qv.create(this.state.doc,i))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;r<this.directPlugins.length;r++){let i=this.directPlugins[r].props[t];if(null!=i&&(n=e?e(i):i))return n}let i=this.state.plugins;if(i)for(let r=0;r<i.length;r++){let o=i[r].props[t];if(null!=o&&(n=e?e(o):o))return n}}hasFocus(){if(_){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(U)return t.focus(U);let e=H(t);t.focus(null==U?{get preventScroll(){return U={preventScroll:!0},!0}}:void 0),U||(U=!1,j(e,0))}(this.dom),Bt(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return Y(this,t)}coordsAtPos(t,e=1){return G(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return it(this,e||this.state,t)}pasteHTML(t,e){return Te(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Te(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return Kt(this,t)}destroy(){this.docView&&(!function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],en(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,l=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){me(t,e)||!ce[e.type]||!t.editable&&e.type in de||ce[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?O&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return cn(t,n)}let n;function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?cn(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function yn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),e.translate||(e.translate="no"),[Ue.node(0,t.state.doc.content.size,e)]}function An(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ue.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function wn(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function vn(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function xn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},77898:(t,e,n)=>{"use strict";n.d(e,{fl:()=>C,iv:()=>l,Ts:()=>x,Qu:()=>_});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),i=r.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=n.cssText,t.appendChild(e)}},d=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:p,defineProperty:h,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,b=globalThis,y=b.trustedTypes,A=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,v=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},_=(t,e)=>!p(t,e),k={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&h(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??k}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:x).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??_)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[v("elementProperties")]=new Map,C[v("finalized")]=new Map,w?.({ReactiveElement:C}),(b.reactiveElementVersions??=[]).push("2.1.1")},14232:(t,e,n)=>{"use strict";n.d(e,{OR:()=>o,_Y:()=>a,fk:()=>l,hl:()=>d,i9:()=>p,ws:()=>h});var r=n(33692);const{I:i}=r.Al,o=t=>void 0===t.strings,s=()=>document.createComment(""),a=(t,e,n)=>{const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=r.insertBefore(s(),o),a=r.insertBefore(s(),o);n=new i(e,a,t,t.options)}else{const e=n._$AB.nextSibling,i=n._$AM,s=i!==t;if(s){let e;n._$AQ?.(t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==i._$AU&&n._$AP(e)}if(e!==o||s){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return n},l=(t,e,n=t)=>(t._$AI(e,n),t),c={},d=(t,e=c)=>t._$AH=e,p=t=>t._$AH,h=t=>{t._$AR(),t._$AA.remove()}},50875:(t,e,n)=>{"use strict";n.d(e,{XM:()=>i,Xe:()=>o,pX:()=>r});const r={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=t=>(...e)=>({_$litDirective$:t,values:e});class o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}},33692:(t,e,n)=>{"use strict";n.d(e,{Al:()=>H,Jb:()=>C,Ld:()=>E,dy:()=>k,sY:()=>U});const r=globalThis,i=r.trustedTypes,o=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+a,c=`<${l}>`,d=document,p=()=>d.createComment(""),h=t=>null===t||"object"!=typeof t&&"function"!=typeof t,u=Array.isArray,f=t=>u(t)||"function"==typeof t?.[Symbol.iterator],m="[ \t\n\f\r]",g=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,y=/>/g,A=RegExp(`>|${m}(?:([^\\s"'>=/]+)(${m}*=${m}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),w=/'/g,v=/"/g,x=/^(?:script|style|textarea|title)$/i,_=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),k=_(1),C=(_(2),_(3),Symbol.for("lit-noChange")),E=Symbol.for("lit-nothing"),S=new WeakMap,B=d.createTreeWalker(d,129);function O(t,e){if(!u(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(e):e}const M=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",l=g;for(let e=0;e<n;e++){const n=t[e];let d,p,h=-1,u=0;for(;u<n.length&&(l.lastIndex=u,p=l.exec(n),null!==p);)u=l.lastIndex,l===g?"!--"===p[1]?l=b:void 0!==p[1]?l=y:void 0!==p[2]?(x.test(p[2])&&(i=RegExp("</"+p[2],"g")),l=A):void 0!==p[3]&&(l=A):l===A?">"===p[0]?(l=i??g,h=-1):void 0===p[1]?h=-2:(h=l.lastIndex-p[2].length,d=p[1],l=void 0===p[3]?A:'"'===p[3]?v:w):l===v||l===w?l=A:l===b||l===y?l=g:(l=A,i=void 0);const f=l===A&&t[e+1].startsWith("/>")?" ":"";o+=l===g?n+c:h>=0?(r.push(d),n.slice(0,h)+s+n.slice(h)+a+f):n+a+(-2===h?e:f)}return[O(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class I{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,c=0;const d=t.length-1,h=this.parts,[u,f]=M(t,e);if(this.el=I.createElement(u,n),B.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=B.nextNode())&&h.length<d;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(s)){const e=f[c++],n=r.getAttribute(t).split(a),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:o,name:i[2],strings:n,ctor:"."===i[1]?R:"?"===i[1]?P:"@"===i[1]?D:N}),r.removeAttribute(t)}else t.startsWith(a)&&(h.push({type:6,index:o}),r.removeAttribute(t));if(x.test(r.tagName)){const t=r.textContent.split(a),e=t.length-1;if(e>0){r.textContent=i?i.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],p()),B.nextNode(),h.push({type:2,index:++o});r.append(t[e],p())}}}else if(8===r.nodeType)if(r.data===l)h.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(a,t+1));)h.push({type:7,index:o}),t+=a.length-1}o++}}static createElement(t,e){const n=d.createElement("template");return n.innerHTML=t,n}}function $(t,e,n=t,r){if(e===C)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=h(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=$(t,i._$AS(t,e.values),i,r)),e}class T{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??d).importNode(e,!0);B.currentNode=r;let i=B.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new L(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new z(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=B.nextNode(),o++)}return B.currentNode=d,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class L{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$(this,t,e),h(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==C&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):f(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&h(this._$AH)?this._$AA.nextSibling.data=t:this.T(d.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=I.createElement(O(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new T(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=S.get(t.strings);return void 0===e&&S.set(t.strings,e=new I(t)),e}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new L(this.O(p()),this.O(p()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=E}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=$(this,t,e,0),o=!h(t)||t!==this._$AH&&t!==C,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=$(this,r[n+s],e,s),a===C&&(a=this._$AH[s]),o||=!h(a)||a!==this._$AH[s],a===E?t=E:t!==E&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class R extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class P extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class D extends N{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=$(this,t,e,0)??E)===C)return;const n=this._$AH,r=t===E&&n!==E||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==E&&(n===E||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){$(this,t)}}const H={M:s,P:a,A:l,C:1,L:M,R:T,D:f,V:$,I:L,H:N,N:P,U:D,B:R,F:z},j=r.litHtmlPolyfillSupport;j?.(I,L),(r.litHtmlVersions??=[]).push("3.3.1");const U=(t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new L(e.insertBefore(p(),t),t,void 0,n??{})}return i._$AI(t),i}},27338:(t,e,n)=>{"use strict";n.d(e,{V:()=>u,i:()=>g});var r=n(33692),i=n(14232),o=n(50875);const s=(t,e)=>{const n=t._$AN;if(void 0===n)return!1;for(const t of n)t._$AO?.(e,!1),s(t,e);return!0},a=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===n?.size)},l=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),p(e)}};function c(t){void 0!==this._$AN?(a(this),this._$AM=t,l(this)):this._$AM=t}function d(t,e=!1,n=0){const r=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(r))for(let t=n;t<r.length;t++)s(r[t],!1),a(r[t]);else null!=r&&(s(r,!1),a(r));else s(this,t)}const p=t=>{t.type==o.pX.CHILD&&(t._$AP??=d,t._$AQ??=c)};class h extends o.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),l(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(s(this,t),a(this))}setValue(t){if((0,i.OR)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const u=()=>new f;class f{}const m=new WeakMap,g=(0,o.XM)(class extends h{render(t){return r.Ld}update(t,[e]){const n=e!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),r.Ld}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const e=this.ht??globalThis;let n=m.get(e);void 0===n&&(n=new WeakMap,m.set(e,n)),void 0!==n.get(this.G)&&this.G.call(this.ht,void 0),n.set(this.G,t),void 0!==t&&this.G.call(this.ht,t)}else this.G.value=t}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},38036:(t,e,n)=>{"use strict";n.d(e,{r:()=>a});var r=n(33692),i=n(50875),o=n(14232);const s=(t,e,n)=>{const r=new Map;for(let i=e;i<=n;i++)r.set(t[i],i);return r},a=(0,i.XM)(class extends i.Xe{constructor(t){if(super(t),t.type!==i.pX.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let r;void 0===n?n=e:void 0!==e&&(r=e);const i=[],o=[];let s=0;for(const e of t)i[s]=r?r(e,s):s,o[s]=n(e,s),s++;return{values:o,keys:i}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,i]){const a=(0,o.i9)(t),{values:l,keys:c}=this.dt(e,n,i);if(!Array.isArray(a))return this.ut=c,l;const d=this.ut??=[],p=[];let h,u,f=0,m=a.length-1,g=0,b=l.length-1;for(;f<=m&&g<=b;)if(null===a[f])f++;else if(null===a[m])m--;else if(d[f]===c[g])p[g]=(0,o.fk)(a[f],l[g]),f++,g++;else if(d[m]===c[b])p[b]=(0,o.fk)(a[m],l[b]),m--,b--;else if(d[f]===c[b])p[b]=(0,o.fk)(a[f],l[b]),(0,o._Y)(t,p[b+1],a[f]),f++,b--;else if(d[m]===c[g])p[g]=(0,o.fk)(a[m],l[g]),(0,o._Y)(t,a[f],a[m]),m--,g++;else if(void 0===h&&(h=s(c,g,b),u=s(d,f,m)),h.has(d[f]))if(h.has(d[m])){const e=u.get(c[g]),n=void 0!==e?a[e]:null;if(null===n){const e=(0,o._Y)(t,a[f]);(0,o.fk)(e,l[g]),p[g]=e}else p[g]=(0,o.fk)(n,l[g]),(0,o._Y)(t,a[f],n),a[e]=null;g++}else(0,o.ws)(a[m]),m--;else(0,o.ws)(a[f]),f++;for(;g<=b;){const e=(0,o._Y)(t,p[b+1]);(0,o.fk)(e,l[g]),p[g++]=e}for(;f<=m;){const t=a[f++];null!==t&&(0,o.ws)(t)}return this.ut=c,(0,o.hl)(t,p),r.Jb}})},21293:(t,e,n)=>{"use strict";n.d(e,{oi:()=>s,iv:()=>r.iv,dy:()=>i.dy,sY:()=>i.sY});var r=n(77898),i=n(33692);const o=globalThis;class s extends r.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,i.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return i.Jb}}s._$litElement$=!0,s.finalized=!0,o.litElementHydrateSupport?.({LitElement:s});const a=o.litElementPolyfillSupport;a?.({LitElement:s});(o.litElementVersions??=[]).push("4.2.1")},62623:(t,e,n)=>{"use strict";n.d(e,{oi:()=>ht,iv:()=>l,dy:()=>W,YP:()=>q});const r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const l=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new a(n,t,o)},c=(t,e)=>{if(i)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),i=r.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=n.cssText,t.appendChild(e)}},d=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:p,defineProperty:h,getOwnPropertyDescriptor:u,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,b=globalThis,y=b.trustedTypes,A=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,v=(t,e)=>t,x={toAttribute(t,e){switch(e){case Boolean:t=t?A:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},_=(t,e)=>!p(t,e),k={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&h(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=u(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??k}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...f(t),...m(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return c(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:x).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:x;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??_)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[v("elementProperties")]=new Map,C[v("finalized")]=new Map,w?.({ReactiveElement:C}),(b.reactiveElementVersions??=[]).push("2.1.1");const E=globalThis,S=E.trustedTypes,B=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,O="$lit$",M=`lit$${Math.random().toFixed(9).slice(2)}$`,I="?"+M,$=`<${I}>`,T=document,L=()=>T.createComment(""),N=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,P=t=>R(t)||"function"==typeof t?.[Symbol.iterator],D="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,H=/-->/g,j=/>/g,U=RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,F=/"/g,V=/^(?:script|style|textarea|title)$/i,Y=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),W=Y(1),q=Y(2),X=(Y(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),K=new WeakMap,J=T.createTreeWalker(T,129);function Q(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==B?B.createHTML(e):e}const tt=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=z;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===z?"!--"===l[1]?s=H:void 0!==l[1]?s=j:void 0!==l[2]?(V.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=U):void 0!==l[3]&&(s=U):s===U?">"===l[0]?(s=i??z,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?U:'"'===l[3]?F:Z):s===F||s===Z?s=U:s===H||s===j?s=z:(s=U,i=void 0);const p=s===U&&t[e+1].startsWith("/>")?" ":"";o+=s===z?n+$:c>=0?(r.push(a),n.slice(0,c)+O+n.slice(c)+M+p):n+M+(-2===c?e:p)}return[Q(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class et{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=tt(t,e);if(this.el=et.createElement(l,n),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=J.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(O)){const e=c[o++],n=r.getAttribute(t).split(M),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?st:"?"===s[1]?at:"@"===s[1]?lt:ot}),r.removeAttribute(t)}else t.startsWith(M)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(V.test(r.tagName)){const t=r.textContent.split(M),e=t.length-1;if(e>0){r.textContent=S?S.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],L()),J.nextNode(),a.push({type:2,index:++i});r.append(t[e],L())}}}else if(8===r.nodeType)if(r.data===I)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(M,t+1));)a.push({type:7,index:i}),t+=M.length-1}i++}}static createElement(t,e){const n=T.createElement("template");return n.innerHTML=t,n}}function nt(t,e,n=t,r){if(e===X)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=N(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=nt(t,i._$AS(t,e.values),i,r)),e}class rt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);J.currentNode=r;let i=J.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new it(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new ct(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=J.nextNode(),o++)}return J.currentNode=T,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),N(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==X&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):P(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=et.createElement(Q(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new rt(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new et(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new it(this.O(L()),this.O(L()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ot{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=nt(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==X,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=nt(this,r[n+s],e,s),a===X&&(a=this._$AH[s]),o||=!N(a)||a!==this._$AH[s],a===G?t=G:t!==G&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class st extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class at extends ot{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class lt extends ot{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??G)===X)return;const n=this._$AH,r=t===G&&n!==G||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==G&&(n===G||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const dt=E.litHtmlPolyfillSupport;dt?.(et,it),(E.litHtmlVersions??=[]).push("3.3.1");const pt=globalThis;class ht extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new it(e.insertBefore(L(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}}ht._$litElement$=!0,ht.finalized=!0,pt.litElementHydrateSupport?.({LitElement:ht});const ut=pt.litElementPolyfillSupport;ut?.({LitElement:ht});(pt.litElementVersions??=[]).push("4.2.1")},84735:t=>{"use strict";t.exports={version:"1.0.34"}},4147:t=>{"use strict";t.exports={i8:"3.0.78"}}},o={};function s(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,s),n.loaded=!0,n.exports}s.m=i,s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,s.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);s.r(i);var o={};t=t||[null,e({}),e([]),e(e)];for(var a=2&r&&n;"object"==typeof a&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((t=>o[t]=()=>n[t]));return o.default=()=>n,s.d(i,o),i},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.f={},s.e=t=>Promise.all(Object.keys(s.f).reduce(((e,n)=>(s.f[n](t,e),e)),[])),s.u=t=>t+".creaditor.bundle.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="Creaditor:",s.l=(t,e,i,o)=>{if(n[t])n[t].push(e);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+i){a=p;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",r+i),a.src=t),n[t]=[e];var h=(e,r)=>{a.onerror=a.onload=null,clearTimeout(u);var i=n[t];if(delete n[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((t=>t(r))),e)return e(r)},u=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;s.g.importScripts&&(t=s.g.location+"");var e=s.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=t})(),(()=>{s.b=document.baseURI||self.location.href;var t={4826:0};s.f.j=(e,n)=>{var r=s.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>r=t[e]=[n,i]));n.push(r[2]=i);var o=s.p+s.u(e),a=new Error;s.l(o,(n=>{if(s.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,r[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[o,a,l]=n,c=0;if(o.some((e=>0!==t[e]))){for(r in a)s.o(a,r)&&(s.m[r]=a[r]);if(l)l(s)}for(e&&e(n);c<o.length;c++)i=o[c],s.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),s.nc=void 0;var a={};return(()=>{"use strict";s.r(a);var t=s(56666);const e={primary:"linear-gradient(319deg, #663dff 0%, #aa00ff 37%, #cc4499 100%)",primaryText:"#fff",bgPrimary:"#d7e4fe",secondary:"#A93C80",topNavbar:"#484554",breadcrumbs:"#424656",resizer:"#d7e4fe",alpha:"rgb(244, 250, 254)",backColor:"#f4f5f7",disabled:"#cdd1db",iconColor:"#586387",fontFamily:"Arial, Helvetica, sans-serif",direction:"rtl",textAlign:"right",justifyContent:"flex-start",rowDirection:"row-reverse"},n=t=>{if(t)for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];e[n]&&(e[n]=r)}const n=`\n #input-iframe--v1,:root {\n --radius: 20px;\n --sm-radius: .25rem;\n --secondary: #0a0a0a;\n --breadcrumbs:${e.breadcrumbs};\n --top-navbar:${e.topNavbar};\n --dark:${e.topNavbar};\n --sidebar-color:${e.primary};\n --sidebar-icon-color:#fff;\n --primary: ${e.primary};\n --primaryText:${e.primaryText};\n --primary-text:${e.primaryText};\n --resizer-color:${e.resizer};\n --alpha:${e.alpha};\n --micro-info-color:#7d7d7d;\n --bgPrimary:${e.bgPrimary};\n --secondary: ${e.secondary};\n --disabled:${e.disabled};\n --icon-color:${e.iconColor};\n --error-color: rgba(165, 16, 16, 0.877); \n --input-border-color: #9EADBD;\n --font-family: ${e.fontFamily};\n --cdtr-font-family: ${e.fontFamily};\n --layout-holder-color: ${e.backColor};\n --justify-content:${e.justifyContent};\n --row-direction:${e.rowDirection};\n --medium-box-shadow: 0 2px 10px 0 rgb(0 6 36 / 20%);\n --section-padding: 10px;\n --add-padding-row:25px 0 25px 0;\n --section-padding-top: 6px;\n --section-padding-bottom: 6px;\n --margin-top:1rem;\n --divider-color: #00000026;\n --focus-shadow: 0 0 0 0.15rem rgb(13 110 253 / 10%);\n --text-align-locale:${e.textAlign};\n --direction-locale:${e.direction};\n --direction:${e.direction};\n --section-hover: #f0f0f048;\n --spacing-sm: .1rem;\n --paper-font-subhead_-_font-size:13px;\n --editor-font-size:13px;\n --paper-item-min-height:30px;\n --alert: rgb(235, 48, 48);\n --section-height: 80px;\n --section: #fff;\n --element-border-color: rgba(0, 0, 0, 0.116);\n --editor-input-height: 30px;\n --title-block-height: 50px;\n --text-dark-color:#00000;\n }`,r=document.createElement("style");return r.id="theme-provider-vars",r.innerHTML=n,{theme:e,styleTag:r}};var r=s(40949),i=s(46062),o=s.n(i),l=s(32877),c=s.n(l),d=s(96793),p=s.n(d),h=s(17892),u=s.n(h),f=s(11173),m=s.n(f),g=s(67444),b={};b.setAttributes=u(),b.insert=p().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=m();o()(g.Z,b);const y=g.Z&&g.Z.locals?g.Z.locals:void 0;var A=s(7896),w=s(65283),v={};v.setAttributes=u(),v.insert=p().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=m();o()(w.Z,v);const x=w.Z&&w.Z.locals?w.Z.locals:void 0;var _=s(4147),k=s(35965);console.log("--\x3e Beta version",_.i8,"🚀");const C=t=>(0,r.Z)("div",{style:t.style,className:(0,k.Z)(x.root)},(0,r.Z)("cdtr-row",{alignItems:"center"},(0,r.Z)("cdtr-col",null,(0,r.Z)("cdtr-row",{style:{height:"35px",width:"150px",margin:"auto"},alignItems:"center",justify:"center"},(0,r.Z)("span",{style:{fontFamily:"var(--font-family)",fontSize:"13px"}},"Powered by"),(0,r.Z)("svg",{className:x.logo,width:"100",height:"34",viewBox:"0 0 152 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.Z)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.96 6.48749C13.7333 6.48749 15.5 6.99999 17 7.99999C18.381 9.11888 18.4975 9.4202 19.1214 11.0336C19.2293 11.3128 19.3525 11.6312 19.5 12L16.5 13.6125C16.5 11.8125 15.2287 11 13.6703 10.3125C12.6503 9.86249 11.8267 9.71249 10.52 9.71249C9.24 9.71249 8.21333 9.91249 7.44 10.3125C6.69333 10.6875 6.09333 11.1875 5.64 11.8125C5.21333 12.4375 4.88 13.275 4.64 14.325C4.26667 15.95 4.08 18.275 4.08 21.3C4.08 24.325 4.69333 26.6 5.92 28.125C6.28089 28.5737 6.69603 29.0505 7.16591 29.5H1.96534C1.64569 28.9808 1.36391 28.41 1.12 27.7875C0.373332 25.7875 0 23.5625 0 21.1125C0 18.6375 0.199999 16.6125 0.599999 15.0375C0.999999 13.4375 1.61333 11.9875 2.44 10.6875C3.29333 9.3625 4.44 8.33749 5.88 7.61249C7.34667 6.86249 9.04 6.48749 10.96 6.48749ZM2.68031 30.5C2.78393 30.6248 2.8905 30.7457 3 30.8625C3.77333 31.6625 4.82667 32.325 6.16 32.85C7.49333 33.375 9.06667 33.6375 10.88 33.6375C13.5733 33.6375 17.5 32.5 18 31.5V30.5L17.1236 30.5C17.0524 31.7047 13.7937 31.581 12.1668 31.5193C11.8889 31.5087 11.6586 31.5 11.5 31.5C10.3251 31.5 9.29305 31.0914 8.40174 30.5H2.68031ZM22.8797 30.5V33.1875H26.4797V30.5H22.8797ZM37.7715 30.5C39.1799 32.5917 41.4724 33.6375 44.6491 33.6375C46.3821 33.6375 48.2093 32.5077 49.9727 31.4175C50.4886 31.0985 50.999 30.7829 51.5 30.5L48.1897 30.5C47.9175 30.6241 47.5455 30.7818 47 31C44.717 31.9132 43.2679 31.1585 42.272 30.6399C42.1774 30.5906 42.0868 30.5434 42 30.5L37.7715 30.5ZM40.8521 29.5H37.2031C36.4604 27.9434 36.0891 25.9476 36.0891 23.5125C36.0891 20.3125 36.8357 17.775 38.3291 15.9C39.8491 14 42.0891 13.05 45.0491 13.05C47.3424 13.05 49.0357 13.7 50.1291 15C51.0357 16.05 51.5957 17.8125 51.8091 20.2875C51.8393 20.6553 51.8738 20.9181 51.9052 21.1565C51.957 21.5501 52 21.8772 52 22.5L51 23C49 24 40 24 40 24L39.9291 24.15C39.9291 26.4443 40.0799 28.3274 40.8521 29.5ZM50.0767 29.5H50.285L50.2091 29.4375C50.1632 29.459 50.1191 29.4798 50.0767 29.5ZM55.0663 30.5C55.7825 32.5916 57.5693 33.6375 60.4269 33.6375C63.0135 33.6375 65.0402 32.7 66.5069 30.825H66.6269C66.6706 30.948 66.6869 31.1327 66.7054 31.3434C66.7661 32.0325 66.8514 33 68 33C68.951 33 70.3038 32.799 71.2942 32.6519C71.866 32.567 72.317 32.5 72.5 32.5L73 31C71.2357 31.196 70.3302 30.9636 69.8813 30.5H62.8616C62.3984 30.5917 61.9068 30.6375 61.3869 30.6375C60.9108 30.6375 60.4946 30.5917 60.1383 30.5H55.0663ZM58.7645 29.5H54.8182C54.744 29.0529 54.7069 28.5696 54.7069 28.05C54.7069 24.75 57.1869 22.7625 62.1469 22.0875L65.9869 21.5625V19.4625C65.9869 17.1875 64.8802 16.05 62.6669 16.05C61.2535 16.05 59.3469 16.4 56.9469 17.1L55.6669 14.7375C57.9602 13.6125 60.4402 13.05 63.1069 13.05C66.3335 13.05 68.3069 13.95 69.0269 15.75C69.4002 16.675 69.5869 17.9 69.5869 19.425V27.4125C69.5869 27.7069 69.5578 28.0143 69.5289 28.3204C69.4904 28.7271 69.4522 29.1315 69.4826 29.5H65.1695C65.4609 29.2847 65.7333 29.0389 65.9869 28.7625V23.475C62.6669 23.2875 59.7733 24.425 59 25C58.3673 25.4784 58.4377 26.5352 58.5055 27.554C58.5263 27.8663 58.5469 28.1751 58.5469 28.4625C58.5469 28.8639 58.6194 29.2097 58.7645 29.5ZM75.9477 30.5C76.145 30.8458 76.364 31.1542 76.6047 31.425C77.938 32.9 79.7247 33.6375 81.9647 33.6375C84.2047 33.6375 86.4 32.7 88 31L88.5 33.5H91L90.9605 30.5H87.1153C86.8289 30.6362 86.427 30.734 85.7677 30.825C85.6033 30.8477 85.4543 30.8689 85.317 30.8885C84.3954 31.0197 83.9994 31.0761 83 31C82.0531 30.9278 81.4134 30.7549 80.9312 30.5H75.9477ZM79.801 29.5H75.4774C74.8956 27.9934 74.6047 25.9851 74.6047 23.475C74.6047 21.925 74.7914 20.525 75.1647 19.275C75.538 18.025 76.018 17.025 76.6047 16.275C77.1914 15.525 77.8714 14.9 78.6447 14.4C80.0047 13.5 81.5247 13.05 83.2047 13.05C84.8847 13.05 86.258 13.45 87.3247 14.25C87.3514 14.25 87.3914 14.2375 87.4447 14.2125L87.3247 13.2375L87.4447 3.49999L91.2447 -6.67572e-06L90.9247 27.7875L90.9473 29.5H87.7092L87.3247 17.1C86.2847 16.4 85.0314 16.05 83.5647 16.05C82.8447 16.05 82.2314 16.1375 81.7247 16.3125C81.218 16.4625 80.698 16.7625 80.1647 17.2125C79.018 18.1875 78.4447 20.175 78.4447 23.175C78.4447 26.15 78.8047 28.1375 79.5247 29.1375C79.6186 29.2633 79.7095 29.3843 79.801 29.5ZM106.671 30.5C106.821 31.0036 107.003 31.4369 107.216 31.8C107.936 33.025 109.469 33.6375 111.816 33.6375C112.509 33.6375 113.283 33.5125 114.136 33.2625C114.989 33.0125 116.18 32.3 116.5 32V30.5H116.223C115.284 30.7497 113.144 31 112.5 31C111.8 31 111.306 30.802 110.942 30.5H106.671ZM110.219 29.5H106.431C106.234 28.4603 106.136 27.202 106.136 25.725V16.35H102.696L103 14.4L108 8.43749H109.736V13.5H115.456L114.5 16.425L109.736 16.35V25.5C109.736 27.3786 109.897 28.7119 110.219 29.5ZM119.683 30.5C120.217 31.4497 120.988 32.1956 122 32.7375C123.147 33.3375 124.547 33.6375 126.2 33.6375C127.88 33.6375 129.334 33.35 130.56 32.775C131.777 32.2169 132.73 31.4586 133.418 30.5H129.855C129.407 30.8934 127.647 31.425 127 31.425C125.969 31.425 124.668 31.0651 123.903 30.5H119.683ZM123.257 29.5H119.211C118.484 27.7297 118.12 25.6089 118.12 23.1375C118.12 20.4375 118.787 18.1375 120.12 16.2375C120.814 15.2625 121.774 14.4875 123 13.9125C124.254 13.3375 125.707 13.05 127.36 13.05C129.04 13.05 130.44 13.35 131.56 13.95C132.707 14.55 133.547 15.3875 134.08 16.4625C135.014 18.3875 135.48 20.75 135.48 23.55C135.48 25.8266 135.007 27.8099 134.058 29.5H130.366C130.408 29.3841 130.459 29.2633 130.56 29.1375C130.88 28.7125 131.12 28.125 131.28 27.375C131.52 26.25 131.64 25.0375 131.64 23.7375C131.64 22.4375 131.614 21.4875 131.56 20.8875C131.507 20.2625 131.374 19.625 131.16 18.975C130.974 18.325 130.694 17.8 130.32 17.4C129.974 17 129.494 16.675 128.88 16.425C128.267 16.175 127.52 16.05 126.64 16.05C125.787 16.05 125.054 16.2 124.44 16.5C123.827 16.8 123.36 17.1625 123.04 17.5875C122.72 17.9875 122.48 18.5625 122.32 19.3125C122.08 20.4375 121.96 21.65 121.96 22.95C121.96 24.25 121.987 25.2125 122.04 25.8375C122.094 26.4375 122.214 27.0625 122.4 27.7125C122.614 28.3625 122.907 28.8875 123.28 29.2875C123.263 29.3594 123.256 29.4303 123.257 29.5ZM140.497 30.5V33.1875H144.097V30.5H140.497ZM144.097 29.5H140.497V18.9L140.177 13.6875L143.097 13.3125L143.537 17.1H143.697C144.15 15.875 144.83 14.9 145.737 14.175C146.67 13.425 147.764 13.05 149.017 13.05C149.71 13.05 150.23 13.1125 150.577 13.2375C150.95 13.3375 151.257 13.425 151.497 13.5C151.737 13.55 151.884 13.5875 151.937 13.6125L151.297 16.9875C150.497 16.7375 149.537 16.6125 148.417 16.6125C147.324 16.6125 146.324 17.0625 145.417 17.9625C144.537 18.8375 144.097 19.9 144.097 21.15V29.5ZM26.4797 29.5H22.8797V18.9L22.5597 13.6875L25.4797 13.3125L25.9197 17.1H26.0797C26.533 15.875 27.213 14.9 28.1197 14.175C29.053 13.425 30.1464 13.05 31.3997 13.05C32.093 13.05 32.613 13.1125 32.9597 13.2375C33.333 13.3375 33.6397 13.425 33.8797 13.5C34.1197 13.55 34.2664 13.5875 34.3197 13.6125L33.6797 16.9875C32.8797 16.7375 31.9197 16.6125 30.7997 16.6125C29.7064 16.6125 28.7064 17.0625 27.7997 17.9625C26.9197 18.8375 26.4797 19.9 26.4797 21.15V29.5ZM47.5309 17.4397C47.503 17.388 47.4757 17.3373 47.4491 17.2875C47.0224 16.4625 46.0357 16.05 44.4891 16.05C42.9691 16.05 41.8891 16.5375 41.2491 17.5125C40.6091 18.4625 40.2091 19.7875 40.0491 21.4875L48.5 21.1125C48.5 19.237 47.951 18.2188 47.5309 17.4397Z",fill:"black"}),(0,r.Z)("path",{d:"M99 12.5H95V29.5H99V12.5Z",fill:"black"}),(0,r.Z)("path",{d:"M97 6.5L99 11.4456H95L97 6.5Z",fill:"#5c5ce0"}),(0,r.Z)("path",{d:"M99 30.5H95V33.5H99V30.5Z",fill:"#5c5ce0"}),(0,r.Z)("path",{d:"M99 12.125H95V13.0625H99V12.125Z",fill:"#5c5ce0"})),(0,r.Z)("span",{style:{background:"#5c5ce0"},className:x.dot})))));var E=s(93042),S={};S.setAttributes=u(),S.insert=p().bind(null,"head"),S.domAPI=c(),S.insertStyleElement=m();o()(E.Z,S);const B=E.Z&&E.Z.locals?E.Z.locals:void 0,O=globalThis,M=O.ShadowRoot&&(void 0===O.ShadyCSS||O.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),$=new WeakMap;class T{constructor(t,e,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(M&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=$.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&$.set(e,t))}return t}toString(){return this.cssText}}const L=M?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new T("string"==typeof t?t:t+"",void 0,I))(e)})(t):t,{is:N,defineProperty:R,getOwnPropertyDescriptor:P,getOwnPropertyNames:D,getOwnPropertySymbols:z,getPrototypeOf:H}=Object,j=globalThis,U=j.trustedTypes,Z=U?U.emptyScript:"",F=j.reactiveElementPolyfillSupport,V=(t,e)=>t,Y={toAttribute(t,e){switch(e){case Boolean:t=t?Z:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},W=(t,e)=>!N(t,e),q={attribute:!0,type:String,converter:Y,reflect:!1,useDefault:!1,hasChanged:W};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;class X extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=q){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&R(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:i}=P(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){const o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??q}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;const t=H(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){const t=this.properties,e=[...D(t),...z(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(L(t))}else void 0!==t&&e.push(L(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(M)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),r=O.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==n.converter?.toAttribute?n.converter:Y).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Y;this._$Em=r;const o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){const r=this.constructor,i=this[t];if(n??=r.getPropertyOptions(t),!((n.hasChanged??W)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t){const{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}X.elementStyles=[],X.shadowRootOptions={mode:"open"},X[V("elementProperties")]=new Map,X[V("finalized")]=new Map,F?.({ReactiveElement:X}),(j.reactiveElementVersions??=[]).push("2.1.1");const G=globalThis,K=G.trustedTypes,J=K?K.createPolicy("lit-html",{createHTML:t=>t}):void 0,Q="$lit$",tt=`lit$${Math.random().toFixed(9).slice(2)}$`,et="?"+tt,nt=`<${et}>`,rt=document,it=()=>rt.createComment(""),ot=t=>null===t||"object"!=typeof t&&"function"!=typeof t,st=Array.isArray,at=t=>st(t)||"function"==typeof t?.[Symbol.iterator],lt="[ \t\n\f\r]",ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dt=/-->/g,pt=/>/g,ht=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,ft=/"/g,mt=/^(?:script|style|textarea|title)$/i,gt=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),bt=gt(1),yt=(gt(2),gt(3),Symbol.for("lit-noChange")),At=Symbol.for("lit-nothing"),wt=new WeakMap,vt=rt.createTreeWalker(rt,129);function xt(t,e){if(!st(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==J?J.createHTML(e):e}const _t=(t,e)=>{const n=t.length-1,r=[];let i,o=2===e?"<svg>":3===e?"<math>":"",s=ct;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===ct?"!--"===l[1]?s=dt:void 0!==l[1]?s=pt:void 0!==l[2]?(mt.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=ht):void 0!==l[3]&&(s=ht):s===ht?">"===l[0]?(s=i??ct,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?ht:'"'===l[3]?ft:ut):s===ft||s===ut?s=ht:s===dt||s===pt?s=ct:(s=ht,i=void 0);const p=s===ht&&t[e+1].startsWith("/>")?" ":"";o+=s===ct?n+nt:c>=0?(r.push(a),n.slice(0,c)+Q+n.slice(c)+tt+p):n+tt+(-2===c?e:p)}return[xt(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class kt{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0;const s=t.length-1,a=this.parts,[l,c]=_t(t,e);if(this.el=kt.createElement(l,n),vt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=vt.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(Q)){const e=c[o++],n=r.getAttribute(t).split(tt),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?Ot:"?"===s[1]?Mt:"@"===s[1]?It:Bt}),r.removeAttribute(t)}else t.startsWith(tt)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(mt.test(r.tagName)){const t=r.textContent.split(tt),e=t.length-1;if(e>0){r.textContent=K?K.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],it()),vt.nextNode(),a.push({type:2,index:++i});r.append(t[e],it())}}}else if(8===r.nodeType)if(r.data===et)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(tt,t+1));)a.push({type:7,index:i}),t+=tt.length-1}i++}}static createElement(t,e){const n=rt.createElement("template");return n.innerHTML=t,n}}function Ct(t,e,n=t,r){if(e===yt)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl;const o=ot(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t),i._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=Ct(t,i._$AS(t,e.values),i,r)),e}class Et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??rt).importNode(e,!0);vt.currentNode=r;let i=vt.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new St(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new $t(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=vt.nextNode(),o++)}return vt.currentNode=rt,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class St{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=At,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ct(this,t,e),ot(t)?t===At||null==t||""===t?(this._$AH!==At&&this._$AR(),this._$AH=At):t!==this._$AH&&t!==yt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):at(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==At&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(rt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=kt.createElement(xt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new Et(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=wt.get(t.strings);return void 0===e&&wt.set(t.strings,e=new kt(t)),e}k(t){st(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const i of t)r===e.length?e.push(n=new St(this.O(it()),this.O(it()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Bt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=At,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=At}_$AI(t,e=this,n,r){const i=this.strings;let o=!1;if(void 0===i)t=Ct(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==yt,o&&(this._$AH=t);else{const r=t;let s,a;for(t=i[0],s=0;s<i.length-1;s++)a=Ct(this,r[n+s],e,s),a===yt&&(a=this._$AH[s]),o||=!ot(a)||a!==this._$AH[s],a===At?t=At:t!==At&&(t+=(a??"")+i[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===At?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ot extends Bt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===At?void 0:t}}class Mt extends Bt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==At)}}class It extends Bt{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=Ct(this,t,e,0)??At)===yt)return;const n=this._$AH,r=t===At&&n!==At||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==At&&(n===At||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class $t{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Ct(this,t)}}const Tt={M:Q,P:tt,A:et,C:1,L:_t,R:Et,D:at,V:Ct,I:St,H:Bt,N:Mt,U:It,B:Ot,F:$t},Lt=G.litHtmlPolyfillSupport;Lt?.(kt,St),(G.litHtmlVersions??=[]).push("3.3.1");const Nt=globalThis;class Rt extends X{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let i=r._$litPart$;if(void 0===i){const t=n?.renderBefore??null;r._$litPart$=i=new St(e.insertBefore(it(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return yt}}Rt._$litElement$=!0,Rt.finalized=!0,Nt.litElementHydrateSupport?.({LitElement:Rt});const Pt=Nt.litElementPolyfillSupport;Pt?.({LitElement:Rt});(Nt.litElementVersions??=[]).push("4.2.1");var Dt=s(61456),zt=s(62623),Ht=s(50629);class jt extends zt.oi{constructor(){super(),this.icon="add",this.width=24,this.height=24}render(){const t=Ht[this.icon]||"no icon";return zt.dy`<svg style="display: block; margin: auto;"
2051
2051
  width="${this.width}"
2052
2052
  height="${this.height}"
2053
2053
  xmlns="http://www.w3.org/2000/svg"
@@ -3420,7 +3420,7 @@
3420
3420
  border-radius: 20px;
3421
3421
  display: block;
3422
3422
  }
3423
- `),(0,t.Z)(Ol,"properties",{value:{type:String,reflect:!0},color:{type:String,reflect:!0},colorpicker:{type:Object},alpha:{type:Boolean,reflect:!0},fixed:{type:Boolean,reflect:!0},show:{type:Boolean,reflect:!0},hidePallete:{type:Boolean,reflect:!0}}),customElements.define("cdtr-colorpicker",Ol);class Ml extends me.oi{constructor(){super(),this.min=0,this.max=100,this.step=1,this.topValue=0,this.leftValue=0,this.rightValue=0,this.bottomValue=0,this.value=0,this.isLock="true",this.direction="all",this.hasLeft=!0,this.hasRight=!0,this.hasTop=!0,this.hasBottom=!0}render(){return me.dy`<div class="main">
3423
+ `),(0,t.Z)(Ol,"properties",{value:{type:String,reflect:!0},color:{type:String,reflect:!0},colorpicker:{type:Object},alpha:{type:Boolean,reflect:!0},fixed:{type:Boolean,reflect:!0},show:{type:Boolean,reflect:!0},hidePallete:{type:Boolean,reflect:!0}}),customElements.define("cdtr-colorpicker",Ol);class Ml extends me.oi{constructor(){super(),this.min=0,this.max=100,this.step=1,this.topValue=0,this.leftValue=0,this.rightValue=0,this.bottomValue=0,this.value=0,this.isLock=!0,this.direction="all",this.hasLeft=!0,this.hasRight=!0,this.hasTop=!0,this.hasBottom=!0}render(){return me.dy`<div class="main">
3424
3424
  ${this.hasTop?me.dy`<cdtr-number-input
3425
3425
  @input=${t=>this.onChangeValue("top",t)}
3426
3426
  max=${this.max}
@@ -3454,9 +3454,9 @@
3454
3454
  class="bottom x"
3455
3455
  ></cdtr-number-input>`:null}
3456
3456
  <div class="lock" @click=${this.clickLock}>
3457
- ${"true"===this.isLock?(0,r.Z)(ol.HE,null):(0,r.Z)(ol.sX,null)}
3457
+ ${!0===this.isLock?(0,r.Z)(ol.HE,null):(0,r.Z)(ol.sX,null)}
3458
3458
  </div>
3459
- </div>`}onChangeValue(t,e){const n=e.target.value;"true"===this.isLock?(this.direction="all",this.value=n,this.topValue=n,this.bottomValue=n,this.rightValue=n,this.leftValue=n):(this.direction=t,this.value=n,this[t+"Value"]=n);const r=new UIEvent(e.type,{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(r)}clickLock(){this.isLock="true"===this.isLock?"false":"true"}patch(t){const e=["topValue","bottomValue","rightValue","leftValue"];"string"==typeof t?e.forEach((e=>this[e]=t)):"object"==typeof t&&e.forEach((e=>this[e]=t[e]))}}(0,t.Z)(Ml,"styles",me.iv`
3459
+ </div>`}onChangeValue(t,e){const n=e.target.value;!0===this.isLock?(this.direction="all",this.value=n,this.topValue=n,this.bottomValue=n,this.rightValue=n,this.leftValue=n):(this.direction=t,this.value=n,this[t+"Value"]=n);const r=new UIEvent(e.type,{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(r)}clickLock(){this.isLock=!0!==this.isLock}patch(t){const e=["topValue","bottomValue","rightValue","leftValue"];"string"==typeof t?e.forEach((e=>this[e]=t)):"object"==typeof t&&e.forEach((e=>this[e]=t[e]))}}(0,t.Z)(Ml,"styles",me.iv`
3460
3460
  cdtr-number-input {
3461
3461
  max-width: 50px;
3462
3462
  font-size: 13px;
@@ -3507,7 +3507,7 @@
3507
3507
  fill: var(--new-ui-socondary);
3508
3508
  width: 20px;
3509
3509
  }
3510
- `),(0,t.Z)(Ml,"properties",{value:{type:Number,reflect:!0},topValue:{type:Number,reflect:!0},leftValue:{type:Number,reflect:!0},rightValue:{type:Number,reflect:!0},bottomValue:{type:Number,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},isLock:{type:String,reflect:!0},direction:{type:String},hasLeft:{type:Boolean,reflect:!0},hasRight:{type:Boolean,reflect:!0},hasTop:{type:Boolean,reflect:!0},hasBottom:{type:Boolean,reflect:!0}}),customElements.define("cdtr-spacing",Ml);var Il=s(38036);class $l extends me.oi{constructor(){super(),this.step=this.step??1,this.onChange=this.onChange.bind(this),this.onInput=this.onInput.bind(this),this.theme=fe.h.get("theme"),this.sizes=[],this.inputEvent=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0}),this.changeEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}onChange(t){this.value=t,this.dispatchEvent(this.inputEvent),this.dispatchEvent(this.changeEvent)}onInput(t){this.value=t,this.dispatchEvent(this.inputEvent)}render(){return me.dy`
3510
+ `),(0,t.Z)(Ml,"properties",{value:{type:Number,reflect:!0},topValue:{type:Number,reflect:!0},leftValue:{type:Number,reflect:!0},rightValue:{type:Number,reflect:!0},bottomValue:{type:Number,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},isLock:{type:Boolean,reflect:!0},direction:{type:String},hasLeft:{type:Boolean,reflect:!0},hasRight:{type:Boolean,reflect:!0},hasTop:{type:Boolean,reflect:!0},hasBottom:{type:Boolean,reflect:!0}}),customElements.define("cdtr-spacing",Ml);var Il=s(38036);class $l extends me.oi{constructor(){super(),this.step=this.step??1,this.onChange=this.onChange.bind(this),this.onInput=this.onInput.bind(this),this.theme=fe.h.get("theme"),this.sizes=[],this.inputEvent=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0}),this.changeEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}onChange(t){this.value=t,this.dispatchEvent(this.inputEvent),this.dispatchEvent(this.changeEvent)}onInput(t){this.value=t,this.dispatchEvent(this.inputEvent)}render(){return me.dy`
3511
3511
  <cdtr-row class="container">
3512
3512
  <cdtr-col sm="12">
3513
3513
  <cdtr-title><lang-text text="${this.text}"></lang-text></cdtr-title>
@@ -5527,7 +5527,7 @@ padding-right: 10px;"
5527
5527
  </div>`}
5528
5528
  </cdtr-col>`))}
5529
5529
  </cdtr-row>
5530
- </div>`}}(0,t.Z)(xc,"styles",ac),(0,t.Z)(xc,"properties",{opened:{type:Boolean},open:{type:Function},menu:{type:Array},components:{type:Array},currentComponents:{type:Array},elementType:{type:String},groupName:{type:String},onElementsDrag:{type:Boolean},inProggress:{type:Boolean}}),customElements.define("cdtr-sections-menu-v1",xc);class _c{constructor(t){let{dropSelector:e,targetSelector:n,container:r,onStart:i,onOver:o,onDrop:s,customMirrorEl:a}=t;this.mouseDown=this.mouseDown.bind(this),this.mouseMove=this.mouseMove.bind(this),this.mouseUp=this.mouseUp.bind(this),this.onStart=i,this.onDrop=s,this.onOver=o,this.container=r||document.body,this.customMirrorEl=a,this.dropSelector=e,this.targetSelector=n,this.init(),this.mirrors=[]}createMirror(){if(this.customMirrorEl)return this.customMirrorEl.cloneNode(!0);const t=document.createElement("div");return Object.assign(t.style,{position:"fixed",width:"200px",height:"200px",background:"blue",opacity:.3,border:"1px solid blue"}),this.mirrors.push(t),t}postionMirrorOn(){if(!this.dropped)return;this.mirror.style.transition="left,top .2s";const t=this.dropped.getBoundingClientRect();this.mirror.style.width=t.width+"px",this.mirror.style.height=t.height+"px";let e=t.top,n=t.left;this.mirror.style.left=n+"px",this.mirror.style.top=e+"px"}mouseMove(t){if(1!==t.which)return;if(t.preventDefault(),!this.onStartCalled){const e=t.pageX-this.firstX,n=t.pageY-this.firstY;Math.sqrt(e*e+n*n)>50&&("function"==typeof this.onStart&&this.onStart({mirror:this.mirror,dragged:this.dragged}),this.onStartCalled=!0)}const e=t.clientY;t.clientX;e<this.moveY?(this.isDraging=!0,this.mouseDirection="top"):e>this.moveY&&(this.isDraging=!0,this.mouseDirection="bottom"),this.moveY=e;const n=this.mirror;n.style.zIndex=-1;const r=this.elementAtXy=document.elementFromPoint(t.clientX,t.clientY);if(!r)return;let i=this.container;null!==i&&(this.scrollable=i);const o=()=>{this.isDraging&&i&&this.mirror&&e<300&&"top"===this.mouseDirection?(window.requestAnimationFrame((()=>i.scroll(0,i.scrollTop-1))),setTimeout((()=>{o()}),100)):this.isDraging&&i&&this.mirror&&window.innerHeight-e<300&&"bottom"===this.mouseDirection&&(window.requestAnimationFrame((()=>i.scroll(0,i.scrollTop+1))),setTimeout((()=>{o()}),100))};o();const s=this.dropped=r.closest(this.dropSelector);if(s&&s!==this.droppedTarget&&(this.droppedTarget=s,"function"==typeof this.onOver&&this.onOver({dropped:s,mirror:this.mirror,dragged:this.dragged})),s)this.postionMirrorOn();else{this.mirror.style.transition="none",this.customMirrorEl||(this.mirror.style.width="200px",this.mirror.style.height="200px");const e=this.mirror.getBoundingClientRect();let r=t.pageY-e.height/2,i=t.pageX-e.width/2;n.style.left=i+"px",n.style.top=r+"px"}n.style.zIndex=9999999999}mouseUp(t){t.preventDefault(),this.mirror=null,this.mirrors.forEach((t=>t.remove())),this.mirrors=[],document.removeEventListener("mousemove",this.mouseMove,!1),document.removeEventListener("mouseup",this.mouseUp,!1),"function"==typeof this.onDrop&&this.onDrop({event:t,mirror:this.mirror,dropped:this.customMirrorEl?this.elementAtXy:this.dropped,dragged:this.dragged}),this.isDraging=!1}mouseDown(t){let e;const n=t.path?t.path:t.composedPath&&t.composedPath();Array.isArray(n)&&n.length>0&&(e=n[0]),e=n[0].closest(this.targetSelector),e&&(this.dragged=e,this.target=e,this.onStartCalled=!1,setTimeout((()=>{const n=e.getBoundingClientRect();this.initX=n.left,this.initY=n.top,this.firstX=t.pageX,this.firstY=t.pageY,this.mirror=this.createMirror(),this.mirror.style.top=t.pageY-n.height/2+"px",this.mirror.style.left=t.pageX-n.width/2+"px",document.body.appendChild(this.mirror),document.addEventListener("mousemove",this.mouseMove,!1),document.addEventListener("mouseup",this.mouseUp,!1)}),0))}init(){window.addEventListener("mousedown",this.mouseDown,!1)}destroy(){window.removeEventListener("mousedown",this.mouseDown,!1)}}const kc=s(80184);function Cc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return t.length>e?t.slice(0,e)+"...":t}function Ec(t){return new Promise(((e,n)=>{(function(t){t||(t={query:"nature",per_page:1});const e=`${re.W7.agent_url}pexels/search/?query=${t.query||"marketing"}&per_page=${t.per_page||1}`;return fetch(e).then((t=>t.json())).then((t=>{if("success"===t.status&&t.data)return t.data;throw new Error("Invalid response from backend")})).catch((t=>{throw console.error("Error fetching images:",t),t}))})({per_page:30,query:t||"marketing"}).then((t=>{if(t.photos){const n=t.photos.map(((t,e)=>({id:t.id,name:Cc(t.alt),type:"images",tags:[],group:"backgrounds",preset:{component:"cdtr-images-preset",properties:{src:t.src.original,style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}})));e(n)}else n("error")}))}))}class Sc extends me.oi{constructor(){super(),(0,t.Z)(this,"sortableElementRef",(0,rl.V)()),(0,t.Z)(this,"imagesAssetsRef",(0,rl.V)()),(0,t.Z)(this,"videosAssetsRef",(0,rl.V)()),this.inProggress=!1,this.canvas_assets_active=!0,this.images_assets_active=!0,this.search_query="",this.video_assets_active=!0,this.currentComponents=[],this.groupName="backgrounds"}activeAssetsByTag(t){"video"===t?(this.video_assets_active=!0,this.images_assets_active=!1,this.canvas_assets_active=!1):"image"===t?(this.images_assets_active=!0,this.video_assets_active=!1,this.canvas_assets_active=!1):"canvas"===t&&(this.canvas_assets_active=!0,this.images_assets_active=!1,this.video_assets_active=!1)}onCloseMenu(){setTimeout((()=>{this.dispatchEvent(new CustomEvent("close",{}))}),100)}loadComponentByGroupName(t){(()=>{this.currentComponents=t.filter((t=>t.group===this.groupName)),fe.h.set({components_templates:this.currentComponents})})();this.backgroundDraggable=new _c({dropSelector:".section-component,.block-component",targetSelector:".backgrounds-draggable",container:document.querySelector(".amazingbar-content-wrapper"),onStart:t=>{let{dragged:e}=t;this.inProggress=!0,this.onCloseMenu()},onOver:t=>{let{dropped:e,mirror:n}=t},onDrop:t=>{let{dropped:e,dragged:n,event:r}=t;if(this.inProggress=!1,!e){const t=ge.Z.components.find((t=>"block"===t.type));if(!t)return;e=t.element}const i=fe.h.get("backgroundTransfer"),o=this.currentComponents.find((t=>t.id===i));if(o){const t=fe.h.get("components",e.dataset.id);t||setTimeout((()=>{throw new Error("Section not found")}),500);const n=t.children,r=[];n.forEach((t=>{const e=ge.Z.getComponent(t);!e||"block"!==e.type||!e.style||"transparent"!==e.style.backsround&&e.style.background||r.push({componentId:e.id,key:"style",value:{background:"#ffffff5e"}})}));const i={...o.preset,type:o.type};r.push({key:"background",value:i,componentId:t.id});try{r.find((t=>"style"===t.key&&t.value.background))||r.push({key:"style",value:{background:"transparent"},componentId:t.id})}catch(t){console.error("error",t)}if(ge.Z.store().execCommands(r).clean().selectComponent(t),"block"===t.type){const e=window.getComputedStyle(t.element).background;1===kc(e).getAlpha()&&r.push({key:"style",value:t=>{const n=t.style;return n.background=(0,Tl.Z)(e,.5),n},componentId:t.id})}}else setTimeout((()=>{throw new Error("background preset not founded..")}),500)}})}onDragElementStart(){this.onElementsDrag=!0}onDragElementEnd(){this.onElementsDrag=!1}firstUpdated(){super.firstUpdated()}connectedCallback(){super.connectedCallback(),setTimeout((()=>{Ec().then((t=>{this.loadComponentByGroupName(t)}))}),500)}disconnectedCallback(){super.disconnectedCallback(),this.backgroundDraggable&&this.backgroundDraggable.destroy(),this.backgroundDraggable=null}render(){const t=this.currentComponents.filter((t=>"images"===t.type)),e=this.currentComponents.filter((t=>"canvas"===t.type)),n=this.currentComponents.filter((t=>"video"===t.type));return me.dy` <cdtr-editor-container
5530
+ </div>`}}(0,t.Z)(xc,"styles",ac),(0,t.Z)(xc,"properties",{opened:{type:Boolean},open:{type:Function},menu:{type:Array},components:{type:Array},currentComponents:{type:Array},elementType:{type:String},groupName:{type:String},onElementsDrag:{type:Boolean},inProggress:{type:Boolean}}),customElements.define("cdtr-sections-menu-v1",xc);class _c{constructor(t){let{dropSelector:e,targetSelector:n,container:r,onStart:i,onOver:o,onDrop:s,customMirrorEl:a}=t;this.mouseDown=this.mouseDown.bind(this),this.mouseMove=this.mouseMove.bind(this),this.mouseUp=this.mouseUp.bind(this),this.onStart=i,this.onDrop=s,this.onOver=o,this.container=r||document.body,this.customMirrorEl=a,this.dropSelector=e,this.targetSelector=n,this.init(),this.mirrors=[]}createMirror(){if(this.customMirrorEl)return this.customMirrorEl.cloneNode(!0);const t=document.createElement("div");return Object.assign(t.style,{position:"fixed",width:"200px",height:"200px",background:"blue",opacity:.3,border:"1px solid blue"}),this.mirrors.push(t),t}postionMirrorOn(){if(!this.dropped)return;this.mirror.style.transition="left,top .2s";const t=this.dropped.getBoundingClientRect();this.mirror.style.width=t.width+"px",this.mirror.style.height=t.height+"px";let e=t.top,n=t.left;this.mirror.style.left=n+"px",this.mirror.style.top=e+"px"}mouseMove(t){if(1!==t.which)return;if(t.preventDefault(),!this.onStartCalled){const e=t.pageX-this.firstX,n=t.pageY-this.firstY;Math.sqrt(e*e+n*n)>50&&("function"==typeof this.onStart&&this.onStart({mirror:this.mirror,dragged:this.dragged}),this.onStartCalled=!0)}const e=t.clientY;t.clientX;e<this.moveY?(this.isDraging=!0,this.mouseDirection="top"):e>this.moveY&&(this.isDraging=!0,this.mouseDirection="bottom"),this.moveY=e;const n=this.mirror;n.style.zIndex=-1;const r=this.elementAtXy=document.elementFromPoint(t.clientX,t.clientY);if(!r)return;let i=this.container;null!==i&&(this.scrollable=i);const o=()=>{this.isDraging&&i&&this.mirror&&e<300&&"top"===this.mouseDirection?(window.requestAnimationFrame((()=>i.scroll(0,i.scrollTop-1))),setTimeout((()=>{o()}),100)):this.isDraging&&i&&this.mirror&&window.innerHeight-e<300&&"bottom"===this.mouseDirection&&(window.requestAnimationFrame((()=>i.scroll(0,i.scrollTop+1))),setTimeout((()=>{o()}),100))};o();const s=this.dropped=r.closest(this.dropSelector);if(s&&s!==this.droppedTarget&&(this.droppedTarget=s,"function"==typeof this.onOver&&this.onOver({dropped:s,mirror:this.mirror,dragged:this.dragged})),s)this.postionMirrorOn();else{this.mirror.style.transition="none",this.customMirrorEl||(this.mirror.style.width="200px",this.mirror.style.height="200px");const e=this.mirror.getBoundingClientRect();let r=t.pageY-e.height/2,i=t.pageX-e.width/2;n.style.left=i+"px",n.style.top=r+"px"}n.style.zIndex=9999999999}mouseUp(t){t.preventDefault(),this.mirror=null,this.mirrors.forEach((t=>t.remove())),this.mirrors=[],document.removeEventListener("mousemove",this.mouseMove,!1),document.removeEventListener("mouseup",this.mouseUp,!1),"function"==typeof this.onDrop&&this.onDrop({event:t,mirror:this.mirror,dropped:this.customMirrorEl?this.elementAtXy:this.dropped,dragged:this.dragged}),this.isDraging=!1}mouseDown(t){let e;const n=t.path?t.path:t.composedPath&&t.composedPath();Array.isArray(n)&&n.length>0&&(e=n[0]),e=n[0].closest(this.targetSelector),e&&(this.dragged=e,this.target=e,this.onStartCalled=!1,setTimeout((()=>{const n=e.getBoundingClientRect();this.initX=n.left,this.initY=n.top,this.firstX=t.pageX,this.firstY=t.pageY,this.mirror=this.createMirror(),this.mirror.style.top=t.pageY-n.height/2+"px",this.mirror.style.left=t.pageX-n.width/2+"px",document.body.appendChild(this.mirror),document.addEventListener("mousemove",this.mouseMove,!1),document.addEventListener("mouseup",this.mouseUp,!1)}),0))}init(){window.addEventListener("mousedown",this.mouseDown,!1)}destroy(){window.removeEventListener("mousedown",this.mouseDown,!1)}}const kc=s(80184);function Cc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return t.length>e?t.slice(0,e)+"...":t}function Ec(t){return new Promise(((e,n)=>{(function(t){t||(t={query:"nature",per_page:1});const e=`${re.W7.agent_url}pexels/search/?query=${t.query||"marketing"}&per_page=${t.per_page||1}`;return fetch(e).then((t=>t.json())).then((t=>{if("success"===t.status&&t.data)return t.data;throw new Error("Invalid response from backend")})).catch((t=>{throw console.error("Error fetching images:",t),t}))})({per_page:30,query:t||"marketing"}).then((t=>{if(t.photos){const n=t.photos.map(((t,e)=>({id:t.id,name:Cc(t.alt),type:"images",tags:[],group:"backgrounds",preset:{component:"cdtr-images-preset",properties:{src:t.src.original,style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}})));e(n)}else n("error")}))}))}class Sc extends me.oi{constructor(){super(),(0,t.Z)(this,"sortableElementRef",(0,rl.V)()),(0,t.Z)(this,"imagesAssetsRef",(0,rl.V)()),(0,t.Z)(this,"videosAssetsRef",(0,rl.V)()),this.inProggress=!1,this.canvas_assets_active=!0,this.images_assets_active=!0,this.search_query="",this.video_assets_active=!0,this.currentComponents=[],this.groupName="backgrounds"}activeAssetsByTag(t){"video"===t?(this.video_assets_active=!0,this.images_assets_active=!1,this.canvas_assets_active=!1):"image"===t?(this.images_assets_active=!0,this.video_assets_active=!1,this.canvas_assets_active=!1):"canvas"===t&&(this.canvas_assets_active=!0,this.images_assets_active=!1,this.video_assets_active=!1)}onCloseMenu(){setTimeout((()=>{this.dispatchEvent(new CustomEvent("close",{}))}),100)}loadComponentByGroupName(t){(()=>{this.currentComponents=t.filter((t=>t.group===this.groupName)),fe.h.set({components_templates:this.currentComponents})})();this.backgroundDraggable=new _c({dropSelector:".section-component,.block-component",targetSelector:".backgrounds-draggable",container:document.querySelector(".amazingbar-content-wrapper"),onStart:t=>{let{dragged:e}=t;this.inProggress=!0,this.onCloseMenu()},onOver:t=>{let{dropped:e,mirror:n}=t},onDrop:t=>{let{dropped:e,dragged:n,event:r}=t;if(this.inProggress=!1,!e){const t=ge.Z.components.find((t=>"block"===t.type));if(!t)return;e=t.element}const i=fe.h.get("backgroundTransfer"),o=this.currentComponents.find((t=>t.id===i));if(o){const t=fe.h.get("components",e.dataset.id);t||setTimeout((()=>{throw new Error("Section not found")}),500);const n=t.children,r=[];n.forEach((t=>{const e=ge.Z.getComponent(t);!e||"block"!==e.type||!e.style||"transparent"!==e.style.backsround&&e.style.background||r.push({componentId:e.id,key:"style",value:{background:"#ffffff5e"}})}));const i={...o.preset,type:o.type};r.push({key:"background",value:i,componentId:t.id});try{r.find((t=>"style"===t.key&&t.value.background))||r.push({key:"style",value:{background:"transparent"},componentId:t.id})}catch(t){console.error("error",t)}if(ge.Z.store().execCommands(r).clean().selectComponent(t),"block"===t.type){const e=window.getComputedStyle(t.element).background;1===kc(e).getAlpha()&&r.push({key:"style",value:t=>{const n=t.style;return n.background=(0,Tl.Z)(e,.5),n},componentId:t.id})}ge.Z.store().updateComponent(t,"background",o.preset).clean().selectComponent(t)}else setTimeout((()=>{throw new Error("background preset not founded..")}),500)}})}onDragElementStart(){this.onElementsDrag=!0}onDragElementEnd(){this.onElementsDrag=!1}firstUpdated(){super.firstUpdated()}connectedCallback(){super.connectedCallback(),setTimeout((()=>{Ec().then((t=>{this.loadComponentByGroupName(t)}))}),500)}disconnectedCallback(){super.disconnectedCallback(),this.backgroundDraggable&&this.backgroundDraggable.destroy(),this.backgroundDraggable=null}render(){const t=this.currentComponents.filter((t=>"images"===t.type)),e=this.currentComponents.filter((t=>"canvas"===t.type)),n=this.currentComponents.filter((t=>"video"===t.type));return me.dy` <cdtr-editor-container
5531
5531
  ><cdtr-title style="color:var(--micro-info-color)">
5532
5532
  <i>
5533
5533
  <lang-text
@@ -5613,7 +5613,7 @@ padding-right: 10px;"
5613
5613
  .src=${t?.preset?.properties?.src}
5614
5614
  .bordered=${!1}
5615
5615
  @mousedown=${e=>{fe.h.set({backgroundTransfer:t.id})}}
5616
- @mouseup=${()=>{if(ge.Z.components.length>0){const e=ge.Z.components[0];if("section"===e.type){const n=e.children,r=[];n.forEach((t=>{const e=ge.Z.getComponent(t);!e||"block"!==e.type||"transparent"!==e.style.background&&e.style.background||r.push({componentId:e.id,key:"style",value:{background:"#ffffff5e"}})}));const i={...t.preset,type:t.type};r.push({key:"background",value:i,componentId:e.id}),ge.Z.store().execCommands(r).clean().selectComponent(e)}else if("block"===e.type){const n={...t.preset,type:t.type};ge.Z.store().updateComponent(e,"background",n)}}}}
5616
+ @mouseup=${()=>{if(ge.Z.components.length>0){const e=ge.Z.components[0];if("section"===e.type){const n=e.children,r=[];n.forEach((t=>{const e=ge.Z.getComponent(t);if(e&&"block"===e.type&&("transparent"===e.style?.background||!e.style?.background)){"web"===fe.h.get("config","channel")&&r.push({componentId:e.id,key:"style",value:{background:"#ffffff5e"}})}}));const i={...t.preset,type:t.type};r.push({key:"background",value:i,componentId:e.id}),ge.Z.store().execCommands(r).clean().selectComponent(e)}else if("block"===e.type){const n={...t.preset,type:t.type};ge.Z.store().updateComponent(e,"background",n)}}}}
5617
5617
  data-id="${t.id}"
5618
5618
  text=${t.name}
5619
5619
  .puzzle=${t.puzzle}
@@ -6120,4 +6120,4 @@ padding-right: 10px;"
6120
6120
  .popover-content.mobile-centered::before {
6121
6121
  display: none;
6122
6122
  }
6123
- `;let Hc=zc;function jc(t){if("string"!=typeof t)return!1;const e=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","prs","ps","sd","ug","ur","yi"].find((e=>e===t.toLowerCase()));return!!e}Nc([tc({type:String})],Hc.prototype,"width"),Nc([tc({type:Boolean})],Hc.prototype,"opened"),Nc([tc({type:String})],Hc.prototype,"placement"),Nc([tc({type:Boolean,attribute:!1})],Hc.prototype,"isMobileView"),customElements.get(Dc)||customElements.define(Dc,Hc),s.e(6737).then(s.bind(s,36737)),s.e(2340).then(s.bind(s,32340)),Promise.all([s.e(4050),s.e(1410)]).then(s.bind(s,1410)),Promise.resolve().then(s.bind(s,9545)),s.e(4).then(s.bind(s,70004)),s.e(3381).then(s.bind(s,63381)),s.e(6892).then(s.bind(s,6892)),Promise.all([s.e(2475),s.e(5936)]).then(s.bind(s,35936)),s.e(6588).then(s.bind(s,76588)),Promise.resolve().then(s.bind(s,71781)),s.e(9838).then(s.bind(s,19838)),s.e(1650).then(s.bind(s,81650)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(4159)]).then(s.bind(s,4159)),s.e(709).then(s.bind(s,20709)),s.e(8333).then(s.bind(s,48333)),Promise.resolve().then(s.bind(s,35432)),s.e(6961).then(s.bind(s,6961)),Promise.resolve().then(s.bind(s,42729)),s.e(2543).then(s.bind(s,62543)),s.e(7804).then(s.bind(s,77804)),s.e(4648).then(s.bind(s,24648)),s.e(42).then(s.bind(s,30042)),s.e(9476).then(s.bind(s,99476)),s.e(2050).then(s.bind(s,42050)),s.e(6700).then(s.bind(s,75478)),s.e(9203).then(s.bind(s,49203)),s.e(132).then(s.bind(s,90132)),s.e(3732).then(s.bind(s,43732)),s.e(3847).then(s.bind(s,13847)),s.e(4212).then(s.bind(s,14212)),s.e(6308).then(s.bind(s,36308)),s.e(6308).then(s.bind(s,36308)),s.e(185).then(s.bind(s,10185)),s.e(6052).then(s.bind(s,86052)),s.e(7490).then(s.t.bind(s,97490,23)),s.e(6430).then(s.bind(s,16430)),s.e(2416).then(s.bind(s,32416)),s.e(7837).then(s.bind(s,37837)),s.e(8724).then(s.bind(s,88724)),s.e(6236).then(s.bind(s,46236)),s.e(3622).then(s.bind(s,53622)),s.e(1790).then(s.bind(s,81790)),s.e(9001).then(s.bind(s,59001)),s.e(5848).then(s.bind(s,95848)),s.e(201).then(s.bind(s,10201)),s.e(1867).then(s.bind(s,51867)),s.e(5985).then(s.bind(s,55985)),s.e(296).then(s.bind(s,60296)),s.e(6807).then(s.bind(s,36807)),Promise.resolve().then(s.bind(s,50629)),s.e(2087).then(s.bind(s,12087)),s.e(3755).then(s.bind(s,83755)),s.e(116).then(s.bind(s,50116)),s.e(5034).then(s.bind(s,75034)),s.e(4473).then(s.bind(s,4473)),s.e(7597).then(s.bind(s,87597)),s.e(1199).then(s.bind(s,31199)),s.e(4661).then(s.bind(s,84661)),s.e(2357).then(s.bind(s,72357)),s.e(2118).then(s.bind(s,92118)),s.e(494).then(s.bind(s,10494)),s.e(4569).then(s.bind(s,4569)),s.e(3831).then(s.bind(s,73831)),s.e(966).then(s.bind(s,60966)),s.e(5581).then(s.bind(s,35581)),s.e(8251).then(s.bind(s,38251)),s.e(8290).then(s.bind(s,88290)),s.e(4900).then(s.bind(s,74900)),s.e(2022).then(s.bind(s,32022)),s.e(3794).then(s.bind(s,83794)),s.e(6046).then(s.bind(s,76046)),s.e(6593).then(s.bind(s,76593)),s.e(6883).then(s.bind(s,46883)),s.e(9050).then(s.bind(s,99050)),s.e(6479).then(s.bind(s,86479)),s.e(8522).then(s.bind(s,78522)),s.e(7149).then(s.bind(s,67149)),s.e(308).then(s.bind(s,90308)),s.e(3020).then(s.bind(s,63020)),s.e(5910).then(s.bind(s,55910)),s.e(8287).then(s.bind(s,58287)),s.e(9136).then(s.bind(s,59136)),s.e(6196).then(s.bind(s,46196)),s.e(1381).then(s.bind(s,71381)),s.e(6524).then(s.bind(s,54050)),s.e(19).then(s.bind(s,19)),s.e(5478).then(s.bind(s,35478)),s.e(1101).then(s.bind(s,31101)),s.e(2721).then(s.bind(s,2721)),s.e(2365).then(s.bind(s,82365)),s.e(2182).then(s.bind(s,12182)),s.e(8073).then(s.bind(s,18073)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(9628)]).then(s.bind(s,99628)),Promise.all([s.e(2609),s.e(4128)]).then(s.bind(s,14128)),Promise.all([s.e(4050),s.e(6220),s.e(9201)]).then(s.bind(s,99201)),Promise.all([s.e(4050),s.e(6220),s.e(2609),s.e(168)]).then(s.bind(s,30168)),Promise.resolve().then(s.bind(s,72743)),s.e(5246).then(s.bind(s,45246)),s.e(2397).then(s.bind(s,62397)),s.e(6993).then(s.bind(s,26993)),xo({href:"https://fonts.googleapis.com",ref:"preconnect",crossorigin:!0}),xo({href:"https://fonts.gstatic.com",ref:"preconnect",crossorigin:!0});const Uc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=[{type:"heading",level:6,text:"rootelement_editor_top_header"},{type:"fontFamily",text:"fontFamily",value:e.props?.style?.fontFamily,onChange:t=>{const e=t.target.value,n=(fe.h.get("components"),ge.Z.getComponents().find((t=>"root"===t.type))),r=[];ge.Z.store().execCommand("style",{fontFamily:e}),n.treeWalk((t=>{if(t&&t.props&&!["root","section","block","row","col"].find((e=>e===t.type))&&(t.props.style&&t.props.style.fontFamily!==e&&ge.Z.store().updateComponent(t,"style",{fontFamily:e}),t.type.equalWith("text")&&r.push(t.tiptap),Array.isArray(t.props.items))){const n=JSON.parse(JSON.stringify(t.props.items));n.forEach((t=>{t&&(t.style?t.style.fontFamily=e:t.props&&t.props.style&&(t.props.style.fontFamily=e),t.props&&t.props.label_field&&t.props.label_field.props&&t.props.label_field.props.style&&(t.props.label_field.props.style.fontFamily=e))})),ge.Z.store().updateComponent(t,"items",n)}})),r.forEach((t=>{t.chain().selectAll().setFontFamily({cssRule:e}).run()}))}},{type:"slider",title:"block_width",min:500,max:1200,value:(()=>{const t=e.find("section");if(!t)return 0;const n=t.children.find((t=>"block"===t.type));return n?parseInt(n?.props?.style?.width):0})(),onInput:t=>{let n=t.target.value;n<500&&(n=500),n>1200&&(n=1200);const r=(()=>{const t=[],n=e.find("section");return n&&n.children.forEach((e=>{const n=fe.h.get("components",e);n&&"block"===n.type&&t.push(n)})),t})();ge.Z.store().execCommand2({transactions:[{key:"style",value:{width:n+"px",maxWidth:"100%"}}],update:r})}},{type:"divider"},{type:"colorpicker",alpha:!1,value:e.props.style.background||"#fff",title:"page_background",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},{type:"divider"},{type:"colorpicker",alpha:!1,title:"bgColor_blocks",onChange:t=>{const e=t.target.value,n=fe.h.get("components").filter((t=>t.type.equalWith("block")));ge.Z.store().execCommand2({transactions:[{key:"style",value:{background:e}}],update:n})}},{type:"divider"},{type:"heading",level:6,text:"rootelement_editor_global_colors_heading"},{type:"heading",level:6,text:"Primary"},{type:"colorpicker",alpha:!1,title:"primaryColor",value:e.props.primaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryColor",e)}},{type:"colorpicker",alpha:!1,title:"primaryContrastColor",value:e.props.primaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryContrastColor",e)}},{type:"divider"},{type:"heading",level:6,text:"secondary"},{type:"colorpicker",alpha:!1,title:"secondaryColor",value:e.props.secondaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryColor",e)}},{type:"colorpicker",alpha:!1,title:"secondaryContrastColor",value:e.props.secondaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryContrastColor",e)}}];return s}}}},Zc=t=>{let{helpers:e,template:n,globalStylesVar:r}=t;return{set:(t,i,o)=>{switch(i){case"style":return t[i]=o,e.mergeDiff(n,{style:t[i]}),!0;case"fontFamily":case"fontSize":case"paragraphFontSize":case"headingLvlOneFontSize":return t[i]=o,!0;case"primaryColor":case"secondaryColor":case"primaryContrastColor":case"secondaryContrastColor":case"secondaryColor":return t[i]=o,r.patch(t),!0;default:return!1}}}};var Fc=s(8831),Vc={};Vc.setAttributes=u(),Vc.insert=p().bind(null,"head"),Vc.domAPI=c(),Vc.insertStyleElement=m();o()(Fc.Z,Vc);const Yc=Fc.Z&&Fc.Z.locals?Fc.Z.locals:void 0,Wc=document.createElement("style");Wc.patch=function(t){let{primaryColor:e,primaryContrastColor:n,secondaryColor:r,secondaryContrastColor:i}=t;e&&(Wc.innerHTML=`:root{--cdtr-primary:${e}}`),r&&(Wc.innerHTML+=`:root{--cdtr-secondary:${r}}`),i&&(Wc.innerHTML+=`:root{--cdtr-secondary-contrast:${r}}`),n&&(Wc.innerHTML+=`:root{--cdtr-primary-contrast:${n}}`)};const qc=()=>{const t="root";return{name:t,create:e=>{const{createElement:n,compose:i,helpers:o}=e,{children:s,backgrounds:a,commands:l}=i,{mergeDiff:c,arrayToString:d}=l;i.style||(i.style={});const p=d("root-component",i.classList,Yc.root);document.head.append(Wc),Wc.patch(i.props);const h=(0,r.Z)("div",{"data-id":i.id},s),u=(0,r.Z)("div",(0,A.Z)({},i,{className:p}),h);let f,m,g=(0,r.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');new vc.ZP(h,{group:"section-component",animation:450,handle:".section-handle--sortable",onStart:t=>{document.body.style.position="fixed",document.body.appendChild(g);const e=t.item;f=e.previousSibling?.dataset.id,m=e.nextSibling?.dataset.id},onEnd:function(t){document.body.style.position=null,g.remove();const e=t.item,n=t.to,r=t.from,i=t.oldIndex,o=t.newIndex;t.oldDraggableIndex,t.newDraggableIndex,t.clone,t.pullMode;ge.Z.store().moveComponent({componentId:e.dataset.id,newParentId:n.dataset.id,oldParentId:r.dataset.id,oldIndex:i,newIndex:o})}});return ge.Z.on("update",(()=>{setTimeout((()=>{const t=u.querySelector(`.${Yc.placeholder}`),e=h.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||u.appendChild((0,r.Z)("div",{className:Yc.placeholder},(0,r.Z)("h1",null,"זה דף ריק,לחצו כאן כדי להוסיף אלמנטים, ורקעים"),(0,r.Z)("div",null,(0,r.Z)("paper-button",{onMousedown:()=>{be.Z.dispatch("open_add_menu",{type:"section-component"})},style:"color:var(--primary)"},(0,r.Z)("lang-text",{text:"for_quike_action_click_here"}))))))}),0)})),n({name:t,id:i.id,template:u,childrenHolder:h,allowSortable:!0,defaultProps:{},validator:Zc({template:u,helpers:o,globalStylesVar:Wc}),schema:i.schema,onSelect:()=>{},onDeselect:()=>{},elementProps:i,remove:()=>{u.remove()},createEditor:Uc})}}};var Xc=s(64721),Gc=s(93339);const Kc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"animations"},{text:"settings"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=e.closest("col")||e.closest("block"),a=[{type:"colorpicker",title:"background",value:e.props.style.background,onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},,{type:"slider",title:"width",value:parseFloat(e.props.style.width),unit:"px",min:20,max:parseInt(window.getComputedStyle(s?.element)?.width||0),onInput:t=>{const e=t.target.value;n.execCommand("style",{width:e+"px",maxWidth:"100%"})}},{type:"slider",title:"height",value:parseFloat(e.props.style.minHeight)||0,unit:"px",min:100,max:800,onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}},{type:"divider"},{type:"heading",level:5,text:"borderSize"},{type:"slider",title:"size",unit:"px",value:parseFloat(e.props.style.borderWidth),min:1,max:20,onInput:t=>{const e=t.target.value;n.execCommand("style",{borderWidth:e+"px"})}},{type:"slider",title:"radius",unit:"px",value:parseFloat(e.props.style.borderRadius),min:0,max:10,step:.1,onInput:t=>{const e=t.target.value;n.execCommand("style",{borderRadius:e+"px"})}},{type:"borderpicker",title:"style",value:e.props.style.borderStyle,onChange:t=>{const e=t.target.value;n.execCommand("style",{borderStyle:e})}},{type:"colorpicker",title:"color",value:e.props.style.borderColor,onChange:t=>{const e=t.target.value;n.execCommand("style",{borderColor:e})}},{type:"spacingPicker",active:()=>"design"===r.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(e?.props?.style?.paddingTop)||parseInt(e?.props?.style?.padding)||0,bottom:parseInt(e?.props?.style?.paddingBottom)||parseInt(e?.props?.style?.padding)||0,left:parseInt(e?.props?.style?.paddingLeft)||parseInt(e?.props?.style?.padding)||0,right:parseInt(e?.props?.style?.paddingRight)||parseInt(e?.props?.style?.padding)||0},onChange:t=>{const e=t.target.value;n.execCommand("style",{padding:e+"px"})}}];return a}}}};s(46245);const Jc=t=>{let{helpers:e}=t;return{set:(t,n,r)=>{if("style"===n)return t[n]=e.deepMerge(t[n],r),!0}}};var Qc=s(77814),td={};td.setAttributes=u(),td.insert=p().bind(null,"head"),td.domAPI=c(),td.insertStyleElement=m();o()(Qc.Z,td);const ed=Qc.Z&&Qc.Z.locals?Qc.Z.locals:void 0,nd=t=>{let{channel:e}=t;const n="card";return{name:n,menu:t=>{let{Compose:e}=t;return new e({type:n,children:[{type:"image",props:{}}],props:{style:{width:"300px",background:"#fff"}}},{group:"col",name:n,puzzle:[{type:"article"}],tags:[n],index:null})},create:t=>{const{createElement:e,compose:r,helpers:i}=t,{arrayToString:o,mergeDiff:s}=i,{children:a}=r,l=o(ed.root,r.classList),c=document.createElement("div"),d=document.createElement("div");a[0].forEach((t=>{d.appendChild(t)})),c.append(d),c.className=l;const p=r.props.style;return e({name:n,id:r.id,template:c,handleBar:!0,draggable:{group:"col"},childrenHolder:d,allowSortable:!0,defaultProps:{style:{borderRadius:".2rem",width:"300px",maxWidth:"100%"}},validator:Jc({template:c,helpers:i,children:a}),schema:r.schema,render:()=>{const t=p.width;if(p.height||(c.style.height="100%"),!parseInt(t)&&p.maxWidth){const t=p.padding||0;p.width=parseInt(p.maxWidth)-2*parseInt(t,10)+"px"}s(c,{style:p}),r.props.background&&"images"===r.props.background.type&&r.props.background.properties.src&&(c.style.backgroundImage=`url(${r.props.background.properties.src})`)},onSelect:t=>{c.classList.add(t)},onDeselect:t=>{c.classList.remove(t)},elementProps:r,remove:()=>{c.remove()},createEditor:Kc})}}};let rd;const id=class{constructor(e){let r;if((0,t.Z)(this,"site",void 0),(0,t.Z)(this,"commands",void 0),(0,t.Z)(this,"editor",void 0),e.channel||(e.channel="newsletter"),this.editor={setContent:t=>{rd&&rd.remove(),rd=vo({target:e.target,page:{},components:t||[]},(()=>{}))}},this.commands={snackbar:t=>{be.Z.dispatch("snackbar",{text:t})},langs:()=>fe.h.get("lang"),lang:t=>fe.h.get("lang",t),injectEditor:t=>{const e=fe.h.get("injectEditor");e&&e(t)},execCommand:(t,e)=>{ge.Z.store().execCommand(t,e)},toJSON:Ae.au,toHTML:Ae.io},fe.h.set({commands:this.commands}),e.target)if("string"==typeof e.target){if(r=document.getElementById(e.target),!r)throw new Error("string must be valid id or htmlElement")}else e.target instanceof HTMLElement?r=e.target:(r=document.createElement("div"),document.body.appendChild(r));else r=document.createElement("div"),e.target=r;fe.h.set({editor:ge.Z});const i=e.target;i.style.maxHeight="100vh",i.style.overflow="hidden",i.style.position="relative",ge.Z.on("change",(()=>{(0,Ae.au)()})),fe.h.set({app:{_id:e.appId,name:e.documentName}}),e.languageJson&&fe.h.set({lang:e.languageJson}),ge.Z.configure=e?.editor?.configure;const o=e.language;!function(){if(jc(o)){fe.h.set({langConfig:{direction:"rtl",align:"right",justifyContent:"flex-start",justify:"start"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"right",e.theme.direction=e.theme.direction?e.theme.direction:"rtl",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-start",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}else{fe.h.set({langConfig:{direction:"ltr",align:"left",justifyContent:"flex-end",justify:"end"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"left",e.theme.direction=e.theme.direction?e.theme.direction:"ltr",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-end",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row-reverse";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}let t=ge.Z?.configure?.plugins;Array.isArray(t)||(t=[]),t.push(Gc.Z),t.push(qc),t.push(Xc.Z),t.push(nd),t=t.map((t=>t({channel:e.channel||"web",languages:e.languageJson,direction:fe.h.get("langConfig").direction,textAlign:fe.h.get("langConfig").align})));const r=e;r.editor.configure.plugins=t,fe.h.set({config:r,schemes:t}),rd=vo({target:e.target,page:{},components:e.components||[]},(()=>{const t=fe.h.get("components").find((t=>"root"===t.type));t&&ge.Z.clean().selectComponent(t)}))}(),e.collaborator,ge.Z.connectWithCloud(e.collaborator)}};function od(){const t="image";return{id:"1",name:t,menu:e=>{let{Compose:n}=e;return new n((()=>{const e="400px",n="250px";return{type:t,props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}})(),{group:"elements",name:t,puzzle:[{type:"image"}],tags:[t],index:null})},lazy:t=>{s.e(7946).then(s.bind(s,7946)).then((e=>{t(e.default())}))}}}function sd(t){const{languages:e,direction:n,textAlign:r}=t,i="@paragraph/text";return{id:i,name:i,menu:t=>{let{Compose:o}=t;return new o({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e.generalText}]}]}}}},{group:"elements",name:"text",puzzle:[{type:"text"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(sd.data))}))}}}sd.configure=t=>{let{fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a}=t;return sd.data={fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a},sd};const ad="video";function ld(t){let{channel:e}=t;return"web"===e?{id:"vvidoe-4Kj^43",name:ad,menu:t=>{let{Compose:e}=t;return new e({type:ad,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:ad,puzzle:[{type:"video"}],tags:[ad],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(3585)]).then(s.bind(s,83585)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"vvidoe-4Kj^43",name:ad,menu:t=>{let{Compose:e}=t;return new e({type:ad,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:ad,puzzle:[{type:"video"}],tags:[ad],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(6069)]).then(s.bind(s,46069)).then((e=>{t(e.default())}))}}:void 0}function cd(t){const{languages:e,direction:n,textAlign:r}=t,i="text",o=`${i}/heading1`;return{id:o,name:i,menu:t=>{let{Compose:s}=t;return new s({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"62px",color:"#000"}}],type:"text",text:e.bigHeading}]}]}}}},{id:o,group:"elements",name:"heading 1",puzzle:[{type:"heading1"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(cd.data))}))}}}function dd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"5445",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:2,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"42px",color:"#000"}}],type:"text",text:n.mediumHeading}]}]}}}},{id:`${e}/heading2`,group:"elements",name:"heading 2",puzzle:[{type:"heading2"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(dd.data))}))}}}function pd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"544663",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:3,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:n.smallHeading}]}]}}}},{id:`${e}/heading3`,group:"elements",name:"heading 3",puzzle:[{type:"heading3"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(pd.data))}))}}}cd.configure=t=>(cd.data=t,cd),dd.configure=t=>(dd.data=t,dd),pd.configure=t=>(pd.data=t,pd);const hd="countdown";function ud(t){let{channel:e}=t;return"web"===e?{id:"1",name:hd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setHours(n.getMinutes()+30),{type:hd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"300px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{id:hd,group:"elements",name:hd,puzzle:[{type:"countdown"}],tags:[hd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:hd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:hd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"400px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{group:"elements",name:hd,puzzle:[{type:"countdown"}],tags:[hd],index:null});var n},lazy:t=>{s.e(5204).then(s.bind(s,95204)).then((e=>{t(e.default())}))}}:void 0}function fd(t){const{languages:e}=t,n="button";return{id:"button-menu",name:n,menu:t=>{let{Compose:r}=t;return new r({type:n,props:{text:e.readMore,style:{height:"auto",width:"100px",maxWidth:"100%",minWidth:"30px",background:"#000",color:"#fff"}}},{group:"elements",name:n,puzzle:[{type:"button"}],tags:[n],index:null})},lazy:t=>{s.e(9800).then(s.bind(s,29800)).then((e=>{t(e.default())}))}}}const md="map";function gd(t){let{channel:e}=t;return"web"===e?{id:"1",name:md,menu:t=>{let{Compose:e}=t;return new e({type:md,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב"}},{group:"elements",name:md,puzzle:[{type:"map"}],tags:[md],index:null})},lazy:t=>{s.e(9265).then(s.bind(s,59265)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:md,menu:t=>{let{Compose:e}=t;return new e({type:md,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב",lang:"he"}},{group:"elements",name:md,puzzle:[{type:"map"}],tags:[md],index:null})},lazy:t=>{s.e(6234).then(s.bind(s,46234)).then((e=>{t(e.default())}))}}:void 0}const bd="social";function yd(t){let{channel:e}=t;return"web"===e?{id:"1",name:bd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:bd,props:{}}),{group:"elements",name:bd,puzzle:[{type:"social"}],tags:[bd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:bd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:bd,props:{style:{gap:"10px"},items:[{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://youtube.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/youtube.png"},{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/snapchat.png"},{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://whatsapp.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/whatsapp.png"}]}}),{group:"elements",name:bd,puzzle:[{type:"social"}],tags:[bd],index:null});var n},lazy:t=>{s.e(7637).then(s.bind(s,77637)).then((e=>{t(e.default())}))}}:void 0}function Ad(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",props:{style:{width:"95%",maxWidth:"345px",padding:"10px"}},children:[{type:"col",children:[{type:"image",props:{src:"https://api.creaditor.com/images/placeholder?width=350&height=150",width:400,height:150,isFullWidthOnMobile:!0,style:{width:"100%"}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{}}}]}]}}function wd(t){const e=t?.text;return{type:"row",props:{style:{width:"300px"}},children:[{type:"col",props:{lg:12,sm:12,justify:"end"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]},{type:"col",props:{lg:12,sm:12},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:"rtl",textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{lg:12,sm:12,justify:"start"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]}]}}function vd(t){let{homePageText:e,direction:n,textAlign:r}=t;return{name:"contact",icon:[{type:"contact"}],tags:["image","two images"],children:[{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/mail.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"example@example.com"}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/website.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/phone.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"0505891010"}]}]}}}}]}]}}function xd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.width||400,n=t.height||200;return{type:"image",props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}}function _d(){const t={width:300,height:200};return{name:"two images",icon:[{type:"image"},{type:"image"}],tags:["image"],children:[xd(t),xd(t)]}}function kd(){const t={width:200,height:200};return{name:"threeImages",icon:[{type:"image"},{type:"image"},{type:"image"}],tags:["quote"],children:[xd(t),xd(t),xd(t)]}}function Cd(){const t={width:150,height:100};return{name:"fourImages",icon:[{type:"image"},{type:"image"},{type:"image"},{type:"image"}],tags:["image"],children:[xd(t),xd(t),xd(t),xd(t)]}}function Ed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t?.text;return{type:"button",props:{style:{height:"40px",padding:"10px",borderRadius:"5px"},text:e}}}function Sd(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",id:"card-title-txt-bton",props:{style:{width:"95%",maxWidth:"345px",background:""}},children:[{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{marginTop:"10px"}}}]}]}}const Bd=JSON.parse('{"name":"שם","link":"קישור","secureLink":"קישור מאובטח","tel":"טלפון","email":"אימייל","items":"פריטים","confirm":"אישור","contact":"יצירת קשר","loadingMore":"טוען תמונות נוספות...","loading":"טוען...","image_in_progress":"התמונה נוצרת...","expand_image_for_outlook_description":"כדי שהתמונה תוצג ותשמור על פרופורציות - הפעילו את הצ׳קבוקס כדי לשמור על גובה התמונה.","email_600":"הפרקטיקות המומלצות לעיצוב מיילים קובעות שגודל הרוחב האידיאלי של ניוזלטר הוא 600 פיקסלים. מספר זה היה הסטנדרט במשך שנים רבות.","mergeTags":"תגיות מיזוג","simply:Scratchcard":"כרטיס גירוד","is_user_wants_https":"להחליף את הקישור לhttps?","social":"רשתות חברתיות","prompt_editor_context":"האם להתייחס לטקסט הקיים?","Enter_your_business_name":"הכניסו את שם העסק שלכם","Enter_your_business_type":"הכניסו את סוג העסק שלכם","Enter_the_URL_of_the_page":"הכניסו את כתובת הדף שלכם","secure_link":"קישור מאובטח","bulletColor":"צבע הבולט","links_with_invalid_url":"קישורים עם כתובות לא תקינות","images_without_alt":"תמונות ללא תיאור","savedLinks":"קישורים שמורים","sms_body_if_needed":"גוף ההודעה אם נדרש","whatsapp_body_if_needed":"הודעת וואטסאפ אם נדרש","twoImages":"שתי תמונות","fourImages":"ארבע תמונות","threeImages":"שלוש תמונות","threeButtons":"שלושה כפתורים","borderSize":"עריכת המסגרת","file":"קובץ","root":"הדף","col":"עמודה","inline-image":"תמונה פנימית","link_of_button":"לאן הכפתור מוביל ?","addedToFavorite":"התווסף למועדפים","removedFromFavorite":"נמחק מהמועדפים","choose_backgroundColor":"בחרו צבע רקע","removedSuccess":"נמחק בהצלחה","aToZ":"א-ת","zToA":"ת-א","anchorName":"שם העוגן","inputEmptyError":"יש למלא את השדה","savedSuccess":"נשמר בהצלחה","createdSuccessfully":"בוצע בהצלחה","texts":"טקסטים","numOneAsFemale":"אחת","click_here_to_add":"לחצו להוספה","heading":"כותרת","bigHeading":"כותרת גדולה","readMore":"קראו עוד","mediumHeading":"כותרת בינונית","smallHeading":"כותרת קטנה","icons":"אייקונים","divider":"קו מפריד","bullets":"בולטים","numbered":"מספור","ok":"אוקי","newImage":"תמונה חדשה","newFolder":"תיקיה חדשה","folders":"תיקיות","edit":"עריכה","article":"מאמר","videoWithArticle":"וידאו עם מאמר","fit_colors":"צבעים מתאימים","plainSection":"מקטע ריק","iamgeWithArticle":"תמונה עם מאמר","imageWithText":"תמונה עם טקסט","BulletsWithImage":"בולטים עם תמונה","BulletsWithArticle":"בולטים עם מאמר","SocialNetwork":"רשת חברתית","twoArticles":"שני מאמרים","twoButtons":"שני כפתורים","threeArticles":"שלושה מאמרים","imageWithBullets":"תמונה עם בולטים","undo":"ביטול","redo":"ביצוע מחדש","wide":"מתוח לכל האוחב","click_to_add":"","videos":"סרטונים","empty_section_info":"זהו מקטע ריק, לחצו כאן כדי להוסיף בלוקים","text:button":"מה הכפתור אומר?","video":"סרטון","images":"תמונות","image":"תמונה","weight":"עובי","buttons":"כפתורים","button":"כפתור","general":"כללי","all":"הכל","myImages":"התמונות שלי","uploadSuccess":"העלאה הושלמה","fromOldToNew":"מהישן לחדש","fromNewToOld":"מהחדש לישן","download":"הורדה","quotes":"ציטוט","recommended":"מומלץ","save_block":"שמירת בלוק","what_category":"באיזו קטגוריה?","middle":"אמצע","give_name_to_block":"תנו שם לבלוק","quote":"ציטוט","no_responsive":"ביטול רספונסיביות","home_page":"דף הבית","quote | image":"ציטוט | תמונה","image | quote":"תמונה | ציטוט","image | card":"כרטיס | תמונה","card | image":"תמונה | כרטיס","quotesWithText":"ציטוט עם טקסט","delete":"מחיקה","anchor":"עוגן","drag_section":"החליפו מיקום עם מקטע אחר","drag_block":"לחצו לבחירה או גררו לשנות את המיקום","remove_block":"הסרת בלוק","duplicate_block":"שכפול בלוק","deleteElement":"מחיקת אלמנט","deleteBlock":"מחיקת בלוק","preview":"תצוגה מקדימה","design":"עיצוב","changeName":"שינוי שם","upload":"העלאת תמונה","add":"הוספה","publish":"פרסם","addons":"תוספות","duo":"מועד","position":"מיקום","drag_to_move_click_to_options":"גרירה להזזה, לחיצה להגדרות","save":"שמירה","repeat":"חזור","autoplay":"הפעל מיד","expand_image_for_outlook":"הגדלת תמונה לאאוטלוק","errors_to_fix":"שגיאות לתיקון","buttons_without_links":"כפתורים ללא קישור","images_with_default_src":"תמונות עם כתובת דיפולטית","urlAddressToYoutVimeo":"שורת כתובת ליוטיוב, וימאו","add_urlAddress_from_media_site":"קישור חיצוני","remove_background_movie":"הסרת רקע","playInLoop":"הפעל בלופ","height_in_section":"גובה, 100 יפרס לכל גובה המסך בהתאם למכשיר","cellSpace":"ריווח תא","numbers":"מספרים","titles":"כותרות","go_to_edit_mode":"חזרה למצב עריכה","auto":"אוטומטי","search":"חיפוש","showAsImage":"הצג כתמונה","titlesStyle":"עיצוב הכותרות","delete_section":"הסרת מקטע","numbersStyle":"עיצוב המספרים","slientMode":"מצב השתק","ratioLock":"נעילת יחס","choose_your_duo_date":"בחרו את המועד הסופי","videoLink":"קישור לסרטון","openAsModal":"פתח תמונה בחלון צף","innerBackgroundColor":"רקע פנימי","radius":"רדיוס","iconsColor":"צבע האייקונים","whereIframeLink":"לאן האייפרם מכוון?","whereIsLinkTo":"?לאן הקישור מכוון","dividerColor":"צבע קו מפריד","buttonText":"טקסט הכפתור","settings":"הגדרות","counterTitle":"הצגת כותרות","foreColor":"צבע הטקסט","colors":"צבעים","marginBottom":"ריווח תחתון","color":"צבע","openGalleryImage":" גלריית תמונות","icon_gallery":"גלריית אייקונים","folderName":"שם תיקיה","addFolder":"הוספת תיקיה","newFolderAdded":"התיקיה ונוספה בהצלחה","file_moved_to_new_folder":"הקובץ הועבר לתיקיה אחרת","add_block":"הוספת בלוק","counterColor":"צבע למונה","chooseBlock":"גרור בלוק","automations":"אוטומציות","list-settings":"מתקדם","page_background":"רקע הדף","bgColor_blocks":"רקע הבלוקים","create_anchor":"צריכים עוגן? לחצו פה","copy":"העתק","uploading":"אני עובד על זה!","verifying":"רגע... כמה בדיקות קטנות","completed":"זהו... סיימתי!","timeout":"אופס! לא בטוח מה קרה פה...","copy_to_here":"העתקה לכאן","addLinks":"הוספת קישור","keep_ratio":"שמירת יחס","list-check":"אלמנטים","powered_by_pexels":"כל התמונות מאתר Pexels","image_micro_copy":"הוסיפו תמונה(אבל אחת יפה) בלחיצה על הכפתור, או לחיצה כפולה על התמונה","typography_micro_copy":"סמנו בדיוק את המילה, או בכלל לא כדאי לעצב את הטקסט","icons_list_micro_copy":"במידה ובולט לא נראה רציני במיוחד, החליפו אותו עם אייקון מעוצב ","anchor_name_micro_copy":"תנו לעוגן שם עכשיו, ותוכלו למצוא אותו בעריכת הקישורים אחר כך.","imageEditTitle":"עריכת תמונה","generate_content":"יצירת תוכן","creating_magic":"אני יוצר את התוכן שלכם...","address":"כתובת","prompt_editor_title":"יצירת תוכן","prompt_editor_textarea_placeholder":"תארו את התמונה שברצונכם לייצר","block_width":"רוחב הבלוקים","describe_image_prompt_input":"תארו את התמונה שברצונכם לייצר","image_prompt_editor_description":"אנחנו יכולים לייצר תמונה בהתאם לתיאור שתכתבו כאן, בלחיצה על כפתור הבחירה תוכלו לבחור תמונה מגלריית התמונות שלכם, או להכניס כתובת תמונה של תמונה חיצונית","insert_image":"בחירה","generate_image":"יצירת תמונה","generating":"אני עובד על זה...","creating_your_masterpiece":"אני יוצר את התמונה שלך...","he":"עברית","en":"אנגלית","ar":"ערבית","empty_state":"שקט פה.. שנתחיל שיחה?","videoEditTitle":"עריכת סרטון","backgroundColor":"צבע רקע","labels":"כותרות","add_table":"הוספת טבלה","button_design":"עיצוב הכפתור","background:form":"רקע הטופס","background:fields":"רקע השדות","width:form":"רוחב הטופס","no_editor:title":"עדיין לא יצרנו עריכה לאלמנט הזה, אנחנו עובדים על זה.","addons_menu:title":" תפריט התוספים, זה החלק המעניין, פה ניתן למצוא תוספים לשדרוג התוכן שלכם. פיצ\'רים נוספים יעלו בקרוב. בנתיים ניתן לגרור את האלמנט לבלוק או מקטע בגרירה חופשית לכל נקודה שתרצו..","sections_menu:title":"תפריט מקטעים, יצירת מקטע דורשת תשומת לב רבה לצרכים שלך, אנחנו עוד עובדים על זה, בנתיים ניתן ליצור מקטע ריק.","backgrounds_menu:title":"תפריט רקעים, בחרו רקע, אבל אחד יפה, וגררו אותו לבלוק או מקטע.","blocks_menu:title":"תפריט בלוקים, פה ניתן למצוא קומפוזציות של כמה אלמנטים שונים, ניתן לגרור אותם בין הבלוקים השונים ובין המקטעים ","elements_menu:title":"תפריט אלמנטים, גררו את האלמנט לצד אלמנט, התקרבו לפינה כדי לפתוח כתא חדש, או פשוט מתחת הבלוק ליצירת בלוק חדש","size_options":"מידות","backgrounds":"רקעים","contactForError":"דווח על שגיאה","contactForErrorDesc":"נתקלת בהתנהגות לא צפויה? \\n לחץ כאן לדיווח על תקלה","fetureRequest":"בקשה לתוספות","pastePageContent":" הדבקת תוכן מייל","titleColor":"צבע כותרת","agreeToOverride":"אני מאשר למחוק את התוכן הקיים ולהחליפו בתוכן שהועתק.","overridePageContent":"בחרת להדביק תוכן של מייל אחר לתוך הדף זה. \\n ההדבקה תמחק את התוכן הקיים בדף ותדביק במקומו את התוכן שהועתק.","fetureRequestDesc":"חסר לך פיצ\'ר כלשהו ? \\n לחץ כאן לבקשה להוספת כלים לעורך","copyPageContent":"העתקת תוכן הדף לחשבון אחר","copyPageContentDesc":"לחצו כאן כדי להעתיק את התוכן הדף לחשבון אחר שלכם בחשבון","pasteContent":"הדבקת תוכן מחשבון אחר","pasteContentDesc":"לחצו כאן כדי להדביק תוכן דף שהעתקם מחשבון אחר שלכם בחשבון","generalText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי ","longText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי, אפשר לרשום כאן מה שמתחשק לכם כל עוד מדובר בתוכן לעניין.","textBlock":"בלוק טקסט","component_selected":"נבחר בלוק","component_unselected":"בלוק לא נבחר","countdown":"מונה זמן","counterBlock":"בלוק קאונטר","bulletBlock":"בלוק בולטים","singleImage":"תמונה בודדת","allImages":"כל התמונות","add_section":"הוספת מקטע","bulletWithImageBlock":"בלוק בולטים לצד תמונה","header1block":"כותרת ראשית","bold":"הדגשה","underline":"קו תחתון","italic":"טקסט נטוי","strikeThrough":"קו חוצה","saved_links":"קישורים שמורים","forecolor":"צבע טקסט","numberColor":"צבע המספרים","threeCells":"שלושה תאים","twoCells":"שני תאים","backcolor":"רקע טקסט","fontFamily":"גופן","back":"חזור","fontSize":"גודל גופן","text_micro_copy":"כתבו ש\\"ח ואז לחיצה על רווח.. אהבתם? שתפו אותנו (: ","direction":"כיוון","right":"ימין","left":"שמאל","scroll":"גלילה","new_item":"פריט חדש","center":"מרכז","top":"למעלה","bottom":"למטה","next":"שלב הבא","twoCards":"שני כרטיסים","threeCards":"שלושה כרטיסים","justify":"מתיחה","remove":"הסרה","unLink":"הסרת קישור","appendImage":"הוספת תמונה","appendVideo":"הוספת סרטון","blocks":"בלוקים","page":"דף","section":"מקטע","block":"בלוק","pageSetting":"הגדרות הדף","home":"בית","about":"אודות","text":"טקסט","clear":"ניקוי","articleTitle":"כותרת מאמר","quick_add":"הוספה מהירה","Header1Web":"כותרת","shortText":"משהו חשוב שעל הלקוחות לדעת","articleMore":"הצג עוד","emoji":"אמוטיקון","lineHeight":"גובה שורה","two images":"שתי תמונות","heading 1":"כותרת גדולה","heading 2":"כותרת בינונית","heading 3":"כותרת קטנה","textAlign":"כיוון טקסט","sendTest":"שליחת בדיקה","Duplicate":"שכפול","DragHere":"גרור פה","imageSize":"גודל תמונה","alignImage":"מיקום תמונה","fullWidthOnMobile":"רוחב מלא במובייל","delete_bcakground":"הסרת רקע","edit_background":"עריכת רקע","altText":"טקסט חילופי","gallery":"גלרייה","padding":"ריווח פנימי","padding_top":"ריווח עליון","padding_bottom":"ריווח תחתון","margin":"ריווח חיצוני","size":"גודל","coming_soon":"מגיע בקרוב","spacer":"ספייסר","background":"רקע","svg_color":"צבע הסמל","width":"רוחב","makeCircle":"שמירה על התמונה כעיגול","add_now":"הוספה","card":"כרטיסיה","go_back":"חזרה אחורה","add_new_element":"הוספת אלמנט חדש","what_the_anchor_name":"שם העוגן","form:manage_fields":"ניהול השדות בטופס","accessories":"תוספות","jhon_lennon":"ג\'ון לנון","jhon_lennon_qoute":"החיים זה מה שקורה בזמן שאתה עסוק בלתכנן תוכניות אחרות","headingText":"טקסט כותרת","height":"גובה","rotate":"סיבוב","dateAndTime":"תאריך ושעת סיום","hour":"שעה","is_active":"האם פעיל?","where_the_image_link":"לאן התמונה מובילה?","minutes":"דקות","alignButton":"מיקום כפתור","favorites":"מועדפים","main":"ראשי","type":"סגנון","opacity":"שקיפות","backgroundColorAndOpacity":"צבע רקע ושקיפות","mediaType":"סוגי מדיה","filter":"סינון","elements":"אלמנטים","freeImages":"תמונות בחינם","choose:":"בחירה","sendTestMail":"שליחת הודעת בדיקה","AddNewAddress":"הוספת מייל נוסף","searchImages":"חיפוש תמונות","send":"שליחה","fontNameWholePage":"פונט לכל הדף","blockMenuInfo":"לחץ על אחד התגיות לבחירה ולחיצה נוספת לביטול *","menu":"תפריט","menu_widget":"תפריט","emailAddress":"כתובת המייל","addEmoji":"הוספת אמוטיקון","addBackcolor":"הוספת צבע רקע","addForcolor":"הוספת צבע טקסט","openNewTab":"פתח בטאב חדש","stayOnSamePage":"השאר באותו הדף","desktopMode":"מצב דפדפן בלבד","lastColors":"צבעים אחרונים","colorsInPage":"צבעים בדף","getColorFromImage":"הצגת צבעים מתמונה","addressWithExample":"כתובת (דוגמא: פתח תקווה, הסיבים 18)","maps":"מפות","map":"מפה","layout":"פריסה","animations":"אנימציות","close_scheme_locked":"נעל סכימת צבעים","open_scheme_locked":"פתיחת סכימת צבעים","event":"אירוע","audio":"שמע","addNew":"הוסף חדש","delete_and_add":"הוספה והסרה","what_would_u_like_to_link":"מה תרצו להוסיף?","add_link":"הוספת קישור","name_of_nav":"שם כפתור הניווט","urlAddress":"שורת כתובת","can_Open_Gallery_With_Double_Click_On_The_Image":" פתיחת הגלרייה על ידי לחיצה כפולה על התמונה","uploadFile":"העלאה של קובץ חדש","FileSelection":"בחירת קובץ","this_is_empty_iframe_start_add_url_link":"זה אייפרם ריק, הוסיפו קישור לכתובת אינטרנט","yes,Create":"כן, צור תיקיה","letterSpacing":"ריווח בין האותיות","spacing":"ריווחים","solid":"אחיד","palletes":"פלטים","savedPalletes":"פלטים שמורים","savedToMainTab":"שמור בלשונית ראשית","dashed":"מקוקו","advanced":"מתקדם","Select_an_element_to_edit_its_properties":"בחרו אלמנט או לחצו על הוספה כדי להתחיל ליצור","maxWidth":"רוחב מקסימלי","whatTheBtnSays":"מה הכפתור אומר?","sendSms":"שליחת סמס","sendWhatsapp":"שליחת וואטסאפ","sendEmail":"שליחת מייל","what_the_url_address":"מהי שורת הכתובת שתרצו להוסיף?","add_catchy_subject":"הוסיפו נושא קליט","what_the_email_address":"לאן המייל ישלח?","what_the_phone_number":"מהו מספר הטלפון?","what_the_phone_number_to_send_msg":"מהו מספר אליו תשלח ההודעה?","email_body_if_needed":"תוכן גוף המייל","active_on-scroll":"יפעל בגלילה","active_on-hover":"יפעל במצב ריחוף עם העכבר","drag_or_click":"גרירה","heading-1":"כותרת גדולה","svg-element":"אלמנט SVG","divider-element":"קו מפריד","iframe":"אייפרם","html-code":"קוד HTML","video with text":"וידאו עם טקסט","image with text":"תמונה עם טקסט","quotes-block":"בלוק ציטוט","animation_deleted":"האנימציה נמחקה","animation_added":"האנימציה נוספה","show_on_desktop":"הצג במחשב הלוח","show_on_mobile":"הצג במכשיר נייד","show_on_tablet":"הצג במכשיר טאבלט","properties":"מאפיינים","ID_with_description":"מזהה (ID)","on_hover":"במצב ריחוף עם העכבר","on_scroll":"בגלילה","menu-widget":"תצוגת תפריט","setting_section":"הגדרות סקשן","setting_block":"הגדרות בלוק","remove_element":"הסרת אלמנט","drag_element":"גרירת אלמנט","max_width":"רוחב מקסימלי","open_gallery":"פתיחת גלריה","open_gallery_icons":"גלריית אייקונים","number_size":"גודל המספרים","large":"גדול","medium":"בינוני","small":"קטן","extra-large":"גדול מאוד","without_radius":"ללא רדיוס","design_custom_list":"עיצוב רשימה מותאמת אישית","display_mode":"מצב תצוגה","left-to-element":"שמאל לאלמנט","right-to-element":"ימין לאלמנט","bottom-to-element":"מתחת לאלמנט","top-to-element":"מעל לאלמנט","open-new-cell-from-right":"הוספה בתא חדש מימין","open-new-cell-from-left":"הוספה בתא חדש משמאל","open-new-block-from-bottom":"הוספה בבלוק חדש מתחת","open-new-block-from-top":"הוספה בבלוק חדש מעלה","description":"תיאור","title":"כותרת","keywords":"מילות מפתח","favicon":"סמל מוצא","cancel":"ביטול","standard":"סטנדרטי","ready_to_publish":"מוכן לפרסום","lets_set_some_seo":"בואו נוסיף כמה הגדרות SEO","We_are_building_your_page":"אנחנו בונים את העמוד שלך","inner_blocks":"מרכז המקטע","drag_here":"גררו לכאן","advance_options":"אפשרויות מתקדמות","duplicate_template_code":"קוד לשכפול תבנית","copied":"הועתק","click_to_copy":"Click To Copy","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"קופצני","tada":"שיקשוק","saved_theme":"עיצוב שמור","open_colorpicker":"בחירה של צבע אישי","colors_that_created_from_image":"צבעים שנוצרו מתמונה","publish_success":"פרסום בוצע בהצלחה","open_the_page":"פתיחת העמוד בדף חדש","close":"סגירה","title_size":"גודל כותרות","ilustrations":"סמלים","svg":"סמל","click_to_refresh":"לחיצה לרענון הדף","error_client_disconnected":"אופס! החיבור לשרת נותק, לחצו על רענון הדף כדי להמשיך לעבוד, בנתיים קבלנו את הנתונים ואנחנו עובדים על פתרון הבעיה, עמך סליחה והמשך עבודה מהנה","connection_error":"החיבור נותק 😱, אבל אל דאגה, התוכן נשמר","typography":"טיפוגרפיה","more_colors":"צבעים נוספים","button_submit_form":"שליחה","get_started":"התחילו עכשיו","design_form":"עיצוב טופס","form_settings":"הגדרות טופס","input":"קלט","send_mail_on_submitted":"רוצים לקבל מייל כשלקוחות נרשמים?","placeholder":"טקסט פנימי של הקלט(במצב ללא טקסט)","default_value":"ערך ברירת מחדל","required":"חובה","hidden":"מוסתר","hidden_field":"שדה מוסתר","advance_setting":"הגדרות מתקדמות","label":"כותרת","color:label":"צבע הטקסט","radio-group":"קבוצת לחצנים","items_in_radio_group":"פריטים בקבוצת לחצנים","add_item":"הוספת פריט","textarea":"טקסט ארוך","items_in_menu":"פריטים בתפריט","checkbox":"תיבת סימון","height:form_field":"גובה השדות","ready_blocks":"בלוקים מוכנים","box-shadow":"אפקט צל","add_new_field":"הוספת שדה חדש","border_design":"עיצוב מסגרת","individual_elements":"אלמנטים בודדים","number_color":"צבע המספרים","send_form_only_if_checked":"שליחת טופס תתאפשר רק אם מסומן","select_fields_to_edit":"לחצו על האלמנטים בטופס לעריכה","url_parameters":"שם פרמטר בשליחה","the_color_of_cols":"צבע מקטעי המספרים","the_radius_of_col":"רדיוס קטעי המספרים","hidden_form_field_info":"שדה שלא יופיע לגולשים בתצוגת הטופס, משמש בעיקר לקבלת ערכי REF ו UTM או פרמטרים קבועים שמעונינים שיופיעו אוטומטית בשדות של הנרשם בטופס הספציפי מבלי שהוא ממלא או רואה אותם.","required_form_field_info":"שדה שהנרשם בטופס חייב למלא/לסמן אותו על מנת לשלוח את הטופס, טופס ששדה חובה לא מולא בו לא ישלח ויקפיץ הודעה לממלא הטופס שהשדה הוא חובה","url_param":"שם פרמטר בשליחה","show_colons":"להציג נקודותיים ?","please_wait_downloading_new_version":"אנא המתינו, אנחנו מעדכנים גרסה חדשה","my_fields":"השדות שלי","allow_send_form_only_if_checked":"אפשר לשלוח טופס רק אם מסומן","field_settings":"הגדרות שדה","after_form_subscribed":"מה לעשות אחרי שהטופס נשלח?","add_user_from_mailinglist_after_subscribed":"לאיזה קבוצות דיוור נרשום את הלקוח שלנו?","remove_user_from_mailinglist_after_subscribed":"מאיזה קבוצות דיוור נסיר את הלקוח שלנו ?","available_fields":"השדות שלי","background_fields":"רקע השדות","label_color":"צבע כותרת עליונה","title_color":"צבע הכותרות","button_color":"צבע טקסט הכפתור","start":"התחלה","end":"סיום","duration":"משך","prefix":"לפני","suffix":"אחרי","separator":"מפריד","count-up":"לספר עד","pie-chart":"פיי נתונים","edit_data":"עריכת נתונים","border_editor":"עריכת מסגרת","moving_from_mailing_list":"הוספה והסרה מרשימת דיוור","coming_soon_automations":"בקרוב! אנחנו מאמינים שאתם ואתן כבעלי ובעלות עסקים צריכים חיים קלים! לכן אנחנו עובדים על תפריט אוטומציות כדי שתוכלו להנות ולבצע פעולות גם בזמן שאתם ישנים.","bar-chart":"טבלת עמודות","cols_color":"צבעי עמודות","button_background":"רקע הכפתור","button_radius":"רדיוס כפתור","justifyContent":"ישור אופקי","alignItems":"ישור אנכי","design_pallete":"פלאטת הצבעים שלי","rootelement_editor_top_header":"שינוי גופן לכל האלמנטים בדף, כלל אלמנטים חדשים שתוסיפו","rootelement_editor_global_colors_heading":"צבעים שמורים לדף, בחרו צבעים לפי צבעי המותג שלכם, ואחר כך הצבעים יחכו לכם בבחירת צבע של כל אלמנט בתוך הcolorpicker","flex-start":"התחלה","primaryColor":"צבע ראשי","primaryContrastColor":"צבע ראשי נגדי","secondaryColor":"צבע משני","secondaryContrastColor":"צבע משני נגדי","flex-end":"סיום","make_it_default_value":"הפוך לערך ברירת מחדל","show_success_popup":"הצגת פופאפ בעת בהצלחה","forward_params":"להעביר פרמטרים?","user_will_redirect_to":"הלקוח יעבור לדף הבא","where_to_redirect":"לאן להעביר את הלקוח?","component_color":"צבע הרכיב","none":"ללא","my_form":"הטופס שלי","form:placeholder_color":"צבע הטקסט הפנימי","search_my_fields":"חיפוש השדות שלי","checkbox_on_right_side":"צ\'קבוקס מימין?","choose_an_option":"בחרו באחת האפשרויות הבאות","checkbox_checked_as_default":"תיבת סימון מסומנת כברירת מחדל","paragraph":"פיסקה","after_submission":"מה יקרה לאחר הרשמה?","stay_at_page":"נשארים בדף","redirect":"מועברים למקום אחר","field_background":"רקע שדות","form:heading":"בואו נדבר, הקפה עלינו!","form:subHeading":"לקביעת פגישה או רק שאלה? אשמח לסייע לכם! השאירו פרטים ואחזור אליכם בהקדם","form:background":"צבע הרקע של שדות","style":"עיצוב","connection_lost":"החיבור אבד","error_transactions_not_completed":"חלק מהפעולות לא הושלמו, בדיוק ברגעים אלה קיבלנו את המידע ואנחנו עובדים על שיפור החוויה בעורך","form":"טופס","sync_all_forms":"סנכרן את כל הטפסים","send_the_data_to":"צריכים לשלוח את הנתונים לCRM ?","horizontal_shadow_length":"מיקום האופקי של הצל","vertical_shadow_length":"מיקום האנכי של הצל","blur_radius":"טשטוש הצל","spread_radius":"פריסת הצל","open_image_editor":"עריכת תמונה","shadow_color":"צבע הצל","inset":"מיקום חיצוני ?","box_shadow:info":"Adds shadow effects around an element\'s frame.","choose":"בחירה","design_for_phone":"עיצוב לנייד","design_for_desktop":"עיצוב למחשב","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"יעד הקישור","open_in_new_tab":"פתח בטאב חדש","open_in_same_tab":"פתח באותו טאב","open_in_parent_frame":"פתח במסגרת ההורה","open_in_top_frame":"פתח במסגרת העליונה","_blank":"פתח בטאב חדש","_self":"פתח באותו טאב","_parent":"פתח במסגרת ההורה","_top":"פתח במסגרת העליונה","user_menu":"תפריט משתמש","send_test_emails":"שליחת מיילי בדיקה","attached_files":"קבצים מצורפים","make_newsletter_as_event":"הפוך ניוזלטר לאירוע","edit_block":"עריכת בלוק","add_files":"הוסף קבצים","max_files_reached":"מספר הקבצים המקסימלי הושג","make_event":"צור אירוע","name_and_subject":"שם ונושא","enter_email_addresses":"הזן כתובות מייל (פסיק או Enter להוספה)","invalid_email_error":"אנא הזן כתובת מייל תקינה","no_emails_error":"אנא הוסף לפחות כתובת מייל אחת","create_event":"צור אירוע","start_date_time":"תאריך ושעת התחלה","end_date_time":"תאריך ושעת סיום","location":"מיקום","link_optional":"קישור (אופציונלי)","save_event":"שמירת אירוע","cancel_event":"ביטול","font_color":"צבע גופן","confirm_cancel":"האם אתה בטוח שברצונך לבטל?","creating_event":"יוצר אירוע...","event_created":"האירוע נוצר!","end_after_start_error":"תאריך/שעת הסיום חייב להיות אחרי תאריך/שעת ההתחלה","enter_event_location":"הזן מיקום האירוע","enter_event_link":"הזן קישור לאירוע","logout":"יציאה מהעורך","details":"פרטים","subject":"נושא","iconDirection":"כיוון האייקון","subtitle":"כותרת משנה","hasIcon":"להפעיל אייקון?","enter_subject":"מה יהיה נושא המייל(subject)?","apply":"החל","automation_settings":"הגדרות אוטומציה","what_should_happen":"בלחיצה על הקישור, אנחנו נסיר או נוסיף את המשתמש לקבוצות הדיוור הבאות","add_to_mailing_list_question":"להוסיף","remove_from_mailing_list_question":"להסיר","select_mailing_lists":"בחרו רשימות תפוצה","saved_successfully":"הפעולה נשמרה בהצלחה","need_automations":"צריכים אוטומציה? לחצו על הכפתור. במידה ולא תמצאו מה שאתם צריכים, נשמח לשמוע איך נוכל לעזור .","menu_automations":"תפריט אוטומציות","selected":"נבחרו","automation_link_preview":"קישור אוטומציה","apply_automation":"החל אוטומציה"}'),Od=JSON.parse('{"name":"Name","link":"Link","secureLink":"https link","tel":"Tel","email":"Email","keep_ratio":"Keep ratio","recommended":"Recommended","opengalleryimage":"Open gallery","email_600":"Email design best practices peg the ideal email newsletter width size at 600 pixels. This number has been the standard for many years.","secure_link":"Secure link","items":"Items","moving_from_mailing_list":"Moving from mailing list","links_with_invalid_url":"Links with invalid url","prompt_editor_title":"Create Your Content","generate_content":"Generate Content","creating_magic":"Creating Magic...","images_without_alt":"Images without alt","sms_body_if_needed":"SMS body if needed","whatsapp_body_if_needed":"WhatsApp message if needed","simply:Scratchcard":"Scratch card","image_in_progress":"Image in progress...","text_micro_copy":"Be creative, write something that will make your customers want to click on the button.","jhon_lennon":"Jhon Lennon","jhon_lennon_qoute":"Life is what happens when you\'re busy making other plans","headingText":"Heading text","title_color":"Title Color","button_color":"Color Button","button_background":"Background Button","start":"Start","end":"End","duration":"Duration","prefix":"Prefix","suffix":"Suffix","separator":"Separator","count-up":"Count up","pie-chart":"Pie chart","edit_data":"Edit Data","bar-chart":"Barchart","cols_color":"Cols Colors","button_radius":"Radius Button","accessories":"Accessories","elements":"Elements","confirm":"Accept","drag_block":"Drag block","what_the_anchor_name":"What the anchor name?","checkbox_on_right_side":"Checkbox on Right?","drag_to_move_click_to_options":"Drag to move, click to options","contact":"Contact","buttons_without_links":"Buttons without links","images_with_default_src":"Images with default src","errors_to_fix":"Errors to fix","expand_image_for_outlook":"Expand image for Outlook","social":"Social Networks","forward_params":"Forward Params?","menu_widget":"Menu widget","powered_by_pexels":"Powered by Pexels","bulletColor":"Bullet Color","makeCircle":"Make Circle","twoImages":"Two Images","component_color":"Component Color","close_scheme_locked":"Close scheme locked","open_scheme_locked":"Open scheme locked","threeImages":"Three Images","threeButtons":"Three Buttons","file":"File","auto":"auto","colors":"Colors","iconsColor":"Icon colors","slientMode":"Slient Mode","dividerColor":"Divider Color","this_is_empty_iframe_start_add_url_link":"This is empty iframe. Start adding url link","openAsModal":"Open image in modal","autoplay":"Autoplay","showAsImage":"show As Image","playInLoop":"play In Loop","addedToFavorite":"Added to Favorites","removedFromFavorite":"Deleted from favorites","removedSuccess":"Successfully deleted","aToZ":"A-Z","zToA":"Z-A","anchorName":"Anchor Name","inputEmptyError":"Fill in the field","savedSuccess":"Saved successfully","createdSuccessfully":"Done successfully","home":"Home","about":"About","position":"Position","scroll":"Scroll","repeat":"Repeat","choose":"Choose","texts":"Texts","home_page":"Home Page","numOneAsFemale":"One","heading":"Title","bigHeading":"Big Title","readMore":"Read More","quick_add":"Quick Add","click_here_to_add":"Click here to add","mediumHeading":"Medium title","smallHeading":"Small title","icons":"Icons","divider":"Divider","bullets":"Bullets","numbered":"Numbering","ok":"OK","newImage":"New Image","newFolder":"New Folder","folders":"Folders","addLinks":"Add link","edit":"editing","rootelement_editor_top_header":"Global settings","block_width":"Block width","page_background":"Page background","bgColor_blocks":"Background color","rootelement_editor_global_colors_heading":"Global colors","openGalleryImage":"Open gallery","clone_element":"Clone element","what_the_url_address":"What the url address?","videoWithArticle":"Video with article","give_name_to_block":"Give name to block","save_block":"Save block","choose_your_duo_date":"Choose your duo date","what_category":"What category?","iamgeWithArticle":"Image with article","imageWithText":"Image with text","no_responsive":"No responsive","BulletsWithImage":"Bulltes with image","SocialNetwork":"Social networks","height:form_field":"Fields height","box-shadow":"Shadow-Fx","ready_blocks":"Blocks","individual_elements":"Individual Elements","connection_lost":"Connection Lost","add_now":"Add Now","error_transactions_not_completed":"TODO:complete_text","form:manage_fields":"Manage The Form","add_new_field":"Add New Field","border_design":"Border Design","number_color":"Numbers Color","twoArticles":"Two article","the_color_of_cols":"The Color Of Cols","the_radius_of_col":"The Radius Of Cols","twoButtons":"Two buttons","show_colons":"Show Colons","my_fields":"My Fields","no_editor:title":"We will add editor to this element soon as possible.","threeArticles":"Three articles","addons_menu:title":"Addons menu, Here you can find some features that will improve your app. drag the element to block or section.","sections_menu:title":"Section menu, We didn’t find time to fill this content. Writing a new section needs a great understanding of your needs.","backgrounds_menu:title":"Backgrounds menu, choose a background, but a nice one and drag it to a block or a section.","blocks_menu:title":"Block menu, here you can find composes of multipal elements in the same block, just drag it between the blocks and the sections.","elements_menu:title":"Drag the element at the right,left.. or just drop it as a new block.","imageWithBullets":"Image With bullets","undo":"Cancel","redo":"Restore","wide":"Wide","text:button":"What The Button say?","empty_section_info":"This is empty section, Click here to add block and beatiful background.","videos":"Videos","video":"Video","images":"Images","image":"Image","weight":"Weight","buttons":"Buttons","button":"Button","general":"General","all":"All","myImages":"My Images","uploadSuccess":"Upload complete","fromOldToNew":"Old to new","fromNewToOld":"New To old","download":"Download","quotes":"A Quote","quotesWithText":"Quote with text","delete":"Deletion","anchor":"Anchor","deleteElement":"Delete element","deleteBlock":"Delete block","preview":"Preview","design":"Design","changeName":"Rename","upload":"Upload Image","uploading":"Uploading...","verifying":"Verifying...","completed":"Completed!","timeout":"Upload timeout","add":"Add","addons":"Extras","save":"Save","cellSpace":"Cell spacing","search":"Search","ratioLock":"Ratio lock","videoLink":"Video link","settings":"Settings","counterTitle":"Counter title?","folderName":"Folder name","addFolder":"Add folder","add_block":"Add block","counterColor":"Counter color","chooseBlock":"Drag a block","imageEditTitle":"Photo editing","videoEditTitle":"Edit video","size_options":"Size Options","backgroundColor":"Backgorund","backgrounds":"Backgrounds","contactForError":"Report an error","contactForErrorDesc":"Did you come across something unexpected?\\n Click here to report the error","fetureRequest":"Request for additions","pastePageContent":" Paste email content","titleColor":"Title color","agreeToOverride":"I agree to delete the existing content and replace it with copied content.","overridePageContent":"You have chosen to paste the content of another email into this page. \\n The paste will delete the existing content on the page and paste the copied content in its place.","fetureRequestDesc":"Are you missing any feature? \\n Click here to request tools to be added to the editor","copyPageContent":"Copy the contents of the page to another account","copyPageContentDesc":"Click here to copy the page content to your other account","pasteContent":"Paste content from another account","pasteContentDesc":"Click here to paste copied content","generalText":"Here we will write down some general text about our product. This is some general text area completely free","longText":"Here we will write down some general text about our product. This is some general text area that is completely free, you can write here what you feel like as long as it is relevant content.","textBlock":"Text block","timeCounter":"Time counter","counterBlock":"Counter block","bulletBlock":"Bullets block","singleImage":"Single image","allImages":"All images","bulletWithImageBlock":"Bullet with images","header1block":"Main title","bold":"Bold","underline":"Underline","italic":"Italic","strikeThrough":"Strike through","forecolor":"Forecolor","threeCells":"Three cells","twoCells":"Two cells","backcolor":"Background text","fontFamily":"Font","fontSize":"Font size","direction":"Direction","right":"Right","left":"Left","center":"Center","justify":"Justify","unLink":"Unlink","appendImage":"Add an image","appendVideo":"Add an video","blocks":"Blocks","page":"Page","block":"Block","section":"Section","pageSetting":"Page settings","text":"Text","clear":"Clear","articleTitle":"Article title","Header1Web":"Title","shortText":"Something important that customers need to know","articleMore":"Show more","emoji":"Emoji","lineHeight":"Line height","textAlign":"Text align","sendTest":"Send test","article":"Article","Duplicate":"Duplicate","component_selected":"Component selected","component_unselected":"Component unselected","add_section":"Add section","remove_block":"Remove block","duplicate_block":"Duplicate block","BulletsWithArticle":"Bullets With Article","sendTestMail":"Send Test Message","blockMenuInfo":"Click on the tag and click again to set it off *","fontNameWholePage":"Whole Page Font name","AddNewAddress":"Add new Input","send":"Send","emailAddress":"Email Address","DragHere":"Drag here","imageSize":"Image size","alignImage":"Align image","fullWidthOnMobile":"Full width on mobile","altText":"Alt text","gallery":"Gallery","padding":"Padding","size":"Size","coming_soon":"Coming Soon","width":"Width","height":"Height","dateAndTime":"Date and Time","hour":"Hour","minutes":"Minute","alignButton":"Align button","main":"Main","favorites":"Favorites","mediaType":"Media type","filter":"Filter","addEmoji":"Add Emoji","addBackcolor":"Add Backcolor","addForcolor":"Add Forecolor","lastColors":"Last Colors","colorsInPage":"Colors in page","openNewTab":"New window","stayOnSamePage":"Same window","desktopMode":"Desktop mode only","addressWithExample":"Address (Example:Petah Tikva,Sibim 18)","maps":"Maps","map":"Map","layout":"Layout","event":"Event","audio":"Audio","addNew":"Add New","animations":"Animations","urlAddress":"Url Address","can_Open_Gallery_With_Double_Click_On_The_Image":"You can open the gallery by Double click on the Image","uploadFile":"Upload File","FileSelection":"File Selection","yes,Create":"Yes, Create","letterSpacing":"Letter Spacing","spacing":"Spacing","advanced":"Advanced","Select_an_element_to_edit_its_properties":"Select an Block, Button, or Text to edit its properties","what_the_phone_number_to_send_msg_to":"What the phone number to send message to","email_body_if_needed":"Email body if needed","what_the_phone_number":"What the phone number to call to","what_the_email_address":"What the email address to send to","active_on-scroll":"Active on scroll","active_on-hover":"Active on mouse over","drag_or_click":"Drag or click","heading-1":"Heading 1","svg-element":"SVG Element","divider-element":"Divider Element","iframe":"Iframe","html-code":"Html Code","video with text":"Video with text","image with text":"Image with text","quotes-block":"quotes block","animation_deleted":"Animation deleted","animation_added":"Animation added","show_on_desktop":"Show on desktop","show_on_mobile":"Show on mobile","show_on_tablet":"Show on tablet","properties":"Properties","ID_with_description":"ID (advance)","on_hover":"On mouse over","on_scroll":"On scroll","menu-widget":"Menu widget","setting_section":"Setting section","setting_block":"Setting block","remove_element":"Remove element","drag_element":"Drag element","max_width":"Max width","open_gallery_icons":"Open gallery icons","number_size":"Number size","large":"Large","medium":"Medium","small":"Small","extra-large":"Extra Large","without_radius":"Without radius","design_custom_list":"Design custom list","display_mode":"Display mode","description":"Description","title":"Title","keywords":"Keywords","favicon":"Favicon","cancel":"Cancel","standard":"Standard","ready_to_publish":"Ready to publish","lets_set_some_seo":"Let\'s set some SEO","We_are_building_your_page":"We are building your page","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"Bounce","tada":"Tada!!","saved_theme":"Saved theme","go_back":"Go back","open_colorpicker":"Open colorpicker","colors_that_created_from_image":"Colors that created from image","publish_success":"Publish success","open_the_page":"Open the page","close":"Close","title_size":"Title size","ilustrations":"Ilustrations","svg":"SVG","click_to_refresh":"Click to refresh","error_client_disconnected":"Opps! we are disconnected from the server. Please try again later.","connection_error":"Connection error 😱 ","typography":"Typography","more_colors":"More colors","button_submit_form":"Send","get_started":"Get started","design_form":"Design form","input":"Input","placeholder":"Placeholder","default_value":"Default value","required":"Required","after_submission":"On Submission?","stay_at_page":"Nothing","redirect":"Redirect","form:background":"Placeholder Color","hidden":"Hidden","form_settings":"Form settings","hidden_field":"Hidden field","advance_setting":"Advance setting","label":"Label","radio-group":"Radio group","items_in_radio_group":"Items in radio group","add_item":"Add item","textarea":"Textarea","items_in_menu":"Items in menu","checkbox":"Checkbox","send_form_only_if_checked":"Send form only if checked","select_fields_to_edit":"Select fields to edit","url_parameters":"URL parameters","hidden_form_field_info":"text required here..","required_form_field_info":"text required here..","url_param":"URL parameter","please_wait_downloading_new_version":"Please wait downloading new version","allow_send_form_only_if_checked":"Allow send form only if checked","field_settings":"Field settings","inner_blocks":"Center","automations":"Automations","drag_here":"Drag here","advance_options":"Advance Options","copied":"Copied","duplicate_template_code":"Duplicate Template Code","click_to_copy":"Click To Copy","list-check":"Elements","drag_section":"Drag section","card":"Card","list-settings":"Advance","icons_list_micro_copy":"If a bullet doesn\'t look serious enough, you can use an icon instead.","typography_micro_copy":"Typography your text with the help of the typography settings.","anchor_name_micro_copy":"Name it now, find it later in the link editor.","create_anchor":"Need Anchor? click here","image_micro_copy":"Click on the button, or dblClick on the image to add an image(but a beautiful one).","after_form_subscribed":"What we Should do after form subscribed","add_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","remove_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","available_fields":"My fields","add_urlAddress_from_media_site":"Add url from media site","background_fields":"Background fields","label_color":"Label color","make_it_default_value":"Make it default value","show_success_popup":"Show success popup","user_will_redirect_to":"User will redirect to","where_to_redirect":"Where to redirect?","none":"None","my_form":"My form","search_my_fields":"Search my fields","choose_an_option":"Choose an option","checkbox_checked_as_default":"Checked as default","form":"Form","sync_all_forms":"Sync all forms","send_the_data_to":"Need to send the data to crm ?","color:label":"Color Text","field_background":"Field Background","paragraph":"Paragraph","horizontal_shadow_length":"Horizontal Shadow Length","vertical_shadow_length":"Vertical Shadow Length","blur_radius":"Blur Radius","spread_radius":"Spread Radius","shadow_color":"Shadow Color","inset":"Inset","box_shadow:info":"Adds shadow effects around an element\'s frame.","design_for_phone":"Mobile Design","design_for_desktop":"Desktop Design","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"Link Target","open_in_new_tab":"Open in new tab","open_in_same_tab":"Open in same tab","open_in_parent_frame":"Open in parent frame","open_in_top_frame":"Open in top frame","user_menu":"User Menu","send_test_emails":"Send Test Emails","attached_files":"Attached Files","make_newsletter_as_event":"Make Newsletter as Event","add_files":"Add Files","max_files_reached":"Maximum number of files reached","make_event":"Make Event","name_and_subject":"Name & Subject","enter_email_addresses":"Enter email addresses (comma or enter to add)","invalid_email_error":"Please enter a valid email address","no_emails_error":"Please add at least one email address","create_event":"Create Event","start_date_time":"Start Date & Time","end_date_time":"End Date & Time","location":"Location","link_optional":"Link (Optional)","save_event":"Save Event","cancel_event":"Cancel Event","confirm_cancel":"Are you sure you want to cancel?","creating_event":"Creating Event...","event_created":"Event Created!","end_after_start_error":"End date/time must be after start date/time","enter_event_location":"Enter event location","enter_event_link":"Enter event link","logout":"Logout","details":"Details","subject":"Subject","subtitle":"Subtitle","enter_subject":"Enter subject","back":"Back","apply":"Apply","automation_settings":"Automation Settings","what_should_happen":"What should happen?","add_to_mailing_list_question":"Add to mailing list?","remove_from_mailing_list_question":"Remove from mailing list?","select_mailing_lists":"Select mailing lists","selected":"Selected","automation_link_preview":"Automation Link","apply_automation":"Apply Automation"}'),Md="spacer";function Id(t){let{channel:e}=t;return{id:"14g55g123ss#$",name:Md,menu:t=>{let{Compose:e}=t;return new e({type:Md,props:{height:"200px"}},{group:"elements",name:Md,puzzle:'<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n<line x1="1" y1="12" x2="25" y2="12" stroke="black" stroke-width="2" stroke-linecap="round"/>\n<path d="M5.25 1H0.75V5.5M11.25 1H14.25M20.25 1H24.75V5.5M24.75 25H0.75V19H24.75V25Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',tags:[Md],index:null})},lazy:t=>{s.e(6085).then(s.bind(s,76085)).then((e=>{t(e.default())}))}}}class $d{constructor(t){return this.props=t,this.init(t)}init(t){const e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.plugins||[];let n=t.languageJson;const r=t.language||"he";n||(n="he"===r?Bd:Od);const i=jc(r)?"rtl":"ltr",o=jc(r)?"right":"left";t.navbar||(t.navbar={}),Array.isArray(t.components)&&0===t.components.length&&(t.components=null),t.width||(t.width="650px",console.warn("using default width of 650px or 1000px.")),t.theme||(t.theme={}),t.textConfigure||(t.textConfigure={}),"object"!=typeof t?.configure&&(t.configure={}),"object"!=typeof t?.configure?.text&&(t.configure.text={}),t.configure.text={onClickMagic:t=>{const{injectEditor:e,insertContent:n,insertContentHtml:r,getJSON:i,getHTML:o,getText:s,selectAll:a}=t;a();const l=document.createElement("cdtr-text-prompt-editor");l.context=s(),l.addEventListener("text-generation-start",(t=>{a()})),l.addEventListener("text-generation-chunk",(t=>{n(t.detail.chunk)})),l.addEventListener("text-generation-complete",(t=>{a(),r(t.detail.text)})),l.addEventListener("text-generation-error",(t=>{console.error("Text generation error:",t.detail.error)})),e(l)}};const s={documentName:t.documentName,editable:t.editable,mode:t.mode,user:t.user,collaborator:t.collaborator,components:t.components||[{_id:"0-root",type:"root",props:{style:{background:"#fff"}},children:["0-section"]},{_id:"0-section",type:"section",props:{style:{width:t.width,margin:"auto",height:"100%"}},children:[]}],channel:"newsletter",userMenu:{onLogout:()=>{"function"==typeof t?.userMenu?.onLogout&&t?.userMenu?.onLogout()}},onNextStep:e=>{"function"==typeof t.onNextStep&&t.onNextStep(e)},onSendTestEmail:t?.onSendTestEmail?e=>{"function"==typeof t.onSendTestEmail&&t.onSendTestEmail(e)}:null,attachFiles:t?.attachFiles?{files:t?.attachFiles?.files||[],lazyLoad:t?.attachFiles?.lazyLoad||null,maxFiles:t?.attachFiles?.maxFiles||1,maxFileSizeMB:t?.attachFiles?.maxFileSizeMB||"0.5",save:e=>{"function"==typeof t.attachFiles.save&&t.attachFiles.save(e)},remove:e=>{"function"==typeof t.attachFiles.remove&&t.attachFiles.remove(e)}}:null,makeEvent:t?.makeEvent?{initialStartDate:t?.makeEvent?.initialStartDate||"",initialStartTime:t?.makeEvent?.initialStartTime||"",initialEndDate:t?.makeEvent?.initialEndDate||"",initialEndTime:t?.makeEvent?.initialEndTime||"",initialLocation:t?.makeEvent?.initialLocation||"",initialLink:t?.makeEvent?.initialLink||"",save:e=>{"function"==typeof t.makeEvent.save&&t.makeEvent.save(e)},cancel:()=>{"function"==typeof t.makeEvent.cancel&&t.makeEvent.cancel()}}:null,subjectAndName:t?.subjectAndName?{name:t?.subjectAndName?.name||"",subject:t?.subjectAndName?.subject||"",subtitle:t?.subjectAndName?.subtitle||"",save:e=>{"function"==typeof t.subjectAndName.save&&t.subjectAndName.save(e)}}:null,savedDebounce:t.savedDebounce||1e3,target:t.target||function(){const t=document.createElement("div");return t.id="root",document.body.appendChild(t),t}(),theme:{},language:r,languageJson:n,editor:{props:{onSave:e=>{console.log("%csync completed","color:green;font-size:20px;",e),"function"==typeof t.onSave&&t.onSave(e)},onChange:()=>{}},configure:{text:t?.configure?.text,editorProps:{fonts:t.fonts||[{id:"Arial",cssRule:"Arial, Helvetica, sans-serif",name:"Arial",language:["en","he"],url:null},{id:"Times New Roman",cssRule:"Times New Roman, Times, Beskerville, Georgia, serif",name:"Times New Roman",language:["en","he"],url:null},{id:"Courier New",cssRule:"Courier New, Courier, monospace",name:"Courier New"},{id:"Tahoma",cssRule:"Tahoma, Geneva, sans-serif",name:"Tahoma"},{id:"Verdana",cssRule:"Verdana, Geneva, sans-serif",name:"Verdana"},{id:"Roboto",cssRule:"Roboto, sans-serif",name:"Roboto (google)",url:"https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"}],menu:{},mergeTags:t.mergeTags||{},mailingLists:t.mailingLists||{},automations:t.automations||{},linkPicker:t.linkPicker||{savedVariables:t.savedVariables||[]}},onSaveBlock:t.onSaveBlock,onDeleteBlock:t.onDeleteBlock,blocksCategories:t.blocksCategories,customBlocks:t.customBlocks,mediaGalleryManager:t.mediaGalleryManager||function(){},blocks:[Ic(_d()),Ic(kd()),Ic(Cd()),Ic({name:"twoButtons",id:"2 button",icon:[{type:"button"},{type:"button"}],tags:["button"],children:[Ed({text:n.readMore}),Ed({text:n.readMore})]}),Ic({name:"threeButtons",id:"3 button",icon:[{type:"button"},{type:"button"},{type:"button"}],tags:["button"],children:[Ed({text:n.readMore}),Ed({text:n.readMore}),Ed({text:n.readMore})]}),Ic(vd({direction:i,textAlign:o,homePageText:Bd.home_page})),Ic((a={text:n.generalText},{name:"quote",icon:[{type:"quote"}],tags:["quote"],children:[wd(a)]})),Ic({name:"image | quote",icon:[{type:"image"},{type:"quote"}],tags:[],children:[wd({text:n.generalText,direction:i,textAlign:o}),xd({width:200,height:150})]}),Ic({name:"quote | image",icon:[{type:"quote"},{type:"image"}],tags:[],children:[xd({width:200,height:150}),wd({text:n.generalText,direction:i,textAlign:o})]}),Ic({name:"twoCards",icon:[{type:"article"},{type:"article"}],tags:["article","card"],children:[Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),Ic({name:"threeCards",icon:[{type:"article"},{type:"article"},{type:"article"}],tags:["article","card"],children:[Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),Ic({name:"card | image",icon:[{type:"image"},{type:"article"}],tags:["article","card","image","readmore"],children:[Sd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),xd({width:300,height:150})]}),Ic({name:"image | card",icon:[{type:"article"},{type:"image"}],tags:["article","card","image","readmore"],children:[xd({width:300,height:150}),Sd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]})],plugins:[od,ld,pd.configure(t.textConfigure),dd.configure(t.textConfigure),cd.configure(t.textConfigure),sd.configure(t.textConfigure),ud,fd,gd,yd,Id,...e]},navbar:{components:t.navbar.components}}};var a;return new id(s)}(t);return e}}"undefined"!=typeof window&&(window.cdtrStarter=$d)})(),a})()));
6123
+ `;let Hc=zc;function jc(t){if("string"!=typeof t)return!1;const e=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","prs","ps","sd","ug","ur","yi"].find((e=>e===t.toLowerCase()));return!!e}Nc([tc({type:String})],Hc.prototype,"width"),Nc([tc({type:Boolean})],Hc.prototype,"opened"),Nc([tc({type:String})],Hc.prototype,"placement"),Nc([tc({type:Boolean,attribute:!1})],Hc.prototype,"isMobileView"),customElements.get(Dc)||customElements.define(Dc,Hc),s.e(6737).then(s.bind(s,36737)),s.e(2340).then(s.bind(s,32340)),Promise.all([s.e(4050),s.e(1410)]).then(s.bind(s,1410)),Promise.resolve().then(s.bind(s,9545)),s.e(4).then(s.bind(s,70004)),s.e(3381).then(s.bind(s,63381)),s.e(6892).then(s.bind(s,6892)),Promise.all([s.e(2475),s.e(5279)]).then(s.bind(s,55279)),s.e(6588).then(s.bind(s,76588)),Promise.resolve().then(s.bind(s,71781)),s.e(9838).then(s.bind(s,19838)),s.e(1650).then(s.bind(s,81650)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(4159)]).then(s.bind(s,4159)),s.e(709).then(s.bind(s,20709)),s.e(8333).then(s.bind(s,48333)),Promise.resolve().then(s.bind(s,35432)),s.e(6961).then(s.bind(s,6961)),Promise.resolve().then(s.bind(s,42729)),s.e(2543).then(s.bind(s,62543)),s.e(7804).then(s.bind(s,77804)),s.e(4648).then(s.bind(s,24648)),s.e(42).then(s.bind(s,30042)),s.e(9476).then(s.bind(s,99476)),s.e(2050).then(s.bind(s,42050)),s.e(6700).then(s.bind(s,75478)),s.e(9203).then(s.bind(s,49203)),s.e(132).then(s.bind(s,90132)),s.e(3732).then(s.bind(s,43732)),s.e(3847).then(s.bind(s,13847)),s.e(4212).then(s.bind(s,14212)),s.e(6308).then(s.bind(s,36308)),s.e(6308).then(s.bind(s,36308)),s.e(185).then(s.bind(s,10185)),s.e(6052).then(s.bind(s,86052)),s.e(7490).then(s.t.bind(s,97490,23)),s.e(6430).then(s.bind(s,16430)),s.e(2416).then(s.bind(s,32416)),s.e(7837).then(s.bind(s,37837)),s.e(8724).then(s.bind(s,88724)),s.e(6236).then(s.bind(s,46236)),s.e(3622).then(s.bind(s,53622)),s.e(1790).then(s.bind(s,81790)),s.e(9001).then(s.bind(s,59001)),s.e(5848).then(s.bind(s,95848)),s.e(201).then(s.bind(s,10201)),s.e(1867).then(s.bind(s,51867)),s.e(5985).then(s.bind(s,55985)),s.e(296).then(s.bind(s,60296)),s.e(6807).then(s.bind(s,36807)),Promise.resolve().then(s.bind(s,50629)),s.e(2087).then(s.bind(s,12087)),s.e(3755).then(s.bind(s,83755)),s.e(116).then(s.bind(s,50116)),s.e(5034).then(s.bind(s,75034)),s.e(4473).then(s.bind(s,4473)),s.e(7597).then(s.bind(s,87597)),s.e(1199).then(s.bind(s,31199)),s.e(4661).then(s.bind(s,84661)),s.e(2357).then(s.bind(s,72357)),s.e(2118).then(s.bind(s,92118)),s.e(494).then(s.bind(s,10494)),s.e(4569).then(s.bind(s,4569)),s.e(3831).then(s.bind(s,73831)),s.e(966).then(s.bind(s,60966)),s.e(5581).then(s.bind(s,35581)),s.e(8251).then(s.bind(s,38251)),s.e(8290).then(s.bind(s,88290)),s.e(4900).then(s.bind(s,74900)),s.e(2022).then(s.bind(s,32022)),s.e(3794).then(s.bind(s,83794)),s.e(6046).then(s.bind(s,76046)),s.e(6593).then(s.bind(s,76593)),s.e(6883).then(s.bind(s,46883)),s.e(9050).then(s.bind(s,99050)),s.e(6479).then(s.bind(s,86479)),s.e(8522).then(s.bind(s,78522)),s.e(7149).then(s.bind(s,67149)),s.e(308).then(s.bind(s,90308)),s.e(3020).then(s.bind(s,63020)),s.e(5910).then(s.bind(s,55910)),s.e(8287).then(s.bind(s,58287)),s.e(9136).then(s.bind(s,59136)),s.e(6196).then(s.bind(s,46196)),s.e(1381).then(s.bind(s,71381)),s.e(6524).then(s.bind(s,54050)),s.e(19).then(s.bind(s,19)),s.e(5478).then(s.bind(s,35478)),s.e(1101).then(s.bind(s,31101)),s.e(2721).then(s.bind(s,2721)),s.e(2365).then(s.bind(s,82365)),s.e(2182).then(s.bind(s,12182)),s.e(8073).then(s.bind(s,18073)),Promise.all([s.e(4050),s.e(6220),s.e(1449),s.e(9628)]).then(s.bind(s,99628)),Promise.all([s.e(2609),s.e(4128)]).then(s.bind(s,14128)),Promise.all([s.e(4050),s.e(6220),s.e(9201)]).then(s.bind(s,99201)),Promise.all([s.e(4050),s.e(6220),s.e(2609),s.e(168)]).then(s.bind(s,30168)),Promise.resolve().then(s.bind(s,72743)),s.e(5246).then(s.bind(s,45246)),s.e(5674).then(s.bind(s,55674)),s.e(2397).then(s.bind(s,62397)),s.e(6993).then(s.bind(s,26993)),xo({href:"https://fonts.googleapis.com",ref:"preconnect",crossorigin:!0}),xo({href:"https://fonts.gstatic.com",ref:"preconnect",crossorigin:!0});const Uc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=[{type:"heading",level:6,text:"rootelement_editor_top_header"},{type:"fontFamily",text:"fontFamily",value:e.props?.style?.fontFamily,onChange:t=>{const e=t.target.value,n=(fe.h.get("components"),ge.Z.getComponents().find((t=>"root"===t.type))),r=[];ge.Z.store().execCommand("style",{fontFamily:e}),n.treeWalk((t=>{if(t&&t.props&&!["root","section","block","row","col"].find((e=>e===t.type))&&(t.props.style&&t.props.style.fontFamily!==e&&ge.Z.store().updateComponent(t,"style",{fontFamily:e}),t.type.equalWith("text")&&r.push(t.tiptap),Array.isArray(t.props.items))){const n=JSON.parse(JSON.stringify(t.props.items));n.forEach((t=>{t&&(t.style?t.style.fontFamily=e:t.props&&t.props.style&&(t.props.style.fontFamily=e),t.props&&t.props.label_field&&t.props.label_field.props&&t.props.label_field.props.style&&(t.props.label_field.props.style.fontFamily=e))})),ge.Z.store().updateComponent(t,"items",n)}})),r.forEach((t=>{t.chain().selectAll().setFontFamily({cssRule:e}).run()}))}},{type:"slider",title:"block_width",min:500,max:1200,value:(()=>{const t=e.find("section");if(!t)return 0;const n=t.children.find((t=>"block"===t.type));return n?parseInt(n?.props?.style?.width):0})(),onInput:t=>{let n=t.target.value;n<500&&(n=500),n>1200&&(n=1200);const r=(()=>{const t=[],n=e.find("section");return n&&n.children.forEach((e=>{const n=fe.h.get("components",e);n&&"block"===n.type&&t.push(n)})),t})();ge.Z.store().execCommand2({transactions:[{key:"style",value:{width:n+"px",maxWidth:"100%"}}],update:r})}},{type:"divider"},{type:"colorpicker",alpha:!1,value:e.props.style.background||"#fff",title:"page_background",onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},{type:"divider"},{type:"colorpicker",alpha:!1,title:"bgColor_blocks",onChange:t=>{const e=t.target.value,n=fe.h.get("components").filter((t=>t.type.equalWith("block")));ge.Z.store().execCommand2({transactions:[{key:"style",value:{background:e}}],update:n})}},{type:"divider"},{type:"heading",level:6,text:"rootelement_editor_global_colors_heading"},{type:"heading",level:6,text:"Primary"},{type:"colorpicker",alpha:!1,title:"primaryColor",value:e.props.primaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryColor",e)}},{type:"colorpicker",alpha:!1,title:"primaryContrastColor",value:e.props.primaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("primaryContrastColor",e)}},{type:"divider"},{type:"heading",level:6,text:"secondary"},{type:"colorpicker",alpha:!1,title:"secondaryColor",value:e.props.secondaryColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryColor",e)}},{type:"colorpicker",alpha:!1,title:"secondaryContrastColor",value:e.props.secondaryContrastColor||"#fff",onChange:t=>{const e=t.target.value;n.execCommand("secondaryContrastColor",e)}}];return s}}}},Zc=t=>{let{helpers:e,template:n,globalStylesVar:r}=t;return{set:(t,i,o)=>{switch(i){case"style":return t[i]=o,e.mergeDiff(n,{style:t[i]}),!0;case"fontFamily":case"fontSize":case"paragraphFontSize":case"headingLvlOneFontSize":return t[i]=o,!0;case"primaryColor":case"secondaryColor":case"primaryContrastColor":case"secondaryContrastColor":case"secondaryColor":return t[i]=o,r.patch(t),!0;default:return!1}}}};var Fc=s(8831),Vc={};Vc.setAttributes=u(),Vc.insert=p().bind(null,"head"),Vc.domAPI=c(),Vc.insertStyleElement=m();o()(Fc.Z,Vc);const Yc=Fc.Z&&Fc.Z.locals?Fc.Z.locals:void 0,Wc=document.createElement("style");Wc.patch=function(t){let{primaryColor:e,primaryContrastColor:n,secondaryColor:r,secondaryContrastColor:i}=t;e&&(Wc.innerHTML=`:root{--cdtr-primary:${e}}`),r&&(Wc.innerHTML+=`:root{--cdtr-secondary:${r}}`),i&&(Wc.innerHTML+=`:root{--cdtr-secondary-contrast:${r}}`),n&&(Wc.innerHTML+=`:root{--cdtr-primary-contrast:${n}}`)};const qc=()=>{const t="root";return{name:t,create:e=>{const{createElement:n,compose:i,helpers:o}=e,{children:s,backgrounds:a,commands:l}=i,{mergeDiff:c,arrayToString:d}=l;i.style||(i.style={});const p=d("root-component",i.classList,Yc.root);document.head.append(Wc),Wc.patch(i.props);const h=(0,r.Z)("div",{"data-id":i.id},s),u=(0,r.Z)("div",(0,A.Z)({},i,{className:p}),h);let f,m,g=(0,r.Z)("style",null,'\n .text-component:after{\n content: "";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: transparent;\n }\n ');new vc.ZP(h,{group:"section-component",animation:450,handle:".section-handle--sortable",onStart:t=>{document.body.style.position="fixed",document.body.appendChild(g);const e=t.item;f=e.previousSibling?.dataset.id,m=e.nextSibling?.dataset.id},onEnd:function(t){document.body.style.position=null,g.remove();const e=t.item,n=t.to,r=t.from,i=t.oldIndex,o=t.newIndex;t.oldDraggableIndex,t.newDraggableIndex,t.clone,t.pullMode;ge.Z.store().moveComponent({componentId:e.dataset.id,newParentId:n.dataset.id,oldParentId:r.dataset.id,oldIndex:i,newIndex:o})}});return ge.Z.on("update",(()=>{setTimeout((()=>{const t=u.querySelector(`.${Yc.placeholder}`),e=h.children.length;0===e&&t||(e>0&&t?t.remove():0!==e||t||u.appendChild((0,r.Z)("div",{className:Yc.placeholder},(0,r.Z)("h1",null,"זה דף ריק,לחצו כאן כדי להוסיף אלמנטים, ורקעים"),(0,r.Z)("div",null,(0,r.Z)("paper-button",{onMousedown:()=>{be.Z.dispatch("open_add_menu",{type:"section-component"})},style:"color:var(--primary)"},(0,r.Z)("lang-text",{text:"for_quike_action_click_here"}))))))}),0)})),n({name:t,id:i.id,template:u,childrenHolder:h,allowSortable:!0,defaultProps:{},validator:Zc({template:u,helpers:o,globalStylesVar:Wc}),schema:i.schema,onSelect:()=>{},onDeselect:()=>{},elementProps:i,remove:()=>{u.remove()},createEditor:Uc})}}};var Xc=s(64721),Gc=s(93339);const Kc=t=>{{const{component:e,commands:n,helpers:r}=t;return{select:t=>{let{changeTab:e,tab:n}=t;"design"!==n.text&&e("design")},tabs:t=>{const e=[{text:"design"},{text:"animations"},{text:"settings"}];return e.forEach((e=>e.selected=e.selected=e.text===t)),e},layout:t=>{let{tab:r,changeTab:i,tabs:o}=t;const s=e.closest("col")||e.closest("block"),a=[{type:"colorpicker",title:"background",value:e.props.style.background,onChange:t=>{const e=t.target.value;n.execCommand("style",{background:e})}},,{type:"slider",title:"width",value:parseFloat(e.props.style.width),unit:"px",min:20,max:parseInt(window.getComputedStyle(s?.element)?.width||0),onInput:t=>{const e=t.target.value;n.execCommand("style",{width:e+"px",maxWidth:"100%"})}},{type:"slider",title:"height",value:parseFloat(e.props.style.minHeight)||0,unit:"px",min:100,max:800,onInput:t=>{const e=t.target.value;n.execCommand("style",{minHeight:e+"px"})}},{type:"divider"},{type:"heading",level:5,text:"borderSize"},{type:"slider",title:"size",unit:"px",value:parseFloat(e.props.style.borderWidth),min:1,max:20,onInput:t=>{const e=t.target.value;n.execCommand("style",{borderWidth:e+"px"})}},{type:"slider",title:"radius",unit:"px",value:parseFloat(e.props.style.borderRadius),min:0,max:10,step:.1,onInput:t=>{const e=t.target.value;n.execCommand("style",{borderRadius:e+"px"})}},{type:"borderpicker",title:"style",value:e.props.style.borderStyle,onChange:t=>{const e=t.target.value;n.execCommand("style",{borderStyle:e})}},{type:"colorpicker",title:"color",value:e.props.style.borderColor,onChange:t=>{const e=t.target.value;n.execCommand("style",{borderColor:e})}},{type:"spacingPicker",active:()=>"design"===r.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(e?.props?.style?.paddingTop)||parseInt(e?.props?.style?.padding)||0,bottom:parseInt(e?.props?.style?.paddingBottom)||parseInt(e?.props?.style?.padding)||0,left:parseInt(e?.props?.style?.paddingLeft)||parseInt(e?.props?.style?.padding)||0,right:parseInt(e?.props?.style?.paddingRight)||parseInt(e?.props?.style?.padding)||0},onChange:t=>{const e=t.target.value;n.execCommand("style",{padding:e+"px"})}}];return a}}}};s(46245);const Jc=t=>{let{helpers:e}=t;return{set:(t,n,r)=>{if("style"===n)return t[n]=e.deepMerge(t[n],r),!0}}};var Qc=s(77814),td={};td.setAttributes=u(),td.insert=p().bind(null,"head"),td.domAPI=c(),td.insertStyleElement=m();o()(Qc.Z,td);const ed=Qc.Z&&Qc.Z.locals?Qc.Z.locals:void 0,nd=t=>{let{channel:e}=t;const n="card";return{name:n,menu:t=>{let{Compose:e}=t;return new e({type:n,children:[{type:"image",props:{}}],props:{style:{width:"300px",background:"#fff"}}},{group:"col",name:n,puzzle:[{type:"article"}],tags:[n],index:null})},create:t=>{const{createElement:e,compose:r,helpers:i}=t,{arrayToString:o,mergeDiff:s}=i,{children:a}=r,l=o(ed.root,r.classList),c=document.createElement("div"),d=document.createElement("div");a[0].forEach((t=>{d.appendChild(t)})),c.append(d),c.className=l;const p=r.props.style;return e({name:n,id:r.id,template:c,handleBar:!0,draggable:{group:"col"},childrenHolder:d,allowSortable:!0,defaultProps:{style:{borderRadius:".2rem",width:"300px",maxWidth:"100%"}},validator:Jc({template:c,helpers:i,children:a}),schema:r.schema,render:()=>{const t=p.width;if(p.height||(c.style.height="100%"),!parseInt(t)&&p.maxWidth){const t=p.padding||0;p.width=parseInt(p.maxWidth)-2*parseInt(t,10)+"px"}s(c,{style:p}),r.props.background&&"images"===r.props.background.type&&r.props.background.properties.src&&(c.style.backgroundImage=`url(${r.props.background.properties.src})`)},onSelect:t=>{c.classList.add(t)},onDeselect:t=>{c.classList.remove(t)},elementProps:r,remove:()=>{c.remove()},createEditor:Kc})}}};let rd;const id=class{constructor(e){let r;if((0,t.Z)(this,"site",void 0),(0,t.Z)(this,"commands",void 0),(0,t.Z)(this,"editor",void 0),e.channel||(e.channel="newsletter"),this.editor={setContent:t=>{rd&&rd.remove(),rd=vo({target:e.target,page:{},components:t||[]},(()=>{}))}},this.commands={snackbar:t=>{be.Z.dispatch("snackbar",{text:t})},langs:()=>fe.h.get("lang"),lang:t=>fe.h.get("lang",t),injectEditor:t=>{const e=fe.h.get("injectEditor");e&&e(t)},execCommand:(t,e)=>{ge.Z.store().execCommand(t,e)},toJSON:Ae.au,toHTML:Ae.io},fe.h.set({commands:this.commands}),e.target)if("string"==typeof e.target){if(r=document.getElementById(e.target),!r)throw new Error("string must be valid id or htmlElement")}else e.target instanceof HTMLElement?r=e.target:(r=document.createElement("div"),document.body.appendChild(r));else r=document.createElement("div"),e.target=r;fe.h.set({editor:ge.Z});const i=e.target;i.style.maxHeight="100vh",i.style.overflow="hidden",i.style.position="relative",ge.Z.on("change",(()=>{(0,Ae.au)()})),fe.h.set({app:{_id:e.appId,name:e.documentName}}),e.languageJson&&fe.h.set({lang:e.languageJson}),ge.Z.configure=e?.editor?.configure;const o=e.language;!function(){if(jc(o)){fe.h.set({langConfig:{direction:"rtl",align:"right",justifyContent:"flex-start",justify:"start"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"right",e.theme.direction=e.theme.direction?e.theme.direction:"rtl",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-start",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}else{fe.h.set({langConfig:{direction:"ltr",align:"left",justifyContent:"flex-end",justify:"end"}}),e.theme.textAlign=e.theme.textAlign?e.theme.textAlign:"left",e.theme.direction=e.theme.direction?e.theme.direction:"ltr",e.theme.justifyContent=e.theme.justifyContent?e.theme.justifyContent:"flex-end",e.theme.rowDirection=e.theme.rowDirection?e.theme.rowDirection:"row-reverse";const t=n(e.theme);fe.h.set({theme:t.theme}),i.appendChild(t.styleTag)}let t=ge.Z?.configure?.plugins;Array.isArray(t)||(t=[]),t.push(Gc.Z),t.push(qc),t.push(Xc.Z),t.push(nd),t=t.map((t=>t({channel:e.channel||"web",languages:e.languageJson,direction:fe.h.get("langConfig").direction,textAlign:fe.h.get("langConfig").align})));const r=e;r.editor.configure.plugins=t,fe.h.set({config:r,schemes:t}),rd=vo({target:e.target,page:{},components:e.components||[]},(()=>{const t=fe.h.get("components").find((t=>"root"===t.type));t&&ge.Z.clean().selectComponent(t)}))}(),e.collaborator,ge.Z.connectWithCloud(e.collaborator)}};function od(){const t="image";return{id:"1",name:t,menu:e=>{let{Compose:n}=e;return new n((()=>{const e="400px",n="250px";return{type:t,props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}})(),{group:"elements",name:t,puzzle:[{type:"image"}],tags:[t],index:null})},lazy:t=>{s.e(7946).then(s.bind(s,7946)).then((e=>{t(e.default())}))}}}function sd(t){const{languages:e,direction:n,textAlign:r}=t,i="@paragraph/text";return{id:i,name:i,menu:t=>{let{Compose:o}=t;return new o({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e.generalText}]}]}}}},{group:"elements",name:"text",puzzle:[{type:"text"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(sd.data))}))}}}sd.configure=t=>{let{fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a}=t;return sd.data={fontSize:e,title:n,suffix:r,prefix:i,fonts:o,direction:s,textAlign:a},sd};const ad="video";function ld(t){let{channel:e}=t;return"web"===e?{id:"vvidoe-4Kj^43",name:ad,menu:t=>{let{Compose:e}=t;return new e({type:ad,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:ad,puzzle:[{type:"video"}],tags:[ad],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(3585)]).then(s.bind(s,83585)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"vvidoe-4Kj^43",name:ad,menu:t=>{let{Compose:e}=t;return new e({type:ad,props:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},{group:"elements",name:ad,puzzle:[{type:"video"}],tags:[ad],index:null})},lazy:t=>{Promise.all([s.e(3691),s.e(6069)]).then(s.bind(s,46069)).then((e=>{t(e.default())}))}}:void 0}function cd(t){const{languages:e,direction:n,textAlign:r}=t,i="text",o=`${i}/heading1`;return{id:o,name:i,menu:t=>{let{Compose:s}=t;return new s({type:i,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:n,textAlign:r},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"62px",color:"#000"}}],type:"text",text:e.bigHeading}]}]}}}},{id:o,group:"elements",name:"heading 1",puzzle:[{type:"heading1"}],tags:[i],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(cd.data))}))}}}function dd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"5445",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:2,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"42px",color:"#000"}}],type:"text",text:n.mediumHeading}]}]}}}},{id:`${e}/heading2`,group:"elements",name:"heading 2",puzzle:[{type:"heading2"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(dd.data))}))}}}function pd(t){const e="text",{languages:n,direction:r,textAlign:i}=t;return{id:"544663",name:e,menu:t=>{let{Compose:o}=t;return new o({type:e,props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:3,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:n.smallHeading}]}]}}}},{id:`${e}/heading3`,group:"elements",name:"heading 3",puzzle:[{type:"heading3"}],tags:[e],index:0})},lazy:t=>{s.e(7988).then(s.bind(s,87988)).then((e=>{t(e.default(pd.data))}))}}}cd.configure=t=>(cd.data=t,cd),dd.configure=t=>(dd.data=t,dd),pd.configure=t=>(pd.data=t,pd);const hd="countdown";function ud(t){let{channel:e}=t;return"web"===e?{id:"1",name:hd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setHours(n.getMinutes()+30),{type:hd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"300px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{id:hd,group:"elements",name:hd,puzzle:[{type:"countdown"}],tags:[hd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:hd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:hd,props:{hasColons:!0,hasLabels:!0,date:n.toString(),language:"he",style:{},classList:[],containerWidth:"400px",containerBg:"transparent",containerRadius:"0",colBg:"transparent",colBorderStyle:"none",colBorderSize:"0",colBorderColor:"none",colBorderPadding:"0",colBorderRadius:"100px",numberSize:"30px",numberColor:"black",numberFontFamily:"Arial",labelSize:"14px",labelColor:"black",labelfontFamily:"Arial"}}),{group:"elements",name:hd,puzzle:[{type:"countdown"}],tags:[hd],index:null});var n},lazy:t=>{s.e(5204).then(s.bind(s,95204)).then((e=>{t(e.default())}))}}:void 0}function fd(t){const{languages:e}=t,n="button";return{id:"button-menu",name:n,menu:t=>{let{Compose:r}=t;return new r({type:n,props:{text:e.readMore,style:{height:"auto",width:"100px",maxWidth:"100%",minWidth:"30px",background:"#000",color:"#fff"}}},{group:"elements",name:n,puzzle:[{type:"button"}],tags:[n],index:null})},lazy:t=>{s.e(9800).then(s.bind(s,29800)).then((e=>{t(e.default())}))}}}const md="map";function gd(t){let{channel:e}=t;return"web"===e?{id:"1",name:md,menu:t=>{let{Compose:e}=t;return new e({type:md,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב"}},{group:"elements",name:md,puzzle:[{type:"map"}],tags:[md],index:null})},lazy:t=>{s.e(9265).then(s.bind(s,59265)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:md,menu:t=>{let{Compose:e}=t;return new e({type:md,props:{width:200,height:200,style:{height:"200px",width:"200px"},address:"תל אביב",lang:"he"}},{group:"elements",name:md,puzzle:[{type:"map"}],tags:[md],index:null})},lazy:t=>{s.e(6234).then(s.bind(s,46234)).then((e=>{t(e.default())}))}}:void 0}const bd="social";function yd(t){let{channel:e}=t;return"web"===e?{id:"1",name:bd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:bd,props:{}}),{group:"elements",name:bd,puzzle:[{type:"social"}],tags:[bd],index:null});var n},lazy:t=>{s.e(9e3).then(s.bind(s,99e3)).then((e=>{t(e.default())}))}}:"newsletter"===e?{id:"1",name:bd,menu:t=>{let{Compose:e}=t;return new e(((n=new Date).setMinutes(n.getMinutes()+30),{type:bd,props:{style:{gap:"10px"},items:[{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://youtube.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/youtube.png"},{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/snapchat.png"},{id:(0,In.Z)(),fgColor:"",bgColor:"",style:{width:"30px",height:"30px"},url:"https://whatsapp.com",src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/whatsapp.png"}]}}),{group:"elements",name:bd,puzzle:[{type:"social"}],tags:[bd],index:null});var n},lazy:t=>{s.e(7637).then(s.bind(s,77637)).then((e=>{t(e.default())}))}}:void 0}function Ad(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",props:{style:{width:"95%",maxWidth:"345px",padding:"10px"}},children:[{type:"col",children:[{type:"image",props:{src:"https://api.creaditor.com/images/placeholder?width=350&height=150",width:400,height:150,isFullWidthOnMobile:!0,style:{width:"100%"}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{}}}]}]}}function wd(t){const e=t?.text;return{type:"row",props:{style:{width:"300px"}},children:[{type:"col",props:{lg:12,sm:12,justify:"end"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]},{type:"col",props:{lg:12,sm:12},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:"rtl",textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"16px",color:"#000"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{lg:12,sm:12,justify:"start"},children:[{type:"image",draggable:!1,props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/last-post-quotes.png",width:24,height:24,style:{width:"24px",height:"24px"}}}]}]}}function vd(t){let{homePageText:e,direction:n,textAlign:r}=t;return{name:"contact",icon:[{type:"contact"}],tags:["image","two images"],children:[{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/mail.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"example@example.com"}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/website.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",children:[{type:"image",props:{src:"https://panel.sendmsg.co.il/templateContentImages/images/CreaditorGeneral/phone.png",width:30,height:30,style:{width:"35px",height:"35px"}}},{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:n,textAlign:"center"},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:"0505891010"}]}]}}}}]}]}}function xd(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.width||400,n=t.height||200;return{type:"image",props:{alt:"image",width:e,height:n,style:{height:"auto",width:e,maxWidth:"100%",minWidth:"30px",objectFit:"fill"},src:`https://api.creaditor.com/images/placeholder?width=${parseInt(e)||250}&height=${parseInt(n)||250}`,isOpenWithModal:!1,isFullWidthOnMobile:!1,isRatioLock:!0}}}function _d(){const t={width:300,height:200};return{name:"two images",icon:[{type:"image"},{type:"image"}],tags:["image"],children:[xd(t),xd(t)]}}function kd(){const t={width:200,height:200};return{name:"threeImages",icon:[{type:"image"},{type:"image"},{type:"image"}],tags:["quote"],children:[xd(t),xd(t),xd(t)]}}function Cd(){const t={width:150,height:100};return{name:"fourImages",icon:[{type:"image"},{type:"image"},{type:"image"},{type:"image"}],tags:["image"],children:[xd(t),xd(t),xd(t),xd(t)]}}function Ed(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t?.text;return{type:"button",props:{style:{height:"40px",padding:"10px",borderRadius:"5px"},text:e}}}function Sd(t){const e=t?.heading,n=t?.text,r=t?.direction,i=t?.textAlign;return{type:"card",id:"card-title-txt-bton",props:{style:{width:"95%",maxWidth:"345px",background:""}},children:[{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"heading",attrs:{level:1,lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"24px",color:"rgb(56, 56, 56)"}}],type:"text",text:e}]}]}}}}]},{type:"col",props:{alignItems:"center"},children:[{type:"text",props:{text:{childNodes:{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:r,textAlign:i},content:[{marks:[{type:"textStyle",attrs:{fontFamily:"Arial",fontSize:"14px",color:"rgb(56, 56, 56)"}}],type:"text",text:n}]}]}}}}]},{type:"col",props:{justify:"rtl"===r?"end":"start",style:{}},children:[{type:"button",props:{style:{marginTop:"10px"}}}]}]}}const Bd=JSON.parse('{"name":"שם","link":"קישור","secureLink":"קישור מאובטח","tel":"טלפון","email":"אימייל","items":"פריטים","confirm":"אישור","contact":"יצירת קשר","loadingMore":"טוען תמונות נוספות...","loading":"טוען...","image_in_progress":"התמונה נוצרת...","expand_image_for_outlook_description":"כדי שהתמונה תוצג ותשמור על פרופורציות - הפעילו את הצ׳קבוקס כדי לשמור על גובה התמונה.","email_600":"הפרקטיקות המומלצות לעיצוב מיילים קובעות שגודל הרוחב האידיאלי של ניוזלטר הוא 600 פיקסלים. מספר זה היה הסטנדרט במשך שנים רבות.","mergeTags":"תגיות מיזוג","simply:Scratchcard":"כרטיס גירוד","is_user_wants_https":"להחליף את הקישור לhttps?","social":"רשתות חברתיות","prompt_editor_context":"האם להתייחס לטקסט הקיים?","Enter_your_business_name":"הכניסו את שם העסק שלכם","Enter_your_business_type":"הכניסו את סוג העסק שלכם","Enter_the_URL_of_the_page":"הכניסו את כתובת הדף שלכם","secure_link":"קישור מאובטח","bulletColor":"צבע הבולט","links_with_invalid_url":"קישורים עם כתובות לא תקינות","images_without_alt":"תמונות ללא תיאור","savedLinks":"קישורים שמורים","sms_body_if_needed":"גוף ההודעה אם נדרש","whatsapp_body_if_needed":"הודעת וואטסאפ אם נדרש","twoImages":"שתי תמונות","fourImages":"ארבע תמונות","threeImages":"שלוש תמונות","threeButtons":"שלושה כפתורים","borderSize":"עריכת המסגרת","file":"קובץ","root":"הדף","col":"עמודה","inline-image":"תמונה פנימית","link_of_button":"לאן הכפתור מוביל ?","addedToFavorite":"התווסף למועדפים","removedFromFavorite":"נמחק מהמועדפים","choose_backgroundColor":"בחרו צבע רקע","removedSuccess":"נמחק בהצלחה","aToZ":"א-ת","zToA":"ת-א","anchorName":"שם העוגן","inputEmptyError":"יש למלא את השדה","savedSuccess":"נשמר בהצלחה","createdSuccessfully":"בוצע בהצלחה","texts":"טקסטים","numOneAsFemale":"אחת","click_here_to_add":"לחצו להוספה","heading":"כותרת","bigHeading":"כותרת גדולה","readMore":"קראו עוד","mediumHeading":"כותרת בינונית","smallHeading":"כותרת קטנה","icons":"אייקונים","divider":"קו מפריד","bullets":"בולטים","numbered":"מספור","ok":"אוקי","newImage":"תמונה חדשה","newFolder":"תיקיה חדשה","folders":"תיקיות","edit":"עריכה","article":"מאמר","videoWithArticle":"וידאו עם מאמר","fit_colors":"צבעים מתאימים","plainSection":"מקטע ריק","iamgeWithArticle":"תמונה עם מאמר","imageWithText":"תמונה עם טקסט","BulletsWithImage":"בולטים עם תמונה","BulletsWithArticle":"בולטים עם מאמר","SocialNetwork":"רשת חברתית","twoArticles":"שני מאמרים","twoButtons":"שני כפתורים","threeArticles":"שלושה מאמרים","imageWithBullets":"תמונה עם בולטים","undo":"ביטול","redo":"ביצוע מחדש","wide":"מתוח לכל האוחב","click_to_add":"","videos":"סרטונים","empty_section_info":"זהו מקטע ריק, לחצו כאן כדי להוסיף בלוקים","text:button":"מה הכפתור אומר?","video":"סרטון","images":"תמונות","image":"תמונה","weight":"עובי","buttons":"כפתורים","button":"כפתור","general":"כללי","all":"הכל","myImages":"התמונות שלי","uploadSuccess":"העלאה הושלמה","fromOldToNew":"מהישן לחדש","fromNewToOld":"מהחדש לישן","download":"הורדה","quotes":"ציטוט","recommended":"מומלץ","save_block":"שמירת בלוק","what_category":"באיזו קטגוריה?","middle":"אמצע","give_name_to_block":"תנו שם לבלוק","quote":"ציטוט","no_responsive":"ביטול רספונסיביות","home_page":"דף הבית","quote | image":"ציטוט | תמונה","image | quote":"תמונה | ציטוט","image | card":"כרטיס | תמונה","card | image":"תמונה | כרטיס","quotesWithText":"ציטוט עם טקסט","delete":"מחיקה","anchor":"עוגן","drag_section":"החליפו מיקום עם מקטע אחר","drag_block":"לחצו לבחירה או גררו לשנות את המיקום","remove_block":"הסרת בלוק","duplicate_block":"שכפול בלוק","deleteElement":"מחיקת אלמנט","deleteBlock":"מחיקת בלוק","preview":"תצוגה מקדימה","design":"עיצוב","changeName":"שינוי שם","upload":"העלאת תמונה","add":"הוספה","publish":"פרסם","addons":"תוספות","duo":"מועד","position":"מיקום","drag_to_move_click_to_options":"גרירה להזזה, לחיצה להגדרות","save":"שמירה","repeat":"חזור","autoplay":"הפעל מיד","expand_image_for_outlook":"הגדלת תמונה לאאוטלוק","errors_to_fix":"שגיאות לתיקון","buttons_without_links":"כפתורים ללא קישור","images_with_default_src":"תמונות עם כתובת דיפולטית","urlAddressToYoutVimeo":"שורת כתובת ליוטיוב, וימאו","add_urlAddress_from_media_site":"קישור חיצוני","remove_background_movie":"הסרת רקע","playInLoop":"הפעל בלופ","height_in_section":"גובה, 100 יפרס לכל גובה המסך בהתאם למכשיר","cellSpace":"ריווח תא","numbers":"מספרים","titles":"כותרות","go_to_edit_mode":"חזרה למצב עריכה","auto":"אוטומטי","search":"חיפוש","showAsImage":"הצג כתמונה","titlesStyle":"עיצוב הכותרות","delete_section":"הסרת מקטע","numbersStyle":"עיצוב המספרים","slientMode":"מצב השתק","ratioLock":"נעילת יחס","choose_your_duo_date":"בחרו את המועד הסופי","videoLink":"קישור לסרטון","openAsModal":"פתח תמונה בחלון צף","innerBackgroundColor":"רקע פנימי","radius":"רדיוס","iconsColor":"צבע האייקונים","whereIframeLink":"לאן האייפרם מכוון?","whereIsLinkTo":"?לאן הקישור מכוון","dividerColor":"צבע קו מפריד","buttonText":"טקסט הכפתור","settings":"הגדרות","counterTitle":"הצגת כותרות","foreColor":"צבע הטקסט","colors":"צבעים","marginBottom":"ריווח תחתון","color":"צבע","openGalleryImage":" גלריית תמונות","icon_gallery":"גלריית אייקונים","folderName":"שם תיקיה","addFolder":"הוספת תיקיה","newFolderAdded":"התיקיה ונוספה בהצלחה","file_moved_to_new_folder":"הקובץ הועבר לתיקיה אחרת","add_block":"הוספת בלוק","counterColor":"צבע למונה","chooseBlock":"גרור בלוק","automations":"אוטומציות","list-settings":"מתקדם","page_background":"רקע הדף","bgColor_blocks":"רקע הבלוקים","create_anchor":"צריכים עוגן? לחצו פה","copy":"העתק","uploading":"אני עובד על זה!","verifying":"רגע... כמה בדיקות קטנות","completed":"זהו... סיימתי!","timeout":"אופס! לא בטוח מה קרה פה...","copy_to_here":"העתקה לכאן","addLinks":"הוספת קישור","keep_ratio":"שמירת יחס","list-check":"אלמנטים","powered_by_pexels":"כל התמונות מאתר Pexels","image_micro_copy":"הוסיפו תמונה(אבל אחת יפה) בלחיצה על הכפתור, או לחיצה כפולה על התמונה","typography_micro_copy":"סמנו בדיוק את המילה, או בכלל לא כדאי לעצב את הטקסט","icons_list_micro_copy":"במידה ובולט לא נראה רציני במיוחד, החליפו אותו עם אייקון מעוצב ","anchor_name_micro_copy":"תנו לעוגן שם עכשיו, ותוכלו למצוא אותו בעריכת הקישורים אחר כך.","imageEditTitle":"עריכת תמונה","generate_content":"יצירת תוכן","creating_magic":"אני יוצר את התוכן שלכם...","address":"כתובת","prompt_editor_title":"יצירת תוכן","prompt_editor_textarea_placeholder":"תארו את התמונה שברצונכם לייצר","block_width":"רוחב הבלוקים","describe_image_prompt_input":"תארו את התמונה שברצונכם לייצר","image_prompt_editor_description":"אנחנו יכולים לייצר תמונה בהתאם לתיאור שתכתבו כאן, בלחיצה על כפתור הבחירה תוכלו לבחור תמונה מגלריית התמונות שלכם, או להכניס כתובת תמונה של תמונה חיצונית","insert_image":"בחירה","generate_image":"יצירת תמונה","generating":"אני עובד על זה...","creating_your_masterpiece":"אני יוצר את התמונה שלך...","he":"עברית","en":"אנגלית","ar":"ערבית","empty_state":"שקט פה.. שנתחיל שיחה?","videoEditTitle":"עריכת סרטון","backgroundColor":"צבע רקע","labels":"כותרות","add_table":"הוספת טבלה","button_design":"עיצוב הכפתור","background:form":"רקע הטופס","background:fields":"רקע השדות","width:form":"רוחב הטופס","no_editor:title":"עדיין לא יצרנו עריכה לאלמנט הזה, אנחנו עובדים על זה.","addons_menu:title":" תפריט התוספים, זה החלק המעניין, פה ניתן למצוא תוספים לשדרוג התוכן שלכם. פיצ\'רים נוספים יעלו בקרוב. בנתיים ניתן לגרור את האלמנט לבלוק או מקטע בגרירה חופשית לכל נקודה שתרצו..","sections_menu:title":"תפריט מקטעים, יצירת מקטע דורשת תשומת לב רבה לצרכים שלך, אנחנו עוד עובדים על זה, בנתיים ניתן ליצור מקטע ריק.","backgrounds_menu:title":"תפריט רקעים, בחרו רקע, אבל אחד יפה, וגררו אותו לבלוק או מקטע.","blocks_menu:title":"תפריט בלוקים, פה ניתן למצוא קומפוזציות של כמה אלמנטים שונים, ניתן לגרור אותם בין הבלוקים השונים ובין המקטעים ","elements_menu:title":"תפריט אלמנטים, גררו את האלמנט לצד אלמנט, התקרבו לפינה כדי לפתוח כתא חדש, או פשוט מתחת הבלוק ליצירת בלוק חדש","size_options":"מידות","backgrounds":"רקעים","contactForError":"דווח על שגיאה","contactForErrorDesc":"נתקלת בהתנהגות לא צפויה? \\n לחץ כאן לדיווח על תקלה","fetureRequest":"בקשה לתוספות","pastePageContent":" הדבקת תוכן מייל","titleColor":"צבע כותרת","agreeToOverride":"אני מאשר למחוק את התוכן הקיים ולהחליפו בתוכן שהועתק.","overridePageContent":"בחרת להדביק תוכן של מייל אחר לתוך הדף זה. \\n ההדבקה תמחק את התוכן הקיים בדף ותדביק במקומו את התוכן שהועתק.","fetureRequestDesc":"חסר לך פיצ\'ר כלשהו ? \\n לחץ כאן לבקשה להוספת כלים לעורך","copyPageContent":"העתקת תוכן הדף לחשבון אחר","copyPageContentDesc":"לחצו כאן כדי להעתיק את התוכן הדף לחשבון אחר שלכם בחשבון","pasteContent":"הדבקת תוכן מחשבון אחר","pasteContentDesc":"לחצו כאן כדי להדביק תוכן דף שהעתקם מחשבון אחר שלכם בחשבון","generalText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי ","longText":"כאן אנו נרשום את טקסט כללי כלשהו על המוצר שלנו. זהו אזור טקסט כללי כלשהו חופשי לגמרי, אפשר לרשום כאן מה שמתחשק לכם כל עוד מדובר בתוכן לעניין.","textBlock":"בלוק טקסט","component_selected":"נבחר בלוק","component_unselected":"בלוק לא נבחר","countdown":"מונה זמן","counterBlock":"בלוק קאונטר","bulletBlock":"בלוק בולטים","singleImage":"תמונה בודדת","allImages":"כל התמונות","add_section":"הוספת מקטע","bulletWithImageBlock":"בלוק בולטים לצד תמונה","header1block":"כותרת ראשית","bold":"הדגשה","underline":"קו תחתון","italic":"טקסט נטוי","strikeThrough":"קו חוצה","saved_links":"קישורים שמורים","forecolor":"צבע טקסט","numberColor":"צבע המספרים","threeCells":"שלושה תאים","twoCells":"שני תאים","backcolor":"רקע טקסט","fontFamily":"גופן","back":"חזור","fontSize":"גודל גופן","text_micro_copy":"כתבו ש\\"ח ואז לחיצה על רווח.. אהבתם? שתפו אותנו (: ","direction":"כיוון","right":"ימין","left":"שמאל","scroll":"גלילה","new_item":"פריט חדש","center":"מרכז","top":"למעלה","bottom":"למטה","next":"שלב הבא","twoCards":"שני כרטיסים","threeCards":"שלושה כרטיסים","justify":"מתיחה","remove":"הסרה","unLink":"הסרת קישור","appendImage":"הוספת תמונה","appendVideo":"הוספת סרטון","blocks":"בלוקים","page":"דף","section":"מקטע","block":"בלוק","pageSetting":"הגדרות הדף","home":"בית","about":"אודות","text":"טקסט","clear":"ניקוי","articleTitle":"כותרת מאמר","quick_add":"הוספה מהירה","Header1Web":"כותרת","shortText":"משהו חשוב שעל הלקוחות לדעת","articleMore":"הצג עוד","emoji":"אמוטיקון","lineHeight":"גובה שורה","two images":"שתי תמונות","heading 1":"כותרת גדולה","heading 2":"כותרת בינונית","heading 3":"כותרת קטנה","textAlign":"כיוון טקסט","sendTest":"שליחת בדיקה","Duplicate":"שכפול","DragHere":"גרור פה","imageSize":"גודל תמונה","alignImage":"מיקום תמונה","fullWidthOnMobile":"רוחב מלא במובייל","delete_bcakground":"הסרת רקע","edit_background":"עריכת רקע","altText":"טקסט חילופי","gallery":"גלרייה","padding":"ריווח פנימי","padding_top":"ריווח עליון","padding_bottom":"ריווח תחתון","margin":"ריווח חיצוני","size":"גודל","coming_soon":"מגיע בקרוב","spacer":"ספייסר","borderWidth":"גודל הבורדר","borderColor":"צבע הבורדר","background":"רקע","svg_color":"צבע הסמל","width":"רוחב","makeCircle":"שמירה על התמונה כעיגול","add_now":"הוספה","card":"כרטיסיה","go_back":"חזרה אחורה","add_new_element":"הוספת אלמנט חדש","what_the_anchor_name":"שם העוגן","form:manage_fields":"ניהול השדות בטופס","accessories":"תוספות","jhon_lennon":"ג\'ון לנון","jhon_lennon_qoute":"החיים זה מה שקורה בזמן שאתה עסוק בלתכנן תוכניות אחרות","headingText":"טקסט כותרת","height":"גובה","rotate":"סיבוב","dateAndTime":"תאריך ושעת סיום","hour":"שעה","is_active":"האם פעיל?","where_the_image_link":"לאן התמונה מובילה?","minutes":"דקות","alignButton":"מיקום כפתור","favorites":"מועדפים","main":"ראשי","type":"סגנון","opacity":"שקיפות","backgroundColorAndOpacity":"צבע רקע ושקיפות","mediaType":"סוגי מדיה","filter":"סינון","elements":"אלמנטים","freeImages":"תמונות בחינם","choose:":"בחירה","sendTestMail":"שליחת הודעת בדיקה","AddNewAddress":"הוספת מייל נוסף","searchImages":"חיפוש תמונות","send":"שליחה","fontNameWholePage":"פונט לכל הדף","blockMenuInfo":"לחץ על אחד התגיות לבחירה ולחיצה נוספת לביטול *","menu":"תפריט","menu_widget":"תפריט","emailAddress":"כתובת המייל","addEmoji":"הוספת אמוטיקון","addBackcolor":"הוספת צבע רקע","addForcolor":"הוספת צבע טקסט","openNewTab":"פתח בטאב חדש","stayOnSamePage":"השאר באותו הדף","desktopMode":"מצב דפדפן בלבד","lastColors":"צבעים אחרונים","colorsInPage":"צבעים בדף","getColorFromImage":"הצגת צבעים מתמונה","addressWithExample":"כתובת (דוגמא: פתח תקווה, הסיבים 18)","maps":"מפות","map":"מפה","layout":"פריסה","animations":"אנימציות","close_scheme_locked":"נעל סכימת צבעים","open_scheme_locked":"פתיחת סכימת צבעים","event":"אירוע","audio":"שמע","addNew":"הוסף חדש","delete_and_add":"הוספה והסרה","what_would_u_like_to_link":"מה תרצו להוסיף?","add_link":"הוספת קישור","name_of_nav":"שם כפתור הניווט","urlAddress":"שורת כתובת","can_Open_Gallery_With_Double_Click_On_The_Image":" פתיחת הגלרייה על ידי לחיצה כפולה על התמונה","uploadFile":"העלאה של קובץ חדש","FileSelection":"בחירת קובץ","this_is_empty_iframe_start_add_url_link":"זה אייפרם ריק, הוסיפו קישור לכתובת אינטרנט","yes,Create":"כן, צור תיקיה","letterSpacing":"ריווח בין האותיות","spacing":"ריווחים","solid":"אחיד","palletes":"פלטים","savedPalletes":"פלטים שמורים","savedToMainTab":"שמור בלשונית ראשית","dashed":"מקוקו","advanced":"מתקדם","Select_an_element_to_edit_its_properties":"בחרו אלמנט או לחצו על הוספה כדי להתחיל ליצור","maxWidth":"רוחב מקסימלי","whatTheBtnSays":"מה הכפתור אומר?","sendSms":"שליחת סמס","sendWhatsapp":"שליחת וואטסאפ","sendEmail":"שליחת מייל","what_the_url_address":"מהי שורת הכתובת שתרצו להוסיף?","add_catchy_subject":"הוסיפו נושא קליט","what_the_email_address":"לאן המייל ישלח?","what_the_phone_number":"מהו מספר הטלפון?","what_the_phone_number_to_send_msg":"מהו מספר אליו תשלח ההודעה?","email_body_if_needed":"תוכן גוף המייל","active_on-scroll":"יפעל בגלילה","active_on-hover":"יפעל במצב ריחוף עם העכבר","drag_or_click":"גרירה","heading-1":"כותרת גדולה","svg-element":"אלמנט SVG","divider-element":"קו מפריד","iframe":"אייפרם","html-code":"קוד HTML","video with text":"וידאו עם טקסט","image with text":"תמונה עם טקסט","quotes-block":"בלוק ציטוט","animation_deleted":"האנימציה נמחקה","animation_added":"האנימציה נוספה","show_on_desktop":"הצג במחשב הלוח","show_on_mobile":"הצג במכשיר נייד","show_on_tablet":"הצג במכשיר טאבלט","properties":"מאפיינים","ID_with_description":"מזהה (ID)","on_hover":"במצב ריחוף עם העכבר","on_scroll":"בגלילה","menu-widget":"תצוגת תפריט","setting_section":"הגדרות סקשן","setting_block":"הגדרות בלוק","remove_element":"הסרת אלמנט","drag_element":"גרירת אלמנט","max_width":"רוחב מקסימלי","open_gallery":"פתיחת גלריה","open_gallery_icons":"גלריית אייקונים","number_size":"גודל המספרים","large":"גדול","medium":"בינוני","small":"קטן","extra-large":"גדול מאוד","without_radius":"ללא רדיוס","design_custom_list":"עיצוב רשימה מותאמת אישית","display_mode":"מצב תצוגה","left-to-element":"שמאל לאלמנט","right-to-element":"ימין לאלמנט","bottom-to-element":"מתחת לאלמנט","top-to-element":"מעל לאלמנט","open-new-cell-from-right":"הוספה בתא חדש מימין","open-new-cell-from-left":"הוספה בתא חדש משמאל","open-new-block-from-bottom":"הוספה בבלוק חדש מתחת","open-new-block-from-top":"הוספה בבלוק חדש מעלה","description":"תיאור","title":"כותרת","keywords":"מילות מפתח","favicon":"סמל מוצא","cancel":"ביטול","standard":"סטנדרטי","ready_to_publish":"מוכן לפרסום","lets_set_some_seo":"בואו נוסיף כמה הגדרות SEO","We_are_building_your_page":"אנחנו בונים את העמוד שלך","inner_blocks":"מרכז המקטע","drag_here":"גררו לכאן","advance_options":"אפשרויות מתקדמות","duplicate_template_code":"קוד לשכפול תבנית","copied":"הועתק","click_to_copy":"Click To Copy","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"קופצני","tada":"שיקשוק","saved_theme":"עיצוב שמור","open_colorpicker":"בחירה של צבע אישי","colors_that_created_from_image":"צבעים שנוצרו מתמונה","publish_success":"פרסום בוצע בהצלחה","open_the_page":"פתיחת העמוד בדף חדש","close":"סגירה","title_size":"גודל כותרות","ilustrations":"סמלים","svg":"סמל","click_to_refresh":"לחיצה לרענון הדף","error_client_disconnected":"אופס! החיבור לשרת נותק, לחצו על רענון הדף כדי להמשיך לעבוד, בנתיים קבלנו את הנתונים ואנחנו עובדים על פתרון הבעיה, עמך סליחה והמשך עבודה מהנה","connection_error":"החיבור נותק 😱, אבל אל דאגה, התוכן נשמר","typography":"טיפוגרפיה","more_colors":"צבעים נוספים","button_submit_form":"שליחה","get_started":"התחילו עכשיו","design_form":"עיצוב טופס","form_settings":"הגדרות טופס","input":"קלט","send_mail_on_submitted":"רוצים לקבל מייל כשלקוחות נרשמים?","placeholder":"טקסט פנימי של הקלט(במצב ללא טקסט)","default_value":"ערך ברירת מחדל","required":"חובה","hidden":"מוסתר","hidden_field":"שדה מוסתר","advance_setting":"הגדרות מתקדמות","label":"כותרת","color:label":"צבע הטקסט","radio-group":"קבוצת לחצנים","items_in_radio_group":"פריטים בקבוצת לחצנים","add_item":"הוספת פריט","textarea":"טקסט ארוך","items_in_menu":"פריטים בתפריט","checkbox":"תיבת סימון","height:form_field":"גובה השדות","ready_blocks":"בלוקים מוכנים","box-shadow":"אפקט צל","add_new_field":"הוספת שדה חדש","border_design":"עיצוב מסגרת","individual_elements":"אלמנטים בודדים","number_color":"צבע המספרים","send_form_only_if_checked":"שליחת טופס תתאפשר רק אם מסומן","select_fields_to_edit":"לחצו על האלמנטים בטופס לעריכה","url_parameters":"שם פרמטר בשליחה","the_color_of_cols":"צבע מקטעי המספרים","the_radius_of_col":"רדיוס קטעי המספרים","hidden_form_field_info":"שדה שלא יופיע לגולשים בתצוגת הטופס, משמש בעיקר לקבלת ערכי REF ו UTM או פרמטרים קבועים שמעונינים שיופיעו אוטומטית בשדות של הנרשם בטופס הספציפי מבלי שהוא ממלא או רואה אותם.","required_form_field_info":"שדה שהנרשם בטופס חייב למלא/לסמן אותו על מנת לשלוח את הטופס, טופס ששדה חובה לא מולא בו לא ישלח ויקפיץ הודעה לממלא הטופס שהשדה הוא חובה","url_param":"שם פרמטר בשליחה","show_colons":"להציג נקודותיים ?","please_wait_downloading_new_version":"אנא המתינו, אנחנו מעדכנים גרסה חדשה","my_fields":"השדות שלי","allow_send_form_only_if_checked":"אפשר לשלוח טופס רק אם מסומן","field_settings":"הגדרות שדה","after_form_subscribed":"מה לעשות אחרי שהטופס נשלח?","add_user_from_mailinglist_after_subscribed":"לאיזה קבוצות דיוור נרשום את הלקוח שלנו?","remove_user_from_mailinglist_after_subscribed":"מאיזה קבוצות דיוור נסיר את הלקוח שלנו ?","available_fields":"השדות שלי","background_fields":"רקע השדות","label_color":"צבע כותרת עליונה","title_color":"צבע הכותרות","button_color":"צבע טקסט הכפתור","start":"התחלה","end":"סיום","duration":"משך","prefix":"לפני","suffix":"אחרי","separator":"מפריד","count-up":"לספר עד","pie-chart":"פיי נתונים","edit_data":"עריכת נתונים","border_editor":"עריכת מסגרת","moving_from_mailing_list":"הוספה והסרה מרשימת דיוור","coming_soon_automations":"בקרוב! אנחנו מאמינים שאתם ואתן כבעלי ובעלות עסקים צריכים חיים קלים! לכן אנחנו עובדים על תפריט אוטומציות כדי שתוכלו להנות ולבצע פעולות גם בזמן שאתם ישנים.","bar-chart":"טבלת עמודות","cols_color":"צבעי עמודות","button_background":"רקע הכפתור","button_radius":"רדיוס כפתור","justifyContent":"ישור אופקי","alignItems":"ישור אנכי","design_pallete":"פלאטת הצבעים שלי","rootelement_editor_top_header":"שינוי גופן לכל האלמנטים בדף, כלל אלמנטים חדשים שתוסיפו","rootelement_editor_global_colors_heading":"צבעים שמורים לדף, בחרו צבעים לפי צבעי המותג שלכם, ואחר כך הצבעים יחכו לכם בבחירת צבע של כל אלמנט בתוך הcolorpicker","flex-start":"התחלה","primaryColor":"צבע ראשי","primaryContrastColor":"צבע ראשי נגדי","secondaryColor":"צבע משני","secondaryContrastColor":"צבע משני נגדי","flex-end":"סיום","make_it_default_value":"הפוך לערך ברירת מחדל","show_success_popup":"הצגת פופאפ בעת בהצלחה","forward_params":"להעביר פרמטרים?","user_will_redirect_to":"הלקוח יעבור לדף הבא","where_to_redirect":"לאן להעביר את הלקוח?","component_color":"צבע הרכיב","none":"ללא","my_form":"הטופס שלי","form:placeholder_color":"צבע הטקסט הפנימי","search_my_fields":"חיפוש השדות שלי","checkbox_on_right_side":"צ\'קבוקס מימין?","choose_an_option":"בחרו באחת האפשרויות הבאות","checkbox_checked_as_default":"תיבת סימון מסומנת כברירת מחדל","paragraph":"פיסקה","after_submission":"מה יקרה לאחר הרשמה?","stay_at_page":"נשארים בדף","redirect":"מועברים למקום אחר","field_background":"רקע שדות","form:heading":"בואו נדבר, הקפה עלינו!","form:subHeading":"לקביעת פגישה או רק שאלה? אשמח לסייע לכם! השאירו פרטים ואחזור אליכם בהקדם","form:background":"צבע הרקע של שדות","style":"עיצוב","connection_lost":"החיבור אבד","error_transactions_not_completed":"חלק מהפעולות לא הושלמו, בדיוק ברגעים אלה קיבלנו את המידע ואנחנו עובדים על שיפור החוויה בעורך","form":"טופס","sync_all_forms":"סנכרן את כל הטפסים","send_the_data_to":"צריכים לשלוח את הנתונים לCRM ?","horizontal_shadow_length":"מיקום האופקי של הצל","vertical_shadow_length":"מיקום האנכי של הצל","blur_radius":"טשטוש הצל","spread_radius":"פריסת הצל","open_image_editor":"עריכת תמונה","shadow_color":"צבע הצל","inset":"מיקום חיצוני ?","box_shadow:info":"Adds shadow effects around an element\'s frame.","choose":"בחירה","design_for_phone":"עיצוב לנייד","design_for_desktop":"עיצוב למחשב","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"יעד הקישור","open_in_new_tab":"פתח בטאב חדש","open_in_same_tab":"פתח באותו טאב","open_in_parent_frame":"פתח במסגרת ההורה","open_in_top_frame":"פתח במסגרת העליונה","_blank":"פתח בטאב חדש","_self":"פתח באותו טאב","_parent":"פתח במסגרת ההורה","_top":"פתח במסגרת העליונה","user_menu":"תפריט משתמש","send_test_emails":"שליחת מיילי בדיקה","attached_files":"קבצים מצורפים","make_newsletter_as_event":"הפוך ניוזלטר לאירוע","edit_block":"עריכת בלוק","add_files":"הוסף קבצים","max_files_reached":"מספר הקבצים המקסימלי הושג","make_event":"צור אירוע","name_and_subject":"שם ונושא","enter_email_addresses":"הזן כתובות מייל (פסיק או Enter להוספה)","invalid_email_error":"אנא הזן כתובת מייל תקינה","no_emails_error":"אנא הוסף לפחות כתובת מייל אחת","create_event":"צור אירוע","start_date_time":"תאריך ושעת התחלה","end_date_time":"תאריך ושעת סיום","location":"מיקום","link_optional":"קישור (אופציונלי)","save_event":"שמירת אירוע","cancel_event":"ביטול","font_color":"צבע גופן","confirm_cancel":"האם אתה בטוח שברצונך לבטל?","creating_event":"יוצר אירוע...","event_created":"האירוע נוצר!","end_after_start_error":"תאריך/שעת הסיום חייב להיות אחרי תאריך/שעת ההתחלה","enter_event_location":"הזן מיקום האירוע","enter_event_link":"הזן קישור לאירוע","logout":"יציאה מהעורך","details":"פרטים","subject":"נושא","iconDirection":"כיוון האייקון","subtitle":"כותרת משנה","hasIcon":"להפעיל אייקון?","enter_subject":"מה יהיה נושא המייל(subject)?","apply":"החל","automation_settings":"הגדרות אוטומציה","what_should_happen":"בלחיצה על הקישור, אנחנו נסיר או נוסיף את המשתמש לקבוצות הדיוור הבאות","add_to_mailing_list_question":"להוסיף","remove_from_mailing_list_question":"להסיר","select_mailing_lists":"בחרו רשימות תפוצה","saved_successfully":"הפעולה נשמרה בהצלחה","need_automations":"צריכים אוטומציה? לחצו על הכפתור. במידה ולא תמצאו מה שאתם צריכים, נשמח לשמוע איך נוכל לעזור .","menu_automations":"תפריט אוטומציות","selected":"נבחרו","automation_link_preview":"קישור אוטומציה","apply_automation":"החל אוטומציה"}'),Od=JSON.parse('{"name":"Name","link":"Link","secureLink":"https link","tel":"Tel","email":"Email","keep_ratio":"Keep ratio","recommended":"Recommended","opengalleryimage":"Open gallery","email_600":"Email design best practices peg the ideal email newsletter width size at 600 pixels. This number has been the standard for many years.","secure_link":"Secure link","items":"Items","moving_from_mailing_list":"Moving from mailing list","links_with_invalid_url":"Links with invalid url","prompt_editor_title":"Create Your Content","generate_content":"Generate Content","creating_magic":"Creating Magic...","images_without_alt":"Images without alt","sms_body_if_needed":"SMS body if needed","whatsapp_body_if_needed":"WhatsApp message if needed","simply:Scratchcard":"Scratch card","image_in_progress":"Image in progress...","text_micro_copy":"Be creative, write something that will make your customers want to click on the button.","jhon_lennon":"Jhon Lennon","jhon_lennon_qoute":"Life is what happens when you\'re busy making other plans","headingText":"Heading text","title_color":"Title Color","button_color":"Color Button","button_background":"Background Button","start":"Start","end":"End","duration":"Duration","prefix":"Prefix","suffix":"Suffix","separator":"Separator","count-up":"Count up","pie-chart":"Pie chart","edit_data":"Edit Data","bar-chart":"Barchart","cols_color":"Cols Colors","button_radius":"Radius Button","accessories":"Accessories","elements":"Elements","confirm":"Accept","drag_block":"Drag block","what_the_anchor_name":"What the anchor name?","checkbox_on_right_side":"Checkbox on Right?","drag_to_move_click_to_options":"Drag to move, click to options","contact":"Contact","buttons_without_links":"Buttons without links","images_with_default_src":"Images with default src","errors_to_fix":"Errors to fix","expand_image_for_outlook":"Expand image for Outlook","social":"Social Networks","forward_params":"Forward Params?","menu_widget":"Menu widget","powered_by_pexels":"Powered by Pexels","bulletColor":"Bullet Color","makeCircle":"Make Circle","twoImages":"Two Images","component_color":"Component Color","close_scheme_locked":"Close scheme locked","open_scheme_locked":"Open scheme locked","threeImages":"Three Images","threeButtons":"Three Buttons","file":"File","auto":"auto","colors":"Colors","iconsColor":"Icon colors","slientMode":"Slient Mode","dividerColor":"Divider Color","this_is_empty_iframe_start_add_url_link":"This is empty iframe. Start adding url link","openAsModal":"Open image in modal","autoplay":"Autoplay","showAsImage":"show As Image","playInLoop":"play In Loop","addedToFavorite":"Added to Favorites","removedFromFavorite":"Deleted from favorites","removedSuccess":"Successfully deleted","aToZ":"A-Z","zToA":"Z-A","anchorName":"Anchor Name","inputEmptyError":"Fill in the field","savedSuccess":"Saved successfully","createdSuccessfully":"Done successfully","home":"Home","about":"About","position":"Position","scroll":"Scroll","repeat":"Repeat","choose":"Choose","texts":"Texts","home_page":"Home Page","numOneAsFemale":"One","heading":"Title","bigHeading":"Big Title","readMore":"Read More","quick_add":"Quick Add","click_here_to_add":"Click here to add","mediumHeading":"Medium title","smallHeading":"Small title","icons":"Icons","divider":"Divider","bullets":"Bullets","numbered":"Numbering","ok":"OK","newImage":"New Image","newFolder":"New Folder","folders":"Folders","addLinks":"Add link","edit":"editing","rootelement_editor_top_header":"Global settings","block_width":"Block width","page_background":"Page background","bgColor_blocks":"Background color","rootelement_editor_global_colors_heading":"Global colors","openGalleryImage":"Open gallery","clone_element":"Clone element","what_the_url_address":"What the url address?","videoWithArticle":"Video with article","give_name_to_block":"Give name to block","save_block":"Save block","choose_your_duo_date":"Choose your duo date","what_category":"What category?","iamgeWithArticle":"Image with article","imageWithText":"Image with text","no_responsive":"No responsive","BulletsWithImage":"Bulltes with image","SocialNetwork":"Social networks","height:form_field":"Fields height","box-shadow":"Shadow-Fx","ready_blocks":"Blocks","individual_elements":"Individual Elements","connection_lost":"Connection Lost","add_now":"Add Now","error_transactions_not_completed":"TODO:complete_text","form:manage_fields":"Manage The Form","add_new_field":"Add New Field","border_design":"Border Design","number_color":"Numbers Color","twoArticles":"Two article","the_color_of_cols":"The Color Of Cols","the_radius_of_col":"The Radius Of Cols","twoButtons":"Two buttons","show_colons":"Show Colons","my_fields":"My Fields","no_editor:title":"We will add editor to this element soon as possible.","threeArticles":"Three articles","addons_menu:title":"Addons menu, Here you can find some features that will improve your app. drag the element to block or section.","sections_menu:title":"Section menu, We didn’t find time to fill this content. Writing a new section needs a great understanding of your needs.","backgrounds_menu:title":"Backgrounds menu, choose a background, but a nice one and drag it to a block or a section.","blocks_menu:title":"Block menu, here you can find composes of multipal elements in the same block, just drag it between the blocks and the sections.","elements_menu:title":"Drag the element at the right,left.. or just drop it as a new block.","imageWithBullets":"Image With bullets","undo":"Cancel","redo":"Restore","wide":"Wide","text:button":"What The Button say?","empty_section_info":"This is empty section, Click here to add block and beatiful background.","videos":"Videos","video":"Video","images":"Images","image":"Image","weight":"Weight","buttons":"Buttons","button":"Button","general":"General","all":"All","myImages":"My Images","uploadSuccess":"Upload complete","fromOldToNew":"Old to new","fromNewToOld":"New To old","download":"Download","quotes":"A Quote","quotesWithText":"Quote with text","delete":"Deletion","anchor":"Anchor","deleteElement":"Delete element","deleteBlock":"Delete block","preview":"Preview","design":"Design","changeName":"Rename","upload":"Upload Image","uploading":"Uploading...","verifying":"Verifying...","completed":"Completed!","timeout":"Upload timeout","add":"Add","addons":"Extras","save":"Save","cellSpace":"Cell spacing","search":"Search","ratioLock":"Ratio lock","videoLink":"Video link","settings":"Settings","counterTitle":"Counter title?","folderName":"Folder name","addFolder":"Add folder","add_block":"Add block","counterColor":"Counter color","chooseBlock":"Drag a block","imageEditTitle":"Photo editing","videoEditTitle":"Edit video","size_options":"Size Options","backgroundColor":"Backgorund","backgrounds":"Backgrounds","contactForError":"Report an error","contactForErrorDesc":"Did you come across something unexpected?\\n Click here to report the error","fetureRequest":"Request for additions","pastePageContent":" Paste email content","titleColor":"Title color","agreeToOverride":"I agree to delete the existing content and replace it with copied content.","overridePageContent":"You have chosen to paste the content of another email into this page. \\n The paste will delete the existing content on the page and paste the copied content in its place.","fetureRequestDesc":"Are you missing any feature? \\n Click here to request tools to be added to the editor","copyPageContent":"Copy the contents of the page to another account","copyPageContentDesc":"Click here to copy the page content to your other account","pasteContent":"Paste content from another account","pasteContentDesc":"Click here to paste copied content","generalText":"Here we will write down some general text about our product. This is some general text area completely free","longText":"Here we will write down some general text about our product. This is some general text area that is completely free, you can write here what you feel like as long as it is relevant content.","textBlock":"Text block","timeCounter":"Time counter","counterBlock":"Counter block","bulletBlock":"Bullets block","singleImage":"Single image","allImages":"All images","bulletWithImageBlock":"Bullet with images","header1block":"Main title","bold":"Bold","underline":"Underline","italic":"Italic","strikeThrough":"Strike through","forecolor":"Forecolor","threeCells":"Three cells","twoCells":"Two cells","backcolor":"Background text","fontFamily":"Font","fontSize":"Font size","direction":"Direction","right":"Right","left":"Left","center":"Center","justify":"Justify","unLink":"Unlink","appendImage":"Add an image","appendVideo":"Add an video","blocks":"Blocks","page":"Page","block":"Block","section":"Section","pageSetting":"Page settings","text":"Text","clear":"Clear","articleTitle":"Article title","Header1Web":"Title","shortText":"Something important that customers need to know","articleMore":"Show more","emoji":"Emoji","lineHeight":"Line height","textAlign":"Text align","sendTest":"Send test","article":"Article","Duplicate":"Duplicate","component_selected":"Component selected","component_unselected":"Component unselected","add_section":"Add section","remove_block":"Remove block","duplicate_block":"Duplicate block","BulletsWithArticle":"Bullets With Article","sendTestMail":"Send Test Message","blockMenuInfo":"Click on the tag and click again to set it off *","fontNameWholePage":"Whole Page Font name","AddNewAddress":"Add new Input","send":"Send","emailAddress":"Email Address","DragHere":"Drag here","imageSize":"Image size","alignImage":"Align image","fullWidthOnMobile":"Full width on mobile","altText":"Alt text","gallery":"Gallery","padding":"Padding","size":"Size","coming_soon":"Coming Soon","width":"Width","height":"Height","dateAndTime":"Date and Time","hour":"Hour","minutes":"Minute","alignButton":"Align button","main":"Main","favorites":"Favorites","mediaType":"Media type","filter":"Filter","addEmoji":"Add Emoji","addBackcolor":"Add Backcolor","addForcolor":"Add Forecolor","lastColors":"Last Colors","colorsInPage":"Colors in page","openNewTab":"New window","stayOnSamePage":"Same window","desktopMode":"Desktop mode only","addressWithExample":"Address (Example:Petah Tikva,Sibim 18)","maps":"Maps","map":"Map","layout":"Layout","event":"Event","audio":"Audio","addNew":"Add New","animations":"Animations","urlAddress":"Url Address","can_Open_Gallery_With_Double_Click_On_The_Image":"You can open the gallery by Double click on the Image","uploadFile":"Upload File","FileSelection":"File Selection","yes,Create":"Yes, Create","letterSpacing":"Letter Spacing","spacing":"Spacing","advanced":"Advanced","Select_an_element_to_edit_its_properties":"Select an Block, Button, or Text to edit its properties","what_the_phone_number_to_send_msg_to":"What the phone number to send message to","email_body_if_needed":"Email body if needed","what_the_phone_number":"What the phone number to call to","what_the_email_address":"What the email address to send to","active_on-scroll":"Active on scroll","active_on-hover":"Active on mouse over","drag_or_click":"Drag or click","heading-1":"Heading 1","svg-element":"SVG Element","divider-element":"Divider Element","iframe":"Iframe","html-code":"Html Code","video with text":"Video with text","image with text":"Image with text","quotes-block":"quotes block","animation_deleted":"Animation deleted","animation_added":"Animation added","show_on_desktop":"Show on desktop","show_on_mobile":"Show on mobile","show_on_tablet":"Show on tablet","properties":"Properties","ID_with_description":"ID (advance)","on_hover":"On mouse over","on_scroll":"On scroll","menu-widget":"Menu widget","setting_section":"Setting section","setting_block":"Setting block","remove_element":"Remove element","drag_element":"Drag element","max_width":"Max width","open_gallery_icons":"Open gallery icons","number_size":"Number size","large":"Large","medium":"Medium","small":"Small","extra-large":"Extra Large","without_radius":"Without radius","design_custom_list":"Design custom list","display_mode":"Display mode","description":"Description","title":"Title","keywords":"Keywords","favicon":"Favicon","cancel":"Cancel","standard":"Standard","ready_to_publish":"Ready to publish","lets_set_some_seo":"Let\'s set some SEO","We_are_building_your_page":"We are building your page","fade_in":"Fade in","fade_in_down":"Fade in down","back_in_down":"Back in down","back_in_right":"Back in right","bounce":"Bounce","tada":"Tada!!","saved_theme":"Saved theme","go_back":"Go back","open_colorpicker":"Open colorpicker","colors_that_created_from_image":"Colors that created from image","publish_success":"Publish success","open_the_page":"Open the page","close":"Close","title_size":"Title size","ilustrations":"Ilustrations","svg":"SVG","click_to_refresh":"Click to refresh","error_client_disconnected":"Opps! we are disconnected from the server. Please try again later.","connection_error":"Connection error 😱 ","typography":"Typography","more_colors":"More colors","button_submit_form":"Send","get_started":"Get started","design_form":"Design form","input":"Input","placeholder":"Placeholder","default_value":"Default value","required":"Required","after_submission":"On Submission?","stay_at_page":"Nothing","redirect":"Redirect","form:background":"Placeholder Color","hidden":"Hidden","form_settings":"Form settings","hidden_field":"Hidden field","advance_setting":"Advance setting","label":"Label","radio-group":"Radio group","items_in_radio_group":"Items in radio group","add_item":"Add item","textarea":"Textarea","items_in_menu":"Items in menu","checkbox":"Checkbox","send_form_only_if_checked":"Send form only if checked","select_fields_to_edit":"Select fields to edit","url_parameters":"URL parameters","hidden_form_field_info":"text required here..","required_form_field_info":"text required here..","url_param":"URL parameter","please_wait_downloading_new_version":"Please wait downloading new version","allow_send_form_only_if_checked":"Allow send form only if checked","field_settings":"Field settings","inner_blocks":"Center","automations":"Automations","drag_here":"Drag here","advance_options":"Advance Options","copied":"Copied","duplicate_template_code":"Duplicate Template Code","click_to_copy":"Click To Copy","list-check":"Elements","drag_section":"Drag section","card":"Card","list-settings":"Advance","icons_list_micro_copy":"If a bullet doesn\'t look serious enough, you can use an icon instead.","typography_micro_copy":"Typography your text with the help of the typography settings.","anchor_name_micro_copy":"Name it now, find it later in the link editor.","create_anchor":"Need Anchor? click here","image_micro_copy":"Click on the button, or dblClick on the image to add an image(but a beautiful one).","after_form_subscribed":"What we Should do after form subscribed","add_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","remove_user_from_mailinglist_after_subscribed":"Pick mailinglist the user subscribed","available_fields":"My fields","add_urlAddress_from_media_site":"Add url from media site","background_fields":"Background fields","label_color":"Label color","make_it_default_value":"Make it default value","show_success_popup":"Show success popup","user_will_redirect_to":"User will redirect to","where_to_redirect":"Where to redirect?","none":"None","my_form":"My form","search_my_fields":"Search my fields","choose_an_option":"Choose an option","checkbox_checked_as_default":"Checked as default","form":"Form","sync_all_forms":"Sync all forms","send_the_data_to":"Need to send the data to crm ?","color:label":"Color Text","field_background":"Field Background","paragraph":"Paragraph","horizontal_shadow_length":"Horizontal Shadow Length","vertical_shadow_length":"Vertical Shadow Length","blur_radius":"Blur Radius","spread_radius":"Spread Radius","shadow_color":"Shadow Color","inset":"Inset","box_shadow:info":"Adds shadow effects around an element\'s frame.","design_for_phone":"Mobile Design","design_for_desktop":"Desktop Design","number_example":"05000000","website_example":"www.example.com","email_example":"example@example.com","link_target":"Link Target","open_in_new_tab":"Open in new tab","open_in_same_tab":"Open in same tab","open_in_parent_frame":"Open in parent frame","open_in_top_frame":"Open in top frame","user_menu":"User Menu","send_test_emails":"Send Test Emails","attached_files":"Attached Files","make_newsletter_as_event":"Make Newsletter as Event","add_files":"Add Files","max_files_reached":"Maximum number of files reached","make_event":"Make Event","name_and_subject":"Name & Subject","enter_email_addresses":"Enter email addresses (comma or enter to add)","invalid_email_error":"Please enter a valid email address","no_emails_error":"Please add at least one email address","create_event":"Create Event","start_date_time":"Start Date & Time","end_date_time":"End Date & Time","location":"Location","link_optional":"Link (Optional)","save_event":"Save Event","cancel_event":"Cancel Event","confirm_cancel":"Are you sure you want to cancel?","creating_event":"Creating Event...","event_created":"Event Created!","end_after_start_error":"End date/time must be after start date/time","enter_event_location":"Enter event location","enter_event_link":"Enter event link","logout":"Logout","details":"Details","subject":"Subject","subtitle":"Subtitle","enter_subject":"Enter subject","back":"Back","apply":"Apply","automation_settings":"Automation Settings","what_should_happen":"What should happen?","add_to_mailing_list_question":"Add to mailing list?","remove_from_mailing_list_question":"Remove from mailing list?","select_mailing_lists":"Select mailing lists","selected":"Selected","automation_link_preview":"Automation Link","apply_automation":"Apply Automation"}'),Md="spacer";function Id(t){let{channel:e}=t;return{id:"14g55g123ss#$",name:Md,menu:t=>{let{Compose:e}=t;return new e({type:Md,props:{height:"200px"}},{group:"elements",name:Md,puzzle:'<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">\n<line x1="1" y1="12" x2="25" y2="12" stroke="black" stroke-width="2" stroke-linecap="round"/>\n<path d="M5.25 1H0.75V5.5M11.25 1H14.25M20.25 1H24.75V5.5M24.75 25H0.75V19H24.75V25Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',tags:[Md],index:null})},lazy:t=>{s.e(6085).then(s.bind(s,76085)).then((e=>{t(e.default())}))}}}class $d{constructor(t){return this.props=t,this.init(t)}init(t){const e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.plugins||[];let n=t.languageJson;const r=t.language||"he";n||(n="he"===r?Bd:Od);const i=jc(r)?"rtl":"ltr",o=jc(r)?"right":"left";t.navbar||(t.navbar={}),Array.isArray(t.components)&&0===t.components.length&&(t.components=null),t.width||(t.width="650px",console.warn("using default width of 650px or 1000px.")),t.theme||(t.theme={}),t.textConfigure||(t.textConfigure={}),"object"!=typeof t?.configure&&(t.configure={}),"object"!=typeof t?.configure?.text&&(t.configure.text={}),t.configure.text={onClickMagic:t=>{const{injectEditor:e,insertContent:n,insertContentHtml:r,getJSON:i,getHTML:o,getText:s,selectAll:a}=t;a();const l=document.createElement("cdtr-text-prompt-editor");l.context=s(),l.addEventListener("text-generation-start",(t=>{a()})),l.addEventListener("text-generation-chunk",(t=>{n(t.detail.chunk)})),l.addEventListener("text-generation-complete",(t=>{a(),r(t.detail.text)})),l.addEventListener("text-generation-error",(t=>{console.error("Text generation error:",t.detail.error)})),e(l)}};const s={documentName:t.documentName,editable:t.editable,mode:t.mode,user:t.user,collaborator:t.collaborator,components:t.components||[{_id:"0-root",type:"root",props:{style:{background:"#fff"}},children:["0-section"]},{_id:"0-section",type:"section",props:{style:{width:t.width,margin:"auto",height:"100%"}},children:[]}],channel:"newsletter",userMenu:{onLogout:()=>{"function"==typeof t?.userMenu?.onLogout&&t?.userMenu?.onLogout()}},onNextStep:e=>{"function"==typeof t.onNextStep&&t.onNextStep(e)},onSendTestEmail:t?.onSendTestEmail?e=>{"function"==typeof t.onSendTestEmail&&t.onSendTestEmail(e)}:null,attachFiles:t?.attachFiles?{files:t?.attachFiles?.files||[],lazyLoad:t?.attachFiles?.lazyLoad||null,maxFiles:t?.attachFiles?.maxFiles||1,maxFileSizeMB:t?.attachFiles?.maxFileSizeMB||"0.5",save:e=>{"function"==typeof t.attachFiles.save&&t.attachFiles.save(e)},remove:e=>{"function"==typeof t.attachFiles.remove&&t.attachFiles.remove(e)}}:null,makeEvent:t?.makeEvent?{initialStartDate:t?.makeEvent?.initialStartDate||"",initialStartTime:t?.makeEvent?.initialStartTime||"",initialEndDate:t?.makeEvent?.initialEndDate||"",initialEndTime:t?.makeEvent?.initialEndTime||"",initialLocation:t?.makeEvent?.initialLocation||"",initialLink:t?.makeEvent?.initialLink||"",save:e=>{"function"==typeof t.makeEvent.save&&t.makeEvent.save(e)},cancel:()=>{"function"==typeof t.makeEvent.cancel&&t.makeEvent.cancel()}}:null,subjectAndName:t?.subjectAndName?{name:t?.subjectAndName?.name||"",subject:t?.subjectAndName?.subject||"",subtitle:t?.subjectAndName?.subtitle||"",save:e=>{"function"==typeof t.subjectAndName.save&&t.subjectAndName.save(e)}}:null,savedDebounce:t.savedDebounce||1e3,target:t.target||function(){const t=document.createElement("div");return t.id="root",document.body.appendChild(t),t}(),theme:{},language:r,languageJson:n,editor:{props:{onSave:e=>{console.log("%csync completed","color:green;font-size:20px;",e),"function"==typeof t.onSave&&t.onSave(e)},onChange:()=>{}},configure:{text:t?.configure?.text,editorProps:{fonts:t.fonts||[{id:"Arial",cssRule:"Arial, Helvetica, sans-serif",name:"Arial",language:["en","he"],url:null},{id:"Times New Roman",cssRule:"Times New Roman, Times, Beskerville, Georgia, serif",name:"Times New Roman",language:["en","he"],url:null},{id:"Courier New",cssRule:"Courier New, Courier, monospace",name:"Courier New"},{id:"Tahoma",cssRule:"Tahoma, Geneva, sans-serif",name:"Tahoma"},{id:"Verdana",cssRule:"Verdana, Geneva, sans-serif",name:"Verdana"},{id:"Roboto",cssRule:"Roboto, sans-serif",name:"Roboto (google)",url:"https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap"}],menu:{},mergeTags:t.mergeTags||{},mailingLists:t.mailingLists||{},automations:t.automations||{},linkPicker:t.linkPicker||{savedVariables:t.savedVariables||[]}},onSaveBlock:t.onSaveBlock,onDeleteBlock:t.onDeleteBlock,blocksCategories:t.blocksCategories,customBlocks:t.customBlocks,mediaGalleryManager:t.mediaGalleryManager||function(){},blocks:[Ic(_d()),Ic(kd()),Ic(Cd()),Ic({name:"twoButtons",id:"2 button",icon:[{type:"button"},{type:"button"}],tags:["button"],children:[Ed({text:n.readMore}),Ed({text:n.readMore})]}),Ic({name:"threeButtons",id:"3 button",icon:[{type:"button"},{type:"button"},{type:"button"}],tags:["button"],children:[Ed({text:n.readMore}),Ed({text:n.readMore}),Ed({text:n.readMore})]}),Ic(vd({direction:i,textAlign:o,homePageText:Bd.home_page})),Ic((a={text:n.generalText},{name:"quote",icon:[{type:"quote"}],tags:["quote"],children:[wd(a)]})),Ic({name:"image | quote",icon:[{type:"image"},{type:"quote"}],tags:[],children:[wd({text:n.generalText,direction:i,textAlign:o}),xd({width:200,height:150})]}),Ic({name:"quote | image",icon:[{type:"quote"},{type:"image"}],tags:[],children:[xd({width:200,height:150}),wd({text:n.generalText,direction:i,textAlign:o})]}),Ic({name:"twoCards",icon:[{type:"article"},{type:"article"}],tags:["article","card"],children:[Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),Ic({name:"threeCards",icon:[{type:"article"},{type:"article"},{type:"article"}],tags:["article","card"],children:[Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),Ad({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]}),Ic({name:"card | image",icon:[{type:"image"},{type:"article"}],tags:["article","card","image","readmore"],children:[Sd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o}),xd({width:300,height:150})]}),Ic({name:"image | card",icon:[{type:"article"},{type:"image"}],tags:["article","card","image","readmore"],children:[xd({width:300,height:150}),Sd({heading:n.header1block,text:n.shortText,direction:i,textAlign:o})]})],plugins:[od,ld,pd.configure(t.textConfigure),dd.configure(t.textConfigure),cd.configure(t.textConfigure),sd.configure(t.textConfigure),ud,fd,gd,yd,Id,...e]},navbar:{components:t.navbar.components}}};var a;return new id(s)}(t);return e}}"undefined"!=typeof window&&(window.cdtrStarter=$d)})(),a})()));