var e=Object.defineProperty,t=Object.getOwnPropertyNames;import{A as n,_ as i,M as r,N as o,O as a,P as s,g as l,m as c,W as d,f as u,e as h,C as p,aB as m,aC as f,a4 as g,aD as y,t as v,B as b,G as w,a as x,aE as _,v as C,al as S,L as k,aF as E,aG as $,aH as M,aI as R,V as A,aJ as T,aK as L,ae as j,l as O,af as N,aL as I,a9 as D,am as P,a6 as z,r as F,aM as B,aA as H,ai as W,aN as U,aO as V,ab as G,aP as Y,aQ as K,i as Q,K as q,p as Z,aR as X,d as J,x as ee,w as te,R as ne,I as ie,H as re,q as oe,a1 as ae,a0 as se,o as le,E as ce,ad as de,a3 as ue,ag as he,U as pe,y as me,h as fe,n as ge,a5 as ye,D as ve,aj as be,aS as we,aT as xe,aU as _e,aV as Ce,a8 as Se,T as ke,aW as Ee,ak as $e,aX as Me,aY as Re,aZ as Ae,a_ as Te,a$ as Le,b0 as je,b1 as Oe}from"./vendor_antd_form-8c7d003b.js";import{p as Ne,C as Ie,K as De,B as Pe,c as ze,u as Fe,r as Be,I as He,D as We,E as Ue,M as Ve,a as Ge,b as Ye,R as Ke,i as Qe,g as qe,d as Ze,e as Xe,f as Je,h as et,j as tt,k as nt,l as it,m as rt,n as ot,o as at,S as st,q as lt,s as ct,t as dt,v as ut,L as ht,w as pt,x as mt,H as ft,F as gt,y as yt,z as vt,W as bt,A as wt,G as xt,J as _t,N as Ct,O as St,P as kt,Q as Et,T as $t,U as Mt,V as Rt,X as At,Y as Tt,Z as Lt}from"./vendor_antd_table-5605ad8b.js";var jt,Ot,Nt=(jt={"yaymail-main.tsx-0f306554.js"(t,jt){var Ot,Nt,It={exports:{}},Dt={},Pt=window.React,zt=Symbol.for("react.element"),Ft=Symbol.for("react.fragment"),Bt=Object.prototype.hasOwnProperty,Ht=Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wt={key:!0,ref:!0,__self:!0,__source:!0};function Ut(e,t,n){var i,r={},o=null,a=null;for(i in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)Bt.call(t,i)&&!Wt.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:zt,type:e,key:o,ref:a,props:r,_owner:Ht.current}}Dt.Fragment=Ft,Dt.jsx=Ut,Dt.jsxs=Ut,It.exports=Dt;var Vt=It.exports;const Gt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},Yt=window.React;var Kt=function(e,t){return Yt.createElement(n,i({},e,{ref:t,icon:Gt}))};const Qt=Yt.forwardRef(Kt),qt=window.React;let Zt=function(e){r(n,e);var t=o(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return s(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){const{message:e,description:t,children:n}=this.props,{error:i,info:r}=this.state,o=r&&r.componentStack?r.componentStack:null,a=void 0===e?(i||"").toString():e,s=void 0===t?o:t;return i?qt.createElement(hn,{type:"error",message:a,description:qt.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},s)}):n}}]),n}(qt.Component);const Xt=Zt,Jt=(e,t,n,i,r)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${t}`,[`${r}-icon`]:{color:n}}),en=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:i,marginSM:r,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,alertIconSizeLG:u,colorText:h,paddingContentVerticalSM:p,alertPaddingHorizontal:m,paddingMD:f,paddingContentHorizontalLG:g,colorTextHeading:y}=e;return{[t]:Object.assign(Object.assign({},d(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${p}px ${m}px`,wordWrap:"break-word",borderRadius:l,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:s},"&-message":{color:h},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},\n padding-top ${n} ${c}, padding-bottom ${n} ${c},\n margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",paddingInline:g,paddingBlock:f,[`${t}-icon`]:{marginInlineEnd:r,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:i,color:y,fontSize:a},[`${t}-description`]:{display:"block"}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},tn=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:r,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:d,colorInfo:u,colorInfoBorder:h,colorInfoBg:p}=e;return{[t]:{"&-success":Jt(r,i,n,e,t),"&-info":Jt(p,h,u,e,t),"&-warning":Jt(s,a,o,e,t),"&-error":Object.assign(Object.assign({},Jt(d,c,l,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},nn=e=>{const{componentCls:t,iconCls:n,motionDurationMid:i,marginXS:r,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=e;return{[t]:{"&-action":{marginInlineStart:r},[`${t}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:o,lineHeight:`${o}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${i}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${i}`,"&:hover":{color:s}}}}},rn=e=>[en(e),tn(e),nn(e)],on=l("Alert",(e=>{const{fontSizeHeading3:t}=e,n=c(e,{alertIconSizeLG:t,alertPaddingHorizontal:12});return[rn(n)]}));var an=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{icon:t,prefixCls:n,type:i}=e,r=ln[i]||null;return t?m(t,sn.createElement("span",{className:`${n}-icon`},t),(()=>({className:h(`${n}-icon`,{[t.props.className]:t.props.className})}))):sn.createElement(r,{className:`${n}-icon`})},dn=e=>{const{isClosable:t,closeText:n,prefixCls:i,closeIcon:r,handleClose:o}=e;return t?sn.createElement("button",{type:"button",onClick:o,className:`${i}-close-icon`,tabIndex:0},n?sn.createElement("span",{className:`${i}-close-text`},n):r):null},un=e=>{var{description:t,prefixCls:n,message:i,banner:r,className:o,rootClassName:a,style:s,onMouseEnter:l,onMouseLeave:c,onClick:d,afterClose:m,showIcon:f,closable:g,closeText:y,closeIcon:v=sn.createElement(Ie,null),action:b}=e,w=an(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]);const[x,_]=sn.useState(!1),C=sn.useRef(null),{getPrefixCls:S,direction:k}=sn.useContext(u),E=S("alert",n),[$,M]=on(E),R=e=>{var t;_(!0),null===(t=w.onClose)||void 0===t||t.call(w,e)},A=!!y||g,T=(()=>{const{type:e}=w;return void 0!==e?e:r?"warning":"info"})(),L=!(!r||void 0!==f)||f,j=h(E,`${E}-${T}`,{[`${E}-with-description`]:!!t,[`${E}-no-icon`]:!L,[`${E}-banner`]:!!r,[`${E}-rtl`]:"rtl"===k},o,a,M),O=Ne(w,{aria:!0,data:!0});return $(sn.createElement(p,{visible:!x,motionName:`${E}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:m},(e=>{let{className:n,style:r}=e;return sn.createElement("div",Object.assign({ref:C,"data-show":!x,className:h(j,n),style:Object.assign(Object.assign({},s),r),onMouseEnter:l,onMouseLeave:c,onClick:d,role:"alert"},O),L?sn.createElement(cn,{description:t,icon:w.icon,prefixCls:E,type:T}):null,sn.createElement("div",{className:`${E}-content`},i?sn.createElement("div",{className:`${E}-message`},i):null,t?sn.createElement("div",{className:`${E}-description`},t):null),b?sn.createElement("div",{className:`${E}-action`},b):null,sn.createElement(dn,{isClosable:!!A,closeText:y,prefixCls:E,closeIcon:v,handleClose:R}))})))};un.ErrorBoundary=Xt;const hn=un,pn=window.React,mn=pn.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.className,a=e.duration,s=void 0===a?4.5:a,l=e.eventKey,c=e.content,d=e.closable,u=e.closeIcon,p=void 0===u?"x":u,m=e.props,f=e.onClick,g=e.onNoticeClose,y=e.times,w=pn.useState(!1),x=v(w,2),_=x[0],C=x[1],S=function(){g(l)};pn.useEffect((function(){if(!_&&s>0){var e=setTimeout((function(){S()}),1e3*s);return function(){clearTimeout(e)}}}),[s,_,y]);var k="".concat(n,"-notice");return pn.createElement("div",i({},m,{ref:t,className:h(k,o,b({},"".concat(k,"-closable"),d)),style:r,onMouseEnter:function(){C(!0)},onMouseLeave:function(){C(!1)},onClick:f}),pn.createElement("div",{className:"".concat(k,"-content")},c),d&&pn.createElement("a",{tabIndex:0,className:"".concat(k,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==De.ENTER||S()},onClick:function(e){e.preventDefault(),e.stopPropagation(),S()}},p))})),fn=window.React,gn=window.ReactDOM.createPortal;var yn=fn.forwardRef((function(e,t){var n=e.prefixCls,r=void 0===n?"rc-notification":n,o=e.container,a=e.motion,s=e.maxCount,l=e.className,c=e.style,d=e.onAllRemoved,u=fn.useState([]),p=v(u,2),m=p[0],f=p[1],g=function(e){var t,n=m.find((function(t){return t.key===e}));null==n||null===(t=n.onClose)||void 0===t||t.call(n),f((function(t){return t.filter((function(t){return t.key!==e}))}))};fn.useImperativeHandle(t,(function(){return{open:function(e){f((function(t){var n,i=w(t),r=i.findIndex((function(t){return t.key===e.key})),o=x({},e);return r>=0?(o.times=((null===(n=t[r])||void 0===n?void 0:n.times)||0)+1,i[r]=o):(o.times=0,i.push(o)),s>0&&i.length>s&&(i=i.slice(-s)),i}))},close:function(e){g(e)},destroy:function(){f([])}}}));var y=fn.useState({}),b=v(y,2),C=b[0],S=b[1];fn.useEffect((function(){var e={};m.forEach((function(t){var n=t.placement,i=void 0===n?"topRight":n;i&&(e[i]=e[i]||[],e[i].push(t))})),Object.keys(C).forEach((function(t){e[t]=e[t]||[]})),S(e)}),[m]);var k=fn.useRef(!1);if(fn.useEffect((function(){Object.keys(C).length>0?k.current=!0:k.current&&(null==d||d(),k.current=!1)}),[C]),!o)return null;var E=Object.keys(C);return gn(fn.createElement(fn.Fragment,null,E.map((function(e){var t=C[e].map((function(e){return{config:e,key:e.key}})),n="function"==typeof a?a(e):a;return fn.createElement(_,i({key:e,className:h(r,"".concat(r,"-").concat(e),null==l?void 0:l(e)),style:null==c?void 0:c(e),keys:t,motionAppear:!0},n,{onAllRemoved:function(){!function(e){S((function(t){var n=x({},t);return(n[e]||[]).length||delete n[e],n}))}(e)}}),(function(e,t){var n=e.config,o=e.className,a=e.style,s=n.key,l=n.times,c=n.className,d=n.style;return fn.createElement(mn,i({},n,{ref:t,prefixCls:r,className:h(o,c),style:x(x({},a),d),times:l,key:s,eventKey:s,onNoticeClose:g}))}))}))),o)})),vn=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved"];const bn=window.React;var wn=function(){return document.body},xn=0;function Cn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?wn:t,i=e.motion,r=e.prefixCls,o=e.maxCount,a=e.className,s=e.style,l=e.onAllRemoved,c=C(e,vn),d=bn.useState(),u=v(d,2),h=u[0],p=u[1],m=bn.useRef(),f=bn.createElement(yn,{container:h,ref:m,prefixCls:r,motion:i,maxCount:o,className:a,style:s,onAllRemoved:l}),g=bn.useState([]),y=v(g,2),b=y[0],x=y[1],_=bn.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),i=0;i{const{componentCls:t,iconCls:n,boxShadow:i,colorText:r,colorSuccess:o,colorError:a,colorWarning:s,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:h,marginXS:p,paddingXS:m,borderRadiusLG:f,zIndexPopup:g,contentPadding:y,contentBg:v}=e,b=`${t}-notice`,w=new S("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:m,transform:"translateY(0)",opacity:1}}),x=new S("MessageMoveOut",{"0%":{maxHeight:e.height,padding:m,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),_={padding:m,textAlign:"center",[`${t}-custom-content > ${n}`]:{verticalAlign:"text-bottom",marginInlineEnd:p,fontSize:c},[`${b}-content`]:{display:"inline-block",padding:y,background:v,borderRadius:f,boxShadow:i,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:s},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:l}};return[{[t]:Object.assign(Object.assign({},d(e)),{color:r,position:"fixed",top:p,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:w,animationDuration:h,animationPlayState:"paused",animationTimingFunction:u},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:x,animationDuration:h,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[b]:Object.assign({},_)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},_),{padding:0,textAlign:"start"})}]},kn=l("Message",(e=>{const t=c(e,{height:150});return[Sn(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));function En(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),i=()=>{null==t||t()};return i.then=(e,t)=>n.then(e,t),i.promise=n,i}var $n=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{top:n,prefixCls:i,getContainer:r,maxCount:o,duration:a=jn,rtl:s,transitionName:l,onAllRemoved:c}=e,{getPrefixCls:d,getPopupContainer:p}=Ln.useContext(u),m=i||d("message"),[,f]=kn(m),g=Ln.createElement("span",{className:`${m}-close-x`},Ln.createElement(Ie,{className:`${m}-close-icon`})),[y,v]=Cn({prefixCls:m,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>h(f,s?`${m}-rtl`:""),motion:()=>function(e,t){return{motionName:null!=t?t:`${e}-move-up`}}(m,l),closable:!1,closeIcon:g,duration:a,getContainer:()=>(null==r?void 0:r())||(null==p?void 0:p())||document.body,maxCount:o,onAllRemoved:c});return Ln.useImperativeHandle(t,(()=>Object.assign(Object.assign({},y),{prefixCls:m,hashId:f}))),v}));let Nn=0;function In(e){const t=Ln.useRef(null);return[Ln.useMemo((()=>{const e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){const e=()=>{};return e.then=()=>{},e}const{open:i,prefixCls:r,hashId:o}=t.current,a=`${r}-notice`,{content:s,icon:l,type:c,key:d,className:u,onClose:p}=n,m=Tn(n,["content","icon","type","key","className","onClose"]);let f=d;return null==f&&(Nn+=1,f=`antd-message-${Nn}`),En((t=>(i(Object.assign(Object.assign({},m),{key:f,content:Ln.createElement(An,{prefixCls:r,type:c,icon:l},s),placement:"top",className:h(c&&`${a}-${c}`,o,u),onClose:()=>{null==p||p(),t()}})),()=>{e(f)})))},i={open:n,destroy:n=>{var i;void 0!==n?e(n):null===(i=t.current)||void 0===i||i.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{i[e]=(t,i,r)=>{let o,a,s;o=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof i?s=i:(a=i,s=r);const l=Object.assign(Object.assign({onClose:s,duration:a},o),{type:e});return n(l)}})),i}),[]),Ln.createElement(On,Object.assign({key:"message-holder"},e,{ref:t}))]}const Dn=window.React,Pn=window.React;function zn(e){return!(!e||!e.then)}const Fn=e=>{const{type:t,children:n,prefixCls:i,buttonProps:r,close:o,autoFocus:a,emitEvent:s,quitOnNullishReturnValue:l,actionFn:c}=e,d=Pn.useRef(!1),u=Pn.useRef(null),[h,p]=E(!1),m=function(){null==o||o.apply(void 0,arguments)};return Pn.useEffect((()=>{let e=null;return a&&(e=setTimeout((()=>{var e;null===(e=u.current)||void 0===e||e.focus()}))),()=>{e&&clearTimeout(e)}}),[]),Pn.createElement(Pe,Object.assign({},ze(t),{onClick:e=>{if(d.current)return;if(d.current=!0,!c)return void m();let t;if(s){if(t=c(e),l&&!zn(t))return d.current=!1,void m(e)}else if(c.length)t=c(o),d.current=!1;else if(t=c(),!t)return void m();(e=>{zn(e)&&(p(!0),e.then((function(){p(!1,!0),m.apply(void 0,arguments),d.current=!1}),(e=>(p(!1,!0),d.current=!1,Promise.reject(e)))))})(t)},loading:h,prefixCls:i},r,{ref:u}),n)};function Bn(e,t,n){var i=t;return!i&&n&&(i="".concat(e,"-").concat(n)),i}function Hn(e,t){var n=e["page".concat(t?"Y":"X","Offset")],i="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[i])&&(n=r.body[i])}return n}const Wn=window.React.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate})),Un=window.React,Vn=window.React.useRef;var Gn={width:0,height:0,overflow:"hidden",outline:"none"},Yn=Un.forwardRef((function(e,t){var n=e.prefixCls,r=e.className,o=e.style,a=e.title,s=e.ariaId,l=e.footer,c=e.closable,d=e.closeIcon,u=e.onClose,p=e.children,m=e.bodyStyle,f=e.bodyProps,g=e.modalRender,y=e.onMouseDown,v=e.onMouseUp,b=e.holderRef,w=e.visible,_=e.forceRender,C=e.width,S=e.height,k=Vn(),E=Vn();Un.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=k.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===E.current?k.current.focus():e||t!==k.current||E.current.focus()}}}));var $,M,R,A={};void 0!==C&&(A.width=C),void 0!==S&&(A.height=S),l&&($=Un.createElement("div",{className:"".concat(n,"-footer")},l)),a&&(M=Un.createElement("div",{className:"".concat(n,"-header")},Un.createElement("div",{className:"".concat(n,"-title"),id:s},a))),c&&(R=Un.createElement("button",{type:"button",onClick:u,"aria-label":"Close",className:"".concat(n,"-close")},d||Un.createElement("span",{className:"".concat(n,"-close-x")})));var T=Un.createElement("div",{className:"".concat(n,"-content")},R,M,Un.createElement("div",i({className:"".concat(n,"-body"),style:m},f),p),$);return Un.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":a?s:null,"aria-modal":"true",ref:b,style:x(x({},o),A),className:h(n,r),onMouseDown:y,onMouseUp:v},Un.createElement("div",{tabIndex:0,ref:k,style:Gn,"aria-hidden":"true"}),Un.createElement(Wn,{shouldUpdate:w||_},g?g(T):T),Un.createElement("div",{tabIndex:0,ref:E,style:Gn,"aria-hidden":"true"}))}));const Kn=window.React,Qn=window.React.useRef;var qn=Kn.forwardRef((function(e,t){var n=e.prefixCls,r=e.title,o=e.style,a=e.className,s=e.visible,l=e.forceRender,c=e.destroyOnClose,d=e.motionName,u=e.ariaId,m=e.onVisibleChanged,f=e.mousePosition,g=Qn(),y=Kn.useState(),b=v(y,2),w=b[0],_=b[1],C={};function S(){var e,t,n,i,r,o=(n={left:(t=(e=g.current).getBoundingClientRect()).left,top:t.top},r=(i=e.ownerDocument).defaultView||i.parentWindow,n.left+=Hn(r),n.top+=Hn(r,!0),n);_(f?"".concat(f.x-o.left,"px ").concat(f.y-o.top,"px"):"")}return w&&(C.transformOrigin=w),Kn.createElement(p,{visible:s,onVisibleChanged:m,onAppearPrepare:S,onEnterPrepare:S,forceRender:l,motionName:d,removeOnLeave:c,ref:g},(function(s,l){var c=s.className,d=s.style;return Kn.createElement(Yn,i({},e,{ref:t,title:r,ariaId:u,prefixCls:n,holderRef:l,style:x(x(x({},d),o),C),className:h(a,c)}))}))}));qn.displayName="Content";const Zn=window.React;function Xn(e){var t=e.prefixCls,n=e.style,r=e.visible,o=e.maskProps,a=e.motionName;return Zn.createElement(p,{key:"mask",visible:r,motionName:a,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,r){var a=e.className,s=e.style;return Zn.createElement("div",i({ref:r,style:x(x({},s),n),className:h("".concat(t,"-mask"),a)},o))}))}const Jn=window.React,ei=window.React.useEffect,ti=window.React.useRef;function ni(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,r=e.zIndex,o=e.visible,a=void 0!==o&&o,s=e.keyboard,l=void 0===s||s,c=e.focusTriggerAfterClose,d=void 0===c||c,u=e.wrapStyle,p=e.wrapClassName,m=e.wrapProps,f=e.onClose,g=e.afterOpenChange,y=e.afterClose,b=e.transitionName,w=e.animation,_=e.closable,C=void 0===_||_,S=e.mask,k=void 0===S||S,E=e.maskTransitionName,R=e.maskAnimation,A=e.maskClosable,T=void 0===A||A,L=e.maskStyle,j=e.maskProps,O=e.rootClassName,N=ti(),I=ti(),D=ti(),P=Jn.useState(a),z=v(P,2),F=z[0],B=z[1],H=$();function W(e){null==f||f(e)}var U=ti(!1),V=ti(),G=null;return T&&(G=function(e){U.current?U.current=!1:I.current===e.target&&W(e)}),ei((function(){a&&(B(!0),M(I.current,document.activeElement)||(N.current=document.activeElement))}),[a]),ei((function(){return function(){clearTimeout(V.current)}}),[]),Jn.createElement("div",i({className:h("".concat(n,"-root"),O)},Ne(e,{data:!0})),Jn.createElement(Xn,{prefixCls:n,visible:k&&a,motionName:Bn(n,E,R),style:x({zIndex:r},L),maskProps:j}),Jn.createElement("div",i({tabIndex:-1,onKeyDown:function(e){if(l&&e.keyCode===De.ESC)return e.stopPropagation(),void W(e);a&&e.keyCode===De.TAB&&D.current.changeActive(!e.shiftKey)},className:h("".concat(n,"-wrap"),p),ref:I,onClick:G,style:x(x({zIndex:r},u),{},{display:F?null:"none"})},m),Jn.createElement(qn,i({},e,{onMouseDown:function(){clearTimeout(V.current),U.current=!0},onMouseUp:function(){V.current=setTimeout((function(){U.current=!1}))},ref:D,closable:C,ariaId:H,prefixCls:n,visible:a&&F,onClose:W,onVisibleChanged:function(e){if(e)M(I.current,document.activeElement)||null===(t=D.current)||void 0===t||t.focus();else{if(B(!1),k&&N.current&&d){try{N.current.focus({preventScroll:!0})}catch(n){}N.current=null}F&&(null==y||y())}var t;null==g||g(e)},motionName:Bn(n,b,w)}))))}const ii=window.React;var ri=function(e){var t=e.visible,n=e.getContainer,r=e.forceRender,o=e.destroyOnClose,a=void 0!==o&&o,s=e.afterClose,l=ii.useState(t),c=v(l,2),d=c[0],u=c[1];return ii.useEffect((function(){t&&u(!0)}),[t]),r||!a||d?ii.createElement(R,{open:t||r||d,autoDestroy:!1,getContainer:n,autoLock:t||d},ii.createElement(ni,i({},e,{destroyOnClose:a,afterClose:function(){null==s||s(),u(!1)}}))):null};ri.displayName="Dialog";const oi=window.React;function ai(e,t){return oi.createElement("span",{className:`${e}-close-x`},t||oi.createElement(Ie,{className:`${e}-close-icon`}))}const si=e=>{const{okText:t,okType:n="primary",cancelText:i,confirmLoading:r,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l}=e,[c]=A("Modal",T());return oi.createElement(oi.Fragment,null,oi.createElement(Pe,Object.assign({onClick:a},l),i||(null==c?void 0:c.cancelText)),oi.createElement(Pe,Object.assign({},ze(n),{loading:r,onClick:o},s),t||(null==c?void 0:c.okText)))};function li(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const ci=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},li("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},li("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:L(e)}]},di=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},d(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${2*e.margin}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${t}-close`]:Object.assign({position:"absolute",top:(e.modalHeaderHeight-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderHeight-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},O(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,\n ${t}-body,\n ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},ui=e=>{const{componentCls:t}=e,n=`${t}-confirm`;return{[n]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${n}-body-wrapper`]:Object.assign({},N()),[`${n}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${n}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,[`+ ${n}-content`]:{marginBlockStart:e.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${e.modalConfirmIconSize+e.marginSM}px)`}},[`${n}-content`]:{color:e.colorText,fontSize:e.fontSize},[`> ${e.iconCls}`]:{flex:"none",marginInlineEnd:e.marginSM,fontSize:e.modalConfirmIconSize,[`+ ${n}-title`]:{flex:1},[`+ ${n}-title + ${n}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.marginSM}}},[`${n}-btns`]:{textAlign:"end",marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${n}-error ${n}-body > ${e.iconCls}`]:{color:e.colorError},[`${n}-warning ${n}-body > ${e.iconCls},\n ${n}-confirm ${n}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${n}-info ${n}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${n}-success ${n}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},hi=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},pi=e=>{const{componentCls:t,antCls:n}=e,i=`${t}-confirm`;return{[t]:{[`${t}-content`]:{padding:0},[`${t}-header`]:{padding:e.modalHeaderPadding,borderBottom:`${e.modalHeaderBorderWidth}px ${e.modalHeaderBorderStyle} ${e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${t}-body`]:{padding:e.modalBodyPadding},[`${t}-footer`]:{padding:`${e.modalFooterPaddingVertical}px ${e.modalFooterPaddingHorizontal}px`,borderTop:`${e.modalFooterBorderWidth}px ${e.modalFooterBorderStyle} ${e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`,marginTop:0}},[i]:{[`${n}-modal-body`]:{padding:`${2*e.padding}px ${2*e.padding}px ${e.paddingLG}px`},[`${i}-body`]:{[`> ${e.iconCls}`]:{marginInlineEnd:e.margin,[`+ ${i}-title + ${i}-content`]:{marginInlineStart:e.modalConfirmIconSize+e.margin}}},[`${i}-btns`]:{marginTop:e.marginLG}}}},mi=l("Modal",(e=>{const t=e.padding,n=e.fontSizeHeading5,i=e.lineHeightHeading5,r=c(e,{modalBodyPadding:e.paddingLG,modalHeaderPadding:`${t}px ${e.paddingLG}px`,modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderHeight:i*n+2*t,modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalIconHoverColor:e.colorIconHover,modalCloseIconColor:e.colorIcon,modalCloseBtnSize:e.fontSize*e.lineHeight,modalConfirmIconSize:e.fontSize*e.lineHeight});return[di(r),ui(r),hi(r),ci(r),e.wireframe&&pi(r),j(r,"zoom")]}),(e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading})));var fi=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{yi={x:e.pageX,y:e.pageY},setTimeout((()=>{yi=null}),100)}),!0);const vi=e=>{var t;const{getPopupContainer:n,getPrefixCls:i,direction:r}=gi.useContext(u),o=t=>{const{onCancel:n}=e;null==n||n(t)},{prefixCls:a,className:s,rootClassName:l,open:c,wrapClassName:d,centered:p,getContainer:m,closeIcon:f,focusTriggerAfterClose:g=!0,visible:y,width:v=520,footer:b}=e,w=fi(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","visible","width","footer"]),x=i("modal",a),_=i(),[C,S]=mi(x),k=h(d,{[`${x}-centered`]:!!p,[`${x}-wrap-rtl`]:"rtl"===r}),E=void 0===b?gi.createElement(si,Object.assign({},e,{onOk:t=>{const{onOk:n}=e;null==n||n(t)},onCancel:o})):b;return C(gi.createElement(D,null,gi.createElement(P,{status:!0,override:!0},gi.createElement(ri,Object.assign({width:v},w,{getContainer:void 0===m?n:m,prefixCls:x,rootClassName:h(S,l),wrapClassName:k,footer:E,visible:null!=c?c:y,mousePosition:null!==(t=w.mousePosition)&&void 0!==t?t:yi,onClose:o,closeIcon:ai(x,f),focusTriggerAfterClose:g,transitionName:z(_,"zoom",e.transitionName),maskTransitionName:z(_,"fade",e.maskTransitionName),className:h(S,s)})))))},bi=window.React;function wi(e){const{icon:t,onCancel:n,onOk:i,close:r,okText:o,okButtonProps:a,cancelText:s,cancelButtonProps:l,confirmPrefixCls:c,rootPrefixCls:d,type:u,okCancel:h,footer:p,locale:m}=e;let v=t;if(!t&&null!==t)switch(u){case"info":v=bi.createElement(Qt,null);break;case"success":v=bi.createElement(f,null);break;case"error":v=bi.createElement(g,null);break;default:v=bi.createElement(y,null)}const b=e.okType||"primary",w=null!=h?h:"confirm"===u,x=null!==e.autoFocusButton&&(e.autoFocusButton||"ok"),[_]=A("Modal"),C=m||_,S=w&&bi.createElement(Fn,{actionFn:n,close:r,autoFocus:"cancel"===x,buttonProps:l,prefixCls:`${d}-btn`},s||(null==C?void 0:C.cancelText));return bi.createElement("div",{className:`${c}-body-wrapper`},bi.createElement("div",{className:`${c}-body`},v,void 0===e.title?null:bi.createElement("span",{className:`${c}-title`},e.title),bi.createElement("div",{className:`${c}-content`},e.content)),void 0===p?bi.createElement("div",{className:`${c}-btns`},S,bi.createElement(Fn,{type:b,actionFn:i,close:r,autoFocus:"ok"===x,buttonProps:a,prefixCls:`${d}-btn`},o||(w?null==C?void 0:C.okText:null==C?void 0:C.justOkText))):p)}const xi=e=>{const{close:t,zIndex:n,afterClose:i,visible:r,open:o,keyboard:a,centered:s,getContainer:l,maskStyle:c,direction:d,prefixCls:u,wrapClassName:p,rootPrefixCls:m,iconPrefixCls:f,theme:g,bodyStyle:y,closable:v=!1,closeIcon:b,modalRender:w,focusTriggerAfterClose:x}=e,_=`${u}-confirm`,C=e.width||416,S=e.style||{},k=void 0===e.mask||e.mask,E=void 0!==e.maskClosable&&e.maskClosable,$=h(_,`${_}-${e.type}`,{[`${_}-rtl`]:"rtl"===d},e.className);return bi.createElement(F,{prefixCls:m,iconPrefixCls:f,direction:d,theme:g},bi.createElement(vi,{prefixCls:u,className:$,wrapClassName:h({[`${_}-centered`]:!!e.centered},p),onCancel:()=>null==t?void 0:t({triggerCancel:!0}),open:o,title:"",footer:null,transitionName:z(m,"zoom",e.transitionName),maskTransitionName:z(m,"fade",e.maskTransitionName),mask:k,maskClosable:E,maskStyle:c,style:S,bodyStyle:y,width:C,zIndex:n,afterClose:i,keyboard:a,centered:s,getContainer:l,closable:v,closeIcon:b,modalRender:w,focusTriggerAfterClose:x},bi.createElement(wi,Object.assign({},e,{confirmPrefixCls:_}))))},_i=[];var Ci=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);re&&e.triggerCancel));e.onCancel&&o&&e.onCancel.apply(e,[()=>{}].concat(w(i.slice(1))));for(let e=0;e<_i.length;e++)if(_i[e]===a){_i.splice(e,1);break}Fe(t)}function o(e){var{okText:i,cancelText:r,prefixCls:o,getContainer:a}=e,s=Ci(e,["okText","cancelText","prefixCls","getContainer"]);clearTimeout(n),n=setTimeout((()=>{const e=T(),{getPrefixCls:n,getIconPrefixCls:l,getTheme:c}=B(),d=n(void 0,ki),u=o||`${d}-modal`,h=l(),p=c();let m=a;!1===m&&(m=void 0),Be(Si.createElement(xi,Object.assign({},s,{getContainer:m,prefixCls:u,rootPrefixCls:d,iconPrefixCls:h,okText:i,locale:e,theme:p,cancelText:r||e.cancelText})),t)}))}function a(){for(var t=arguments.length,n=new Array(t),a=0;a{"function"==typeof e.afterClose&&e.afterClose(),r.apply(this,n)}}),i.visible&&delete i.visible,o(i)}return o(i),_i.push(a),{destroy:a,update:function(e){i="function"==typeof e?e(i):Object.assign(Object.assign({},i),e),o(i)}}}function $i(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Mi(e){return Object.assign(Object.assign({},e),{type:"info"})}function Ri(e){return Object.assign(Object.assign({},e),{type:"success"})}function Ai(e){return Object.assign(Object.assign({},e),{type:"error"})}function Ti(e){return Object.assign(Object.assign({},e),{type:"confirm"})}const Li=window.React,ji=(e,t)=>{let{afterClose:n,config:i}=e;var r;const[o,a]=Li.useState(!0),[s,l]=Li.useState(i),{direction:c,getPrefixCls:d}=Li.useContext(u),h=d("modal"),p=d(),m=function(){a(!1);for(var e=arguments.length,t=new Array(e),n=0;ne&&e.triggerCancel));s.onCancel&&i&&s.onCancel.apply(s,[()=>{}].concat(w(t.slice(1))))};Li.useImperativeHandle(t,(()=>({destroy:m,update:e=>{l((t=>Object.assign(Object.assign({},t),e)))}})));const f=null!==(r=s.okCancel)&&void 0!==r?r:"confirm"===s.type,[g]=A("Modal",H.Modal);return Li.createElement(xi,Object.assign({prefixCls:h,rootPrefixCls:p},s,{close:m,open:o,afterClose:()=>{var e;n(),null===(e=s.afterClose)||void 0===e||e.call(s)},okText:s.okText||(f?null==g?void 0:g.okText:null==g?void 0:g.justOkText),direction:s.direction||c,cancelText:s.cancelText||(null==g?void 0:g.cancelText)}))},Oi=Li.forwardRef(ji),Ni=window.React;let Ii=0;const Di=Ni.memo(Ni.forwardRef(((e,t)=>{const[n,i]=function(){const[e,t]=Dn.useState([]);return[e,Dn.useCallback((e=>(t((t=>[].concat(w(t),[e]))),()=>{t((t=>t.filter((t=>t!==e))))})),[])]}();return Ni.useImperativeHandle(t,(()=>({patchElement:i})),[]),Ni.createElement(Ni.Fragment,null,n)}))),Pi=e=>{const{componentCls:t,width:n,notificationMarginEdge:i}=e,r=new S("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),o=new S("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new S("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:r}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:i,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}},zi=e=>{const{iconCls:t,componentCls:n,boxShadow:i,fontSizeLG:r,notificationMarginBottom:o,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:h,notificationBg:p,notificationPadding:m,notificationMarginEdge:f,motionDurationMid:g,motionEaseInOut:y,fontSize:v,lineHeight:b,width:w,notificationIconSize:x,colorText:_}=e,C=`${n}-notice`,k=new S("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:w},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),E=new S("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:o,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}}),$={position:"relative",width:w,maxWidth:`calc(100vw - ${2*f}px)`,marginBottom:o,marginInlineStart:"auto",padding:m,overflow:"hidden",lineHeight:b,wordWrap:"break-word",background:p,borderRadius:a,boxShadow:i,[`${n}-close-icon`]:{fontSize:v,cursor:"pointer"},[`${C}-message`]:{marginBottom:e.marginXS,color:h,fontSize:r,lineHeight:e.lineHeightLG},[`${C}-description`]:{fontSize:v,color:_},[`&${C}-closable ${C}-message`]:{paddingInlineEnd:e.paddingLG},[`${C}-with-icon ${C}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+x,fontSize:r},[`${C}-with-icon ${C}-description`]:{marginInlineStart:e.marginSM+x,fontSize:v},[`${C}-icon`]:{position:"absolute",fontSize:x,lineHeight:0,[`&-success${t}`]:{color:s},[`&-info${t}`]:{color:l},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${C}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${C}-btn`]:{float:"right",marginTop:e.marginSM}};return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:f,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[C]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[C]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:y,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:y,animationFillMode:"both",animationDuration:g,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:k,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:E,animationPlayState:"running"}}),Pi(e)),{"&-rtl":{direction:"rtl",[`${C}-btn`]:{float:"left"}}})},{[n]:{[C]:Object.assign({},$)}},{[`${C}-pure-panel`]:Object.assign(Object.assign({},$),{margin:0})}]},Fi=l("Notification",(e=>{const t=e.paddingMD,n=e.paddingLG,i=c(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:.55*e.controlHeightLG,notificationMarginBottom:e.margin,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginEdge:e.marginLG,animationMaxHeight:150});return[zi(i)]}),(e=>({zIndexPopup:e.zIndexPopupBase+50,width:384})));var Bi=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{top:n,bottom:i,prefixCls:r,getContainer:o,maxCount:a,rtl:s,onAllRemoved:l}=e,{getPrefixCls:c,getPopupContainer:d}=Yi.useContext(u),p=r||c("notification"),[,m]=Fi(p),[f,g]=Cn({prefixCls:p,style:e=>function(e,t,n){let i;switch(e){case"top":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":i={left:0,top:t,bottom:"auto"};break;case"topRight":i={right:0,top:t,bottom:"auto"};break;case"bottom":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n}}return i}(e,null!=n?n:24,null!=i?i:24),className:()=>h(m,{[`${p}-rtl`]:s}),motion:()=>function(e){return{motionName:`${e}-fade`}}(p),closable:!0,closeIcon:Wi(p),duration:4.5,getContainer:()=>(null==o?void 0:o())||(null==d?void 0:d())||document.body,maxCount:a,onAllRemoved:l});return Yi.useImperativeHandle(t,(()=>Object.assign(Object.assign({},f),{prefixCls:p,hashId:m}))),g}));function Qi(e){const t=Yi.useRef(null);return[Yi.useMemo((()=>{const e=e=>{if(!t.current)return;const{open:n,prefixCls:i,hashId:r}=t.current,o=`${i}-notice`,{message:a,description:s,icon:l,type:c,btn:d,className:u,role:p="alert"}=e,m=Gi(e,["message","description","icon","type","btn","className","role"]);return n(Object.assign(Object.assign({placement:"topRight"},m),{content:Yi.createElement(Vi,{prefixCls:o,icon:l,type:c,message:a,description:s,btn:d,role:p}),className:h(c&&`${o}-${c}`,r,u)}))},n={open:e,destroy:e=>{var n,i;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(i=t.current)||void 0===i||i.destroy()}};return["success","info","warning","error"].forEach((t=>{n[t]=n=>e(Object.assign(Object.assign({},n),{type:t}))})),n}),[]),Yi.createElement(Ki,Object.assign({key:"notification-holder"},e,{ref:t}))]}const qi=e=>e?"function"==typeof e?e():e:null,Zi=e=>{const{componentCls:t,popoverColor:n,minWidth:i,fontWeightStrong:r,popoverPadding:o,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,marginXS:u,colorBgElevated:h,popoverBg:p}=e;return[{[t]:Object.assign(Object.assign({},d(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":h,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:i,marginBottom:u,color:s,fontWeight:r},[`${t}-inner-content`]:{color:n}})},W(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},Xi=e=>{const{componentCls:t}=e;return{[t]:U.map((n=>{const i=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":i,[`${t}-inner`]:{backgroundColor:i},[`${t}-arrow`]:{background:"transparent"}}}}))}},Ji=e=>{const{componentCls:t,lineWidth:n,lineType:i,colorSplit:r,paddingSM:o,controlHeight:a,fontSize:s,lineHeight:l,padding:c}=e,d=a-Math.round(s*l),u=d/2,h=d/2-n,p=c;return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${u}px ${p}px ${h}px`,borderBottom:`${n}px ${i} ${r}`},[`${t}-inner-content`]:{padding:`${o}px ${p}px`}}}},er=l("Popover",(e=>{const{colorBgElevated:t,colorText:n,wireframe:i}=e,r=c(e,{popoverPadding:12,popoverBg:t,popoverColor:n});return[Zi(r),Xi(r),i&&Ji(r),j(r,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{deprecatedTokens:[["width","minWidth"]]});var tr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{if(t||n)return nr.createElement(nr.Fragment,null,t&&nr.createElement("div",{className:`${e}-title`},qi(t)),nr.createElement("div",{className:`${e}-inner-content`},qi(n)))})(n,a,s)))}var rr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{let{title:t,content:n,prefixCls:i}=e;return or.createElement(or.Fragment,null,t&&or.createElement("div",{className:`${i}-title`},qi(t)),or.createElement("div",{className:`${i}-inner-content`},qi(n)))},sr=or.forwardRef(((e,t)=>{const{prefixCls:n,title:i,content:r,overlayClassName:o,placement:a="top",trigger:s="hover",mouseEnterDelay:l=.1,mouseLeaveDelay:c=.1,overlayStyle:d={}}=e,p=rr(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:m}=or.useContext(u),f=m("popover",n),[g,y]=er(f),v=m(),b=h(o,y);return g(or.createElement(G,Object.assign({placement:a,trigger:s,mouseEnterDelay:l,mouseLeaveDelay:c,overlayStyle:d},p,{prefixCls:f,overlayClassName:b,ref:t,overlay:i||r?or.createElement(ar,{prefixCls:f,title:i,content:r}):null,transitionName:z(v,"zoom-big",p.transitionName),"data-popover-inject":!0})))}));sr._InternalPanelDoNotUseOrYouWillBeFired=function(e){const{prefixCls:t}=e,n=tr(e,["prefixCls"]),{getPrefixCls:i}=nr.useContext(u),r=i("popover",t),[o,a]=er(r);return o(nr.createElement(ir,Object.assign({},n,{prefixCls:r,hashId:a})))};const lr=sr,cr=new S("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),dr=new S("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),ur=new S("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),hr=new S("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),pr=new S("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),mr=new S("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),fr=e=>{const{componentCls:t,iconCls:n,antCls:i,badgeFontHeight:r,badgeShadowSize:o,badgeHeightSm:a,motionDurationSlow:s,badgeStatusSize:l,marginXS:c,badgeRibbonOffset:u}=e,h=`${i}-scroll-number`,p=`${i}-ribbon`,m=`${i}-ribbon-wrapper`,f=Y(e,((e,n)=>{let{darkColor:i}=n;return{[`${t}-color-${e}`]:{background:i}}})),g=Y(e,((e,t)=>{let{darkColor:n}=t;return{[`&${p}-color-${e}`]:{background:n,color:n}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.badgeZIndex,minWidth:e.badgeHeight,height:e.badgeHeight,color:e.badgeTextColor,fontWeight:e.badgeFontWeight,fontSize:e.badgeFontSize,lineHeight:`${e.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:e.badgeHeight/2,boxShadow:`0 0 0 ${o}px ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:a,height:a,fontSize:e.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${t}-multiple-words`]:{padding:`0 ${e.paddingXS}px`},[`${t}-dot`]:{zIndex:e.badgeZIndex,width:e.badgeDotSize,minWidth:e.badgeDotSize,height:e.badgeDotSize,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${o}px ${e.badgeShadowColor}`},[`${t}-dot${h}`]:{transition:`background ${s}`},[`${t}-count, ${t}-dot, ${h}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:mr,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{position:"relative",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:cr,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:c,color:e.colorText,fontSize:e.fontSize}}}),f),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:dr,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:ur,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:hr,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:pr,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${h}-custom-component, ${t}-count`]:{transform:"none"},[`${h}-custom-component, ${h}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${h}`]:{overflow:"hidden",[`${h}-only`]:{position:"relative",display:"inline-block",height:e.badgeHeight,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${h}-only-unit`]:{height:e.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${h}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${h}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${m}`]:{position:"relative"},[`${p}`]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{position:"absolute",top:c,padding:`0 ${e.paddingXS}px`,color:e.colorPrimary,lineHeight:`${r}px`,whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${p}-text`]:{color:e.colorTextLightSolid},[`${p}-corner`]:{position:"absolute",top:"100%",width:u,height:u,color:"currentcolor",border:u/2+"px solid",transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),g),{[`&${p}-placement-end`]:{insetInlineEnd:-u,borderEndEndRadius:0,[`${p}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${p}-placement-start`]:{insetInlineStart:-u,borderEndStartRadius:0,[`${p}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},gr=l("Badge",(e=>{const{fontSize:t,lineHeight:n,fontSizeSM:i,lineWidth:r,marginXS:o,colorBorderBg:a}=e,s=Math.round(t*n),l=r,d=s-2*l,u=e.colorBgContainer,h=i,p=e.colorError,m=e.colorErrorHover,f=c(e,{badgeFontHeight:s,badgeShadowSize:l,badgeZIndex:"auto",badgeHeight:d,badgeTextColor:u,badgeFontWeight:"normal",badgeFontSize:h,badgeColor:p,badgeColorHover:m,badgeShadowColor:a,badgeHeightSm:t,badgeDotSize:i/2,badgeFontSizeSm:i,badgeStatusSize:i/2,badgeProcessingDuration:"1.2s",badgeRibbonOffset:o,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[fr(f)]})),yr=window.React,vr=window.React;function br(e){let t,{prefixCls:n,value:i,current:r,offset:o=0}=e;return o&&(t={position:"absolute",top:`${o}00%`,left:0}),vr.createElement("span",{style:t,className:h(`${n}-only-unit`,{current:r})},i)}function wr(e,t,n){let i=e,r=0;for(;(i+10)%10!==t;)i+=n,r+=n;return r}function xr(e){const{prefixCls:t,count:n,value:i}=e,r=Number(i),o=Math.abs(n),[a,s]=vr.useState(r),[l,c]=vr.useState(o),d=()=>{s(r),c(o)};let u,h;if(vr.useEffect((()=>{const e=setTimeout((()=>{d()}),1e3);return()=>{clearTimeout(e)}}),[r]),a===r||Number.isNaN(r)||Number.isNaN(a))u=[vr.createElement(br,Object.assign({},e,{key:r,current:!0}))],h={transition:"none"};else{u=[];const t=r+10,n=[];for(let e=r;e<=t;e+=1)n.push(e);const i=n.findIndex((e=>e%10===a));u=n.map(((t,n)=>{const r=t%10;return vr.createElement(br,Object.assign({},e,{key:t,value:r,offset:n-i,current:n===i}))})),h={transform:`translateY(${-wr(a,r,l{var{prefixCls:n,count:i,className:r,motionClassName:o,style:a,title:s,show:l,component:c="sup",children:d}=e,p=_r(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]);const{getPrefixCls:m}=Cr.useContext(u),f=m("scroll-number",n),g=Object.assign(Object.assign({},p),{"data-show":l,style:a,className:h(f,r,o),title:s});let y=i;if(i&&Number(i)%1==0){const e=String(i).split("");y=e.map(((t,n)=>Cr.createElement(xr,{prefixCls:f,count:Number(i),value:t,key:e.length-n})))}return a&&a.borderColor&&(g.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),d?Q(d,(e=>({className:h(`${f}-custom-component`,null==e?void 0:e.className,o)}))):Cr.createElement(c,Object.assign({},g,{ref:t}),y)}));var kr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:n,scrollNumberPrefixCls:i,children:r,status:o,text:a,color:s,count:l=null,overflowCount:c=99,dot:d=!1,size:m="default",title:f,offset:g,style:y,className:v,rootClassName:b,showZero:w=!1}=e,x=kr(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","showZero"]),{getPrefixCls:_,direction:C}=Er.useContext(u),S=_("badge",n),[k,E]=gr(S),$=l>c?`${c}+`:l,M="0"===$||0===$,R=(null!=o||null!=s)&&(null===l||M&&!w),A=d&&!M,T=A?"":$,L=$r((()=>(null==T||""===T||M&&!w)&&!A),[T,M,w,A]),j=Mr(l);L||(j.current=l);const O=j.current,N=Mr(T);L||(N.current=T);const I=N.current,D=Mr(A);L||(D.current=A);const P=$r((()=>{if(!g)return Object.assign({},y);const e={marginTop:g[1]};return"rtl"===C?e.left=parseInt(g[0],10):e.right=-parseInt(g[0],10),Object.assign(Object.assign({},e),y)}),[C,g,y]),z=null!=f?f:"string"==typeof O||"number"==typeof O?O:void 0,F=L||!a?null:Er.createElement("span",{className:`${S}-status-text`},a),B=O&&"object"==typeof O?Q(O,(e=>({style:Object.assign(Object.assign({},P),e.style)}))):void 0,H=K(s,!1),W=h({[`${S}-status-dot`]:R,[`${S}-status-${o}`]:!!o,[`${S}-color-${s}`]:H}),U={};s&&!H&&(U.color=s,U.background=s);const V=h(S,{[`${S}-status`]:R,[`${S}-not-a-wrapper`]:!r,[`${S}-rtl`]:"rtl"===C},v,b,E);if(!r&&R){const e=P.color;return k(Er.createElement("span",Object.assign({},x,{className:V,style:P}),Er.createElement("span",{className:W,style:U}),a&&Er.createElement("span",{style:{color:e},className:`${S}-status-text`},a)))}return k(Er.createElement("span",Object.assign({ref:t},x,{className:V}),r,Er.createElement(p,{visible:!L,motionName:`${S}-zoom`,motionAppear:!1,motionDeadline:1e3},(e=>{let{className:t,ref:n}=e;const r=_("scroll-number",i),a=D.current,l=h({[`${S}-dot`]:a,[`${S}-count`]:!a,[`${S}-count-sm`]:"small"===m,[`${S}-multiple-words`]:!a&&I&&I.toString().length>1,[`${S}-status-${o}`]:!!o,[`${S}-color-${s}`]:H});let c=Object.assign({},P);return s&&!H&&(c=c||{},c.background=s),Er.createElement(Sr,{prefixCls:r,show:!L,motionClassName:t,className:l,count:I,title:z,style:c,key:"scrollNumber",ref:n},B)})),F))},Ar=Er.forwardRef(Rr);Ar.Ribbon=e=>{let{className:t,prefixCls:n,style:i,color:r,children:o,text:a,placement:s="end"}=e;const{getPrefixCls:l,direction:c}=yr.useContext(u),d=l("ribbon",n),p=K(r,!1),m=h(d,`${d}-placement-${s}`,{[`${d}-rtl`]:"rtl"===c,[`${d}-color-${r}`]:p},t),[f,g]=gr(d),y={},v={};return r&&!p&&(y.background=r,v.color=r),f(yr.createElement("div",{className:h(`${d}-wrapper`,g)},o,yr.createElement("div",{className:h(m,g),style:Object.assign(Object.assign({},y),i)},yr.createElement("span",{className:`${d}-text`},a),yr.createElement("div",{className:`${d}-corner`,style:v}))))};const Tr=Ar,Lr=window.React,jr=e=>{let{children:t}=e;const{getPrefixCls:n}=Lr.useContext(u),i=n("breadcrumb");return Lr.createElement("li",{className:`${i}-separator`,"aria-hidden":"true"},""===t?t:t||"/")};jr.__ANT_BREADCRUMB_SEPARATOR=!0;const Or=jr;var Nr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:t,separator:n="/",children:i,menu:r,overlay:o,dropdownProps:a,href:s}=e,l=(e=>{if(r||o){const n=Object.assign({},a);if(r){const e=r||{},{items:t}=e,i=Pr(e,["items"]);n.menu=Object.assign(Object.assign({},i),{items:null==t?void 0:t.map(((e,t)=>{var{key:n,title:i,label:r,path:o}=e,a=Pr(e,["key","title","label","path"]);let l=null!=r?r:i;return o&&(l=zr.createElement("a",{href:`${s}${o}`},l)),Object.assign(Object.assign({},a),{key:null!=n?n:t,label:l})}))})}else o&&(n.overlay=o);return zr.createElement(He,Object.assign({placement:"bottom"},n),zr.createElement("span",{className:`${t}-overlay-link`},e,zr.createElement(We,null)))}return e})(i);return null!=l?zr.createElement(zr.Fragment,null,zr.createElement("li",null,l),n&&zr.createElement(Or,null,n)):null},Br=e=>{const{prefixCls:t,children:n,href:i}=e,r=Pr(e,["prefixCls","children","href"]),{getPrefixCls:o}=zr.useContext(u),a=o("breadcrumb",t);return zr.createElement(Fr,Object.assign({},r,{prefixCls:a}),Dr(a,r,n,i))};Br.__ANT_BREADCRUMB_ITEM=!0;const Hr=Br,Wr=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},d(e)),{color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},O(e)),"li:last-child":{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[`\n > ${n} + span,\n > ${n} + a\n `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}},Ur=l("Breadcrumb",(e=>{const t=c(e,{});return[Wr(t)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS})));var Vr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{var{breadcrumbName:t}=e,n=Vr(e,["breadcrumbName"]);return Object.assign(Object.assign({},n),{title:t})}))}),r}var Kr=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:t,separator:n="/",style:i,className:r,rootClassName:o,routes:a,items:s,children:l,itemRender:c,params:d={}}=e,p=Kr(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:m,direction:f}=Qr.useContext(u);let g;const y=m("breadcrumb",t),[v,b]=Ur(y),w=function(e,t){return Gr((()=>e||(t?t.map(Yr):null)),[e,t])}(s,a),x=function(e,t){return(n,i,r,o,a)=>{if(t)return t(n,i,r,o);const s=function(e,t){if(void 0===e.title||null===e.title)return null;const n=Object.keys(t).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),((e,n)=>t[n]||e))}(n,i);return Dr(e,n,s,a)}}(y,c);if(w&&w.length>0){const e=[],t=s||a;g=w.map(((i,r)=>{const{path:o,key:a,type:s,menu:l,overlay:c,onClick:u,className:h,separator:p,dropdownProps:m}=i,f=((e,t)=>{if(void 0===t)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach((t=>{n=n.replace(`:${t}`,e[t])})),n})(d,o);void 0!==f&&e.push(f);const g=null!=a?a:r;if("separator"===s)return Qr.createElement(Or,{key:g},p);const v={},b=r===w.length-1;l?v.menu=l:c&&(v.overlay=c);let{href:_}=i;return e.length&&void 0!==f&&(_=`#/${e.join("/")}`),Qr.createElement(Fr,Object.assign({key:g},v,Ne(i,{data:!0,aria:!0}),{className:h,dropdownProps:m,href:_,separator:b?"":n,onClick:u,prefixCls:y}),x(i,d,t,e,_))}))}else if(l){const e=q(l).length;g=q(l).map(((t,i)=>t?Q(t,{separator:i===e-1?"":n,key:i}):t))}const _=h(y,{[`${y}-rtl`]:"rtl"===f},r,o,b);return v(Qr.createElement("nav",Object.assign({className:_,style:i},p),Qr.createElement("ol",null,g)))};qr.Item=Hr,qr.Separator=Or;const Zr=qr,Xr=window.React,Jr=e=>{const{prefixCls:t,className:n,style:i,size:r,shape:o}=e,a=h({[`${t}-lg`]:"large"===r,[`${t}-sm`]:"small"===r}),s=h({[`${t}-circle`]:"circle"===o,[`${t}-square`]:"square"===o,[`${t}-round`]:"round"===o}),l=Xr.useMemo((()=>"number"==typeof r?{width:r,height:r,lineHeight:`${r}px`}:{}),[r]);return Xr.createElement("span",{className:h(t,a,s,n),style:Object.assign(Object.assign({},l),i)})},eo=new S("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),to=e=>({height:e,lineHeight:`${e}px`}),no=e=>Object.assign({width:e},to(e)),io=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:eo,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ro=e=>Object.assign({width:5*e,minWidth:5*e},to(e)),oo=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:i,controlHeightLG:r,controlHeightSM:o}=e;return{[`${t}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},no(i)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},no(r)),[`${t}${t}-sm`]:Object.assign({},no(o))}},ao=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:i,controlHeightLG:r,controlHeightSM:o,gradientFromColor:a}=e;return{[`${i}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},ro(t)),[`${i}-lg`]:Object.assign({},ro(r)),[`${i}-sm`]:Object.assign({},ro(o))}},so=e=>Object.assign({width:e},to(e)),lo=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:i,borderRadiusSM:r}=e;return{[`${t}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:i,borderRadius:r},so(2*n)),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},so(n)),{maxWidth:4*n,maxHeight:4*n}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},co=(e,t,n)=>{const{skeletonButtonCls:i}=e;return{[`${n}${i}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${i}-round`]:{borderRadius:t}}},uo=e=>Object.assign({width:2*e,minWidth:2*e},to(e)),ho=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:i,controlHeightLG:r,controlHeightSM:o,gradientFromColor:a}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${n}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:2*i,minWidth:2*i},uo(i))},co(e,i,n)),{[`${n}-lg`]:Object.assign({},uo(r))}),co(e,r,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},uo(o))}),co(e,o,`${n}-sm`))},po=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:i,skeletonParagraphCls:r,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:d,gradientFromColor:u,padding:h,marginSM:p,borderRadius:m,titleHeight:f,blockRadius:g,paragraphLiHeight:y,controlHeightXS:v,paragraphMarginTop:b}=e;return{[`${t}`]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:h,verticalAlign:"top",[`${n}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:u},no(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},no(c)),[`${n}-sm`]:Object.assign({},no(d))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${i}`]:{width:"100%",height:f,background:u,borderRadius:g,[`+ ${r}`]:{marginBlockStart:d}},[`${r}`]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:u,borderRadius:g,"+ li":{marginBlockStart:v}}},[`${r}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${i}, ${r} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[`${i}`]:{marginBlockStart:p,[`+ ${r}`]:{marginBlockStart:b}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},ho(e)),oo(e)),ao(e)),lo(e)),[`${t}${t}-block`]:{width:"100%",[`${o}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${t}${t}-active`]:{[`\n ${i},\n ${r} > li,\n ${n},\n ${o},\n ${a},\n ${s}\n `]:Object.assign({},io(e))}}},mo=l("Skeleton",(e=>{const{componentCls:t}=e,n=c(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:1.5*e.controlHeight,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[po(n)]}),(e=>{const{colorFillContent:t,colorFill:n}=e;return{color:t,colorGradientEnd:n,gradientFromColor:t,gradientToColor:n,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}}),{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),fo=window.React,go=window.React,yo={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},vo=window.React;var bo=function(e,t){return vo.createElement(n,i({},e,{ref:t,icon:yo}))};const wo=vo.forwardRef(bo),xo=window.React,_o=window.React,Co=window.React,So=window.React,ko=e=>{const t=t=>{const{width:n,rows:i=2}=e;return Array.isArray(n)?n[t]:i-1===t?n:void 0},{prefixCls:n,className:i,style:r,rows:o}=e,a=w(Array(o)).map(((e,n)=>So.createElement("li",{key:n,style:{width:t(n)}})));return So.createElement("ul",{className:h(n,i),style:r},a)},Eo=window.React,$o=e=>{let{prefixCls:t,className:n,width:i,style:r}=e;return Eo.createElement("h3",{className:h(t,n),style:Object.assign({width:i},r)})},Mo=window.React;function Ro(e){return e&&"object"==typeof e?e:{}}const Ao=e=>{const{prefixCls:t,loading:n,className:i,rootClassName:r,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:d,round:p}=e,{getPrefixCls:m,direction:f}=Mo.useContext(u),g=m("skeleton",t),[y,v]=mo(g);if(n||!("loading"in e)){const e=!!s,t=!!l,n=!!c;let a,u;if(e){const e=Object.assign(Object.assign({prefixCls:`${g}-avatar`},function(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}(t,n)),Ro(s));a=Mo.createElement("div",{className:`${g}-header`},Mo.createElement(Jr,Object.assign({},e)))}if(t||n){let i,r;if(t){const t=Object.assign(Object.assign({prefixCls:`${g}-title`},function(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}(e,n)),Ro(l));i=Mo.createElement($o,Object.assign({},t))}if(n){const n=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},function(e,t){const n={};return e&&t||(n.width="61%"),n.rows=!e&&t?3:2,n}(e,t)),Ro(c));r=Mo.createElement(ko,Object.assign({},n))}u=Mo.createElement("div",{className:`${g}-content`},i,r)}const m=h(g,{[`${g}-with-avatar`]:e,[`${g}-active`]:d,[`${g}-rtl`]:"rtl"===f,[`${g}-round`]:p},i,r,v);return y(Mo.createElement("div",{className:m,style:o},a,u))}return void 0!==a?a:null};Ao.Button=e=>{const{prefixCls:t,className:n,rootClassName:i,active:r,block:o=!1,size:a="default"}=e,{getPrefixCls:s}=go.useContext(u),l=s("skeleton",t),[c,d]=mo(l),p=Z(e,["prefixCls"]),m=h(l,`${l}-element`,{[`${l}-active`]:r,[`${l}-block`]:o},n,i,d);return c(go.createElement("div",{className:m},go.createElement(Jr,Object.assign({prefixCls:`${l}-button`,size:a},p))))},Ao.Avatar=e=>{const{prefixCls:t,className:n,rootClassName:i,active:r,shape:o="circle",size:a="default"}=e,{getPrefixCls:s}=fo.useContext(u),l=s("skeleton",t),[c,d]=mo(l),p=Z(e,["prefixCls","className"]),m=h(l,`${l}-element`,{[`${l}-active`]:r},n,i,d);return c(fo.createElement("div",{className:m},fo.createElement(Jr,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},p))))},Ao.Input=e=>{const{prefixCls:t,className:n,rootClassName:i,active:r,block:o,size:a="default"}=e,{getPrefixCls:s}=Co.useContext(u),l=s("skeleton",t),[c,d]=mo(l),p=Z(e,["prefixCls"]),m=h(l,`${l}-element`,{[`${l}-active`]:r,[`${l}-block`]:o},n,i,d);return c(Co.createElement("div",{className:m},Co.createElement(Jr,Object.assign({prefixCls:`${l}-input`,size:a},p))))},Ao.Image=e=>{const{prefixCls:t,className:n,rootClassName:i,style:r,active:o}=e,{getPrefixCls:a}=_o.useContext(u),s=a("skeleton",t),[l,c]=mo(s),d=h(s,`${s}-element`,{[`${s}-active`]:o},n,i,c);return l(_o.createElement("div",{className:d},_o.createElement("div",{className:h(`${s}-image`,n),style:r},_o.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},_o.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:`${s}-image-path`})))))},Ao.Node=e=>{const{prefixCls:t,className:n,rootClassName:i,style:r,active:o,children:a}=e,{getPrefixCls:s}=xo.useContext(u),l=s("skeleton",t),[c,d]=mo(l),p=h(l,`${l}-element`,{[`${l}-active`]:o},d,n,i),m=null!=a?a:xo.createElement(wo,null);return c(xo.createElement("div",{className:p},xo.createElement("div",{className:h(`${l}-image`,n),style:r},m)))};const To=Ao,Lo={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},jo=window.React;var Oo=function(e,t){return jo.createElement(n,i({},e,{ref:t,icon:Lo}))};const No=jo.forwardRef(Oo),Io=(0,window.React.createContext)(null),Do=window.React;var Po=Do.forwardRef((function(e,t){var n=e.prefixCls,i=e.className,r=e.style,o=e.id,a=e.active,s=e.tabKey,l=e.children;return Do.createElement("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:r,className:h(n,a&&"".concat(n,"-active"),i),ref:t},l)})),zo=["key","forceRender","style","className"];const Fo=window.React;function Bo(e){var t=e.id,n=e.activeKey,r=e.animated,o=e.tabPosition,a=e.destroyInactiveTabPane,s=Fo.useContext(Io),l=s.prefixCls,c=s.tabs,d=r.tabPane,u="".concat(l,"-tabpane");return Fo.createElement("div",{className:h("".concat(l,"-content-holder"))},Fo.createElement("div",{className:h("".concat(l,"-content"),"".concat(l,"-content-").concat(o),b({},"".concat(l,"-content-animated"),d))},c.map((function(e){var o=e.key,s=e.forceRender,l=e.style,c=e.className,m=C(e,zo),f=o===n;return Fo.createElement(p,i({key:o,visible:f,forceRender:s,removeOnLeave:!!a,leavedClassName:"".concat(u,"-hidden")},r.tabPaneMotion),(function(e,n){var r=e.style,a=e.className;return Fo.createElement(Po,i({},m,{prefixCls:u,id:t,tabKey:o,animated:d,active:f,style:x(x({},l),r),className:h(c,a),ref:n}))}))}))))}const Ho=window.React.useMemo;var Wo={width:0,height:0,left:0,top:0};const Uo=window.React;function Vo(e,t){var n=Uo.useRef(e),i=Uo.useState({}),r=v(i,2)[1];return[n.current,function(e){var i="function"==typeof e?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}]}const Go=window.React,Yo=window.React.useState,Ko=window.React.useRef;var Qo=Math.pow(.995,20);const qo=window.React.useRef,Zo=window.React.useState;function Xo(e){var t=Zo(0),n=v(t,2),i=n[0],r=n[1],o=qo(0),a=qo();return a.current=e,X((function(){var e;null===(e=a.current)||void 0===e||e.call(a)}),[i]),function(){o.current===i&&(o.current+=1,r(o.current))}}const Jo=window.React.useMemo;var ea={width:0,height:0,left:0,top:0,right:0};function ta(e){var t;return e instanceof Map?(t={},e.forEach((function(e,n){t[n]=e}))):t=e,JSON.stringify(t)}function na(e){return String(e).replace(/"/g,"TABS_DQ")}const ia=window.React;function ra(e,t){var n=e.prefixCls,i=e.editable,r=e.locale,o=e.style;return i&&!1!==i.showAdd?ia.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==r?void 0:r.addAriaLabel)||"Add tab",onClick:function(e){i.onEdit("add",{event:e})}},i.addIcon||"+"):null}const oa=ia.forwardRef(ra),aa=window.React;var sa=aa.forwardRef((function(e,t){var n,i=e.position,r=e.prefixCls,o=e.extra;if(!o)return null;var a={};return"object"!==J(o)||aa.isValidElement(o)?a.right=o:a=o,"right"===i&&(n=a.right),"left"===i&&(n=a.left),n?aa.createElement("div",{className:"".concat(r,"-extra-content"),ref:t},n):null}));const la=window.React,ca=window.React.useEffect,da=window.React.useState;function ua(e,t){var n=e.prefixCls,i=e.id,r=e.tabs,o=e.locale,a=e.mobile,s=e.moreIcon,l=void 0===s?"More":s,c=e.moreTransitionName,d=e.style,u=e.className,p=e.editable,m=e.tabBarGutter,f=e.rtl,g=e.removeAriaLabel,y=e.onTabClick,w=e.getPopupContainer,x=e.popupClassName,_=da(!1),C=v(_,2),S=C[0],k=C[1],E=da(null),$=v(E,2),M=$[0],R=$[1],A="".concat(i,"-more-popup"),T="".concat(n,"-dropdown"),L=null!==M?"".concat(A,"-").concat(M):null,j=null==o?void 0:o.dropdownAriaLabel,O=la.createElement(Ue,{onClick:function(e){var t=e.key,n=e.domEvent;y(t,n),k(!1)},prefixCls:"".concat(T,"-menu"),id:A,tabIndex:-1,role:"listbox","aria-activedescendant":L,selectedKeys:[M],"aria-label":void 0!==j?j:"expanded dropdown"},r.map((function(e){var t=p&&!1!==e.closable&&!e.disabled;return la.createElement(Ve,{key:e.key,id:"".concat(A,"-").concat(e.key),role:"option","aria-controls":i&&"".concat(i,"-panel-").concat(e.key),disabled:e.disabled},la.createElement("span",null,e.label),t&&la.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:"".concat(T,"-menu-item-remove"),onClick:function(t){var n,i;t.stopPropagation(),n=t,i=e.key,n.preventDefault(),n.stopPropagation(),p.onEdit("remove",{key:i,event:n})}},e.closeIcon||p.removeIcon||"×"))})));function N(e){for(var t=r.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===M}))||0,i=t.length,o=0;ot?"left":"right"})})),N=v(O,2),I=N[0],D=N[1],P=Vo(0,(function(e,t){!j&&k&&k({direction:e>t?"top":"bottom"})})),z=v(P,2),F=z[0],B=z[1],H=va([0,0]),W=v(H,2),U=W[0],V=W[1],G=va([0,0]),Y=v(G,2),K=Y[0],Q=Y[1],q=va([0,0]),Z=v(q,2),X=Z[0],J=Z[1],re=va([0,0]),oe=v(re,2),ae=oe[0],se=oe[1],le=function(e){var t=qo([]),n=Zo({}),i=v(n,2)[1],r=qo("function"==typeof e?e():e),o=Xo((function(){var e=r.current;t.current.forEach((function(t){e=t(e)})),t.current=[],r.current=e,i({})}));return[r.current,function(e){t.current.push(e),o()}]}(new Map),ce=v(le,2),de=ce[0],ue=ce[1],he=function(e,t,n){return Ho((function(){for(var n,i=new Map,r=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||Wo,o=r.left+r.width,a=0;axe?xe:e}j&&p?(we=0,xe=Math.max(0,me-ve)):(we=Math.min(0,ve-me),xe=0);var Ce=ya(),Se=va(),ke=v(Se,2),Ee=ke[0],$e=ke[1];function Me(){$e(Date.now())}function Re(){window.clearTimeout(Ce.current)}!function(e,t){var n=Yo(),i=v(n,2),r=i[0],o=i[1],a=Yo(0),s=v(a,2),l=s[0],c=s[1],d=Yo(0),u=v(d,2),h=u[0],p=u[1],m=Yo(),f=v(m,2),g=f[0],y=f[1],b=Ko(),w=Ko(),x=Ko(null);x.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,i=t.screenY;o({x:n,y:i}),window.clearInterval(b.current)},onTouchMove:function(e){if(r){e.preventDefault();var n=e.touches[0],i=n.screenX,a=n.screenY;o({x:i,y:a});var s=i-r.x,d=a-r.y;t(s,d);var u=Date.now();c(u),p(u-l),y({x:s,y:d})}},onTouchEnd:function(){if(r&&(o(null),y(null),g)){var e=g.x/h,n=g.y/h,i=Math.abs(e),a=Math.abs(n);if(Math.max(i,a)<.1)return;var s=e,l=n;b.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(b.current):t(20*(s*=Qo),20*(l*=Qo))}),20)}},onWheel:function(e){var n=e.deltaX,i=e.deltaY,r=0,o=Math.abs(n),a=Math.abs(i);o===a?r="x"===w.current?n:i:o>a?(r=n,w.current="x"):(r=i,w.current="y"),t(-r,-r)&&e.preventDefault()}},Go.useEffect((function(){function t(e){x.current.onTouchMove(e)}function n(e){x.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){x.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){x.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){function n(e,t){e((function(e){return _e(e+t)}))}return!!ye&&(j?n(D,e):n(B,t),Re(),Me(),!0)})),ga((function(){return Re(),Ee&&(Ce.current=window.setTimeout((function(){$e(0)}),100)),Re}),[Ee]);var Ae=function(e,t,n,i,r,o,a){var s,l,c,d=a.tabs,u=a.tabPosition,h=a.rtl;return["top","bottom"].includes(u)?(s="width",l=h?"right":"left",c=Math.abs(n)):(s="height",l="top",c=-n),Jo((function(){if(!d.length)return[0,0];for(var n=d.length,i=n,r=0;rc+t){i=r-1;break}}for(var a=0,u=n-1;u>=0;u-=1)if((e.get(d[u].key)||ea)[l]=i?[0,0]:[a,i]}),[e,t,i,r,o,c,u,d.map((function(e){return e.key})).join("_"),h])}(he,ve,j?I:F,me,fe,ge,x(x({},e),{},{tabs:a})),Te=v(Ae,2),Le=Te[0],je=Te[1],Oe=ee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=he.get(e)||{width:0,height:0,left:0,right:0,top:0};if(j){var n=I;p?t.rightI+ve&&(n=t.right+t.width-ve):t.left<-I?n=-t.left:t.left+t.width>-I+ve&&(n=-(t.left+t.width-ve)),B(0),D(_e(n))}else{var i=F;t.top<-F?i=-t.top:t.top+t.height>-F+ve&&(i=-(t.top+t.height-ve)),D(0),B(_e(i))}})),Ne={};"top"===y||"bottom"===y?Ne[p?"marginRight":"marginLeft"]=_:Ne.marginTop=_;var Ie=a.map((function(e,t){var n=e.key;return fa.createElement(ma,{id:c,prefixCls:o,key:n,tab:e,style:0===t?void 0:Ne,closable:e.closable,editable:f,active:n===u,renderWrapper:C,removeAriaLabel:null==g?void 0:g.removeAriaLabel,onClick:function(e){S(n,e)},onFocus:function(){Oe(n),Me(),R.current&&(p||(R.current.scrollLeft=0),R.current.scrollTop=0)}})})),De=function(){return ue((function(){var e=new Map;return a.forEach((function(t){var n,i=t.key,r=null===(n=A.current)||void 0===n?void 0:n.querySelector('[data-node-key="'.concat(na(i),'"]'));r&&e.set(i,{width:r.offsetWidth,height:r.offsetHeight,left:r.offsetLeft,top:r.offsetTop})})),e}))};ga((function(){De()}),[a.map((function(e){return e.key})).join("_")]);var Pe=Xo((function(){var e=ba(E),t=ba($),n=ba(M);V([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var i=ba(L);J(i);var r=ba(T);se(r);var o=ba(A);Q([o[0]-i[0],o[1]-i[1]]),De()})),ze=a.slice(0,Le),Fe=a.slice(je+1),Be=[].concat(w(ze),w(Fe)),He=va(),We=v(He,2),Ue=We[0],Ve=We[1],Ge=he.get(u),Ye=ya();function Ke(){te.cancel(Ye.current)}ga((function(){var e={};return Ge&&(j?(p?e.right=Ge.right:e.left=Ge.left,e.width=Ge.width):(e.top=Ge.top,e.height=Ge.height)),Ke(),Ye.current=te((function(){Ve(e)})),Ke}),[Ge,j,p]),ga((function(){Oe()}),[u,we,xe,ta(Ge),ta(he),j]),ga((function(){Pe()}),[p]);var Qe,qe,Ze,Xe,Je=!!Be.length,et="".concat(o,"-nav-wrap");return j?p?(qe=I>0,Qe=I!==xe):(Qe=I<0,qe=I!==we):(Ze=F<0,Xe=F!==we),fa.createElement(ne,{onResize:Pe},fa.createElement("div",{ref:ie(t,E),role:"tablist",className:h("".concat(o,"-nav"),s),style:l,onKeyDown:function(){Me()}},fa.createElement(sa,{ref:$,position:"left",extra:m,prefixCls:o}),fa.createElement("div",{className:h(et,(n={},b(n,"".concat(et,"-ping-left"),Qe),b(n,"".concat(et,"-ping-right"),qe),b(n,"".concat(et,"-ping-top"),Ze),b(n,"".concat(et,"-ping-bottom"),Xe),n)),ref:R},fa.createElement(ne,{onResize:Pe},fa.createElement("div",{ref:A,className:"".concat(o,"-nav-list"),style:{transform:"translate(".concat(I,"px, ").concat(F,"px)"),transition:Ee?"none":void 0}},Ie,fa.createElement(oa,{ref:L,prefixCls:o,locale:g,editable:f,style:x(x({},0===Ie.length?void 0:Ne),{},{visibility:Je?"hidden":null})}),fa.createElement("div",{className:h("".concat(o,"-ink-bar"),b({},"".concat(o,"-ink-bar-animated"),d.inkBar)),style:Ue})))),fa.createElement(ha,i({},e,{removeAriaLabel:null==g?void 0:g.removeAriaLabel,ref:T,prefixCls:o,tabs:Be,className:!Je&&be,tabMoving:!!Ee})),fa.createElement(sa,{ref:M,position:"right",extra:m,prefixCls:o})))}const _a=fa.forwardRef(xa);var Ca=["renderTabBar"],Sa=["label","key"];const ka=window.React;function Ea(e){var t=e.renderTabBar,n=C(e,Ca),r=ka.useContext(Io).tabs;return t?t(x(x({},n),{},{panes:r.map((function(e){var t=e.label,n=e.key,r=C(e,Sa);return ka.createElement(Po,i({tab:t,key:n,tabKey:n},r))}))}),_a):ka.createElement(_a,n)}var $a=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName"];const Ma=window.React,Ra=window.React.useEffect,Aa=window.React.useState;var Ta=0;function La(e,t){var n,r=e.id,o=e.prefixCls,a=void 0===o?"rc-tabs":o,s=e.className,l=e.items,c=e.direction,d=e.activeKey,u=e.defaultActiveKey,p=e.editable,m=e.animated,f=e.tabPosition,g=void 0===f?"top":f,y=e.tabBarGutter,w=e.tabBarStyle,_=e.tabBarExtraContent,S=e.locale,k=e.moreIcon,E=e.moreTransitionName,$=e.destroyInactiveTabPane,M=e.renderTabBar,R=e.onChange,A=e.onTabClick,T=e.onTabScroll,L=e.getPopupContainer,j=e.popupClassName,O=C(e,$a),N=Ma.useMemo((function(){return(l||[]).filter((function(e){return e&&"object"===J(e)&&"key"in e}))}),[l]),I="rtl"===c,D=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:x({inkBar:!0},"object"===J(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(m),P=Aa(!1),z=v(P,2),F=z[0],B=z[1];Ra((function(){B(re())}),[]);var H=oe((function(){var e;return null===(e=N[0])||void 0===e?void 0:e.key}),{value:d,defaultValue:u}),W=v(H,2),U=W[0],V=W[1],G=Aa((function(){return N.findIndex((function(e){return e.key===U}))})),Y=v(G,2),K=Y[0],Q=Y[1];Ra((function(){var e,t=N.findIndex((function(e){return e.key===U}));-1===t&&(t=Math.max(0,Math.min(K,N.length-1)),V(null===(e=N[t])||void 0===e?void 0:e.key)),Q(t)}),[N.map((function(e){return e.key})).join("_"),U,K]);var q=oe(null,{value:r}),Z=v(q,2),X=Z[0],ee=Z[1];Ra((function(){r||(ee("rc-tabs-".concat(Ta)),Ta+=1)}),[]);var te={id:X,activeKey:U,animated:D,tabPosition:g,rtl:I,mobile:F},ne=x(x({},te),{},{editable:p,locale:S,moreIcon:k,moreTransitionName:E,tabBarGutter:y,onTabClick:function(e,t){null==A||A(e,t);var n=e!==U;V(e),n&&(null==R||R(e))},onTabScroll:T,extra:_,style:w,panes:null,getPopupContainer:L,popupClassName:j});return Ma.createElement(Io.Provider,{value:{tabs:N,prefixCls:a}},Ma.createElement("div",i({ref:t,id:r,className:h(a,"".concat(a,"-").concat(g),(n={},b(n,"".concat(a,"-mobile"),F),b(n,"".concat(a,"-editable"),p),b(n,"".concat(a,"-rtl"),I),n),s)},O),void 0,Ma.createElement(Ea,i({},ne,{renderTabBar:M})),Ma.createElement(Bo,i({destroyInactiveTabPane:$},te,{animated:D}))))}var ja=Ma.forwardRef(La);const Oa={motionAppear:!1,motionEnter:!0,motionLeave:!0};var Na=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[ae(e,"slide-up"),ae(e,"slide-down")]]},Pa=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:i,cardGutter:r,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:i,border:`${e.lineWidth}px ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${r}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${r}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},za=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:i}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},d(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${i}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},se),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Fa=e=>{const{componentCls:t,margin:n,colorBorderSecondary:i,horizontalMargin:r,verticalItemPadding:o,verticalItemMargin:a}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:r,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${i}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},\n right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,\n > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:1.25*e.controlHeight,[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},Ba=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:i,horizontalItemPaddingSM:r,horizontalItemPaddingLG:o}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:i}}}}}},Ha=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:i,iconCls:r,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s}=e,l=`${t}-tab`;return{[l]:{position:"relative",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},O(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:i},[`&${l}-active ${l}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${r}`]:{margin:0},[r]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:o}}}},Wa=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:i,cardGutter:r}=e,o=`${t}-rtl`;return{[o]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[i]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:r},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Ua=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:i,cardGutter:r,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:i,marginLeft:{_skip_check_:!0,value:r},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${s}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},O(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),Ha(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},Va=l("Tabs",(e=>{const t=c(e,{tabsCardPadding:e.cardPadding||`${(e.cardHeight-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${e.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${e.horizontalItemGutter}px`});return[Ba(t),Wa(t),Fa(t),za(t),Pa(t),Ua(t),Da(t)]}),(e=>{const t=e.controlHeightLG;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:t,cardPadding:"",cardPaddingSM:`${1.5*e.paddingXXS}px ${e.padding}px`,cardPaddingLG:`${e.paddingXS}px ${e.padding}px ${1.5*e.paddingXXS}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}));var Ga=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{let{key:n,event:i}=t;null==o||o("add"===e?i:n,e)},removeIcon:Ya.createElement(Ie,null),addIcon:l||Ya.createElement(No,null),showAdd:!0!==a});const k=b(),E=function(e,t){return e||function(e){return e.filter((e=>e))}(q(t).map((e=>{if(Ia.isValidElement(e)){const{key:t,props:n}=e,i=n||{},{tab:r}=i,o=Na(i,["tab"]);return Object.assign(Object.assign({key:String(t)},o),{label:r})}return null})))}(p,d),$=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return t=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof n?n:{}),t.tabPane&&(t.tabPaneMotion=Object.assign(Object.assign({},Oa),{motionName:z(e,"switch")})),t}(x,m),M=le(r);return _(Ya.createElement(ja,Object.assign({direction:v,getPopupContainer:w,moreTransitionName:`${k}-slide-up`},f,{items:E,className:h({[`${x}-${M}`]:M,[`${x}-card`]:["card","editable-card"].includes(t),[`${x}-editable-card`]:"editable-card"===t,[`${x}-centered`]:s},n,i,C),popupClassName:h(c,C),editable:S,moreIcon:y,prefixCls:x,animated:$})))}Ka.TabPane=()=>null;var Qa=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{var{prefixCls:t,className:n,hoverable:i=!0}=e,r=Qa(e,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=qa.useContext(u),a=o("card",t),s=h(`${a}-grid`,n,{[`${a}-grid-hoverable`]:i});return qa.createElement("div",Object.assign({},r,{className:s}))},Xa=e=>{const{antCls:t,componentCls:n,headerHeight:i,cardPaddingBase:r,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},N()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},se),{[`\n > ${n}-typography,\n > ${n}-typography-edit-content\n `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:o,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},Ja=e=>{const{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:i,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`\n ${r}px 0 0 0 ${n},\n 0 ${r}px 0 0 ${n},\n ${r}px ${r}px 0 0 ${n},\n ${r}px 0 0 0 ${n} inset,\n 0 ${r}px 0 0 ${n} inset;\n `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},es=e=>{const{componentCls:t,iconCls:n,actionsLiMargin:i,cardActionsIconSize:r,colorBorderSecondary:o,actionsBg:a}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${e.lineWidth}px ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px `},N()),{"& > li":{margin:i,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:2*e.cardActionsIconSize,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:e.fontSize*e.lineHeight+"px",transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:r,lineHeight:r*e.lineHeight+"px"}},"&:not(:last-child)":{borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${o}`}}})},ts=e=>Object.assign(Object.assign({margin:`-${e.marginXXS}px 0`,display:"flex"},N()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},se),"&-description":{color:e.colorTextDescription}}),ns=e=>{const{componentCls:t,cardPaddingBase:n,colorFillAlter:i}=e;return{[`${t}-head`]:{padding:`0 ${n}px`,background:i,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${e.padding}px ${n}px`}}},is=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},rs=e=>{const{antCls:t,componentCls:n,cardShadow:i,cardHeadPadding:r,colorBorderSecondary:o,boxShadowTertiary:a,cardPaddingBase:s,extraColor:l}=e;return{[n]:Object.assign(Object.assign({},d(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${n}-bordered)`]:{boxShadow:a},[`${n}-head`]:Xa(e),[`${n}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${n}-body`]:Object.assign({padding:s,borderRadius:` 0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},N()),[`${n}-grid`]:Ja(e),[`${n}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${t}-image-mask`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`}},[`${n}-actions`]:es(e),[`${n}-meta`]:ts(e)}),[`${n}-bordered`]:{border:`${e.lineWidth}px ${e.lineType} ${o}`,[`${n}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${n}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:i}},[`${n}-contain-grid`]:{[`${n}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${n}-loading) ${n}-body`]:{marginBlockStart:-e.lineWidth,marginInlineStart:-e.lineWidth,padding:0}},[`${n}-contain-tabs`]:{[`> ${n}-head`]:{[`${n}-head-title, ${n}-extra`]:{paddingTop:r}}},[`${n}-type-inner`]:ns(e),[`${n}-loading`]:is(e),[`${n}-rtl`]:{direction:"rtl"}}},os=e=>{const{componentCls:t,cardPaddingSM:n,headerHeightSM:i,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${n}px`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{minHeight:i,paddingTop:0,display:"flex",alignItems:"center"}}}}},as=l("Card",(e=>{const t=c(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[rs(t),os(t)]}),(e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText})));var ss=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:n,className:i,rootClassName:r,extra:o,headStyle:a={},bodyStyle:s={},title:l,loading:c,bordered:d=!0,size:p,type:m,cover:f,actions:g,tabList:y,children:v,activeTabKey:b,defaultActiveTabKey:w,tabBarExtraContent:x,hoverable:_,tabProps:C={}}=e,S=ss(e,["prefixCls","className","rootClassName","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:k,direction:E}=ls.useContext(u),$=ls.useMemo((()=>{let e=!1;return ls.Children.forEach(v,(t=>{t&&t.type&&t.type===Za&&(e=!0)})),e}),[v]),M=k("card",n),[R,A]=as(M),T=ls.createElement(To,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),L=void 0!==b,j=Object.assign(Object.assign({},C),{[L?"activeKey":"defaultActiveKey"]:L?b:w,tabBarExtraContent:x});let O;const N=le(p),I=N&&"default"!==N?N:"large",D=y&&y.length?ls.createElement(Ka,Object.assign({size:I},j,{className:`${M}-head-tabs`,onChange:t=>{var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)},items:y.map((e=>{var{tab:t}=e,n=ss(e,["tab"]);return Object.assign({label:t},n)}))})):null;(l||o||D)&&(O=ls.createElement("div",{className:`${M}-head`,style:a},ls.createElement("div",{className:`${M}-head-wrapper`},l&&ls.createElement("div",{className:`${M}-head-title`},l),o&&ls.createElement("div",{className:`${M}-extra`},o)),D));const P=f?ls.createElement("div",{className:`${M}-cover`},f):null,z=ls.createElement("div",{className:`${M}-body`,style:s},c?T:v),F=g&&g.length?ls.createElement("ul",{className:`${M}-actions`},function(e){return e.map(((t,n)=>ls.createElement("li",{style:{width:100/e.length+"%"},key:`action-${n}`},ls.createElement("span",null,t))))}(g)):null,B=Z(S,["onTabChange"]),H=h(M,{[`${M}-loading`]:c,[`${M}-bordered`]:d,[`${M}-hoverable`]:_,[`${M}-contain-grid`]:$,[`${M}-contain-tabs`]:y&&y.length,[`${M}-${N}`]:N,[`${M}-type-${m}`]:!!m,[`${M}-rtl`]:"rtl"===E},i,r,A);return R(ls.createElement("div",Object.assign({ref:t},B,{className:H}),O,P,z,F))}));var ds=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:t,className:n,avatar:i,title:r,description:o}=e,a=ds(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=us.useContext(u),l=s("card",t),c=h(`${l}-meta`,n),d=i?us.createElement("div",{className:`${l}-meta-avatar`},i):null,p=r?us.createElement("div",{className:`${l}-meta-title`},r):null,m=o?us.createElement("div",{className:`${l}-meta-description`},o):null,f=p||m?us.createElement("div",{className:`${l}-meta-detail`},p,m):null;return us.createElement("div",Object.assign({},a,{className:c}),d,f)};const ps=hs,ms=window.React;var fs=ms.forwardRef((function(e,t){var n,i=e.prefixCls,r=e.forceRender,o=e.className,a=e.style,s=e.children,l=e.isActive,c=e.role,d=ms.useState(l||r),u=v(d,2),p=u[0],m=u[1];return ms.useEffect((function(){(r||l)&&m(!0)}),[r,l]),p?ms.createElement("div",{ref:t,className:h("".concat(i,"-content"),(n={},b(n,"".concat(i,"-content-active"),l),b(n,"".concat(i,"-content-inactive"),!l),n),o),style:a,role:c},ms.createElement("div",{className:"".concat(i,"-content-box")},s)):null}));fs.displayName="PanelContent";const gs=window.React;var ys=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],vs=gs.forwardRef((function(e,t){var n,r,o=e.showArrow,a=void 0===o||o,s=e.headerClass,l=e.isActive,c=e.onItemClick,d=e.forceRender,u=e.className,m=e.prefixCls,f=e.collapsible,g=e.accordion,y=e.panelKey,v=e.extra,w=e.header,x=e.expandIcon,_=e.openMotion,S=e.destroyInactivePanel,k=e.children,E=C(e,ys),$="disabled"===f,M="header"===f,R="icon"===f,A=null!=v&&"boolean"!=typeof v,T=function(){null==c||c(y)},L="function"==typeof x?x(e):gs.createElement("i",{className:"arrow"});L&&(L=gs.createElement("div",{className:"".concat(m,"-expand-icon"),onClick:["header","icon"].includes(f)?T:void 0},L));var j=h((b(n={},"".concat(m,"-item"),!0),b(n,"".concat(m,"-item-active"),l),b(n,"".concat(m,"-item-disabled"),$),n),u),O={className:h((b(r={},"".concat(m,"-header"),!0),b(r,"headerClass",s),b(r,"".concat(m,"-header-collapsible-only"),M),b(r,"".concat(m,"-icon-collapsible-only"),R),r)),"aria-expanded":l,"aria-disabled":$,onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==De.ENTER&&e.which!==De.ENTER||T()}};return M||R||(O.onClick=T,O.role=g?"tab":"button",O.tabIndex=$?-1:0),gs.createElement("div",i({},E,{ref:t,className:j}),gs.createElement("div",O,a&&L,gs.createElement("span",{className:"".concat(m,"-header-text"),onClick:"header"===f?T:void 0},w),A&&gs.createElement("div",{className:"".concat(m,"-extra")},v)),gs.createElement(p,i({visible:l,leavedClassName:"".concat(m,"-content-hidden")},_,{forceRender:d,removeOnLeave:S}),(function(e,t){var n=e.className,i=e.style;return gs.createElement(fs,{ref:t,prefixCls:m,className:n,style:i,isActive:l,forceRender:d,role:g?"tabpanel":void 0},k)})))}));const bs=window.React;var ws=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];const xs=window.React;function _s(e){var t=e;if(!Array.isArray(t)){var n=J(t);t="number"===n||"string"===n?[t]:[]}return t.map((function(e){return String(e)}))}var Cs=xs.forwardRef((function(e,t){var n=e.prefixCls,r=void 0===n?"rc-collapse":n,o=e.destroyInactivePanel,a=void 0!==o&&o,s=e.style,l=e.accordion,c=e.className,d=e.children,u=e.collapsible,p=e.openMotion,m=e.expandIcon,f=e.activeKey,g=e.defaultActiveKey,y=e.onChange,b=e.items,x=h(r,c),_=oe([],{value:f,onChange:function(e){return null==y?void 0:y(e)},defaultValue:g,postState:_s}),S=v(_,2),k=S[0],E=S[1];ce(!d,"`children` will be removed in next major version. Please use `items` instead.");var $=function(e,t,n){return Array.isArray(e)?function(e,t){var n=t.prefixCls,r=t.accordion,o=t.collapsible,a=t.destroyInactivePanel,s=t.onItemClick,l=t.activeKey,c=t.openMotion,d=t.expandIcon;return e.map((function(e,t){var u,h=e.children,p=e.label,m=e.key,f=e.collapsible,g=e.onItemClick,y=e.destroyInactivePanel,v=C(e,ws),b=String(null!=m?m:t),w=null!=f?f:o,x=null!=y?y:a;return u=r?l[0]===b:l.indexOf(b)>-1,bs.createElement(vs,i({},v,{prefixCls:n,key:b,panelKey:b,isActive:u,accordion:r,openMotion:c,expandIcon:d,header:p,collapsible:w,onItemClick:function(e){"disabled"!==w&&(s(e),null==g||g(e))},destroyInactivePanel:x}),h)}))}(e,n):q(t).map((function(e,t){return function(e,t,n){if(!e)return null;var i,r=n.prefixCls,o=n.accordion,a=n.collapsible,s=n.destroyInactivePanel,l=n.onItemClick,c=n.activeKey,d=n.openMotion,u=n.expandIcon,h=e.key||String(t),p=e.props,m=p.header,f=p.headerClass,g=p.destroyInactivePanel,y=p.collapsible,v=p.onItemClick;i=o?c[0]===h:c.indexOf(h)>-1;var b=null!=y?y:a,w={key:h,panelKey:h,header:m,headerClass:f,isActive:i,prefixCls:r,destroyInactivePanel:null!=g?g:s,openMotion:d,accordion:o,children:e.props.children,onItemClick:function(e){"disabled"!==b&&(l(e),null==v||v(e))},expandIcon:u,collapsible:b};return"string"==typeof e.type?e:(Object.keys(w).forEach((function(e){void 0===w[e]&&delete w[e]})),bs.cloneElement(e,w))}(e,t,n)}))}(b,d,{prefixCls:r,accordion:l,openMotion:p,expandIcon:m,collapsible:u,destroyInactivePanel:a,onItemClick:function(e){return E((function(){return l?k[0]===e?[]:[e]:k.indexOf(e)>-1?k.filter((function(t){return t!==e})):[].concat(w(k),[e])}))},activeKey:k});return xs.createElement("div",{ref:t,className:x,style:s,role:l?"tablist":void 0},$)}));const Ss=Object.assign(Cs,{Panel:vs});Ss.Panel;const ks=window.React,Es=ks.forwardRef(((e,t)=>{const{getPrefixCls:n}=ks.useContext(u),{prefixCls:i,className:r="",showArrow:o=!0}=e,a=n("collapse",i),s=h({[`${a}-no-arrow`]:!o},r);return ks.createElement(Ss.Panel,Object.assign({ref:t},e,{prefixCls:a,className:s}))})),$s=e=>{const{componentCls:t,collapseContentBg:n,padding:i,collapseContentPaddingHorizontal:r,collapseHeaderBg:o,collapseHeaderPadding:a,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:c,lineWidth:u,lineType:h,colorBorder:p,colorText:m,colorTextHeading:f,colorTextDisabled:g,fontSize:y,fontSizeLG:v,lineHeight:b,marginSM:w,paddingSM:x,paddingLG:_,paddingXS:C,motionDurationSlow:S,fontSizeIcon:k}=e,E=`${u}px ${h} ${p}`;return{[t]:Object.assign(Object.assign({},d(e)),{backgroundColor:o,border:E,borderBottom:0,borderRadius:`${c}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:E,"&:last-child":{[`\n &,\n & > ${t}-header`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,paddingInlineStart:x,color:f,lineHeight:b,cursor:"pointer",transition:`all ${S}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:y*b,display:"flex",alignItems:"center",paddingInlineEnd:w,marginInlineStart:i-x},[`${t}-arrow`]:Object.assign(Object.assign({},ue()),{fontSize:k,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:m,backgroundColor:n,borderTop:E,[`& > ${t}-content-box`]:{padding:`${i}px ${r}px`},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:s,paddingInlineStart:C,[`> ${t}-expand-icon`]:{marginInlineStart:x-C}},[`> ${t}-content > ${t}-content-box`]:{padding:x}}},"&-large":{[`> ${t}-item`]:{fontSize:v,[`> ${t}-header`]:{padding:l,paddingInlineStart:i,[`> ${t}-expand-icon`]:{height:v*b,marginInlineStart:_-i}},[`> ${t}-content > ${t}-content-box`]:{padding:_}}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:g,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:w}}}}})}},Ms=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Rs=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:i,colorBorder:r}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${r}`},[`\n > ${t}-item:last-child,\n > ${t}-item:last-child ${t}-header\n `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:i}}}},As=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Ts=l("Collapse",(e=>{const t=c(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapseHeaderPaddingSM:`${e.paddingXS}px ${e.paddingSM}px`,collapseHeaderPaddingLG:`${e.padding}px ${e.paddingLG}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[$s(t),Rs(t),As(t),Ms(t),de(t)]})),Ls=window.React,js=Ls.forwardRef(((e,t)=>{const{getPrefixCls:n,direction:i}=Ls.useContext(u),{prefixCls:r,className:o,rootClassName:a,bordered:s=!0,ghost:l,size:c,expandIconPosition:d="start",children:p,expandIcon:m}=e,f=le((e=>{var t;return null!==(t=null!=c?c:e)&&void 0!==t?t:"middle"})),g=n("collapse",r),y=n(),[v,b]=Ts(g),w=Ls.useMemo((()=>"left"===d?"start":"right"===d?"end":d),[d]),x=h(`${g}-icon-position-${w}`,{[`${g}-borderless`]:!s,[`${g}-rtl`]:"rtl"===i,[`${g}-ghost`]:!!l,[`${g}-${f}`]:"middle"!==f},o,a,b),_=Object.assign(Object.assign({},he(y)),{motionAppear:!1,leavedClassName:`${g}-content-hidden`}),C=Ls.useMemo((()=>p?q(p).map(((e,t)=>{var n,i;if(null===(n=e.props)||void 0===n?void 0:n.disabled){const n=null!==(i=e.key)&&void 0!==i?i:String(t),{disabled:r,collapsible:o}=e.props,a=Object.assign(Object.assign({},Z(e.props,["disabled"])),{key:n,collapsible:null!=o?o:r?"disabled":void 0});return Q(e,a)}return e})):null),[p]);return v(Ls.createElement(Ss,Object.assign({ref:t,openMotion:_},Z(e,["rootClassName"]),{expandIcon:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=m?m(e):Ls.createElement(Ke,{rotate:e.isActive?90:void 0});return Q(t,(()=>({className:h(t.props.className,`${g}-arrow`)})))},prefixCls:g,className:x}),C))})),Os=Object.assign(js,{Panel:Es});var Ns=["v"],Is=function(){r(t,pe);var e=o(t);function t(n){return a(this,t),e.call(this,zs(n))}return s(t,[{key:"toHsbString",value:function(){var e=this.toHsb(),t=Ps(100*e.s),n=Ps(100*e.b),i=Ps(e.h),r=e.a,o="hsb(".concat(i,", ").concat(t,"%, ").concat(n,"%)"),a="hsba(".concat(i,", ").concat(t,"%, ").concat(n,"%, ").concat(r.toFixed(0===r?0:2),")");return 1===r?o:a}},{key:"toHsb",value:function(){var e=this.toHsv();"object"===J(this.originalInput)&&this.originalInput&&"h"in this.originalInput&&(e=this.originalInput);var t=e;t.v;var n=C(t,Ns);return x(x({},n),{},{b:e.v})}}]),t}(),Ds=["b"],Ps=function(e){return Math.round(Number(e||0))},zs=function(e){if(e&&"object"===J(e)&&"h"in e&&"b"in e){var t=e,n=t.b,i=C(t,Ds);return x(x({},i),{},{v:n})}return"string"==typeof e&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Fs=function(e){return e instanceof Is?e:new Is(e)},Bs=Fs("#1677ff"),Hs=function(e){var t=e.offset,n=e.targetRef,i=e.containerRef,r=e.color,o=e.type,a=i.current.getBoundingClientRect(),s=a.width,l=a.height,c=n.current.getBoundingClientRect(),d=c.width/2,u=c.height/2,h=(t.x+d)/s,p=1-(t.y+u)/l,m=r.toHsb(),f=h,g=(t.x+d)/s*360;if(o)switch(o){case"hue":return Fs(x(x({},m),{},{h:g<=0?0:g}));case"alpha":return Fs(x(x({},m),{},{a:f<=0?0:f}))}return Fs({h:m.h,s:h<=0?0:h,b:p>=1?1:p,a:m.a})},Ws=function(e,t,n,i){var r=e.current.getBoundingClientRect(),o=r.width,a=r.height,s=t.current.getBoundingClientRect(),l=s.width,c=s.height,d=l/2,u=c/2,h=n.toHsb();if((0!==l||0!==c)&&l===c){if(i)switch(i){case"hue":return{x:h.h/360*o-d,y:-u/3};case"alpha":return{x:h.a/1*o-d,y:-u/3}}return{x:h.s*o-d,y:(1-h.b)*a-u}}};const Us=window.React;var Vs=function(e){var t=e.color,n=e.prefixCls,i=e.className,r=e.style,o=e.onClick,a="".concat(n,"-color-block");return Us.createElement("div",{className:h(a,i),style:r,onClick:o},Us.createElement("div",{className:"".concat(a,"-inner"),style:{background:t}}))};const Gs=window.React.useEffect,Ys=window.React.useRef,Ks=window.React.useState;function Qs(e){var t=e.offset,n=e.targetRef,i=e.containerRef,r=e.direction,o=e.onDragChange,a=e.onDragChangeComplete,s=e.calculate,l=e.color,c=e.disabledDrag,d=Ks(t||{x:0,y:0}),u=v(d,2),h=u[0],p=u[1],m=Ys(null),f=Ys(null),g=Ys({flag:!1});Gs((function(){if(!1===g.current.flag){var e=null==s?void 0:s(i);e&&p(e)}}),[l,i]),Gs((function(){return function(){document.removeEventListener("mousemove",m.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",m.current),document.removeEventListener("touchend",f.current),m.current=null,f.current=null}}),[]);var y=function(e){var t=function(e){var t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,i=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-i}}(e),a=t.pageX,s=t.pageY,l=i.current.getBoundingClientRect(),c=l.x,d=l.y,u=l.width,m=l.height,f=n.current.getBoundingClientRect(),g=f.width,y=f.height,v=g/2,b=y/2,w=Math.max(0,Math.min(a-c,u))-v,x=Math.max(0,Math.min(s-d,m))-b,_={x:w,y:"x"===r?h.y:x};if(0===g&&0===y||g!==y)return!1;p(_),null==o||o(_)},b=function(e){e.preventDefault(),y(e)},w=function(e){e.preventDefault(),g.current.flag=!1,document.removeEventListener("mousemove",m.current),document.removeEventListener("mouseup",f.current),document.removeEventListener("touchmove",m.current),document.removeEventListener("touchend",f.current),m.current=null,f.current=null,null==a||a()};return[h,function(e){c||(y(e),g.current.flag=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),document.addEventListener("touchmove",b),document.addEventListener("touchend",w),m.current=b,f.current=w)}]}const qs=window.React;var Zs=function(e){var t=e.size,n=void 0===t?"default":t,i=e.color,r=e.prefixCls;return qs.createElement("div",{className:h("".concat(r,"-handler"),b({},"".concat(r,"-handler-sm"),"small"===n)),style:{backgroundColor:i}})};const Xs=window.React;var Js=function(e){var t=e.children,n=e.style,i=e.prefixCls;return Xs.createElement("div",{className:"".concat(i,"-palette"),style:x({position:"relative"},n)},t)};const el=window.React;var tl=(0,window.React.forwardRef)((function(e,t){var n=e.children,i=e.offset;return el.createElement("div",{ref:t,style:{position:"absolute",left:i.x,top:i.y,zIndex:1}},n)}));const nl=window.React,il=window.React.useRef;var rl=function(e){var t=e.color,n=e.onChange,i=e.prefixCls,r=e.onChangeComplete,o=e.disabled,a=il(),s=il(),l=Qs({color:t,containerRef:a,targetRef:s,calculate:function(e){return Ws(e,s,t)},onDragChange:function(e){return n(Hs({offset:e,targetRef:s,containerRef:a,color:t}))},onDragChangeComplete:r,disabledDrag:o}),c=v(l,2),d=c[0],u=c[1];return nl.createElement("div",{ref:a,className:"".concat(i,"-select"),onMouseDown:u,onTouchStart:u},nl.createElement(Js,{prefixCls:i},nl.createElement(tl,{offset:d,ref:s},nl.createElement(Zs,{color:t.toRgbString(),prefixCls:i})),nl.createElement("div",{className:"".concat(i,"-saturation"),style:{backgroundColor:"hsl(".concat(t.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))};const ol=window.React,al=window.React.useMemo;var sl=function(e){var t=e.colors,n=e.children,i=e.direction,r=void 0===i?"to right":i,o=e.type,a=e.prefixCls,s=al((function(){return t.map((function(e,n){var i=Fs(e);return"alpha"===o&&n===t.length-1&&i.setAlpha(1),i.toRgbString()})).join(",")}),[t,o]);return ol.createElement("div",{className:"".concat(a,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(r,", ").concat(s,")")}},n)};const ll=window.React,cl=window.React.useRef;var dl=function(e){var t=e.gradientColors,n=e.direction,i=e.type,r=void 0===i?"hue":i,o=e.color,a=e.value,s=e.onChange,l=e.onChangeComplete,c=e.disabled,d=e.prefixCls,u=cl(),p=cl(),m=Qs({color:o,targetRef:p,containerRef:u,calculate:function(e){return Ws(e,p,o,r)},onDragChange:function(e){s(Hs({offset:e,targetRef:p,containerRef:u,color:o,type:r}))},onDragChangeComplete:function(){null==l||l(r)},direction:"x",disabledDrag:c}),f=v(m,2),g=f[0],y=f[1];return ll.createElement("div",{ref:u,className:h("".concat(d,"-slider"),"".concat(d,"-slider-").concat(r)),onMouseDown:y,onTouchStart:y},ll.createElement(Js,{prefixCls:d},ll.createElement(tl,{offset:g,ref:p},ll.createElement(Zs,{size:"small",color:a,prefixCls:d})),ll.createElement(sl,{colors:t,direction:n,type:r,prefixCls:d})))};const ul=window.React.useEffect,hl=window.React.useState;function pl(e){return void 0!==e}const ml=window.React,fl=window.React.forwardRef,gl=window.React.useMemo;var yl=["rgb(255, 0, 0) 0%","rgb(255, 255, 0) 17%","rgb(0, 255, 0) 33%","rgb(0, 255, 255) 50%","rgb(0, 0, 255) 67%","rgb(255, 0, 255) 83%","rgb(255, 0, 0) 100%"];const vl=fl((function(e,t){var n=e.value,r=e.defaultValue,o=e.prefixCls,a=void 0===o?"rc-color-picker":o,s=e.onChange,l=e.onChangeComplete,c=e.className,d=e.style,u=e.panelRender,p=e.disabledAlpha,m=void 0!==p&&p,f=e.disabled,g=void 0!==f&&f,y=function(e,t){var n=t.defaultValue,i=t.value,r=hl((function(){var t;return t=pl(i)?i:pl(n)?n:e,Fs(t)})),o=v(r,2),a=o[0],s=o[1];return ul((function(){i&&s(Fs(i))}),[i]),[a,s]}(Bs,{value:n,defaultValue:r}),w=v(y,2),x=w[0],_=w[1],C=gl((function(){var e=Fs(x.toRgbString());return e.setAlpha(1),e.toRgbString()}),[x]),S=h("".concat(a,"-panel"),c,b({},"".concat(a,"-panel-disabled"),g)),k={prefixCls:a,onChangeComplete:l,disabled:g},E=function(e,t){n||_(e),null==s||s(e,t)},$=ml.createElement(ml.Fragment,null,ml.createElement(rl,i({color:x,onChange:E},k)),ml.createElement("div",{className:"".concat(a,"-slider-container")},ml.createElement("div",{className:h("".concat(a,"-slider-group"),b({},"".concat(a,"-slider-group-disabled-alpha"),m))},ml.createElement(dl,i({gradientColors:yl,color:x,value:"hsl(".concat(x.toHsb().h,",100%, 50%)"),onChange:function(e){return E(e,"hue")}},k)),!m&&ml.createElement(dl,i({type:"alpha",gradientColors:["rgba(255, 0, 4, 0) 0%",C],color:x,value:x.toRgbString(),onChange:function(e){return E(e,"alpha")}},k))),ml.createElement(Vs,{color:x.toRgbString(),prefixCls:a})));return ml.createElement("div",{className:S,style:d,ref:t},"function"==typeof u?u($):$)})),bl=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:r}=e;return{[t]:Object.assign(Object.assign({},d(e)),{borderBlockStart:`${r}px solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${e.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${r}px solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${r}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${t}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${r}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},wl=l("Divider",(e=>{const t=c(e,{dividerVerticalGutterMargin:e.marginXS,dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG});return[bl(t)]}),{sizePaddingEdgeHorizontal:0});var xl=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{getPrefixCls:t,direction:n}=_l.useContext(u),{prefixCls:i,type:r="horizontal",orientation:o="center",orientationMargin:a,className:s,rootClassName:l,children:c,dashed:d,plain:p}=e,m=xl(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain"]),f=t("divider",i),[g,y]=wl(f),v=o.length>0?`-${o}`:o,b=!!c,w="left"===o&&null!=a,x="right"===o&&null!=a,_=h(f,y,`${f}-${r}`,{[`${f}-with-text`]:b,[`${f}-with-text${v}`]:b,[`${f}-dashed`]:!!d,[`${f}-plain`]:!!p,[`${f}-rtl`]:"rtl"===n,[`${f}-no-default-orientation-margin-left`]:w,[`${f}-no-default-orientation-margin-right`]:x},s,l),C=_l.useMemo((()=>"number"==typeof a?a:/^\d+$/.test(a)?Number(a):a),[a]),S=Object.assign(Object.assign({},w&&{marginLeft:C}),x&&{marginRight:C});return g(_l.createElement("div",Object.assign({className:_},m,{role:"separator"}),c&&"vertical"!==r&&_l.createElement("span",{className:`${f}-inner-text`,style:S},c)))};let Sl=function(){function e(t){a(this,e),this.metaColor=new Is(t)}return s(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return $l(this.toHexString(),this.metaColor.getAlpha()<1)}},{key:"toHexString",value:function(){return 1===this.metaColor.getAlpha()?this.metaColor.toHexString():this.metaColor.toHex8String()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}}]),e}();const kl=e=>e instanceof Sl?e:new Sl(e),El=(e,t)=>(null==e?void 0:e.replace(/[^\w/]/gi,"").slice(0,t?8:6))||"",$l=(e,t)=>e?El(e,t):"",Ml=window.React,Rl=e=>{let{prefixCls:t,value:n,colorCleared:i,onChange:r}=e;return Ml.createElement("div",{className:`${t}-clear`,onClick:()=>{if(n&&!i){const e=n.toHsb();e.a=0;const t=kl(e);null==r||r(t)}}})};var Al,Tl;(Tl=Al||(Al={})).hex="hex",Tl.rgb="rgb",Tl.hsb="hsb";const Ll={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},jl=window.React;var Ol=function(e,t){return jl.createElement(n,i({},e,{ref:t,icon:Ll}))};const Nl=jl.forwardRef(Ol);function Il(){return"function"==typeof BigInt}function Dl(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function Pl(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var i=t||"0",r=i.split("."),o=r[0]||"0",a=r[1]||"0";"0"===o&&"0"===a&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:i,integerStr:o,decimalStr:a,fullStr:"".concat(s).concat(i)}}function zl(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Fl(e){var t=String(e);if(zl(e)){var n=Number(t.slice(t.indexOf("e-")+2)),i=t.match(/\.(\d+)/);return null!=i&&i[1]&&(n+=i[1].length),n}return t.includes(".")&&Hl(t)?t.length-t.indexOf(".")-1:0}function Bl(e){var t=String(e);if(zl(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Il()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":Pl("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr}}]),e}(),Ul=function(){function e(t){a(this,e),b(this,"origin",""),b(this,"number",void 0),b(this,"empty",void 0),Dl(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return s(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var i=this.number+n;if(i>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(iNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(i0&&void 0!==arguments[0]&&!arguments[0]?this.origin:this.isInvalidate()?"":Bl(this.number)}}]),e}();function Vl(e){return Il()?new Wl(e):new Ul(e)}function Gl(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var r=Pl(e),o=r.negativeStr,a=r.integerStr,s=r.decimalStr,l="".concat(t).concat(s),c="".concat(o).concat(a);if(n>=0){var d=Number(s[n]);return d>=5&&!i?Gl(Vl(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-d)).toString(),t,n,i):0===n?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return".0"===l?c:"".concat(c).concat(l)}const Yl=window.React.useState,Kl=window.React;function Ql(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,o=e.upDisabled,a=e.downDisabled,s=e.onStep,l=Kl.useRef(),c=Kl.useRef();c.current=s;var d,u,p,m,f=function(e,t){e.preventDefault(),c.current(t),l.current=setTimeout((function e(){c.current(t),l.current=setTimeout(e,200)}),600)},g=function(){clearTimeout(l.current)};if(Kl.useEffect((function(){return g}),[]),d=Yl(!1),p=(u=v(d,2))[0],m=u[1],me((function(){m(re())}),[]),p)return null;var y="".concat(t,"-handler"),w=h(y,"".concat(y,"-up"),b({},"".concat(y,"-up-disabled"),o)),x=h(y,"".concat(y,"-down"),b({},"".concat(y,"-down-disabled"),a)),_={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return Kl.createElement("div",{className:"".concat(y,"-wrap")},Kl.createElement("span",i({},_,{onMouseDown:function(e){f(e,!0)},"aria-label":"Increase Value","aria-disabled":o,className:w}),n||Kl.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),Kl.createElement("span",i({},_,{onMouseDown:function(e){f(e,!1)},"aria-label":"Decrease Value","aria-disabled":a,className:x}),r||Kl.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function ql(e){var t="number"==typeof e?Bl(e):Pl(e).fullStr;return t.includes(".")?Pl(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const Zl=window.React.useRef,Xl=window.React.useRef,Jl=window.React.useEffect;var ec=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"];const tc=window.React;var nc=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},ic=function(e){var t=Vl(e);return t.isInvalidate()?null:t},rc=tc.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-input-number":r,a=e.className,s=e.style,l=e.min,c=e.max,d=e.step,u=void 0===d?1:d,p=e.defaultValue,m=e.value,f=e.disabled,g=e.readOnly,y=e.upHandler,w=e.downHandler,x=e.keyboard,_=e.controls,S=void 0===_||_,k=e.stringMode,E=e.parser,$=e.formatter,M=e.precision,R=e.decimalSeparator,A=e.onChange,T=e.onInput,L=e.onPressEnter,j=e.onStep,O=C(e,ec),N="".concat(o,"-input"),I=tc.useRef(null),D=tc.useState(!1),P=v(D,2),z=P[0],F=P[1],B=tc.useRef(!1),H=tc.useRef(!1),W=tc.useRef(!1),U=tc.useState((function(){return Vl(null!=m?m:p)})),V=v(U,2),G=V[0],Y=V[1],K=tc.useCallback((function(e,t){if(!t)return M>=0?M:Math.max(Fl(e),Fl(u))}),[M,u]),Q=tc.useCallback((function(e){var t=String(e);if(E)return E(t);var n=t;return R&&(n=n.replace(R,".")),n.replace(/[^\w.-]+/g,"")}),[E,R]),q=tc.useRef(""),Z=tc.useCallback((function(e,t){if($)return $(e,{userTyping:t,input:String(q.current)});var n="number"==typeof e?Bl(e):e;if(!t){var i=K(n,t);Hl(n)&&(R||i>=0)&&(n=Gl(n,R||".",i))}return n}),[$,K,R]),ee=tc.useState((function(){var e=null!=p?p:m;return G.isInvalidate()&&["string","number"].includes(J(e))?Number.isNaN(e)?"":e:Z(G.toString(),!1)})),ne=v(ee,2),ie=ne[0],re=ne[1];function oe(e,t){re(Z(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}q.current=ie;var ae,se,le,de,ue,he=tc.useMemo((function(){return ic(c)}),[c,M]),pe=tc.useMemo((function(){return ic(l)}),[l,M]),me=tc.useMemo((function(){return!(!he||!G||G.isInvalidate())&&he.lessEquals(G)}),[he,G]),ge=tc.useMemo((function(){return!(!pe||!G||G.isInvalidate())&&G.lessEquals(pe)}),[pe,G]),ye=(ae=I.current,se=z,le=Zl(null),[function(){try{var e=ae.selectionStart,t=ae.selectionEnd,n=ae.value,i=n.substring(0,e),r=n.substring(t);le.current={start:e,end:t,value:n,beforeTxt:i,afterTxt:r}}catch(o){}},function(){if(ae&&le.current&&se)try{var e=ae.value,t=le.current,n=t.beforeTxt,i=t.afterTxt,r=t.start,o=e.length;if(e.endsWith(i))o=e.length-le.current.afterTxt.length;else if(e.startsWith(n))o=n.length;else{var a=n[r-1],s=e.indexOf(a,r-1);-1!==s&&(o=s+1)}ae.setSelectionRange(o,o)}catch(l){ce(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(l.message))}}]),ve=v(ye,2),be=ve[0],we=ve[1],xe=function(e){return he&&!e.lessEquals(he)?he:pe&&!pe.lessEquals(e)?pe:null},_e=function(e){return!xe(e)},Ce=function(e,t){var n=e,i=_e(n)||n.isEmpty();if(n.isEmpty()||t||(n=xe(n)||n,i=!0),!g&&!f&&i){var r=n.toString(),o=K(r,t);return o>=0&&(n=Vl(Gl(r,".",o)),_e(n)||(n=Vl(Gl(r,".",o,!0)))),n.equals(G)||(void 0===m&&Y(n),null==A||A(n.isEmpty()?null:nc(k,n)),void 0===m&&oe(n,t)),n}return G},Se=(de=Xl(0),ue=function(){te.cancel(de.current)},Jl((function(){return ue}),[]),function(e){ue(),de.current=te((function(){e()}))}),ke=function e(t){if(be(),re(t),!H.current){var n=Vl(Q(t));n.isNaN()||Ce(n,!0)}null==T||T(t),Se((function(){var n=t;E||(n=t.replace(/。/g,".")),n!==t&&e(n)}))},Ee=function(e){var t;if(!(e&&me||!e&&ge)){B.current=!1;var n=Vl(W.current?ql(u):u);e||(n=n.negate());var i=(G||Vl(0)).add(n.toString()),r=Ce(i,!1);null==j||j(nc(k,r),{offset:W.current?ql(u):u,type:e?"up":"down"}),null===(t=I.current)||void 0===t||t.focus()}},$e=function(e){var t=Vl(Q(ie)),n=t;n=t.isNaN()?G:Ce(t,e),void 0!==m?oe(G,!1):n.isNaN()||oe(n,!1)};return X((function(){G.isInvalidate()||oe(G,!1)}),[M]),X((function(){var e=Vl(m);Y(e);var t=Vl(Q(ie));e.equals(t)&&B.current&&!$||oe(e,B.current)}),[m]),X((function(){$&&we()}),[ie]),tc.createElement("div",{className:h(o,a,(n={},b(n,"".concat(o,"-focused"),z),b(n,"".concat(o,"-disabled"),f),b(n,"".concat(o,"-readonly"),g),b(n,"".concat(o,"-not-a-number"),G.isNaN()),b(n,"".concat(o,"-out-of-range"),!G.isInvalidate()&&!_e(G)),n)),style:s,onFocus:function(){F(!0)},onBlur:function(){$e(!1),F(!1),B.current=!1},onKeyDown:function(e){var t=e.which,n=e.shiftKey;B.current=!0,W.current=!!n,t===De.ENTER&&(H.current||(B.current=!1),$e(!1),null==L||L(e)),!1!==x&&!H.current&&[De.UP,De.DOWN].includes(t)&&(Ee(De.UP===t),e.preventDefault())},onKeyUp:function(){B.current=!1,W.current=!1},onCompositionStart:function(){H.current=!0},onCompositionEnd:function(){H.current=!1,ke(I.current.value)},onBeforeInput:function(){B.current=!0}},S&&tc.createElement(Ql,{prefixCls:o,upNode:y,downNode:w,upDisabled:me,downDisabled:ge,onStep:Ee}),tc.createElement("div",{className:"".concat(N,"-wrap")},tc.createElement("input",i({autoComplete:"off",role:"spinbutton","aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":G.isInvalidate()?null:G.toString(),step:u},O,{ref:fe(I,t),className:N,value:ie,onChange:function(e){ke(e.target.value)},disabled:f,readOnly:g}))))}));rc.displayName="InputNumber";const oc=e=>{const{componentCls:t,lineWidth:n,lineType:i,colorBorder:r,borderRadius:o,fontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:h,motionDurationMid:p,colorPrimary:m,controlHeight:f,inputPaddingHorizontal:g,colorBgContainer:y,colorTextDisabled:v,borderRadiusSM:b,borderRadiusLG:w,controlWidth:x,handleVisible:_}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),Ze(e)),Xe(e,t)),{display:"inline-block",width:x,margin:0,padding:0,border:`${n}px ${i} ${r}`,borderRadius:o,"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:w,[`input${t}-input`]:{height:s-2*n}},"&-sm":{padding:0,borderRadius:b,[`input${t}-input`]:{height:l-2*n,padding:`0 ${u}px`}},"&:hover":Object.assign({},Je(e)),"&-focused":Object.assign({},et(e)),"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},d(e)),tt(e)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:w}},"&-sm":{[`${t}-group-addon`]:{borderRadius:b}},[`${t}-wrapper-disabled > ${t}-group-addon`]:Object.assign({},nt(e))}}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{width:"100%",height:f-2*n,padding:`0 ${g}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${p} linear`,appearance:"textfield",fontSize:"inherit"}),it(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[t]:{[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{opacity:1},[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleWidth,height:"100%",background:y,borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,opacity:!0===_?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${p} linear ${p}`,[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`\n ${t}-handler-up-inner,\n ${t}-handler-down-inner\n `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:h,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${i} ${r}`,transition:`all ${p} linear`,"&:active":{background:e.colorFillAlter},"&:hover":{height:"60%",[`\n ${t}-handler-up-inner,\n ${t}-handler-down-inner\n `]:{color:m}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},ue()),{color:h,transition:`all ${p} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderBlockStart:`${n}px ${i} ${r}`,borderEndEndRadius:o},"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`\n ${t}-handler-up-disabled,\n ${t}-handler-down-disabled\n `]:{cursor:"not-allowed"},[`\n ${t}-handler-up-disabled:hover &-handler-up-inner,\n ${t}-handler-down-disabled:hover &-handler-down-inner\n `]:{color:v}}},{[`${t}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${t}-handler-down`]:{borderBlockStartWidth:0}}}]},ac=e=>{const{componentCls:t,inputPaddingHorizontal:n,inputAffixPadding:i,controlWidth:r,borderRadiusLG:o,borderRadiusSM:a}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},Ze(e)),Xe(e,`${t}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:r,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:o},"&-sm":{borderRadius:a},[`&:not(${t}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},Je(e)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},[`input${t}-input`]:{padding:0},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:i},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:i}}})}},sc=l("InputNumber",(e=>{const t=Qe(e);return[oc(t),ac(t),qe(t)]}),(e=>({controlWidth:90,handleWidth:e.controlHeightSM-2*e.lineWidth,handleFontSize:e.fontSize/2,handleVisible:"auto"})));var lc=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{getPrefixCls:n,direction:i}=cc.useContext(u),[r,o]=cc.useState(!1),a=cc.useRef(null);cc.useImperativeHandle(t,(()=>a.current));const{className:s,rootClassName:l,size:c,disabled:d,prefixCls:p,addonBefore:m,addonAfter:f,prefix:g,bordered:y=!0,readOnly:v,status:b,controls:w}=e,x=lc(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),_=n("input-number",p),[C,S]=sc(_),{compactSize:k,compactItemClassnames:E}=ge(_,i);let $=cc.createElement(Nl,{className:`${_}-handler-up-inner`}),M=cc.createElement(We,{className:`${_}-handler-down-inner`});const R="boolean"==typeof w?w:void 0;"object"==typeof w&&($=void 0===w.upIcon?$:cc.createElement("span",{className:`${_}-handler-up-inner`},w.upIcon),M=void 0===w.downIcon?M:cc.createElement("span",{className:`${_}-handler-down-inner`},w.downIcon));const{hasFeedback:A,status:T,isFormItemInput:L,feedbackIcon:j}=cc.useContext(ye),O=ot(T,b),N=le((e=>{var t;return null!==(t=null!=c?c:k)&&void 0!==t?t:e})),I=null!=g||A,z=!(!m&&!f),F=cc.useContext(ve),B=null!=d?d:F,H=h({[`${_}-lg`]:"large"===N,[`${_}-sm`]:"small"===N,[`${_}-rtl`]:"rtl"===i,[`${_}-borderless`]:!y,[`${_}-in-form-item`]:L},rt(_,O),E,S,s,!I&&!z&&l);let W=cc.createElement(rc,Object.assign({ref:a,disabled:B,className:H,upHandler:$,downHandler:M,prefixCls:_,readOnly:v,controls:R},x));if(I){const t=h(`${_}-affix-wrapper`,rt(`${_}-affix-wrapper`,O,A),{[`${_}-affix-wrapper-focused`]:r,[`${_}-affix-wrapper-disabled`]:e.disabled,[`${_}-affix-wrapper-sm`]:"small"===N,[`${_}-affix-wrapper-lg`]:"large"===N,[`${_}-affix-wrapper-rtl`]:"rtl"===i,[`${_}-affix-wrapper-readonly`]:v,[`${_}-affix-wrapper-borderless`]:!y},!z&&s,!z&&l,S);W=cc.createElement("div",{className:t,style:e.style,onMouseUp:()=>a.current.focus()},g&&cc.createElement("span",{className:`${_}-prefix`},g),Q(W,{style:null,value:e.value,onFocus:t=>{var n;o(!0),null===(n=e.onFocus)||void 0===n||n.call(e,t)},onBlur:t=>{var n;o(!1),null===(n=e.onBlur)||void 0===n||n.call(e,t)}}),A&&cc.createElement("span",{className:`${_}-suffix`},j))}if(z){const t=`${_}-group`,n=`${t}-addon`,r=m?cc.createElement("div",{className:n},m):null,o=f?cc.createElement("div",{className:n},f):null,a=h(`${_}-wrapper`,t,S,{[`${t}-rtl`]:"rtl"===i,[`${_}-wrapper-disabled`]:B}),c=h(`${_}-group-wrapper`,{[`${_}-group-wrapper-sm`]:"small"===N,[`${_}-group-wrapper-lg`]:"large"===N,[`${_}-group-wrapper-rtl`]:"rtl"===i},rt(`${_}-group-wrapper`,O,A),S,s,l);W=cc.createElement("div",{className:c,style:e.style},cc.createElement("div",{className:a},r&&cc.createElement(D,null,cc.createElement(P,{status:!0,override:!0},r)),Q(W,{style:null,disabled:B}),o&&cc.createElement(D,null,cc.createElement(P,{status:!0,override:!0},o))))}return C(W)})),uc=dc;uc._InternalPanelDoNotUseOrYouWillBeFired=e=>cc.createElement(F,{theme:{components:{InputNumber:{handleVisible:!0}}}},cc.createElement(dc,Object.assign({},e)));const hc=uc,pc=window.React,mc=window.React.useEffect,fc=window.React.useState,gc=e=>{let{prefixCls:t,min:n=0,max:i=100,value:r,onChange:o,className:a,formatter:s}=e;const l=`${t}-steppers`,[c,d]=fc(r);return mc((()=>{Number.isNaN(r)||d(r)}),[r]),pc.createElement(hc,{className:h(l,a),min:n,max:i,value:c,formatter:s,size:"small",onChange:e=>{r||d(e||0),null==o||o(e)}})},yc=window.React,vc=window.React.useEffect,bc=window.React.useState,wc=e=>{let{prefixCls:t,value:n,onChange:i}=e;const r=`${t}-alpha-input`,[o,a]=bc(kl(n||"#000"));return vc((()=>{n&&a(n)}),[n]),yc.createElement(gc,{value:(s=o,Ps(100*s.toHsb().a)),prefixCls:t,formatter:e=>`${e}%`,className:r,onChange:e=>{const t=o.toHsb();t.a=(e||0)/100;const r=kl(t);n||a(r),null==i||i(r)}});var s},xc=window.React,_c=window.React.useEffect,Cc=window.React.useState,Sc=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,kc=e=>Sc.test(`#${e}`),Ec=e=>{let{prefixCls:t,value:n,onChange:i}=e;const r=`${t}-hex-input`,[o,a]=Cc(null==n?void 0:n.toHex());return _c((()=>{const e=null==n?void 0:n.toHex();kc(e)&&n&&a(El(e))}),[n]),xc.createElement(at,{className:r,value:null==o?void 0:o.toUpperCase(),prefix:"#",onChange:e=>{const t=e.target.value;a(El(t)),kc(El(t,!0))&&(null==i||i(kl(t)))},size:"small"})},$c=window.React,Mc=window.React.useEffect,Rc=window.React.useState,Ac=e=>{let{prefixCls:t,value:n,onChange:i}=e;const r=`${t}-hsb-input`,[o,a]=Rc(kl(n||"#000"));Mc((()=>{n&&a(n)}),[n]);const s=(e,t)=>{const r=o.toHsb();r[t]="h"===t?e:(e||0)/100;const s=kl(r);n||a(s),null==i||i(s)};return $c.createElement("div",{className:r},$c.createElement(gc,{max:360,min:0,value:Number(o.toHsb().h),prefixCls:t,className:r,formatter:e=>Ps(e||0).toString(),onChange:e=>s(Number(e),"h")}),$c.createElement(gc,{max:100,min:0,value:100*Number(o.toHsb().s),prefixCls:t,className:r,formatter:e=>`${Ps(e||0)}%`,onChange:e=>s(Number(e),"s")}),$c.createElement(gc,{max:100,min:0,value:100*Number(o.toHsb().b),prefixCls:t,className:r,formatter:e=>`${Ps(e||0)}%`,onChange:e=>s(Number(e),"b")}))},Tc=window.React,Lc=window.React.useEffect,jc=window.React.useState,Oc=e=>{let{prefixCls:t,value:n,onChange:i}=e;const r=`${t}-rgb-input`,[o,a]=jc(kl(n||"#000"));Lc((()=>{n&&a(n)}),[n]);const s=(e,t)=>{const r=o.toRgb();r[t]=e||0;const s=kl(r);n||a(s),null==i||i(s)};return Tc.createElement("div",{className:r},Tc.createElement(gc,{max:255,min:0,value:Number(o.toRgb().r),prefixCls:t,className:r,onChange:e=>s(Number(e),"r")}),Tc.createElement(gc,{max:255,min:0,value:Number(o.toRgb().g),prefixCls:t,className:r,onChange:e=>s(Number(e),"g")}),Tc.createElement(gc,{max:255,min:0,value:Number(o.toRgb().b),prefixCls:t,className:r,onChange:e=>s(Number(e),"b")}))},Nc=window.React,Ic=window.React.useMemo,Dc=[Al.hex,Al.hsb,Al.rgb].map((e=>({value:e,label:e.toLocaleUpperCase()}))),Pc=e=>{const{prefixCls:t,format:n,value:i,onFormatChange:r,onChange:o}=e,[a,s]=oe(Al.hex,{value:n,onChange:r}),l=`${t}-input`,c=Ic((()=>{const e={value:i,prefixCls:t,onChange:o};switch(a){case Al.hsb:return Nc.createElement(Ac,Object.assign({},e));case Al.rgb:return Nc.createElement(Oc,Object.assign({},e));case Al.hex:default:return Nc.createElement(Ec,Object.assign({},e))}}),[a,t,i,o]);return Nc.createElement("div",{className:`${l}-container`},Nc.createElement(st,{value:a,bordered:!1,getPopupContainer:e=>e,popupMatchSelectWidth:68,placement:"bottomRight",onChange:e=>{s(e)},className:`${t}-format-select`,size:"small",options:Dc}),Nc.createElement("div",{className:l},c),Nc.createElement(wc,{prefixCls:t,value:i,onChange:o}))},zc=window.React,Fc=window.React.useMemo,Bc=e=>e.map((e=>(e.colors=e.colors.map(kl),e))),Hc=(e,t)=>{const{r:n,g:i,b:r,a:o}=e.toRgb(),a=new Is(e.toRgbString()).onBackground(t).toHsv();return o<=.5?a.v>.5:.299*n+.587*i+.114*r>192},Wc=e=>{let{prefixCls:t,presets:n,value:i,onChange:r}=e;const[o]=A("ColorPicker"),{token:{colorBgElevated:a}}=be.useToken(),[s]=oe(Bc(n),{value:Bc(n),postState:Bc}),l=`${t}-presets`,c=Fc((()=>s.map((e=>`panel-${e.label}`))),[s]),d=s.map((e=>{var n;return{key:`panel-${e.label}`,label:zc.createElement("div",{className:`${l}-label`},null==e?void 0:e.label),children:zc.createElement("div",{className:`${l}-items`},Array.isArray(null==e?void 0:e.colors)&&(null===(n=e.colors)||void 0===n?void 0:n.length)>0?e.colors.map((e=>zc.createElement(Vs,{key:`preset-${e.toHexString()}`,color:kl(e).toRgbString(),prefixCls:t,className:h(`${l}-color`,{[`${l}-color-checked`]:e.toHexString()===(null==i?void 0:i.toHexString()),[`${l}-color-bright`]:Hc(e,a)}),onClick:()=>{null==r||r(e)}}))):zc.createElement("span",{className:`${l}-empty`},o.presetEmpty))}}));return zc.createElement("div",{className:l},zc.createElement(Os,{defaultActiveKey:c,ghost:!0,items:d}))};var Uc=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:t,allowClear:n,presets:i,onChange:r,onClear:o,onChangeComplete:a,color:s,colorCleared:l}=e,c=Uc(e,["prefixCls","allowClear","presets","onChange","onClear","onChangeComplete","color","colorCleared"]),d=`${t}-inner-panel`;return Vc.createElement(vl,{prefixCls:t,value:null==s?void 0:s.toHsb(),onChange:(e,t)=>null==r?void 0:r(e,t,!0),panelRender:e=>Vc.createElement("div",{className:d},n&&Vc.createElement(Rl,Object.assign({prefixCls:t,value:s,colorCleared:l,onChange:e=>{null==r||r(e),null==o||o()}},c)),e,Vc.createElement(Pc,Object.assign({value:s,onChange:r,prefixCls:t},c)),Array.isArray(i)&&Vc.createElement(Vc.Fragment,null,Vc.createElement(Cl,{className:`${d}-divider`}),Vc.createElement(Wc,{value:s,presets:i,prefixCls:t,onChange:r}))),onChangeComplete:a})};var Yc=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{color:n,prefixCls:i,open:r,colorCleared:o,disabled:a,className:s}=e,l=Yc(e,["color","prefixCls","open","colorCleared","disabled","className"]),c=`${i}-trigger`,d=qc((()=>o?Kc.createElement(Rl,{prefixCls:i}):Kc.createElement(Vs,{prefixCls:i,color:n.toRgbString()})),[n,o,i]);return Kc.createElement("div",Object.assign({ref:t,className:h(c,s,{[`${c}-active`]:r,[`${c}-disabled`]:a})},l),d)})),Xc=window.React.useEffect,Jc=window.React.useState;function ed(e){return void 0!==e}const td=(e,t)=>({backgroundImage:`conic-gradient(${t} 0 25%, transparent 0 50%, ${t} 0 75%, transparent 0)`,backgroundSize:`${e} ${e}`}),nd=(e,t)=>{const{componentCls:n,borderRadiusSM:i,colorPickerInsetShadow:r,lineWidth:o,colorFillSecondary:a}=e;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:i,width:t,height:t,boxShadow:r},td("50%",e.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",border:`${o}px solid ${a}`,borderRadius:"inherit"}})}},id=e=>{const{componentCls:t,antCls:n,fontSizeSM:i,lineHeightSM:r,colorPickerAlphaInputWidth:o,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:d,paddingXS:u,colorTextPlaceholder:h,colorPickerInputNumberHandleWidth:p,lineWidth:m}=e;return{[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:i,lineHeight:r,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:p}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${o}px`,marginInlineStart:a},[`${t}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:d+a,fontSize:i,lineHeight:`${l}px`},[`${n}-select-item-option-content`]:{fontSize:i,lineHeight:r},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${u}px`,[`${n}-input`]:{fontSize:i,lineHeight:l-2*m+"px"},[`${n}-input-prefix`]:{color:h}}}}}},rd=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:i,colorPickerInsetShadow:r,marginSM:o,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c,colorPickerHandlerSizeSM:d,colorPickerSliderHeight:u,colorPickerPreviewSize:h}=e;return Object.assign({[`${t}-select`]:{[`${t}-palette`]:{minHeight:4*n,overflow:"hidden",borderRadius:i},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:r,inset:0},marginBottom:o},[`${t}-handler`]:{width:c,height:c,border:`${l}px solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${r}, 0 0 0 1px ${s}`,"&-sm":{width:d,height:d}},[`${t}-slider`]:{borderRadius:u/2,[`${t}-palette`]:{height:u},[`${t}-gradient`]:{borderRadius:u/2,boxShadow:r},"&-alpha":td(`${u}px`,e.colorFillSecondary),marginBottom:o},[`${t}-slider-container`]:{display:"flex",gap:o,[`${t}-slider-group`]:{flex:1}}},nd(e,h))},od=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:i,paddingXXS:r,colorPickerPresetColorSize:o,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:d,colorFill:u,colorWhite:h,marginXXS:p,paddingXS:m}=e;return{[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:a*l,color:i,paddingInlineEnd:r}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:p},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${m}px 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:1.5*p,[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:o,height:o,"&::before":{content:'""',pointerEvents:"none",width:o+4*c,height:o+4*c,position:"absolute",top:-2*c,insetInlineStart:-2*c,borderRadius:d,border:`${c}px solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:u},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"22.5%",display:"table",width:o/13*5,height:o/13*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:h,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:i}}}},ad=e=>({boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),sd=e=>{const{componentCls:t}=e;return{"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},ld=(e,t)=>{const{componentCls:n,borderRadiusSM:i,lineWidth:r,colorSplit:o,red6:a}=e;return{[`${n}-clear`]:{width:t,height:t,borderRadius:i,border:`${r}px solid ${o}`,position:"relative",cursor:"pointer",overflow:"hidden","&::after":{content:'""',position:"absolute",insetInlineEnd:r,top:0,display:"block",width:40,height:2,transformOrigin:"right",transform:"rotate(-45deg)",backgroundColor:a}}}},cd=e=>{const{componentCls:t,colorPickerWidth:n,colorPrimary:i,motionDurationMid:r,colorBgElevated:o,colorTextDisabled:a,colorBgContainerDisabled:s,borderRadius:l,marginXS:c,marginSM:d,controlHeight:u,controlHeightSM:h,colorBgTextActive:p,colorPickerPresetColorSize:m,lineWidth:f,colorBorder:g}=e;return[{[t]:Object.assign({[`${t}-panel`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",width:n,[`${t}-inner-panel`]:{[`${t}-clear`]:{marginInlineStart:"auto",marginBottom:c},"&-divider":{margin:`${d}px 0 ${c}px`}}},rd(e)),id(e)),od(e)),ld(e,m)),"&-trigger":Object.assign(Object.assign({width:u,height:u,borderRadius:l,border:`${f}px solid ${g}`,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:`all ${r}`,background:o,"&-active":Object.assign(Object.assign({},ad(e)),{borderColor:i}),"&:hover":{borderColor:i},"&-disabled":{color:a,background:s,cursor:"not-allowed","&:hover":{borderColor:p}}},ld(e,h)),nd(e,h))},sd(e))}]},dd=l("ColorPicker",(e=>{const{colorTextQuaternary:t,marginSM:n}=e,i=c(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:18,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:8,colorPickerPreviewSize:16+n});return[cd(i)]})),ud=window.React,hd=window.React.useContext,pd=window.React.useRef,md=window.React.useState,fd=e=>{const{value:t,defaultValue:n,format:i,allowClear:r=!1,presets:o,children:a,trigger:s="click",open:l,disabled:c,placement:d="bottomLeft",arrow:p=!0,style:m,className:f,rootClassName:g,styles:y,onFormatChange:v,onChange:b,onClear:w,onOpenChange:x,getPopupContainer:_,autoAdjustOverflow:C=!0}=e,{getPrefixCls:S,direction:k}=hd(u),{token:E}=be.useToken(),[$,M]=((e,t)=>{const{defaultValue:n,value:i}=t,[r,o]=Jc((()=>{let t;return t=ed(i)?i:ed(n)?n:e,kl(t||"")}));return Xc((()=>{i&&o(kl(i))}),[i]),[r,o]})(E.colorPrimary,{value:t,defaultValue:n}),[R,A]=oe(!1,{value:l,postState:e=>!c&&e,onChange:x}),[T,L]=md(!1),j=S("color-picker","ant-color-picker"),[O,N]=dd(j),I={[`${j}-rtl`]:k},D=h(g,I),P=h(D,f,N),z=h(j,I),F=pd(!0),B={open:R,trigger:s,placement:d,arrow:p,rootClassName:g,getPopupContainer:_,autoAdjustOverflow:C},H={prefixCls:j,color:$,allowClear:r,colorCleared:T,disabled:c,presets:o,format:i,onFormatChange:v};return O(ud.createElement(lr,Object.assign({style:null==y?void 0:y.popup,onOpenChange:e=>{F.current&&A(e)},content:ud.createElement(Gc,Object.assign({},H,{onChange:(e,n,i)=>{let r=kl(e);if(T){L(!1);const e=r.toHsb();0===$.toHsb().a&&"alpha"!==n&&(e.a=1,r=kl(e))}t||M(r),i&&(F.current=!1),null==b||b(r,r.toHexString())},onChangeComplete:()=>{F.current=!0},onClear:()=>{L(!0),null==w||w()}})),overlayClassName:z},B),a||ud.createElement(Zc,{open:R,className:P,style:m,color:$,prefixCls:j,disabled:c,colorCleared:T})))},gd=lt(fd,"color-picker",(e=>e),(e=>Object.assign(Object.assign({},e),{placement:"bottom",autoAdjustOverflow:!1})));fd._InternalPanelDoNotUseOrYouWillBeFired=gd;const yd=fd;function vd(e,t,n,i){var r=t+n,o=(n-i)/2;if(n>i){if(t>0)return b({},e,o);if(t<0&&ri)return b({},e,t<0?o:-o);return{}}const bd=window.React.useState,wd=window.React.useRef;var xd={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};const _d=window.React;var Cd=function(e){var t,n=e.visible,i=e.maskTransitionName,r=e.getContainer,o=e.prefixCls,a=e.rootClassName,s=e.icons,l=e.countRender,c=e.showSwitch,d=e.showProgress,u=e.current,m=e.count,f=e.scale,g=e.onSwitchLeft,y=e.onSwitchRight,v=e.onClose,w=e.onZoomIn,x=e.onZoomOut,_=e.onRotateRight,C=e.onRotateLeft,S=e.onFlipX,k=e.onFlipY,E=s.rotateLeft,$=s.rotateRight,M=s.zoomIn,A=s.zoomOut,T=s.close,L=s.left,j=s.right,O=s.flipX,N=s.flipY,I="".concat(o,"-operations-operation"),D="".concat(o,"-operations-icon"),P=[{icon:T,onClick:v,type:"close"},{icon:M,onClick:w,type:"zoomIn",disabled:50===f},{icon:A,onClick:x,type:"zoomOut",disabled:1===f},{icon:$,onClick:_,type:"rotateRight"},{icon:E,onClick:C,type:"rotateLeft"},{icon:O,onClick:S,type:"flipX"},{icon:N,onClick:k,type:"flipY"}],z=_d.createElement(_d.Fragment,null,c&&_d.createElement(_d.Fragment,null,_d.createElement("div",{className:h("".concat(o,"-switch-left"),b({},"".concat(o,"-switch-left-disabled"),0===u)),onClick:g},L),_d.createElement("div",{className:h("".concat(o,"-switch-right"),b({},"".concat(o,"-switch-right-disabled"),u===m-1)),onClick:y},j)),_d.createElement("ul",{className:"".concat(o,"-operations")},d&&_d.createElement("li",{className:"".concat(o,"-operations-progress")},null!==(t=null==l?void 0:l(u+1,m))&&void 0!==t?t:"".concat(u+1," / ").concat(m)),P.map((function(e){var t,n=e.icon,i=e.onClick,r=e.type,a=e.disabled;return _d.createElement("li",{className:h(I,(t={},b(t,"".concat(o,"-operations-operation-").concat(r),!0),b(t,"".concat(o,"-operations-operation-disabled"),!!a),t)),onClick:i,key:r},_d.isValidElement(n)?_d.cloneElement(n,{className:D}):n)}))));return _d.createElement(p,{visible:n,motionName:i},(function(e){var t=e.className,n=e.style;return _d.createElement(R,{open:!0,getContainer:null!=r?r:document.body},_d.createElement("div",{className:h("".concat(o,"-operations-wrapper"),t,a),style:n},z))}))},Sd=["visible","onVisibleChange","getContainer","current","countRender","onChange"];const kd=window.React,Ed=window.React.useState;var $d=kd.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),Md=$d.Provider;function Rd(e,t){if(void 0!==t){var n=e.indexOf(t);if(-1!==n)return n}}var Ad=["prefixCls","src","alt","onClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"];const Td=window.React,Ld=window.React.useCallback,jd=window.React.useContext,Od=window.React.useEffect,Nd=window.React.useRef,Id=window.React.useState;var Dd=function(e){var t=e.prefixCls,n=e.src,r=e.alt,o=e.onClose,a=e.visible,s=e.icons,l=void 0===s?{}:s,c=e.rootClassName,d=e.getContainer,u=e.countRender,p=e.scaleStep,m=void 0===p?.5:p,f=e.transitionName,g=void 0===f?"zoom":f,y=e.maskTransitionName,w=void 0===y?"fade":y,_=C(e,Ad),S=Nd(),k=Nd({deltaX:0,deltaY:0,transformX:0,transformY:0}),E=Id(!1),$=v(E,2),M=$[0],R=$[1],A=jd($d),T=A.previewUrls,L=A.current,j=A.isPreviewGroup,O=A.setCurrent,N=T.size,I=Array.from(T.keys()),D=I.indexOf(L),P=j?T.get(L):n,z=j&&N>1,F=j&&N>=1,B=function(e){var t=wd(null),n=wd([]),i=bd(xd),r=v(i,2),o=r[0],a=r[1],s=function(e){null===t.current&&(n.current=[],t.current=te((function(){a((function(e){var i=e;return n.current.forEach((function(e){i=x(x({},i),e)})),t.current=null,i}))}))),n.current.push(x(x({},o),e))};return{transform:o,resetTransform:function(){a(xd)},updateTransform:s,dispatchZoomChange:function(t,n,i){var r=e.current,a=r.width,l=r.height,c=r.offsetWidth,d=r.offsetHeight,u=r.offsetLeft,h=r.offsetTop,p=t,m=o.scale*t;m>50?(p=50/o.scale,m=50):m<1&&(p=1/o.scale,m=1);var f=null!=n?n:innerWidth/2,g=null!=i?i:innerHeight/2,y=p-1,v=y*a*.5,b=y*l*.5,w=y*(f-o.x-u),x=y*(g-o.y-h),_=o.x-(w-v),C=o.y-(x-b);if(t<1&&1===m){var S=c*m,k=d*m,E=ct(),$=E.width,M=E.height;S<=$&&k<=M&&(_=0,C=0)}s({x:_,y:C,scale:m})}}}(S),H=B.transform,W=B.resetTransform,U=B.updateTransform,V=B.dispatchZoomChange,G=Id(!0),Y=v(G,2),K=Y[0],Q=Y[1],q=H.rotate,Z=H.scale,X=h(b({},"".concat(t,"-moving"),M));Od((function(){K||Q(!0)}),[K]);var J=function(){if(a&&M){R(!1);var e=k.current,t=e.transformX,n=e.transformY;if(H.x===t||H.y===n)return;var i=S.current.offsetWidth*Z,r=S.current.offsetHeight*Z,o=S.current.getBoundingClientRect(),s=o.left,l=o.top,c=q%180!=0,d=function(e,t,n,i){var r=ct(),o=r.width,a=r.height,s=null;return e<=o&&t<=a?s={x:0,y:0}:(e>o||t>a)&&(s=x(x({},vd("x",n,e,o)),vd("y",i,t,a))),s}(c?r:i,c?i:r,s,l);d&&U(x({},d))}},ee=function(e){a&&M&&U({x:e.pageX-k.current.deltaX,y:e.pageY-k.current.deltaY})},ne=Ld((function(e){a&&z&&(e.keyCode===De.LEFT?D>0&&O(I[D-1]):e.keyCode===De.RIGHT&&D0&&(n=1/n),V(n,e.clientX,e.clientY)}},onMouseDown:function(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),k.current={deltaX:e.pageX-H.x,deltaY:e.pageY-H.y,transformX:H.x,transformY:H.y},R(!0))},onDoubleClick:function(e){a&&(1!==Z?U({x:0,y:0,scale:1}):V(1+m,e.clientX,e.clientY))},ref:S,className:"".concat(t,"-img"),src:P,alt:r,style:{transform:"translate3d(".concat(H.x,"px, ").concat(H.y,"px, 0) scale3d(").concat(H.flipX?"-":"").concat(Z,", ").concat(H.flipY?"-":"").concat(Z,", 1) rotate(").concat(q,"deg)"),transitionDuration:!K&&"0s"}}))),Td.createElement(Cd,{visible:a,maskTransitionName:w,getContainer:d,prefixCls:t,rootClassName:c,icons:l,countRender:u,showSwitch:z,showProgress:F,current:D,count:N,scale:Z,onSwitchLeft:function(e){e.preventDefault(),e.stopPropagation(),D>0&&(Q(!1),W(),O(I[D-1]))},onSwitchRight:function(e){e.preventDefault(),e.stopPropagation(),D2&&void 0!==arguments[2])||arguments[2];return $((function(i){return new Map(i).set(e,{url:t,canPreview:n})})),function(){$((function(t){var n=new Map(t);return n.delete(e)?n:t}))}}}},r,kd.createElement(Dd,i({"aria-hidden":!I,visible:I,prefixCls:n,onClose:function(e){e.stopPropagation(),D(!1),B(null)},mousePosition:F,src:U.get(L),icons:a,getContainer:m,countRender:b},_)))},Wd.displayName="Image";const Ud={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Vd=window.React;var Gd=function(e,t){return Vd.createElement(n,i({},e,{ref:t,icon:Ud}))};const Yd=Vd.forwardRef(Gd),Kd={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},Qd=window.React;var qd=function(e,t){return Qd.createElement(n,i({},e,{ref:t,icon:Kd}))};const Zd=Qd.forwardRef(qd),Xd={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Jd=window.React;var eu=function(e,t){return Jd.createElement(n,i({},e,{ref:t,icon:Xd}))};const tu=Jd.forwardRef(eu),nu={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},iu=window.React;var ru=function(e,t){return iu.createElement(n,i({},e,{ref:t,icon:nu}))};const ou=iu.forwardRef(ru),au={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},su=window.React;var lu=function(e,t){return su.createElement(n,i({},e,{ref:t,icon:au}))};const cu=su.forwardRef(lu),du=e=>({position:e||"absolute",inset:0}),uu=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:i,marginXXS:r,prefixCls:o}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new pe("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${o}-mask-info`]:Object.assign(Object.assign({},se),{padding:`0 ${i}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},hu=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:i,previewOperationColorDisabled:r,motionDurationSlow:o}=e,a=new pe(n).setAlpha(.1),s=a.clone().setAlpha(.2);return{[`${t}-operations`]:Object.assign(Object.assign({},d(e)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:e.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:i,padding:i,cursor:"pointer",transition:`all ${o}`,userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{color:r,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:e.previewOperationSize}})}},pu=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:i,previewCls:r,zIndexPopup:o,motionDurationSlow:a}=e,s=new pe(t).setAlpha(.1),l=s.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:o+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:i,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},mu=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:i,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:Object.assign(Object.assign({},du()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${i} ${t} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":Object.assign(Object.assign({},du()),{transition:`transform ${i} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:e.zIndexPopup+1,width:"100%"},"&":[hu(e),pu(e)]}]},fu=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},uu(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},du())}}},gu=e=>{const{previewCls:t}=e;return{[`${t}-root`]:j(e,"zoom"),"&":L(e,!0)}},yu=l("Image",(e=>{const t=`${e.componentCls}-preview`,n=c(e,{previewCls:t,modalMaskBg:new pe("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[fu(n),mu(n),ci(c(n,{componentCls:t})),gu(n)]}),(e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new pe(e.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new pe(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:1.5*e.fontSizeIcon})));var vu=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{var{prefixCls:t,preview:n,rootClassName:i}=e,r=xu(e,["prefixCls","preview","rootClassName"]);const{getPrefixCls:o,locale:a=H,getPopupContainer:s}=_u.useContext(u),l=o("image",t),c=o(),d=a.Image||H.Image,[p,m]=yu(l),f=h(i,m),g=_u.useMemo((()=>{if(!1===n)return n;const e="object"==typeof n?n:{},{getContainer:t}=e,i=xu(e,["getContainer"]);return Object.assign(Object.assign({mask:_u.createElement("div",{className:`${l}-mask-info`},_u.createElement(pt,null),null==d?void 0:d.preview),icons:wu},i),{getContainer:t||s,transitionName:z(c,"zoom",e.transitionName),maskTransitionName:z(c,"fade",e.maskTransitionName)})}),[n,d]);return p(_u.createElement(Wd,Object.assign({prefixCls:`${l}`,preview:g,rootClassName:f},r)))};Cu.PreviewGroup=e=>{var{previewPrefixCls:t,preview:n}=e,i=vu(e,["previewPrefixCls","preview"]);const{getPrefixCls:r}=bu.useContext(u),o=r("image",t),a=`${o}-preview`,s=r(),[l,c]=yu(o),d=bu.useMemo((()=>{var e;if(!1===n)return n;const t="object"==typeof n?n:{},i=h(c,null!==(e=t.rootClassName)&&void 0!==e?e:"");return Object.assign(Object.assign({},t),{transitionName:z(s,"zoom",t.transitionName),maskTransitionName:z(s,"fade",t.maskTransitionName),rootClassName:i})}),[n]);return l(bu.createElement(Wd.PreviewGroup,Object.assign({preview:d,previewPrefixCls:a,icons:wu},i)))};const Su=Cu,ku=mt;ku.Header=ft,ku.Footer=gt,ku.Content=yt,ku.Sider=vt;const Eu=ku,$u=window.React;let Mu=null,Ru=e=>e(),Au=[],Tu={};const Lu=$u.forwardRef(((e,t)=>{const n=()=>{const{prefixCls:e,container:t,maxCount:n,duration:i,rtl:r,top:o}=function(){const{prefixCls:e,getContainer:t,duration:n,rtl:i,maxCount:r,top:o}=Tu;return{prefixCls:null!=e?e:B().getPrefixCls("message"),container:(null==t?void 0:t())||document.body,duration:n,rtl:i,maxCount:r,top:o}}();return{prefixCls:e,getContainer:()=>t,maxCount:n,duration:i,rtl:r,top:o}},[i,r]=$u.useState(n),[o,a]=In(i),s=B(),l=s.getRootPrefixCls(),c=s.getIconPrefixCls(),d=s.getTheme(),u=()=>{r(n)};return $u.useEffect(u,[]),$u.useImperativeHandle(t,(()=>{const e=Object.assign({},o);return Object.keys(e).forEach((t=>{e[t]=function(){return u(),o[t].apply(o,arguments)}})),{instance:e,sync:u}})),$u.createElement(F,{prefixCls:l,iconPrefixCls:c,theme:d},a)}));function ju(){if(!Mu){const e=document.createDocumentFragment(),t={fragment:e};return Mu=t,void Ru((()=>{Be($u.createElement(Lu,{ref:e=>{const{instance:n,sync:i}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=i,ju())}))}}),e)}))}Mu.instance&&(Au.forEach((e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":Ru((()=>{const t=Mu.instance.open(Object.assign(Object.assign({},Tu),e.config));null==t||t.then(e.resolve),e.setCloseFn(t)}));break;case"destroy":Ru((()=>{null==Mu||Mu.instance.destroy(e.key)}));break;default:Ru((()=>{var n;const i=(n=Mu.instance)[t].apply(n,w(e.args));null==i||i.then(e.resolve),e.setCloseFn(i)}))}})),Au=[])}const Ou={open:function(e){const t=En((t=>{let n;const i={type:"open",config:e,resolve:t,setCloseFn:e=>{n=e}};return Au.push(i),()=>{n?Ru((()=>{n()})):i.skipped=!0}}));return ju(),t},destroy:function(e){Au.push({type:"destroy",key:e}),ju()},config:function(e){Tu=Object.assign(Object.assign({},Tu),e),Ru((()=>{var e;null===(e=null==Mu?void 0:Mu.sync)||void 0===e||e.call(Mu)}))},useMessage:function(e){return In(e)},_InternalPanelDoNotUseOrYouWillBeFired:function(e){const{prefixCls:t,className:n,type:i,icon:r,content:o}=e,a=$n(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=Mn.useContext(u),l=t||s("message"),[,c]=kn(l);return Mn.createElement(mn,Object.assign({},a,{prefixCls:l,className:h(n,c,`${l}-notice-pure-panel`),eventKey:"pure",duration:null,content:Mn.createElement(An,{prefixCls:l,type:i,icon:r},o)}))}};["success","info","warning","error","loading"].forEach((e=>{Ou[e]=function(){for(var t=arguments.length,n=new Array(t),i=0;i{let i;const r={type:e,args:t,resolve:n,setCloseFn:e=>{i=e}};return Au.push(r),()=>{i?Ru((()=>{i()})):r.skipped=!0}}));return ju(),n}(e,n)}}));const Nu=Ou;var Iu=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{t.length&&(w(t).forEach((e=>{e()})),n([]))}),[t]);const i=Ni.useCallback((t=>function(i){var r;Ii+=1;const o=Ni.createRef();let a;const s=Ni.createElement(Oi,{key:`modal-${Ii}`,config:t(i),ref:o,afterClose:()=>{null==a||a()}});return a=null===(r=e.current)||void 0===r?void 0:r.patchElement(s),a&&_i.push(a),{destroy:()=>{function e(){var e;null===(e=o.current)||void 0===e||e.destroy()}o.current?e():n((t=>[].concat(w(t),[e])))},update:e=>{function t(){var t;null===(t=o.current)||void 0===t||t.update(e)}o.current?t():n((e=>[].concat(w(e),[t])))}}}),[]);return[Ni.useMemo((()=>({info:i(Mi),success:i(Ri),error:i(Ai),warning:i($i),confirm:i(Ti)})),[]),Ni.createElement(Di,{key:"modal-holder",ref:e})]},zu.info=function(e){return Ei(Mi(e))},zu.success=function(e){return Ei(Ri(e))},zu.error=function(e){return Ei(Ai(e))},zu.warning=Pu,zu.warn=Pu,zu.confirm=function(e){return Ei(Ti(e))},zu.destroyAll=function(){for(;_i.length;){const e=_i.pop();e&&e()}},zu.config=function(e){let{rootPrefixCls:t}=e;ki=t},zu._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,closeIcon:i,closable:r,type:o,title:a,children:s}=e,l=Iu(e,["prefixCls","className","closeIcon","closable","type","title","children"]),{getPrefixCls:c}=Du.useContext(u),d=c(),p=t||c("modal"),[,m]=mi(p),f=`${p}-confirm`;let g={};return g=o?{closable:null!=r&&r,title:"",footer:"",children:Du.createElement(wi,Object.assign({},e,{confirmPrefixCls:f,rootPrefixCls:d,content:s}))}:{closable:null==r||r,title:a,footer:void 0===e.footer?Du.createElement(si,Object.assign({},e)):e.footer,children:s},Du.createElement(Yn,Object.assign({prefixCls:p,className:h(m,`${p}-pure-panel`,o&&f,o&&`${f}-${o}`,n)},l,{closeIcon:ai(p,i),closable:r},g))};const Fu=zu,Bu=window.React;let Hu=null,Wu=e=>e(),Uu=[],Vu={};const Gu=Bu.forwardRef(((e,t)=>{const[n,i]=Bu.useState(),[r,o]=Bu.useState(),[a,s]=Bu.useState(),[l,c]=Bu.useState(),[d,u]=Bu.useState(),[h,p]=Bu.useState(),[m,f]=Qi({prefixCls:n,getContainer:()=>r,maxCount:a,rtl:l,top:d,bottom:h}),g=B(),y=g.getRootPrefixCls(),v=g.getIconPrefixCls(),b=g.getTheme(),w=()=>{const{prefixCls:e,container:t,maxCount:n,rtl:r,top:a,bottom:l}=function(){const{prefixCls:e,getContainer:t,rtl:n,maxCount:i,top:r,bottom:o}=Vu;return{prefixCls:null!=e?e:B().getPrefixCls("notification"),container:(null==t?void 0:t())||document.body,rtl:n,maxCount:i,top:r,bottom:o}}();i(e),o(t),s(n),c(r),u(a),p(l)};return Bu.useEffect(w,[]),Bu.useImperativeHandle(t,(()=>{const e=Object.assign({},m);return Object.keys(e).forEach((t=>{e[t]=function(){return w(),m[t].apply(m,arguments)}})),{instance:e,sync:w}})),Bu.createElement(F,{prefixCls:y,iconPrefixCls:v,theme:b},f)}));function Yu(){if(!Hu){const e=document.createDocumentFragment(),t={fragment:e};return Hu=t,void Wu((()=>{Be(Bu.createElement(Gu,{ref:e=>{const{instance:n,sync:i}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=i,Yu())}))}}),e)}))}Hu.instance&&(Uu.forEach((e=>{switch(e.type){case"open":Wu((()=>{Hu.instance.open(Object.assign(Object.assign({},Vu),e.config))}));break;case"destroy":Wu((()=>{null==Hu||Hu.instance.destroy(e.key)}))}})),Uu=[])}function Ku(e){Uu.push({type:"open",config:e}),Yu()}const Qu={open:Ku,destroy:function(e){Uu.push({type:"destroy",key:e}),Yu()},config:function(e){Vu=Object.assign(Object.assign({},Vu),e),Wu((()=>{var e;null===(e=null==Hu?void 0:Hu.sync)||void 0===e||e.call(Hu)}))},useNotification:function(e){return Qi(e)},_InternalPanelDoNotUseOrYouWillBeFired:function(e){const{prefixCls:t,className:n,icon:i,type:r,message:o,description:a,btn:s,closable:l=!0,closeIcon:c}=e,d=Bi(e,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon"]),{getPrefixCls:p}=Hi.useContext(u),m=t||p("notification"),f=`${m}-notice`,[,g]=Fi(m);return Hi.createElement(mn,Object.assign({},d,{prefixCls:m,className:h(n,g,`${f}-pure-panel`),eventKey:"pure",duration:null,closable:l,closeIcon:Wi(m,c),content:Hi.createElement(Vi,{prefixCls:f,icon:i,type:r,message:o,description:a,btn:s})}))}};["success","info","warning","error"].forEach((e=>{Qu[e]=t=>Ku(Object.assign(Object.assign({},t),{type:e}))}));const qu=Qu,Zu={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-center",theme:"outlined"},Xu=window.React;var Ju=function(e,t){return Xu.createElement(n,i({},e,{ref:t,icon:Zu}))};const eh=Xu.forwardRef(Ju),th={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"},nh=window.React;var ih=function(e,t){return nh.createElement(n,i({},e,{ref:t,icon:th}))};const rh=nh.forwardRef(ih),oh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-right",theme:"outlined"},ah=window.React;var sh=function(e,t){return ah.createElement(n,i({},e,{ref:t,icon:oh}))};const lh=ah.forwardRef(sh),ch={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},dh=window.React;var uh=function(e,t){return dh.createElement(n,i({},e,{ref:t,icon:ch}))};const hh=dh.forwardRef(uh),ph={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M740 161c-61.8 0-112 50.2-112 112 0 50.1 33.1 92.6 78.5 106.9v95.9L320 602.4V318.1c44.2-15 76-56.9 76-106.1 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 49.2 31.8 91 76 106.1V706c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-27.8l423.5-138.7a50.52 50.52 0 0034.9-48.2V378.2c42.9-15.8 73.6-57 73.6-105.2 0-61.8-50.2-112-112-112zm-504 51a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm96 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm408-491a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"branches",theme:"outlined"},mh=window.React;var fh=function(e,t){return mh.createElement(n,i({},e,{ref:t,icon:ph}))};const gh=mh.forwardRef(fh),yh={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z"}}]},name:"caret-left",theme:"outlined"},vh=window.React;var bh=function(e,t){return vh.createElement(n,i({},e,{ref:t,icon:yh}))};const wh=vh.forwardRef(bh),xh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}},{tag:"path",attrs:{d:"M376.9 656.4c1.8-33.5 15.7-64.7 39.5-88.6 25.4-25.5 60-39.8 96-39.8 36.2 0 70.3 14.1 96 39.8 1.4 1.4 2.7 2.8 4.1 4.3l-25 19.6a8 8 0 003 14.1l98.2 24c5 1.2 9.9-2.6 9.9-7.7l.5-101.3c0-6.7-7.6-10.5-12.9-6.3L663 532.7c-36.6-42-90.4-68.6-150.5-68.6-107.4 0-195 85.1-199.4 191.7-.2 4.5 3.4 8.3 8 8.3H369c4.2-.1 7.7-3.4 7.9-7.7zM703 664h-47.9c-4.2 0-7.7 3.3-8 7.6-1.8 33.5-15.7 64.7-39.5 88.6-25.4 25.5-60 39.8-96 39.8-36.2 0-70.3-14.1-96-39.8-1.4-1.4-2.7-2.8-4.1-4.3l25-19.6a8 8 0 00-3-14.1l-98.2-24c-5-1.2-9.9 2.6-9.9 7.7l-.4 101.4c0 6.7 7.6 10.5 12.9 6.3l23.2-18.2c36.6 42 90.4 68.6 150.5 68.6 107.4 0 195-85.1 199.4-191.7.2-4.5-3.4-8.3-8-8.3z"}}]},name:"cloud-sync",theme:"outlined"},_h=window.React;var Ch=function(e,t){return _h.createElement(n,i({},e,{ref:t,icon:xh}))};const Sh=_h.forwardRef(Ch),kh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},Eh=window.React;var $h=function(e,t){return Eh.createElement(n,i({},e,{ref:t,icon:kh}))};const Mh=Eh.forwardRef($h),Rh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Ah=window.React;var Th=function(e,t){return Ah.createElement(n,i({},e,{ref:t,icon:Rh}))};const Lh=Ah.forwardRef(Th),jh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M899.6 276.5L705 396.4 518.4 147.5a8.06 8.06 0 00-12.9 0L319 396.4 124.3 276.5c-5.7-3.5-13.1 1.2-12.2 7.9L188.5 865c1.1 7.9 7.9 14 16 14h615.1c8 0 14.9-6 15.9-14l76.4-580.6c.8-6.7-6.5-11.4-12.3-7.9zM512 734.2c-62.1 0-112.6-50.5-112.6-112.6S449.9 509 512 509s112.6 50.5 112.6 112.6S574.1 734.2 512 734.2zm0-160.9c-26.6 0-48.2 21.6-48.2 48.3 0 26.6 21.6 48.3 48.2 48.3s48.2-21.6 48.2-48.3c0-26.6-21.6-48.3-48.2-48.3z"}}]},name:"crown",theme:"filled"},Oh=window.React;var Nh=function(e,t){return Oh.createElement(n,i({},e,{ref:t,icon:jh}))};const Ih=Oh.forwardRef(Nh),Dh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Ph=window.React;var zh=function(e,t){return Ph.createElement(n,i({},e,{ref:t,icon:Dh}))};const Fh=Ph.forwardRef(zh),Bh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M476 399.1c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1V484h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H420v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V540h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H476v-84.9zM560.5 704h-225c-4.1 0-7.5 3.2-7.5 7v42c0 3.8 3.4 7 7.5 7h225c4.1 0 7.5-3.2 7.5-7v-42c0-3.8-3.4-7-7.5-7zm-7.1-502.6c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM664 888H232V264h282.2L664 413.8V888zm190.2-581.4L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23z"}}]},name:"diff",theme:"outlined"},Hh=window.React;var Wh=function(e,t){return Hh.createElement(n,i({},e,{ref:t,icon:Bh}))};const Uh=Hh.forwardRef(Wh),Vh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"},Gh=window.React;var Yh=function(e,t){return Gh.createElement(n,i({},e,{ref:t,icon:Vh}))};const Kh=Gh.forwardRef(Yh),Qh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M484 443.1V528h-84.5c-4.1 0-7.5 3.1-7.5 7v42c0 3.8 3.4 7 7.5 7H484v84.9c0 3.9 3.2 7.1 7 7.1h42c3.9 0 7-3.2 7-7.1V584h84.5c4.1 0 7.5-3.2 7.5-7v-42c0-3.9-3.4-7-7.5-7H540v-84.9c0-3.9-3.1-7.1-7-7.1h-42c-3.8 0-7 3.2-7 7.1zm396-144.7H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder-add",theme:"outlined"},qh=window.React;var Zh=function(e,t){return qh.createElement(n,i({},e,{ref:t,icon:Qh}))};const Xh=qh.forwardRef(Zh),Jh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},ep=window.React;var tp=function(e,t){return ep.createElement(n,i({},e,{ref:t,icon:Jh}))};const np=ep.forwardRef(tp),ip={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM512 533c-85.5 0-155.6 67.3-160 151.6a8 8 0 008 8.4h48.1c4.2 0 7.8-3.2 8.1-7.4C420 636.1 461.5 597 512 597s92.1 39.1 95.8 88.6c.3 4.2 3.9 7.4 8.1 7.4H664a8 8 0 008-8.4C667.6 600.3 597.5 533 512 533z"}}]},name:"frown",theme:"outlined"},rp=window.React;var op=function(e,t){return rp.createElement(n,i({},e,{ref:t,icon:ip}))};const ap=rp.forwardRef(op),sp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M957.6 507.4L603.2 158.2a7.9 7.9 0 00-11.2 0L353.3 393.4a8.03 8.03 0 00-.1 11.3l.1.1 40 39.4-117.2 115.3a8.03 8.03 0 00-.1 11.3l.1.1 39.5 38.9-189.1 187H72.1c-4.4 0-8.1 3.6-8.1 8V860c0 4.4 3.6 8 8 8h344.9c2.1 0 4.1-.8 5.6-2.3l76.1-75.6 40.4 39.8a7.9 7.9 0 0011.2 0l117.1-115.6 40.1 39.5a7.9 7.9 0 0011.2 0l238.7-235.2c3.4-3 3.4-8 .3-11.2zM389.8 796.2H229.6l134.4-133 80.1 78.9-54.3 54.1zm154.8-62.1L373.2 565.2l68.6-67.6 171.4 168.9-68.6 67.6zM713.1 658L450.3 399.1 597.6 254l262.8 259-147.3 145z"}}]},name:"highlight",theme:"outlined"},lp=window.React;var cp=function(e,t){return lp.createElement(n,i({},e,{ref:t,icon:sp}))};const dp=lp.forwardRef(cp),up={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M536.1 273H488c-4.4 0-8 3.6-8 8v275.3c0 2.6 1.2 5 3.3 6.5l165.3 120.7c3.6 2.6 8.6 1.9 11.2-1.7l28.6-39c2.7-3.7 1.9-8.7-1.7-11.2L544.1 528.5V281c0-4.4-3.6-8-8-8zm219.8 75.2l156.8 38.3c5 1.2 9.9-2.6 9.9-7.7l.8-161.5c0-6.7-7.7-10.5-12.9-6.3L752.9 334.1a8 8 0 003 14.1zm167.7 301.1l-56.7-19.5a8 8 0 00-10.1 4.8c-1.9 5.1-3.9 10.1-6 15.1-17.8 42.1-43.3 80-75.9 112.5a353 353 0 01-112.5 75.9 352.18 352.18 0 01-137.7 27.8c-47.8 0-94.1-9.3-137.7-27.8a353 353 0 01-112.5-75.9c-32.5-32.5-58-70.4-75.9-112.5A353.44 353.44 0 01171 512c0-47.8 9.3-94.2 27.8-137.8 17.8-42.1 43.3-80 75.9-112.5a353 353 0 01112.5-75.9C430.6 167.3 477 158 524.8 158s94.1 9.3 137.7 27.8A353 353 0 01775 261.7c10.2 10.3 19.8 21 28.6 32.3l59.8-46.8C784.7 146.6 662.2 81.9 524.6 82 285 82.1 92.6 276.7 95 516.4 97.4 751.9 288.9 942 524.8 942c185.5 0 343.5-117.6 403.7-282.3 1.5-4.2-.7-8.9-4.9-10.4z"}}]},name:"history",theme:"outlined"},hp=window.React;var pp=function(e,t){return hp.createElement(n,i({},e,{ref:t,icon:up}))};const mp=hp.forwardRef(pp),fp={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},gp=window.React;var yp=function(e,t){return gp.createElement(n,i({},e,{ref:t,icon:fp}))};const vp=gp.forwardRef(yp);var bp=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"];const wp=window.React;var xp=wp.forwardRef((function(e,t){var n=e.className,r=e.component,o=e.viewBox,a=e.spin,s=e.rotate,l=e.tabIndex,c=e.onClick,d=e.children,u=C(e,bp),p=wp.useRef(),m=ie(p,t);we(Boolean(r||d),"Should have `component` prop or `children`."),xe(p);var f=wp.useContext(_e),g=f.prefixCls,y=void 0===g?"anticon":g,v=f.rootClassName,w=h(v,y,n),_=h(b({},"".concat(y,"-spin"),!!a)),S=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,k=x(x({},Ce),{},{className:_,style:S,viewBox:o});o||delete k.viewBox;var E=l;return void 0===E&&c&&(E=-1),wp.createElement("span",i({role:"img"},u,{ref:m,tabIndex:E,onClick:c,className:w}),r?wp.createElement(r,k,d):d?(we(Boolean(o)||1===wp.Children.count(d)&&wp.isValidElement(d)&&"use"===wp.Children.only(d).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),wp.createElement("svg",i({},k,{viewBox:o}),d)):null)}));xp.displayName="AntdIcon";const _p=xp;var Cp=window.React.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0});function Sp(e,t,n){return(e-t)/(n-t)}function kp(e,t,n,i){var r=Sp(t,n,i),o={};switch(e){case"rtl":o.right="".concat(100*r,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(100*r,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(100*r,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(100*r,"%"),o.transform="translateX(-50%)"}return o}function Ep(e,t){return Array.isArray(e)?e[t]:e}var $p=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];const Mp=window.React;var Rp=Mp.forwardRef((function(e,t){var n,r,o=e.prefixCls,a=e.value,s=e.valueIndex,l=e.onStartMove,c=e.style,d=e.render,u=e.dragging,p=e.onOffsetChange,m=C(e,$p),f=Mp.useContext(Cp),g=f.min,y=f.max,v=f.direction,w=f.disabled,_=f.keyboard,S=f.range,k=f.tabIndex,E=f.ariaLabelForHandle,$=f.ariaLabelledByForHandle,M=f.ariaValueTextFormatterForHandle,R="".concat(o,"-handle"),A=function(e){w||l(e,s)},T=kp(v,a,g,y),L=Mp.createElement("div",i({ref:t,className:h(R,(n={},b(n,"".concat(R,"-").concat(s+1),S),b(n,"".concat(R,"-dragging"),u),n)),style:x(x({},T),c),onMouseDown:A,onTouchStart:A,onKeyDown:function(e){if(!w&&_){var t=null;switch(e.which||e.keyCode){case De.LEFT:t="ltr"===v||"btt"===v?-1:1;break;case De.RIGHT:t="ltr"===v||"btt"===v?1:-1;break;case De.UP:t="ttb"!==v?1:-1;break;case De.DOWN:t="ttb"!==v?-1:1;break;case De.HOME:t="min";break;case De.END:t="max";break;case De.PAGE_UP:t=2;break;case De.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),p(t,s))}},tabIndex:w?null:Ep(k,s),role:"slider","aria-valuemin":g,"aria-valuemax":y,"aria-valuenow":a,"aria-disabled":w,"aria-label":Ep(E,s),"aria-labelledby":Ep($,s),"aria-valuetext":null===(r=Ep(M,s))||void 0===r?void 0:r(a)},m));return d&&(L=d(L,{index:s,prefixCls:o,value:a,dragging:u})),L})),Ap=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];const Tp=window.React;var Lp=Tp.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,a=e.onOffsetChange,s=e.values,l=e.handleRender,c=e.draggingIndex,d=C(e,Ap),u=Tp.useRef({});return Tp.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=u.current[e])||void 0===t||t.focus()}}})),Tp.createElement(Tp.Fragment,null,s.map((function(e,t){return Tp.createElement(Rp,i({ref:function(e){e?u.current[t]=e:delete u.current[t]},dragging:c===t,prefixCls:n,style:Ep(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:a,render:l},d))})))}));const jp=window.React;function Op(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}const Np=window.React;function Ip(e){var t=e.prefixCls,n=e.style,i=e.start,r=e.end,o=e.index,a=e.onStartMove,s=Np.useContext(Cp),l=s.direction,c=s.min,d=s.max,u=s.disabled,p=s.range,m="".concat(t,"-track"),f=Sp(i,c,d),g=Sp(r,c,d),y=function(e){!u&&a&&a(e,-1)},v={};switch(l){case"rtl":v.right="".concat(100*f,"%"),v.width="".concat(100*g-100*f,"%");break;case"btt":v.bottom="".concat(100*f,"%"),v.height="".concat(100*g-100*f,"%");break;case"ttb":v.top="".concat(100*f,"%"),v.height="".concat(100*g-100*f,"%");break;default:v.left="".concat(100*f,"%"),v.width="".concat(100*g-100*f,"%")}return Np.createElement("div",{className:h(m,p&&"".concat(m,"-").concat(o+1)),style:x(x({},v),n),onMouseDown:y,onTouchStart:y})}const Dp=window.React;function Pp(e){var t=e.prefixCls,n=e.style,i=e.values,r=e.startPoint,o=e.onStartMove,a=Dp.useContext(Cp),s=a.included,l=a.range,c=a.min,d=Dp.useMemo((function(){if(!l){if(0===i.length)return[];var e=null!=r?r:c,t=i[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],o=0;o=0&&O}),[O,se]),ce=Kp.useMemo((function(){return Object.keys(G||{}).map((function(e){var t=G[e],n={value:Number(e)};return t&&"object"===J(t)&&!Kp.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[G]),de=function(e,t,n,i,r,o){var a=Yp.useCallback((function(n){var i=isFinite(n);return i=Math.min(t,n),Math.max(e,i)}),[e,t]),s=Yp.useCallback((function(i){if(null!==n){var r=e+Math.round((a(i)-e)/n)*n,o=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(o(n),o(t),o(e)),l=Number(r.toFixed(s));return e<=l&&l<=t?l:null}return null}),[n,e,t,a]),l=Yp.useCallback((function(r){var o=a(r),l=i.map((function(e){return e.value}));null!==n&&l.push(s(r)),l.push(e,t);var c=l[0],d=t-e;return l.forEach((function(e){var t=Math.abs(o-e);t<=d&&(c=e,d=t)})),c}),[e,t,i,n,a,s]),c=function r(o,a,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var d,u=o[l],h=u+a,p=[];i.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(s(u));var m=a>0?1:-1;"unit"===c?p.push(s(u+m*n)):p.push(s(h)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=u:e>=u})),"unit"===c&&(p=p.filter((function(e){return e!==u})));var f="unit"===c?u:h;d=p[0];var g=Math.abs(d-f);if(p.forEach((function(e){var t=Math.abs(e-f);t1){var y=w(o);return y[l]=d,r(y,a-m,l,c)}return d}return"min"===a?e:"max"===a?t:void 0},d=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",r=e[n],o=c(e,t,n,i);return{value:o,changed:o!==r}},u=function(e){return null===o&&0===e||"number"==typeof o&&e3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(l),s=a[n],h=c(a,t,n,i);if(a[n]=h,!1===r){var p=o||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n0;y-=1)for(var v=!0;u(a[y]-a[y-1])&&v;){var b=d(a,-1,y-1);a[y-1]=b.value,v=b.changed}for(var w=a.length-1;w>0;w-=1)for(var x=!0;u(a[w]-a[w-1])&&x;){var _=d(a,-1,w-1);a[w-1]=_.value,x=_.changed}for(var C=0;C=0?$+1:2;for(n=n.slice(0,i);n.length=0&&te.current.focus(e)}$e(null)}),[Ee]);var Me=Kp.useMemo((function(){return(!N||null!==se)&&N}),[N,se]),Re=function(e,t,n,i,r,o,a,s,l){var c=jp.useState(null),d=v(c,2),u=d[0],h=d[1],p=jp.useState(-1),m=v(p,2),f=m[0],g=m[1],y=jp.useState(n),b=v(y,2),x=b[0],_=b[1],C=jp.useState(n),S=v(C,2),k=S[0],E=S[1],$=jp.useRef(null),M=jp.useRef(null);jp.useEffect((function(){-1===f&&_(n)}),[n,f]),jp.useEffect((function(){return function(){document.removeEventListener("mousemove",$.current),document.removeEventListener("mouseup",M.current),document.removeEventListener("touchmove",$.current),document.removeEventListener("touchend",M.current)}}),[]);var R=function(e,t){x.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&h(t),_(e),a(e))},T=function(e,t){if(-1===e){var n=k[0],a=k[k.length-1],s=i-n,c=r-a,d=t*(r-i);d=Math.max(d,s),d=Math.min(d,c);var u=o(n+d);d=u-n;var h=k.map((function(e){return e+d}));R(h)}else{var p=(r-i)*t,m=w(x);m[e]=k[e];var f=l(m,p,e,"dist");R(f.values,f.value)}},L=jp.useRef(T);L.current=T;var j=jp.useMemo((function(){var e=w(n).sort((function(e,t){return e-t})),t=w(x).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?x:n}),[n,x]);return[f,u,j,function(i,r){i.stopPropagation();var o=n[r];g(r),h(o),E(n);var a=Op(i),s=a.pageX,l=a.pageY,c=function(n){n.preventDefault();var i,o=Op(n),a=o.pageX,c=o.pageY,d=a-s,u=c-l,h=e.current.getBoundingClientRect(),p=h.width,m=h.height;switch(t){case"btt":i=-u/m;break;case"ttb":i=u/m;break;case"rtl":i=-d/p;break;default:i=d/p}L.current(r,i)},d=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",c),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",c),$.current=null,M.current=null,g(-1),null==A||A(we(be.current))};document.addEventListener("mouseup",d),document.addEventListener("mousemove",c),document.addEventListener("touchend",d),document.addEventListener("touchmove",c),$.current=c,M.current=d}]}(ne,ie,ve,re,ae,he,xe,0,pe),Ae=v(Re,4),Te=Ae[0],Le=Ae[1],je=Ae[2],Oe=Ae[3],Ne=function(e,t){Oe(e,t),null==R||R(we(be.current))},Ie=-1!==Te;Kp.useEffect((function(){if(!Ie){var e=ve.lastIndexOf(Le);te.current.focus(e)}}),[Ie]);var De=Kp.useMemo((function(){return w(je).sort((function(e,t){return e-t}))}),[je]),Pe=Kp.useMemo((function(){return E?[De[0],De[De.length-1]]:[re,De[0]]}),[De,E,re]),ze=v(Pe,2),Fe=ze[0],Be=ze[1];Kp.useImperativeHandle(t,(function(){return{focus:function(){te.current.focus(0)},blur:function(){var e=document.activeElement;ne.current.contains(e)&&(null==e||e.blur())}}})),Kp.useEffect((function(){u&&te.current.focus(0)}),[]);var He=Kp.useMemo((function(){return{min:re,max:ae,direction:ie,disabled:l,keyboard:d,step:se,included:z,includedStart:Fe,includedEnd:Be,range:E,tabIndex:q,ariaLabelForHandle:Z,ariaLabelledByForHandle:X,ariaValueTextFormatterForHandle:ee}}),[re,ae,ie,l,d,se,z,Fe,Be,E,q,Z,X,ee]);return Kp.createElement(Cp.Provider,{value:He},Kp.createElement("div",{ref:ne,className:h(r,o,(n={},b(n,"".concat(r,"-disabled"),l),b(n,"".concat(r,"-vertical"),D),b(n,"".concat(r,"-horizontal"),!D),b(n,"".concat(r,"-with-marks"),ce.length),n)),style:a,onMouseDown:function(e){e.preventDefault();var t,n=ne.current.getBoundingClientRect(),i=n.width,r=n.height,o=n.left,a=n.top,s=n.bottom,l=n.right,c=e.clientX,d=e.clientY;switch(ie){case"btt":t=(s-d)/r;break;case"ttb":t=(d-a)/r;break;case"rtl":t=(l-c)/i;break;default:t=(c-o)/i}_e(he(re+t*(ae-re)))}},Kp.createElement("div",{className:"".concat(r,"-rail"),style:W}),Kp.createElement(Pp,{prefixCls:r,style:B,values:De,startPoint:F,onStartMove:Me?Ne:null}),Kp.createElement(Gp,{prefixCls:r,marks:ce,dots:Y,style:U,activeStyle:V}),Kp.createElement(Lp,{ref:te,prefixCls:r,style:H,values:je,draggingIndex:Te,onStartMove:Ne,onOffsetChange:function(e,t){if(!l){var n=pe(ve,e,t);null==R||R(we(ve)),xe(n.values),null==A||A(we(n.values)),$e(n.value)}},onFocus:p,onBlur:m,handleRender:K}),Kp.createElement(Hp,{prefixCls:r,marks:ce,onClick:_e})))}));const qp=window.React,Zp=window.React.useRef,Xp=qp.forwardRef(((e,t)=>{const{open:n}=e,i=Zp(null),r=Zp(null);function o(){te.cancel(r.current),r.current=null}return qp.useEffect((()=>(n?r.current=te((()=>{var e;null===(e=i.current)||void 0===e||e.forceAlign(),r.current=null})):o(),o)),[n,e.title]),qp.createElement(G,Object.assign({ref:fe(i,t)},e))})),Jp=e=>{const{componentCls:t,controlSize:n,dotSize:i,marginFull:r,marginPart:o,colorFillContentHover:a}=e;return{[t]:Object.assign(Object.assign({},d(e)),{position:"relative",height:n,margin:`${o}px ${r}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${r}px ${o}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+2*e.handleLineWidth,height:e.handleSize+2*e.handleLineWidth,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`\n inset-inline-start ${e.motionDurationMid},\n inset-block-start ${e.motionDurationMid},\n width ${e.motionDurationMid},\n height ${e.motionDurationMid},\n box-shadow ${e.motionDurationMid}\n `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+2*e.handleLineWidthHover,height:e.handleSizeHover+2*e.handleLineWidthHover},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:i,height:i,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.colorPrimaryBorder}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`\n ${t}-dot\n `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new pe(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexShortString()}`,insetInlineStart:0,insetBlockStart:0},[`\n ${t}-mark-text,\n ${t}-dot\n `]:{cursor:"not-allowed !important"}}})}},em=(e,t)=>{const{componentCls:n,railSize:i,handleSize:r,dotSize:o}=e,a=t?"paddingBlock":"paddingInline",s=t?"width":"height",l=t?"height":"width",c=t?"insetBlockStart":"insetInlineStart",d=t?"top":"insetInlineStart";return{[a]:i,[l]:3*i,[`${n}-rail`]:{[s]:"100%",[l]:i},[`${n}-track`]:{[l]:i},[`${n}-handle`]:{[c]:(3*i-r)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[d]:r,[s]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[d]:i,[s]:"100%",[l]:i},[`${n}-dot`]:{position:"absolute",[c]:(i-o)/2}}},tm=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},em(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},nm=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},em(e,!1)),{height:"100%"})}},im=l("Slider",(e=>{const t=c(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[Jp(t),tm(t),nm(t)]}),(e=>{const t=e.controlHeightLG/4;return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:e.controlHeightSM/2,dotSize:8,handleLineWidth:e.lineWidth+1,handleLineWidthHover:e.lineWidth+3}}));var rm=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r"number"==typeof e?e.toString():"",sm=om.forwardRef(((e,t)=>{const{prefixCls:n,range:i,className:r,rootClassName:o,disabled:a,tooltipPrefixCls:s,tipFormatter:l,tooltipVisible:c,getTooltipPopupContainer:d,tooltipPlacement:p}=e,m=rm(e,["prefixCls","range","className","rootClassName","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{getPrefixCls:f,direction:g,getPopupContainer:y}=om.useContext(u),v=om.useContext(ve),b=null!=a?a:v,[w,x]=om.useState({}),_=(e,t)=>{x((n=>Object.assign(Object.assign({},n),{[e]:t})))},C=(e,t)=>e||(t?"rtl"===g?"left":"right":"top"),S=f("slider",n),[k,E]=im(S),$=h(r,o,{[`${S}-rtl`]:"rtl"===g},E);"rtl"!==g||m.vertical||(m.reverse=!m.reverse);const[M,R]=om.useMemo((()=>i?"object"==typeof i?[!0,i.draggableTrack]:[!0,!1]:[!1]),[i]);return k(om.createElement(Qp,Object.assign({},m,{step:m.step,range:M,draggableTrack:R,className:$,disabled:b,ref:t,prefixCls:S,handleRender:(t,n)=>{var i;const{index:r,dragging:o}=n,{tooltip:a={},vertical:u}=e,h=Object.assign({},a),{open:m,placement:g,getPopupContainer:v,prefixCls:b,formatter:x}=h;let k;k=x||null===x?x:l||null===l?l:am;const E=!!k&&(w[r]||o),$=null!==(i=null!=m?m:c)&&void 0!==i?i:void 0===m&&E,M=Object.assign(Object.assign({},t.props),{onMouseEnter:()=>_(r,!0),onMouseLeave:()=>_(r,!1)}),R=f("tooltip",null!=b?b:s);return om.createElement(Xp,{prefixCls:R,title:k?k(n.value):"",open:$,placement:C(null!=g?g:p,u),key:r,overlayClassName:`${S}-tooltip`,getPopupContainer:v||d||y},om.cloneElement(t,M))}})))}));var lm=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"];const cm=window.React;var dm=cm.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-switch":r,a=e.className,s=e.checked,l=e.defaultChecked,c=e.disabled,d=e.loadingIcon,u=e.checkedChildren,p=e.unCheckedChildren,m=e.onClick,f=e.onChange,g=e.onKeyDown,y=C(e,lm),w=oe(!1,{value:s,defaultValue:l}),x=v(w,2),_=x[0],S=x[1];function k(e,t){var n=_;return c||(S(n=e),null==f||f(n,t)),n}var E=h(o,a,(b(n={},"".concat(o,"-checked"),_),b(n,"".concat(o,"-disabled"),c),n));return cm.createElement("button",i({},y,{type:"button",role:"switch","aria-checked":_,disabled:c,className:E,ref:t,onKeyDown:function(e){e.which===De.LEFT?k(!1,e):e.which===De.RIGHT&&k(!0,e),null==g||g(e)},onClick:function(e){var t=k(!_,e);null==m||m(t,e)}}),d,cm.createElement("span",{className:"".concat(o,"-inner")},cm.createElement("span",{className:"".concat(o,"-inner-checked")},u),cm.createElement("span",{className:"".concat(o,"-inner-unchecked")},p)))}));dm.displayName="Switch";const um=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[`&${t}-small`]:{minWidth:e.switchMinWidthSM,height:e.switchHeightSM,lineHeight:`${e.switchHeightSM}px`,[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMaxSM,paddingInlineEnd:e.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSizeSM+2*e.switchPadding}px - ${2*e.switchInnerMarginMaxSM}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSizeSM+2*e.switchPadding}px + ${2*e.switchInnerMarginMaxSM}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:e.switchPinSizeSM,height:e.switchPinSizeSM},[`${t}-loading-icon`]:{top:(e.switchPinSizeSM-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:e.switchInnerMarginMinSM,paddingInlineEnd:e.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSizeSM+2*e.switchPadding}px + ${2*e.switchInnerMarginMaxSM}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSizeSM+2*e.switchPadding}px - ${2*e.switchInnerMarginMaxSM}px)`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${e.switchPinSizeSM+e.switchPadding}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},hm=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:(e.switchPinSize-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},pm=e=>{const{componentCls:t,motion:n}=e,i=`${t}-handle`;return{[t]:{[i]:{position:"absolute",top:e.switchPadding,insetInlineStart:e.switchPadding,width:e.switchPinSize,height:e.switchPinSize,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:e.colorWhite,borderRadius:e.switchPinSize/2,boxShadow:e.switchHandleShadow,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${i}`]:{insetInlineStart:`calc(100% - ${e.switchPinSize+e.switchPadding}px)`},[`&:not(${t}-disabled):active`]:n?{[`${i}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${i}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}:{}}}},mm=e=>{const{componentCls:t}=e,n=`${t}-inner`;return{[t]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:e.switchInnerMarginMax,paddingInlineEnd:e.switchInnerMarginMin,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${e.switchPinSize+2*e.switchPadding}px - ${2*e.switchInnerMarginMax}px)`,marginInlineEnd:`calc(100% - ${e.switchPinSize+2*e.switchPadding}px + ${2*e.switchInnerMarginMax}px)`},[`${n}-unchecked`]:{marginTop:-e.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${n}`]:{paddingInlineStart:e.switchInnerMarginMin,paddingInlineEnd:e.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${e.switchPinSize+2*e.switchPadding}px + ${2*e.switchInnerMarginMax}px)`,marginInlineEnd:`calc(-100% + ${e.switchPinSize+2*e.switchPadding}px - ${2*e.switchInnerMarginMax}px)`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:2*e.switchPadding,marginInlineEnd:2*-e.switchPadding}},[`&${t}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:2*-e.switchPadding,marginInlineEnd:2*e.switchPadding}}}}}},fm=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},d(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:e.switchMinWidth,height:e.switchHeight,lineHeight:`${e.switchHeight}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),O(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},gm=l("Switch",(e=>{const t=e.fontSize*e.lineHeight,n=e.controlHeight/2,i=t-4,r=n-4,o=c(e,{switchMinWidth:2*i+8,switchHeight:t,switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchInnerMarginMin:i/2,switchInnerMarginMax:i+2+4,switchPadding:2,switchPinSize:i,switchBg:e.colorBgContainer,switchMinWidthSM:2*r+4,switchHeightSM:n,switchInnerMarginMinSM:r/2,switchInnerMarginMaxSM:r+2+4,switchPinSizeSM:r,switchHandleShadow:`0 2px 4px 0 ${new pe("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:.75*e.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[fm(o),mm(o),pm(o),hm(o),um(o)]}));var ym=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{var{prefixCls:n,size:i,disabled:r,loading:o,className:a,rootClassName:s}=e,l=ym(e,["prefixCls","size","disabled","loading","className","rootClassName"]);const{getPrefixCls:c,direction:d}=vm.useContext(u),p=vm.useContext(ve),m=(null!=r?r:p)||o,f=c("switch",n),g=vm.createElement("div",{className:`${f}-handle`},o&&vm.createElement(k,{className:`${f}-loading-icon`})),[y,v]=gm(f),b=le(i),w=h({[`${f}-small`]:"small"===b,[`${f}-loading`]:o,[`${f}-rtl`]:"rtl"===d},a,s,v);return y(vm.createElement(bt,null,vm.createElement(dm,Object.assign({},l,{prefixCls:f,className:w,disabled:m,ref:t,loadingIcon:g}))))}));bm.__ANT_SWITCH=!0;const wm=bm,xm=window.React.useState,_m=window.React.useMemo;const Cm=window.React;function Sm(e){var t=e.prefixCls,n=e.current,i=e.total,r=e.title,o=e.description,a=e.onClose,s=e.onPrev,l=e.onNext,c=e.onFinish,d=e.className;return Cm.createElement("div",{className:h("".concat(t,"-content"),d)},Cm.createElement("div",{className:"".concat(t,"-inner")},Cm.createElement("button",{type:"button",onClick:a,"aria-label":"Close",className:"".concat(t,"-close")},Cm.createElement("span",{className:"".concat(t,"-close-x")},"×")),Cm.createElement("div",{className:"".concat(t,"-header")},Cm.createElement("div",{className:"".concat(t,"-title")},r)),Cm.createElement("div",{className:"".concat(t,"-description")},o),Cm.createElement("div",{className:"".concat(t,"-footer")},Cm.createElement("div",{className:"".concat(t,"-sliders")},i>1?w(Array.from({length:i}).keys()).map((function(e,t){return Cm.createElement("span",{key:e,className:t===n?"active":""})})):null),Cm.createElement("div",{className:"".concat(t,"-buttons")},0!==n?Cm.createElement("button",{className:"".concat(t,"-prev-btn"),onClick:s},"Prev"):null,n===i-1?Cm.createElement("button",{className:"".concat(t,"-finish-btn"),onClick:c},"Finish"):Cm.createElement("button",{className:"".concat(t,"-next-btn"),onClick:l},"Next")))))}const km=window.React;var Em=function(e){var t=e.current,n=e.renderPanel;return km.createElement(km.Fragment,null,"function"==typeof n?n(e,t):km.createElement(Sm,e))};const $m=window.React;var Mm={fill:"transparent",pointerEvents:"auto"},Rm=function(e){var t=e.prefixCls,n=e.rootClassName,r=e.pos,o=e.showMask,a=e.style,s=void 0===a?{}:a,l=e.fill,c=void 0===l?"rgba(0,0,0,0.5)":l,d=e.open,u=e.animated,p=e.zIndex,m=$(),f="".concat(t,"-mask-").concat(m),g="object"===J(u)?null==u?void 0:u.placeholder:u;return $m.createElement(R,{open:d,autoLock:!0},$m.createElement("div",{className:h("".concat(t,"-mask"),n),style:x({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:p,pointerEvents:"none"},s)},o?$m.createElement("svg",{style:{width:"100%",height:"100%"}},$m.createElement("defs",null,$m.createElement("mask",{id:f},$m.createElement("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"}),r&&$m.createElement("rect",{x:r.left,y:r.top,rx:r.radius,width:r.width,height:r.height,fill:"black",className:g?"".concat(t,"-placeholder-animated"):""}))),$m.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:"url(#".concat(f,")")}),r&&$m.createElement($m.Fragment,null,$m.createElement("rect",i({},Mm,{x:"0",y:"0",width:"100%",height:r.top})),$m.createElement("rect",i({},Mm,{x:"0",y:"0",width:r.left,height:"100%"})),$m.createElement("rect",i({},Mm,{x:"0",y:r.top+r.height,width:"100%",height:"calc(100vh - ".concat(r.top+r.height,"px)")})),$m.createElement("rect",i({},Mm,{x:r.left+r.width,y:"0",width:"calc(100vw - ".concat(r.left+r.width,"px)"),height:"100%"})))):null))},Am=[0,0],Tm={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function Lm(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={};return Object.keys(Tm).forEach((function(n){t[n]=x(x({},Tm[n]),{},{autoArrow:e,targetOffset:Am})})),t}Lm();var jm=["prefixCls","steps","defaultCurrent","current","onChange","onClose","onFinish","open","mask","arrow","rootClassName","placement","renderPanel","gap","animated","scrollIntoViewOptions","zIndex"];const Om=window.React;var Nm={left:"50%",top:"50%",width:1,height:1},Im=function(e){var t=e.prefixCls,n=void 0===t?"rc-tour":t,r=e.steps,o=void 0===r?[]:r,a=e.defaultCurrent,s=e.current,l=e.onChange,c=e.onClose,d=e.onFinish,u=e.open,p=e.mask,m=void 0===p||p,f=e.arrow,g=void 0===f||f,y=e.rootClassName,b=e.placement,w=void 0===b?"bottom":b,_=e.renderPanel,S=e.gap,k=e.animated,E=e.scrollIntoViewOptions,$=void 0===E||E,M=e.zIndex,A=void 0===M?1001:M,T=C(e,jm),L=Om.useRef(),j=oe(0,{value:s,defaultValue:a}),O=v(j,2),N=O[0],I=O[1],D=oe(void 0,{value:u,postState:function(e){return!(N<0||N>=o.length)&&(null==e||e)}}),P=v(D,2),z=P[0],F=P[1],B=Om.useRef(z);me((function(){z&&!B.current&&I(0),B.current=z}),[z]);var H=o[N]||{},W=H.target,U=H.placement,V=H.style,G=H.arrow,Y=H.className,K=H.mask,Q=H.scrollIntoViewOptions,q=null!=U?U:w,Z=z&&(null!=K?K:m),X=function(e,t,n,i){var r=xm(void 0),o=v(r,2),a=o[0],s=o[1];me((function(){var t="function"==typeof e?e():e;s(t||null)}));var l=xm(null),c=v(l,2),d=c[0],u=c[1],h=ee((function(){if(a){r=a,o=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight,c=(l=r.getBoundingClientRect()).top,d=l.right,h=l.bottom,p=l.left,!(c>=0&&p>=0&&d<=o&&h<=s)&&t&&a.scrollIntoView(i);var e=a.getBoundingClientRect(),n={left:e.left,top:e.top,width:e.width,height:e.height,radius:0};u((function(e){return JSON.stringify(e)!==JSON.stringify(n)?n:e}))}else u(null);var r,o,s,l,c,d,h,p}));return me((function(){return h(),window.addEventListener("resize",h),function(){window.removeEventListener("resize",h)}}),[a,t,h]),[_m((function(){if(!d)return d;var e=(null==n?void 0:n.offset)||6,t=(null==n?void 0:n.radius)||2;return{left:d.left-e,top:d.top-e,width:d.width+2*e,height:d.height+2*e,radius:t}}),[d,n]),a]}(W,u,S,null!=Q?Q:$),te=v(X,2),ne=te[0],ie=te[1],re=!!ie&&(void 0===G?g:G),ae="object"===J(re)&&re.pointAtCenter;me((function(){var e;null===(e=L.current)||void 0===e||e.forceAlign()}),[ae,N]);var se=function(e){I(e),null==l||l(e)};if(void 0===ie)return null;var le=function(){F(!1),null==c||c(N)},ce="boolean"==typeof Z?Z:!!Z,de="boolean"==typeof Z?void 0:Z;return Om.createElement(Om.Fragment,null,Om.createElement(Rm,{zIndex:A,prefixCls:n,pos:ne,showMask:ce,style:null==de?void 0:de.style,fill:null==de?void 0:de.color,open:z,animated:k,rootClassName:y}),Om.createElement(ke,i({builtinPlacements:Lm(ae)},T,{ref:L,popupStyle:V,popupPlacement:q,popupVisible:z,popupClassName:h(y,Y),prefixCls:n,popup:function(){return Om.createElement(Em,i({arrow:re,key:"content",prefixCls:n,total:o.length,renderPanel:_,onPrev:function(){se(N-1)},onNext:function(){se(N+1)},onClose:le,current:N,onFinish:function(){le(),null==d||d()}},o[N]))},forceRender:!1,destroyPopupOnHide:!0,zIndex:A,getTriggerDOMNode:function(e){return e||ie||document.body},arrow:!!re}),Om.createElement(R,{open:z,autoLock:!0},Om.createElement("div",{className:h(y,"".concat(n,"-target-placeholder")),style:x(x({},ne||Nm),{},{position:"fixed",pointerEvents:"none"})}))))};const Dm=window.React;function Pm(e){return null!=e}const zm=e=>{let{stepProps:t,current:n,type:i,indicatorsRender:r}=e;var o,a;const{prefixCls:s,total:l=1,title:c,onClose:d,onPrev:u,onNext:p,onFinish:m,cover:f,description:g,nextButtonProps:y,prevButtonProps:v,type:b,className:x}=t,_=null!=b?b:i,C=n===l-1,S=Pm(c)?Dm.createElement("div",{className:`${s}-header`},Dm.createElement("div",{className:`${s}-title`},c)):null,k=Pm(g)?Dm.createElement("div",{className:`${s}-description`},g):null,E=Pm(f)?Dm.createElement("div",{className:`${s}-cover`},f):null;let $;$=r?r(n,l):w(Array.from({length:l}).keys()).map(((e,t)=>Dm.createElement("span",{key:e,className:h(t===n&&`${s}-indicator-active`,`${s}-indicator`)})));const M="primary"===_?"default":"primary",R={type:"default",ghost:"primary"===_},[T]=A("Tour",H.Tour);return Dm.createElement("div",{className:h(x,`${s}-content`)},Dm.createElement("div",{className:`${s}-inner`},Dm.createElement(Ie,{className:`${s}-close`,onClick:d}),E,S,k,Dm.createElement("div",{className:`${s}-footer`},l>1&&Dm.createElement("div",{className:`${s}-indicators`},$),Dm.createElement("div",{className:`${s}-buttons`},0!==n?Dm.createElement(Pe,Object.assign({},R,v,{onClick:()=>{var e;null==u||u(),null===(e=null==v?void 0:v.onClick)||void 0===e||e.call(v)},size:"small",className:h(`${s}-prev-btn`,null==v?void 0:v.className)}),null!==(o=null==v?void 0:v.children)&&void 0!==o?o:null==T?void 0:T.Previous):null,Dm.createElement(Pe,Object.assign({type:M},y,{onClick:()=>{var e;C?null==m||m():null==p||p(),null===(e=null==y?void 0:y.onClick)||void 0===e||e.call(y)},size:"small",className:h(`${s}-next-btn`,null==y?void 0:y.className)}),null!==(a=null==y?void 0:y.children)&&void 0!==a?a:C?null==T?void 0:T.Finish:null==T?void 0:T.Next)))))},Fm=e=>{const{componentCls:t,lineHeight:n,padding:i,paddingXS:r,borderRadius:o,borderRadiusXS:a,colorPrimary:s,colorText:l,colorFill:c,indicatorHeight:u,indicatorWidth:h,boxShadowTertiary:p,tourZIndexPopup:m,fontSize:f,colorBgContainer:g,fontWeightStrong:y,marginXS:v,colorTextLightSolid:b,tourBorderRadius:w,colorWhite:x,colorBgTextHover:_,tourCloseSize:C,motionDurationSlow:S,antCls:k}=e;return[{[t]:Object.assign(Object.assign({},d(e)),{color:l,position:"absolute",zIndex:m,display:"block",visibility:"visible",fontSize:f,lineHeight:n,width:520,"--antd-arrow-background-color":g,"&-pure":{maxWidth:"100%",position:"relative"},[`&${t}-hidden`]:{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:w,boxShadow:p,position:"relative",backgroundColor:g,border:"none",backgroundClip:"padding-box",[`${t}-close`]:{position:"absolute",top:i,insetInlineEnd:i,color:e.colorIcon,outline:"none",width:C,height:C,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${t}-cover`]:{textAlign:"center",padding:`${i+C+r}px ${i}px 0`,img:{width:"100%"}},[`${t}-header`]:{padding:`${i}px ${i}px ${r}px`,[`${t}-title`]:{lineHeight:n,fontSize:f,fontWeight:y}},[`${t}-description`]:{padding:`0 ${i}px`,lineHeight:n,wordWrap:"break-word"},[`${t}-footer`]:{padding:`${r}px ${i}px ${i}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${t}-indicators`]:{display:"inline-block",[`${t}-indicator`]:{width:h,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:s}}},[`${t}-buttons`]:{marginInlineStart:"auto",[`${k}-btn`]:{marginInlineStart:v}}}},[`${t}-primary, &${t}-primary`]:{"--antd-arrow-background-color":s,[`${t}-inner`]:{color:b,textAlign:"start",textDecoration:"none",backgroundColor:s,borderRadius:o,boxShadow:p,[`${t}-close`]:{color:b},[`${t}-indicators`]:{[`${t}-indicator`]:{background:new pe(b).setAlpha(.15).toRgbString(),"&-active":{background:b}}},[`${t}-prev-btn`]:{color:b,borderColor:new pe(b).setAlpha(.15).toRgbString(),backgroundColor:s,"&:hover":{backgroundColor:new pe(b).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${t}-next-btn`]:{color:s,borderColor:"transparent",background:x,"&:hover":{background:new pe(_).onBackground(x).toRgbString()}}}}}),[`${t}-mask`]:{[`${t}-placeholder-animated`]:{transition:`all ${S}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(w,Ee)}}},W(e,{colorBg:"var(--antd-arrow-background-color)",contentRadius:w,limitVerticalRadius:!0})]},Bm=l("Tour",(e=>{const{borderRadiusLG:t,fontSize:n,lineHeight:i}=e,r=c(e,{tourZIndexPopup:e.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:t,tourCloseSize:n*i});return[Fm(r)]}));var Hm=globalThis&&globalThis.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r{const{prefixCls:t,current:n,defaultCurrent:i,type:r,rootClassName:o,indicatorsRender:a,steps:s}=e,l=Vm(e,["prefixCls","current","defaultCurrent","type","rootClassName","indicatorsRender","steps"]),{getPrefixCls:c,direction:d}=Ym(u),p=c("tour",t),[m,f]=Bm(p),{token:g}=be.useToken(),{currentMergedType:y,updateInnerCurrent:v}=(e=>{let{defaultType:t,steps:n=[],current:i,defaultCurrent:r}=e;var o;const[a,s]=oe(r,{value:i});Um((()=>{void 0!==i&&s(i)}),[i]);const l="number"==typeof a?null===(o=n[a])||void 0===o?void 0:o.type:t;return{currentMergedType:null!=l?l:t,updateInnerCurrent:s}})({defaultType:r,steps:s,current:n,defaultCurrent:i}),b=$e({arrowPointAtCenter:!0,autoAdjustOverflow:!0,offset:g.marginXXS,arrowWidth:g.sizePopupArrow,borderRadius:g.borderRadius}),w=h({[`${p}-primary`]:"primary"===y,[`${p}-rtl`]:"rtl"===d},f,o);return m(Gm.createElement(Im,Object.assign({},l,{rootClassName:w,prefixCls:p,current:n,defaultCurrent:i,animated:!0,renderPanel:(e,t)=>Gm.createElement(zm,{type:r,stepProps:e,current:t,indicatorsRender:a}),builtinPlacements:b,onChange:t=>{var n;v(t),null===(n=e.onChange)||void 0===n||n.call(e,t)},steps:s})))};Km._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,current:n=0,total:i=6,className:r,style:o,type:a}=e,s=Hm(e,["prefixCls","current","total","className","style","type"]),{getPrefixCls:l}=Wm.useContext(u),c=l("tour",t),[d,p]=Bm(c);return d(Wm.createElement(ir,{prefixCls:c,hashId:p,className:h(r,`${c}-pure`,a&&`${c}-${a}`),style:o},Wm.createElement(zm,{stepProps:Object.assign(Object.assign({},s),{prefixCls:c,total:i}),current:n,type:a})))};const Qm=Km;var qm={"text/plain":"Text","text/html":"Url",default:"Text"};const Zm=Me((function(e,t){var n,i,r,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(r=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],i=0;iVt.jsx(F,{prefixCls:"yaymail",direction:window.yaymailData.is_rtl?"rtl":"ltr",theme:Jm,children:null==e?void 0:e.children}),tf=e=>{let t;const n=new Set,i=(e,i)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=i?i:"object"!=typeof r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,o={setState:i,getState:r,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}};return t=e(i,r,o),o},nf=e=>e?tf(e):tf;var rf={exports:{}},of={},af={exports:{}},sf={},lf=window.React,cf="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},df=lf.useState,uf=lf.useEffect,hf=lf.useLayoutEffect,pf=lf.useDebugValue;function mf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cf(e,n)}catch(i){return!0}}var ff="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=df({inst:{value:n,getSnapshot:t}}),r=i[0].inst,o=i[1];return hf((function(){r.value=n,r.getSnapshot=t,mf(r)&&o({inst:r})}),[e,n,t]),uf((function(){return mf(r)&&o({inst:r}),e((function(){mf(r)&&o({inst:r})}))}),[e]),pf(n),n};sf.useSyncExternalStore=void 0!==lf.useSyncExternalStore?lf.useSyncExternalStore:ff,af.exports=sf;var gf=af.exports,yf=window.React,vf=gf,bf="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},wf=vf.useSyncExternalStore,xf=yf.useRef,_f=yf.useEffect,Cf=yf.useMemo,Sf=yf.useDebugValue;of.useSyncExternalStoreWithSelector=function(e,t,n,i,r){var o=xf(null);if(null===o.current){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Cf((function(){function e(e){if(!l){if(l=!0,o=e,e=i(e),void 0!==r&&a.hasValue){var t=a.value;if(r(t,e))return s=t}return s=e}if(t=s,bf(o,e))return t;var n=i(e);return void 0!==r&&r(t,n)?t:(o=e,s=n)}var o,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,i,r]);var s=wf(e,o[0],o[1]);return _f((function(){a.hasValue=!0,a.value=s}),[s]),Sf(s),s},rf.exports=of;var kf=rf.exports;const Ef=Me(kf),$f=window.React.useDebugValue,{useSyncExternalStoreWithSelector:Mf}=Ef,Rf=e=>{const t="function"==typeof e?nf(e):e,n=(e,n)=>function(e,t=e.getState,n){const i=Mf(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return $f(i),i}(t,e,n);return Object.assign(n,t),n},Af=Rf(((e,t)=>({notify:null,setNotifyFunction:t=>{e((e=>({...e,notify:t})))}})));const Tf=()=>{const e=Af((e=>e.setNotifyFunction)),[t,n]=qu.useNotification({maxCount:1});return e(((e,n,i)=>{t[e]({message:n,placement:i??"bottomRight",duration:3})})),Vt.jsx(Vt.Fragment,{children:n})};function Lf(){return Lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.removeEventListener(Nf,u),l=null}},createHref:e=>function(e,t){let n=e.document.querySelector("base"),i="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");i=-1===n?t:t.slice(0,n)}return i+"#"+("string"==typeof t?t:Bf(t))}(r,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=jf.Push;let i=Ff(p.location,e,t);n&&n(i,e),c=d()+1;let u=zf(i,c),h=p.createHref(i);try{a.pushState(u,"",h)}catch(m){if(m instanceof DOMException&&"DataCloneError"===m.name)throw m;r.location.assign(h)}o&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s=jf.Replace;let i=Ff(p.location,e,t);n&&n(i,e),c=d();let r=zf(i,c),u=p.createHref(i);a.replaceState(r,"",u),o&&l&&l({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}(0,0,(function(e,t){Pf("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function Df(e,t){if(!1===e||null==e)throw new Error(t)}function Pf(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function zf(e,t){return{usr:e.state,key:e.key,idx:t}}function Ff(e,t,n,i){return void 0===n&&(n=null),Lf({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Hf(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function Bf(e){let{pathname:t="/",search:n="",hash:i=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(t+="#"===i.charAt(0)?i:"#"+i),t}function Hf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}var Wf,Uf;(Uf=Wf||(Wf={})).data="data",Uf.deferred="deferred",Uf.redirect="redirect",Uf.error="error";const Vf=new Set(["lazy","caseSensitive","path","id","index","children"]);function Gf(e,t,n,i){return void 0===n&&(n=[]),void 0===i&&(i={}),e.map(((e,r)=>{let o=[...n,r],a="string"==typeof e.id?e.id:o.join("-");if(Df(!0!==e.index||!e.children,"Cannot specify children on an index route"),Df(!i[a],'Found a route id collision on id "'+a+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=Lf({},e,t(e),{id:a});return i[a]=n,n}{let n=Lf({},e,t(e),{id:a,children:void 0});return i[a]=n,e.children&&(n.children=Gf(e.children,t,o,i)),n}}))}function Yf(e,t,n){void 0===n&&(n="/");let i=ng(("string"==typeof t?Hf(t):t).pathname||"/",n);if(null==i)return null;let r=Kf(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(r);let o=null;for(let a=0;null==o&&a{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};a.relativePath.startsWith("/")&&(Df(a.relativePath.startsWith(i),'Absolute route path "'+a.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(i.length));let s=ag([i,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(Df(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Kf(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Xf(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let i of Qf(e.path))r(e,t,i);else r(e,t)})),t}function Qf(e){let t=e.split("/");if(0===t.length)return[];let[n,...i]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===i.length)return r?[o,""]:[o];let a=Qf(i.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),r&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const qf=/^:\w+$/,Zf=e=>"*"===e;function Xf(e,t){let n=e.split("/"),i=n.length;return n.some(Zf)&&(i+=-2),t&&(i+=2),n.filter((e=>!Zf(e))).reduce(((e,t)=>e+(qf.test(t)?3:""===t?1:10)),i)}function Jf(e,t){let{routesMeta:n}=e,i={},r="/",o=[];for(let a=0;a(i.push(t),"/([^\\/]+)")));return e.endsWith("*")?(i.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),i]}(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let o=r[0],a=o.replace(/(.)\/+$/,"$1"),s=r.slice(1);return{params:i.reduce(((e,t,n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return Pf(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(s[n]||"",t),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function tg(e){try{return decodeURI(e)}catch(t){return Pf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function ng(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}function ig(e,t,n,i){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function rg(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function og(e,t,n,i){let r;void 0===i&&(i=!1),"string"==typeof e?r=Hf(e):(r=Lf({},e),Df(!r.pathname||!r.pathname.includes("?"),ig("?","pathname","search",r)),Df(!r.pathname||!r.pathname.includes("#"),ig("#","pathname","hash",r)),Df(!r.search||!r.search.includes("#"),ig("#","search","hash",r)));let o,a=""===e||""===r.pathname,s=a?"/":r.pathname;if(i||null==s)o=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:i="",hash:r=""}="string"==typeof e?Hf(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:lg(i),hash:cg(r)}}(r,o),c=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}const ag=e=>e.join("/").replace(/\/\/+/g,"/"),sg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),lg=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",cg=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class dg{constructor(e,t,n,i){void 0===i&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function ug(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const hg=["post","put","patch","delete"],pg=new Set(hg),mg=["get",...hg],fg=new Set(mg),gg=new Set([301,302,303,307,308]),yg=new Set([307,308]),vg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wg={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_g=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function Cg(e,t,n,i,r,o,a){let s,l;if(null!=o&&"path"!==a){s=[];for(let e of t)if(s.push(e),e.route.id===o){l=e;break}}else s=t,l=t[t.length-1];let c=og(r||".",rg(s).map((e=>e.pathnameBase)),ng(e.pathname,n)||e.pathname,"path"===a);return null==r&&(c.search=e.search,c.hash=e.hash),null!=r&&""!==r&&"."!==r||!l||!l.route.index||Gg(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),i&&"/"!==n&&(c.pathname="/"===c.pathname?n:ag([n,c.pathname])),Bf(c)}function Sg(e,t,n,i){if(!i||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(i))return{path:n};if(i.formMethod&&(r=i.formMethod,!fg.has(r.toLowerCase())))return{path:n,error:Dg(405,{method:i.formMethod})};var r;let o,a,s=()=>({path:n,error:Dg(400,{type:"invalid-body"})}),l=i.formMethod||"get",c=e?l.toUpperCase():l.toLowerCase(),d=zg(n);if(void 0!==i.body){if("text/plain"===i.formEncType){if(!Wg(c))return s();let e="string"==typeof i.body?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce(((e,t)=>{let[n,i]=t;return""+e+n+"="+i+"\n"}),""):String(i.body);return{path:n,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===i.formEncType){if(!Wg(c))return s();try{let e="string"==typeof i.body?JSON.parse(i.body):i.body;return{path:n,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:e,text:void 0}}}catch(p){return s()}}}if(Df("function"==typeof FormData,"FormData is not available in this environment"),i.formData)o=Tg(i.formData),a=i.formData;else if(i.body instanceof FormData)o=Tg(i.body),a=i.body;else if(i.body instanceof URLSearchParams)o=i.body,a=Lg(o);else if(null==i.body)o=new URLSearchParams,a=new FormData;else try{o=new URLSearchParams(i.body),a=Lg(o)}catch(p){return s()}let u={formMethod:c,formAction:d,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(Wg(u.formMethod))return{path:n,submission:u};let h=Hf(n);return t&&h.search&&Gg(h.search)&&o.append("index",""),h.search="?"+o,{path:Bf(h),submission:u}}function kg(e,t,n,i,r,o,a,s,l,c,d,u,h,p){let m=p?Object.values(p)[0]:h?Object.values(h)[0]:void 0,f=e.createURL(t.location),g=e.createURL(r),y=p?Object.keys(p)[0]:void 0,v=function(e,t){let n=e;if(t){let i=e.findIndex((e=>e.route.id===t));i>=0&&(n=e.slice(0,i))}return n}(n,y),b=v.filter(((e,n)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){let i=!t||n.route.id!==t.route.id,r=void 0===e[n.route.id];return i||r}(t.loaderData,t.matches[n],e)||a.some((t=>t===e.route.id)))return!0;let r=t.matches[n],s=e;return $g(e,Lf({currentUrl:f,currentParams:r.params,nextUrl:g,nextParams:s.params},i,{actionResult:m,defaultShouldRevalidate:o||f.pathname+f.search===g.pathname+g.search||f.search!==g.search||Eg(r,s)}))})),w=[];return l.forEach(((e,r)=>{if(!n.some((t=>t.route.id===e.routeId)))return;let a=Yf(d,e.path,u);if(!a)return void w.push({key:r,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let l=t.fetchers.get(r),h=l&&"idle"!==l.state&&void 0===l.data&&!c.has(r),p=Yg(a,e.path);(s.includes(r)||h||$g(p,Lf({currentUrl:f,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:n[n.length-1].params},i,{actionResult:m,defaultShouldRevalidate:o})))&&w.push({key:r,routeId:e.routeId,path:e.path,matches:a,match:p,controller:new AbortController})})),[b,w]}function Eg(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function $g(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}async function Mg(e,t,n){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let r=n[e.id];Df(r,"No route found in manifest");let o={};for(let a in i){let e=void 0!==r[a]&&"hasErrorBoundary"!==a;Pf(!e,'Route "'+r.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||Vf.has(a)||(o[a]=i[a])}Object.assign(r,o),Object.assign(r,Lf({},t(r),{lazy:void 0}))}async function Rg(e,t,n,i,r,o,a,s){let l,c,d;void 0===s&&(s={});let u=e=>{let i,r=new Promise(((e,t)=>i=t));return d=()=>i(),t.signal.addEventListener("abort",d),Promise.race([e({request:t,params:n.params,context:s.requestContext}),r])};try{let i=n.route[e];if(n.route.lazy)if(i)c=(await Promise.all([u(i),Mg(n.route,o,r)]))[0];else{if(await Mg(n.route,o,r),i=n.route[e],!i){if("action"===e){let e=new URL(t.url),i=e.pathname+e.search;throw Dg(405,{method:t.method,pathname:i,routeId:n.route.id})}return{type:Wf.data,data:void 0}}c=await u(i)}else{if(!i){let e=new URL(t.url);throw Dg(404,{pathname:e.pathname+e.search})}c=await u(i)}Df(void 0!==c,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(f){l=Wf.error,c=f}finally{d&&t.signal.removeEventListener("abort",d)}if(null!=(h=c)&&"number"==typeof h.status&&"string"==typeof h.statusText&&"object"==typeof h.headers&&void 0!==h.body){let e,r=c.status;if(gg.has(r)){let e=c.headers.get("Location");if(Df(e,"Redirects returned/thrown from loaders/actions must have a Location header"),xg.test(e)){if(!s.isStaticRequest){let n=new URL(t.url),i=e.startsWith("//")?new URL(n.protocol+e):new URL(e),r=null!=ng(i.pathname,a);i.origin===n.origin&&r&&(e=i.pathname+i.search+i.hash)}}else e=Cg(new URL(t.url),i.slice(0,i.indexOf(n)+1),a,!0,e);if(s.isStaticRequest)throw c.headers.set("Location",e),c;return{type:Wf.redirect,status:r,location:e,revalidate:null!==c.headers.get("X-Remix-Revalidate")}}if(s.isRouteRequest)throw{type:l||Wf.data,response:c};let o=c.headers.get("Content-Type");return e=o&&/\bapplication\/json\b/.test(o)?await c.json():await c.text(),l===Wf.error?{type:l,error:new dg(r,c.statusText,e),headers:c.headers}:{type:Wf.data,data:e,statusCode:c.status,headers:c.headers}}var h,p,m;return l===Wf.error?{type:l,error:c}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(c)?{type:Wf.deferred,deferredData:c,statusCode:null==(p=c.init)?void 0:p.status,headers:(null==(m=c.init)?void 0:m.headers)&&new Headers(c.init.headers)}:{type:Wf.data,data:c}}function Ag(e,t,n,i){let r=e.createURL(zg(t)).toString(),o={signal:n};if(i&&Wg(i.formMethod)){let{formMethod:e,formEncType:t}=i;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(i.json)):"text/plain"===t?o.body=i.text:"application/x-www-form-urlencoded"===t&&i.formData?o.body=Tg(i.formData):o.body=i.formData}return new Request(r,o)}function Tg(e){let t=new URLSearchParams;for(let[n,i]of e.entries())t.append(n,"string"==typeof i?i:i.name);return t}function Lg(e){let t=new FormData;for(let[n,i]of e.entries())t.append(n,i);return t}function jg(e,t,n,i,r,o,a,s){let{loaderData:l,errors:c}=function(e,t,n,i,r){let o,a={},s=null,l=!1,c={};return n.forEach(((n,d)=>{let u=t[d].route.id;if(Df(!Hg(n),"Cannot handle redirect results in processLoaderData"),Bg(n)){let t=Ng(e,u),r=n.error;i&&(r=Object.values(i)[0],i=void 0),s=s||{},null==s[t.route.id]&&(s[t.route.id]=r),a[u]=void 0,l||(l=!0,o=ug(n.error)?n.error.status:500),n.headers&&(c[u]=n.headers)}else Fg(n)?(r.set(u,n.deferredData),a[u]=n.deferredData.data):a[u]=n.data,null==n.statusCode||200===n.statusCode||l||(o=n.statusCode),n.headers&&(c[u]=n.headers)})),i&&(s=i,a[Object.keys(i)[0]]=void 0),{loaderData:a,errors:s,statusCode:o||200,loaderHeaders:c}}(t,n,i,r,s);for(let d=0;de.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ig(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Dg(e,t){let{pathname:n,routeId:i,method:r,type:o}=void 0===t?{}:t,a="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(a="Bad Request",r&&n&&i?s="You made a "+r+' request to "'+n+'" but did not provide a `loader` for route "'+i+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(a="Forbidden",s='Route "'+i+'" does not match URL "'+n+'"'):404===e?(a="Not Found",s='No route matches URL "'+n+'"'):405===e&&(a="Method Not Allowed",r&&n&&i?s="You made a "+r.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+i+'", so there is no way to handle the request.':r&&(s='Invalid request method "'+r.toUpperCase()+'"')),new dg(e||500,a,new Error(s),!0)}function Pg(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Hg(n))return n}}function zg(e){return Bf(Lf({},"string"==typeof e?Hf(e):e,{hash:""}))}function Fg(e){return e.type===Wf.deferred}function Bg(e){return e.type===Wf.error}function Hg(e){return(e&&e.type)===Wf.redirect}function Wg(e){return pg.has(e.toLowerCase())}async function Ug(e,t,n,i,r,o){for(let a=0;ae.route.id===l.route.id)),d=null!=c&&!Eg(c,l)&&void 0!==(o&&o[l.route.id]);if(Fg(s)&&(r||d)){let e=i[a];Df(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Vg(s,e,r).then((e=>{e&&(n[a]=e||n[a])}))}}}async function Vg(e,t,n){if(void 0===n&&(n=!1),!(await e.deferredData.resolveData(t))){if(n)try{return{type:Wf.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Wf.error,error:i}}return{type:Wf.data,data:e.deferredData.data}}}function Gg(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Yg(e,t){let n="string"==typeof t?Hf(t).search:t.search;if(e[e.length-1].route.index&&Gg(n||""))return e[e.length-1];let i=rg(e);return i[i.length-1]}function Kg(e){let{formMethod:t,formAction:n,formEncType:i,text:r,formData:o,json:a}=e;if(t&&n&&i)return null!=r?{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:void 0,text:r}:null!=o?{formMethod:t,formAction:n,formEncType:i,formData:o,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:i,formData:void 0,json:a,text:void 0}:void 0}function Qg(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qg(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function Zg(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}const Xg=window.React;function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),Xg.useCallback((function(i,r){void 0===r&&(r={}),n.current&&("number"==typeof i?e.navigate(i):e.navigate(i,Jg({fromRouteId:t},r)))}),[e,t])}():function(){ay()||Df(!1);let e=Xg.useContext(ey),{basename:t,navigator:n}=Xg.useContext(ny),{matches:i}=Xg.useContext(ry),{pathname:r}=sy(),o=JSON.stringify(rg(i).map((e=>e.pathnameBase))),a=Xg.useRef(!1);return ly((()=>{a.current=!0})),Xg.useCallback((function(i,s){if(void 0===s&&(s={}),!a.current)return;if("number"==typeof i)return void n.go(i);let l=og(i,JSON.parse(o),r,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:ag([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)}),[t,n,o,r,e])}()}const dy=Xg.createContext(null);function uy(e,t){let{relative:n}=void 0===t?{}:t,{matches:i}=Xg.useContext(ry),{pathname:r}=sy(),o=JSON.stringify(rg(i).map((e=>e.pathnameBase)));return Xg.useMemo((()=>og(e,JSON.parse(o),r,"path"===n)),[e,o,r,n])}function hy(){let e=function(){var e;let t=Xg.useContext(oy),n=xy(vy.UseRouteError),i=_y(vy.UseRouteError);return t||(null==(e=n.errors)?void 0:e[i])}(),t=ug(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return Xg.createElement(Xg.Fragment,null,Xg.createElement("h2",null,"Unexpected Application Error!"),Xg.createElement("h3",{style:{fontStyle:"italic"}},t),n?Xg.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},n):null,null)}const py=Xg.createElement(hy,null);class my extends Xg.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?Xg.createElement(ry.Provider,{value:this.props.routeContext},Xg.createElement(oy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fy(e){let{routeContext:t,match:n,children:i}=e,r=Xg.useContext(ey);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),Xg.createElement(ry.Provider,{value:t},i)}var gy,yy,vy,by;function wy(e){let t=Xg.useContext(ey);return t||Df(!1),t}function xy(e){let t=Xg.useContext(ty);return t||Df(!1),t}function _y(e){let t=function(){let e=Xg.useContext(ry);return e||Df(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||Df(!1),n.route.id}(yy=gy||(gy={})).UseBlocker="useBlocker",yy.UseRevalidator="useRevalidator",yy.UseNavigateStable="useNavigate",(by=vy||(vy={})).UseBlocker="useBlocker",by.UseLoaderData="useLoaderData",by.UseActionData="useActionData",by.UseRouteError="useRouteError",by.UseNavigation="useNavigation",by.UseRouteLoaderData="useRouteLoaderData",by.UseMatches="useMatches",by.UseRevalidator="useRevalidator",by.UseNavigateStable="useNavigate",by.UseRouteId="useRouteId";let Cy=0;const Sy=Xg.startTransition;function ky(e){let{fallbackElement:t,router:n,future:i}=e,[r,o]=Xg.useState(n.state),{v7_startTransition:a}=i||{},s=Xg.useCallback((e=>{a&&Sy?Sy((()=>o(e))):o(e)}),[o,a]);Xg.useLayoutEffect((()=>n.subscribe(s)),[n,s]);let l=Xg.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,i)=>n.navigate(e,{state:t,preventScrollReset:null==i?void 0:i.preventScrollReset}),replace:(e,t,i)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==i?void 0:i.preventScrollReset})})),[n]),c=n.basename||"/",d=Xg.useMemo((()=>({router:n,navigator:l,static:!1,basename:c})),[n,l,c]);return Xg.createElement(Xg.Fragment,null,Xg.createElement(ey.Provider,{value:d},Xg.createElement(ty.Provider,{value:r},Xg.createElement(Ry,{basename:c,location:r.location,navigationType:r.historyAction,navigator:l},r.initialized?Xg.createElement(Ey,{routes:n.routes,state:r}):t))),null)}function Ey(e){let{routes:t,state:n}=e;return function(e,t,n){ay()||Df(!1);let{navigator:i}=Xg.useContext(ny),{matches:r}=Xg.useContext(ry),o=r[r.length-1],a=o?o.params:{};!o||o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let l,c=sy();if(t){var d;let e="string"==typeof t?Hf(t):t;"/"===s||(null==(d=e.pathname)?void 0:d.startsWith(s))||Df(!1),l=e}else l=c;let u=l.pathname||"/",h=Yf(e,{pathname:"/"===s?u:u.slice(s.length)||"/"}),p=function(e,t,n){var i,r;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){if(null==(r=n)||!r.errors)return null;e=n.matches}let o=e,a=null==(i=n)?void 0:i.errors;if(null!=a){let e=o.findIndex((e=>e.route.id&&(null==a?void 0:a[e.route.id])));e>=0||Df(!1),o=o.slice(0,Math.min(o.length,e+1))}return o.reduceRight(((e,i,r)=>{let s=i.route.id?null==a?void 0:a[i.route.id]:null,l=null;n&&(l=i.route.errorElement||py);let c=t.concat(o.slice(0,r+1)),d=()=>{let t;return t=s?l:i.route.Component?Xg.createElement(i.route.Component,null):i.route.element?i.route.element:e,Xg.createElement(fy,{match:i,routeContext:{outlet:e,matches:c,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===r)?Xg.createElement(my,{location:n.location,revalidation:n.revalidation,component:l,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()}),null)}(h&&h.map((e=>Object.assign({},e,{params:Object.assign({},a,e.params),pathname:ag([s,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:ag([s,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),r,n);return t&&p?Xg.createElement(iy.Provider,{value:{location:Jg({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:jf.Pop}},p):p}(t,void 0,n)}function $y(e){let{to:t,replace:n,state:i,relative:r}=e;ay()||Df(!1);let{matches:o}=Xg.useContext(ry),{pathname:a}=sy(),s=cy(),l=og(t,rg(o).map((e=>e.pathnameBase)),a,"path"===r),c=JSON.stringify(l);return Xg.useEffect((()=>s(JSON.parse(c),{replace:n,state:i,relative:r})),[s,c,r,n,i]),null}function My(e){return function(e){let t=Xg.useContext(ry).outlet;return t?Xg.createElement(dy.Provider,{value:e},t):t}(e.context)}function Ry(e){let{basename:t="/",children:n=null,location:i,navigationType:r=jf.Pop,navigator:o,static:a=!1}=e;ay()&&Df(!1);let s=t.replace(/^\/*/,"/"),l=Xg.useMemo((()=>({basename:s,navigator:o,static:a})),[s,o,a]);"string"==typeof i&&(i=Hf(i));let{pathname:c="/",search:d="",hash:u="",state:h=null,key:p="default"}=i,m=Xg.useMemo((()=>{let e=ng(c,s);return null==e?null:{location:{pathname:e,search:d,hash:u,state:h,key:p},navigationType:r}}),[s,c,d,u,h,p,r]);return null==m?null:Xg.createElement(ny.Provider,{value:l},Xg.createElement(iy.Provider,{children:n,value:m}))}var Ay,Ty;function Ly(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:Xg.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:Xg.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}(Ty=Ay||(Ay={}))[Ty.pending=0]="pending",Ty[Ty.success=1]="success",Ty[Ty.error=2]="error",new Promise((()=>{})),Xg.Component;const jy=window.React;function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)r=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;r=e=>({hasErrorBoundary:t(e)})}else r=_g;let o,a={},s=Gf(e.routes,r,void 0,a),l=e.basename||"/",c=Lf({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),d=null,u=new Set,h=null,p=null,m=null,f=null!=e.hydrationData,g=Yf(s,e.history.location,l),y=null;if(null==g){let t=Dg(404,{pathname:e.history.location.pathname}),{matches:n,route:i}=Ig(s);g=n,y={[i.id]:t}}let v,b,w=!(g.some((e=>e.route.lazy))||g.some((e=>e.route.loader))&&null==e.hydrationData),x={historyAction:e.history.action,location:e.history.location,matches:g,initialized:w,navigation:vg,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},_=jf.Pop,C=!1,S=!1,k=!1,E=[],$=[],M=new Map,R=0,A=-1,T=new Map,L=new Set,j=new Map,O=new Map,N=new Map,I=!1;function D(e){x=Lf({},x,e),u.forEach((e=>e(x)))}function P(t,n){var i,r;let a,l=null!=x.actionData&&null!=x.navigation.formMethod&&Wg(x.navigation.formMethod)&&"loading"===x.navigation.state&&!0!==(null==(i=t.state)?void 0:i._isRedirect);a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?x.actionData:null;let c=n.loaderData?Og(x.loaderData,n.loaderData,n.matches||[],n.errors):x.loaderData,d=new Map;N.clear();let u=!0===C||null!=x.navigation.formMethod&&Wg(x.navigation.formMethod)&&!0!==(null==(r=t.state)?void 0:r._isRedirect);o&&(s=o,o=void 0),S||_===jf.Pop||(_===jf.Push?e.history.push(t,t.state):_===jf.Replace&&e.history.replace(t,t.state)),D(Lf({},n,{actionData:a,loaderData:c,historyAction:_,location:t,initialized:!0,navigation:vg,revalidation:"idle",restoreScrollPosition:te(t,n.matches||x.matches),preventScrollReset:u,blockers:d})),_=jf.Pop,C=!1,S=!1,k=!1,E=[],$=[]}async function z(t,n,i){b&&b.abort(),b=null,_=t,S=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(h&&m){let n=ee(e,t);h[n]=m()}}(x.location,x.matches),C=!0===(i&&i.preventScrollReset);let c=o||s,d=i&&i.overrideNavigation,u=Yf(c,n,l);if(!u){let e=Dg(404,{pathname:n.pathname}),{matches:t,route:i}=Ig(c);return J(),void P(n,{matches:t,loaderData:{},errors:{[i.id]:e}})}if(x.initialized&&!k&&(f=n,(p=x.location).pathname===f.pathname&&p.search===f.search&&(""===p.hash?""!==f.hash:p.hash===f.hash||""!==f.hash))&&!(i&&i.submission&&Wg(i.submission.formMethod)))return void P(n,{matches:u});var p,f;b=new AbortController;let g,y,v=Ag(e.history,n,b.signal,i&&i.submission);if(i&&i.pendingError)y={[Ng(u).route.id]:i.pendingError};else if(i&&i.submission&&Wg(i.submission.formMethod)){let e=await async function(e,t,n,i,o){void 0===o&&(o={}),W();let s,c=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,n);D({navigation:c});let d=Yg(i,t);if(d.route.action||d.route.lazy){if(s=await Rg("action",e,d,i,a,r,l),e.signal.aborted)return{shortCircuited:!0}}else s={type:Wf.error,error:Dg(405,{method:e.method,pathname:t.pathname,routeId:d.route.id})};if(Hg(s)){let e;return e=o&&null!=o.replace?o.replace:s.location===x.location.pathname+x.location.search,await B(x,s,{submission:n,replace:e}),{shortCircuited:!0}}if(Bg(s)){let e=Ng(i,d.route.id);return!0!==(o&&o.replace)&&(_=jf.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:s.error}}}if(Fg(s))throw Dg(400,{type:"defer-action"});return{pendingActionData:{[d.route.id]:s.data}}}(v,n,i.submission,u,{replace:i.replace});if(e.shortCircuited)return;g=e.pendingActionData,y=e.pendingActionError,d=Qg(n,i.submission),v=new Request(v.url,{signal:v.signal})}let{shortCircuited:w,loaderData:T,errors:N}=await async function(t,n,i,r,a,c,d,u,h){let p=r||Qg(n,a),m=a||c||Kg(p),f=o||s,[g,y]=kg(e.history,x,i,m,n,k,E,$,j,L,f,l,u,h);if(J((e=>!(i&&i.some((t=>t.route.id===e)))||g&&g.some((t=>t.route.id===e)))),0===g.length&&0===y.length){let e=K();return P(n,Lf({matches:i,loaderData:{},errors:h||null},u?{actionData:u}:{},e?{fetchers:new Map(x.fetchers)}:{})),{shortCircuited:!0}}if(!S){y.forEach((e=>{let t=x.fetchers.get(e.key),n=qg(void 0,t?t.data:void 0);x.fetchers.set(e.key,n)}));let e=u||x.actionData;D(Lf({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},y.length>0?{fetchers:new Map(x.fetchers)}:{}))}A=++R,y.forEach((e=>{M.has(e.key)&&G(e.key),e.controller&&M.set(e.key,e.controller)}));let v=()=>y.forEach((e=>G(e.key)));b&&b.signal.addEventListener("abort",v);let{results:w,loaderResults:_,fetcherResults:C}=await H(x.matches,i,g,y,t);if(t.signal.aborted)return{shortCircuited:!0};b&&b.signal.removeEventListener("abort",v),y.forEach((e=>M.delete(e.key)));let T=Pg(w);if(T)return await B(x,T,{replace:d}),{shortCircuited:!0};let{loaderData:N,errors:I}=jg(x,i,g,_,h,y,C,O);O.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&O.delete(t)}))}));let z=K(),F=Q(A);return Lf({loaderData:N,errors:I},z||F||y.length>0?{fetchers:new Map(x.fetchers)}:{})}(v,n,u,d,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,g,y);w||(b=null,P(n,Lf({matches:u},g?{actionData:g}:{},{loaderData:T,errors:N})))}function F(e){return x.fetchers.get(e)||bg}async function B(i,r,o){let{submission:a,replace:s,isFetchActionRedirect:c}=void 0===o?{}:o;r.revalidate&&(k=!0);let d=Ff(i.location,r.location,Lf({_isRedirect:!0},c?{_isFetchActionRedirect:!0}:{}));if(Df(d,"Expected a location on the redirect navigation"),xg.test(r.location)&&n){let n=e.history.createURL(r.location),i=null==ng(n.pathname,l);if(t.location.origin!==n.origin||i)return void(s?t.location.replace(r.location):t.location.assign(r.location))}b=null;let u=!0===s?jf.Replace:jf.Push,h=a||Kg(i.navigation);if(yg.has(r.status)&&h&&Wg(h.formMethod))await z(u,d,{submission:Lf({},h,{formAction:r.location}),preventScrollReset:C});else if(c)await z(u,d,{overrideNavigation:Qg(d),fetcherSubmission:h,preventScrollReset:C});else{let e=Qg(d,h);await z(u,d,{overrideNavigation:e,preventScrollReset:C})}}async function H(t,n,i,o,s){let c=await Promise.all([...i.map((e=>Rg("loader",s,e,n,a,r,l))),...o.map((t=>t.matches&&t.match&&t.controller?Rg("loader",Ag(e.history,t.path,t.controller.signal),t.match,t.matches,a,r,l):{type:Wf.error,error:Dg(404,{pathname:t.path})}))]),d=c.slice(0,i.length),u=c.slice(i.length);return await Promise.all([Ug(t,i,d,d.map((()=>s.signal)),!1,x.loaderData),Ug(t,o.map((e=>e.match)),u,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:c,loaderResults:d,fetcherResults:u}}function W(){k=!0,E.push(...J()),j.forEach(((e,t)=>{M.has(t)&&($.push(t),G(t))}))}function U(e,t,n){let i=Ng(x.matches,t);V(e),D({errors:{[i.route.id]:n},fetchers:new Map(x.fetchers)})}function V(e){let t=x.fetchers.get(e);!M.has(e)||t&&"loading"===t.state&&T.has(e)||G(e),j.delete(e),T.delete(e),L.delete(e),x.fetchers.delete(e)}function G(e){let t=M.get(e);Df(t,"Expected fetch controller: "+e),t.abort(),M.delete(e)}function Y(e){for(let t of e){let e=Zg(F(t).data);x.fetchers.set(t,e)}}function K(){let e=[],t=!1;for(let n of L){let i=x.fetchers.get(n);Df(i,"Expected fetcher: "+n),"loading"===i.state&&(L.delete(n),e.push(n),t=!0)}return Y(e),t}function Q(e){let t=[];for(let[n,i]of T)if(i0}function q(e){x.blockers.delete(e),N.delete(e)}function Z(e,t){let n=x.blockers.get(e)||wg;Df("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let i=new Map(x.blockers);i.set(e,t),D({blockers:i})}function X(e){let{currentLocation:t,nextLocation:n,historyAction:i}=e;if(0===N.size)return;N.size>1&&Pf(!1,"A router only supports one blocker at a time");let r=Array.from(N.entries()),[o,a]=r[r.length-1],s=x.blockers.get(o);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:i})?o:void 0}function J(e){let t=[];return O.forEach(((n,i)=>{e&&!e(i)||(n.cancel(),t.push(i),O.delete(i))})),t}function ee(e,t){return p&&p(e,t.map((e=>function(e,t){let{route:n,pathname:i,params:r}=e;return{id:n.id,pathname:i,params:r,data:t[n.id],handle:n.handle}}(e,x.loaderData))))||e.key}function te(e,t){if(h){let n=ee(e,t),i=h[n];if("number"==typeof i)return i}return null}return v={get basename(){return l},get state(){return x},get routes(){return s},initialize:function(){return d=e.history.listen((t=>{let{action:n,location:i,delta:r}=t;if(I)return void(I=!1);Pf(0===N.size||null!=r,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=X({currentLocation:x.location,nextLocation:i,historyAction:n});return o&&null!=r?(I=!0,e.history.go(-1*r),void Z(o,{state:"blocked",location:i,proceed(){Z(o,{state:"proceeding",proceed:void 0,reset:void 0,location:i}),e.history.go(r)},reset(){let e=new Map(x.blockers);e.set(o,wg),D({blockers:e})}})):z(n,i)})),x.initialized||z(jf.Pop,x.location),v},subscribe:function(e){return u.add(e),()=>u.delete(e)},enableScrollRestoration:function(e,t,n){if(h=e,m=t,p=n||null,!f&&x.navigation===vg){f=!0;let e=te(x.location,x.matches);null!=e&&D({restoreScrollPosition:e})}return()=>{h=null,m=null,p=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let r=Cg(x.location,x.matches,l,c.v7_prependBasename,n,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:o,submission:a,error:s}=Sg(c.v7_normalizeFormMethod,!1,r,i),d=x.location,u=Ff(x.location,o,i&&i.state);u=Lf({},u,e.history.encodeLocation(u));let h=i&&null!=i.replace?i.replace:void 0,p=jf.Push;!0===h?p=jf.Replace:!1===h||null!=a&&Wg(a.formMethod)&&a.formAction===x.location.pathname+x.location.search&&(p=jf.Replace);let m=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,f=X({currentLocation:d,nextLocation:u,historyAction:p});if(!f)return await z(p,u,{submission:a,pendingError:s,preventScrollReset:m,replace:i&&i.replace});Z(f,{state:"blocked",location:u,proceed(){Z(f,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(n,i)},reset(){let e=new Map(x.blockers);e.set(f,wg),D({blockers:e})}})},fetch:function(t,n,d,u){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");M.has(t)&&G(t);let h=o||s,p=Cg(x.location,x.matches,l,c.v7_prependBasename,d,n,null==u?void 0:u.relative),m=Yf(h,p,l);if(!m)return void U(t,n,Dg(404,{pathname:p}));let{path:f,submission:g,error:y}=Sg(c.v7_normalizeFormMethod,!0,p,u);if(y)return void U(t,n,y);let v=Yg(m,f);C=!0===(u&&u.preventScrollReset),g&&Wg(g.formMethod)?async function(t,n,i,c,d,u){if(W(),j.delete(t),!c.route.action&&!c.route.lazy){let e=Dg(405,{method:u.formMethod,pathname:i,routeId:n});return void U(t,n,e)}let h=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(u,x.fetchers.get(t));x.fetchers.set(t,h),D({fetchers:new Map(x.fetchers)});let p=new AbortController,m=Ag(e.history,i,p.signal,u);M.set(t,p);let f=await Rg("action",m,c,d,a,r,l);if(m.signal.aborted)return void(M.get(t)===p&&M.delete(t));if(Hg(f)){M.delete(t),L.add(t);let e=qg(u);return x.fetchers.set(t,e),D({fetchers:new Map(x.fetchers)}),B(x,f,{submission:u,isFetchActionRedirect:!0})}if(Bg(f))return void U(t,n,f.error);if(Fg(f))throw Dg(400,{type:"defer-action"});let g=x.navigation.location||x.location,y=Ag(e.history,g,p.signal),v=o||s,w="idle"!==x.navigation.state?Yf(v,x.navigation.location,l):x.matches;Df(w,"Didn't find any matches after fetcher action");let C=++R;T.set(t,C);let S=qg(u,f.data);x.fetchers.set(t,S);let[N,I]=kg(e.history,x,w,u,g,k,E,$,j,L,v,l,{[c.route.id]:f.data},void 0);I.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=x.fetchers.get(t),i=qg(void 0,n?n.data:void 0);x.fetchers.set(t,i),M.has(t)&&G(t),e.controller&&M.set(t,e.controller)})),D({fetchers:new Map(x.fetchers)});let z=()=>I.forEach((e=>G(e.key)));p.signal.addEventListener("abort",z);let{results:F,loaderResults:V,fetcherResults:Y}=await H(x.matches,w,N,I,y);if(p.signal.aborted)return;p.signal.removeEventListener("abort",z),T.delete(t),M.delete(t),I.forEach((e=>M.delete(e.key)));let K=Pg(F);if(K)return B(x,K);let{loaderData:q,errors:Z}=jg(x,x.matches,N,V,void 0,I,Y,O);if(x.fetchers.has(t)){let e=Zg(f.data);x.fetchers.set(t,e)}let X=Q(C);"loading"===x.navigation.state&&C>A?(Df(_,"Expected pending action"),b&&b.abort(),P(x.navigation.location,{matches:w,loaderData:q,errors:Z,fetchers:new Map(x.fetchers)})):(D(Lf({errors:Z,loaderData:Og(x.loaderData,q,w,Z)},X||I.length>0?{fetchers:new Map(x.fetchers)}:{})),k=!1)}(t,n,f,v,m,g):(j.set(t,{routeId:n,path:f}),async function(t,n,i,o,s,c){let d=x.fetchers.get(t),u=qg(c,d?d.data:void 0);x.fetchers.set(t,u),D({fetchers:new Map(x.fetchers)});let h=new AbortController,p=Ag(e.history,i,h.signal);M.set(t,h);let m=await Rg("loader",p,o,s,a,r,l);if(Fg(m)&&(m=await Vg(m,p.signal,!0)||m),M.get(t)===h&&M.delete(t),p.signal.aborted)return;if(Hg(m))return L.add(t),void(await B(x,m));if(Bg(m)){let e=Ng(x.matches,n);return x.fetchers.delete(t),void D({fetchers:new Map(x.fetchers),errors:{[e.route.id]:m.error}})}Df(!Fg(m),"Unhandled fetcher deferred data");let f=Zg(m.data);x.fetchers.set(t,f),D({fetchers:new Map(x.fetchers)})}(t,n,f,v,m,g))},revalidate:function(){W(),D({revalidation:"loading"}),"submitting"!==x.navigation.state&&("idle"!==x.navigation.state?z(_||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation}):z(x.historyAction,x.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:F,deleteFetcher:V,dispose:function(){d&&d(),u.clear(),b&&b.abort(),x.fetchers.forEach(((e,t)=>V(t))),x.blockers.forEach(((e,t)=>q(t)))},getBlocker:function(e,t){let n=x.blockers.get(e)||wg;return N.get(e)!==t&&N.set(e,t),n},deleteBlocker:q,_internalFetchControllers:M,_internalActiveDeferreds:O,_internalSetRoutes:function(e){a={},o=Gf(e,r,void 0,a)}},v}({basename:null==t?void 0:t.basename,future:Oy({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:If({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Dy(),routes:e,mapRouteProperties:Ly}).initialize()}function Dy(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Oy({},t,{errors:Py(t.errors)})),t}function Py(e){if(!e)return null;let t=Object.entries(e),n={};for(let[i,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[i]=new dg(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){let e=new Error(r.message);e.stack="",n[i]=e}else n[i]=r;return n}jy.startTransition;const zy="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Fy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,By=jy.forwardRef((function(e,t){let n,{onClick:i,relative:r,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:d}=e,u=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r}(e,Ny),{basename:h}=jy.useContext(ny),p=!1;if("string"==typeof c&&Fy.test(c)&&(n=c,zy))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=ng(t.pathname,h);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:p=!0}catch(g){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;ay()||Df(!1);let{basename:i,navigator:r}=Xg.useContext(ny),{hash:o,pathname:a,search:s}=uy(e,{relative:n}),l=a;return"/"!==i&&(l="/"===a?i:ag([i,a])),r.createHref({pathname:l,search:s,hash:o})}(c,{relative:r}),f=function(e,t){let{target:n,replace:i,state:r,preventScrollReset:o,relative:a}=void 0===t?{}:t,s=cy(),l=sy(),c=uy(e,{relative:a});return jy.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==i?i:Bf(l)===Bf(c);s(e,{replace:n,state:r,preventScrollReset:o,relative:a})}}),[l,s,c,i,r,n,e,o,a])}(c,{replace:a,state:s,target:l,preventScrollReset:d,relative:r});return jy.createElement("a",Oy({},u,{href:n||m,onClick:p||o?i:function(e){i&&i(e),e.defaultPrevented||f(e)},ref:t,target:l}))}));var Hy,Wy;function Uy(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Re(e,t)}!function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"}(Hy||(Hy={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Wy||(Wy={}));var Vy=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}(),Gy="undefined"==typeof window;function Yy(){}function Ky(e){return"number"==typeof e&&e>=0&&e!==1/0}function Qy(e){return Array.isArray(e)?e:[e]}function qy(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zy(e,t,n){return lv(e)?"function"==typeof t?i({},n,{queryKey:e,queryFn:t}):i({},t,{queryKey:e}):e}function Xy(e,t,n){return lv(e)?[i({},t,{queryKey:e}),n]:[e||{},t]}function Jy(e,t){var n=e.active,i=e.exact,r=e.fetching,o=e.inactive,a=e.predicate,s=e.queryKey,l=e.stale;if(lv(s))if(i){if(t.queryHash!==tv(s,t.options))return!1}else if(!iv(t.queryKey,s))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,o);if("none"===c)return!1;if("all"!==c){var d=t.isActive();if("active"===c&&!d)return!1;if("inactive"===c&&d)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof r&&t.isFetching()!==r||a&&!a(t))}function ev(e,t){var n=e.exact,i=e.fetching,r=e.predicate,o=e.mutationKey;if(lv(o)){if(!t.options.mutationKey)return!1;if(n){if(nv(t.options.mutationKey)!==nv(o))return!1}else if(!iv(t.options.mutationKey,o))return!1}return!("boolean"==typeof i&&"loading"===t.state.status!==i||r&&!r(t))}function tv(e,t){return((null==t?void 0:t.queryKeyHashFn)||nv)(e)}function nv(e){var t;return t=Qy(e),JSON.stringify(t,(function(e,t){return av(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function iv(e,t){return rv(Qy(e),Qy(t))}function rv(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!rv(e[n],t[n])}))}function ov(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||av(e)&&av(t)){for(var i=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),o=r.length,a=n?[]:{},s=0,l=0;l0?this.queries.filter((function(e){return Jy(n,e)})):this.queries},n.notify=function(e){var t=this;bv.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;bv.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;bv.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(Vy),Sv=function(){function e(e){this.options=i({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Yy).catch(Yy)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,i=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),i=i.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),i.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),xv().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new yv({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return i({},e,{failureCount:e.failureCount+1});case"pause":return i({},e,{isPaused:!0});case"continue":return i({},e,{isPaused:!1});case"loading":return i({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return i({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return i({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return i({},e,t.state);default:return e}}(this.state,e),bv.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}(),kv=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}Uy(t,e);var n=t.prototype;return n.build=function(e,t,n){var i=new Sv({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(i),i},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;bv.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return ev(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return ev(e,t)}))},n.notify=function(e){var t=this;bv.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return bv.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(Yy)}))}),Promise.resolve())}))},t}(Vy);function Ev(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var $v=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new Cv,this.mutationCache=e.mutationCache||new kv,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=uv.subscribe((function(){uv.isFocused()&&hv.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=hv.subscribe((function(){uv.isFocused()&&hv.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=Xy(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll(i({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var i=Zy(e),r=this.defaultQueryOptions(i);return this.queryCache.build(this,r).setData(t,n)},t.setQueriesData=function(e,t,n){var i=this;return bv.batch((function(){return i.getQueryCache().findAll(e).map((function(e){var r=e.queryKey;return[r,i.setQueryData(r,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=Xy(e,t)[0],i=this.queryCache;bv.batch((function(){i.findAll(n).forEach((function(e){i.remove(e)}))}))},t.resetQueries=function(e,t,n){var r=this,o=Xy(e,t,n),a=o[0],s=o[1],l=this.queryCache,c=i({},a,{active:!0});return bv.batch((function(){return l.findAll(a).forEach((function(e){e.reset()})),r.refetchQueries(c,s)}))},t.cancelQueries=function(e,t,n){var i=this,r=Xy(e,t,n),o=r[0],a=r[1],s=void 0===a?{}:a;void 0===s.revert&&(s.revert=!0);var l=bv.batch((function(){return i.queryCache.findAll(o).map((function(e){return e.cancel(s)}))}));return Promise.all(l).then(Yy).catch(Yy)},t.invalidateQueries=function(e,t,n){var r,o,a,s=this,l=Xy(e,t,n),c=l[0],d=l[1],u=i({},c,{active:null==(r=null!=(o=c.refetchActive)?o:c.active)||r,inactive:null!=(a=c.refetchInactive)&&a});return bv.batch((function(){return s.queryCache.findAll(c).forEach((function(e){e.invalidate()})),s.refetchQueries(u,d)}))},t.refetchQueries=function(e,t,n){var r=this,o=Xy(e,t,n),a=o[0],s=o[1],l=bv.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.fetch(void 0,i({},s,{meta:{refetchPage:null==a?void 0:a.refetchPage}}))}))})),c=Promise.all(l).then(Yy);return(null==s?void 0:s.throwOnError)||(c=c.catch(Yy)),c},t.fetchQuery=function(e,t,n){var i=Zy(e,t,n),r=this.defaultQueryOptions(i);void 0===r.retry&&(r.retry=!1);var o=this.queryCache.build(this,r);return o.isStaleByTime(r.staleTime)?o.fetch(r):Promise.resolve(o.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(Yy).catch(Yy)},t.fetchInfiniteQuery=function(e,t,n){var i=Zy(e,t,n);return i.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,i,r,o,a,s,l,c,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,u=null==(i=e.fetchOptions)||null==(r=i.meta)?void 0:r.fetchMore,h=null==u?void 0:u.pageParam,p="forward"===(null==u?void 0:u.direction),m="backward"===(null==u?void 0:u.direction),f=(null==(o=e.state.data)?void 0:o.pages)||[],g=(null==(a=e.state.data)?void 0:a.pageParams)||[],y=dv(),v=null==y?void 0:y.signal,b=g,w=!1,x=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},_=function(e,t,n,i){return b=i?[t].concat(b):[].concat(b,[t]),i?[n].concat(e):[].concat(e,[n])},C=function(t,n,i,r){if(w)return Promise.reject("Cancelled");if(void 0===i&&!n&&t.length)return Promise.resolve(t);var o={queryKey:e.queryKey,signal:v,pageParam:i,meta:e.meta},a=x(o),s=Promise.resolve(a).then((function(e){return _(t,i,e,r)}));return mv(a)&&(s.cancel=a.cancel),s};if(f.length)if(p){var S=void 0!==h,k=S?h:Ev(e.options,f);s=C(f,S,k)}else if(m){var E=void 0!==h,$=E?h:(l=e.options,c=f,null==l.getPreviousPageParam?void 0:l.getPreviousPageParam(c[0],c));s=C(f,E,$,!0)}else!function(){b=[];var t=void 0===e.options.getNextPageParam,n=!d||!f[0]||d(f[0],0,f);s=n?C([],t,g[0]):Promise.resolve(_([],g[0],f[0]));for(var i=function(n){s=s.then((function(i){if(!d||!f[n]||d(f[n],n,f)){var r=t?g[n]:Ev(e.options,i);return C(i,t,r)}return Promise.resolve(_(i,g[n],f[n]))}))},r=1;r0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:f,isRefetching:f&&"loading"!==g,isLoadingError:"error"===g&&0===u.dataUpdatedAt,isPlaceholderData:v,isPreviousData:y,isRefetchError:"error"===g&&0!==u.dataUpdatedAt,isStale:Lv(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,i=n.notifyOnChangeProps,r=n.notifyOnChangePropsExclusions;if(!i&&!r)return!0;if("tracked"===i&&!this.trackedProps.length)return!0;var o="tracked"===i?this.trackedProps:i;return Object.keys(e).some((function(n){var i=n,a=e[i]!==t[i],s=null==o?void 0:o.some((function(e){return e===n})),l=null==r?void 0:r.some((function(e){return e===n}));return a&&!l&&(!o||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!function(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify(i({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||gv(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;bv.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(Vy);function Rv(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&Av(e,t,t.refetchOnMount)}function Av(e,t,n){if(!1!==t.enabled){var i="function"==typeof n?n(e):n;return"always"===i||!1!==i&&Lv(e,t)}return!1}function Tv(e,t,n,i){return!1!==n.enabled&&(e!==t||!1===i.enabled)&&(!n.suspense||"error"!==e.state.status)&&Lv(e,n)}function Lv(e,t){return e.isStaleByTime(t.staleTime)}var jv=function(e){function t(t,n){var i;return(i=e.call(this)||this).client=t,i.setOptions(n),i.bindMethods(),i.updateResult(),i}Uy(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,i({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},t=i({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;bv.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(Vy),Ov=window.ReactDOM.unstable_batchedUpdates;bv.setBatchNotifyFunction(Ov);var Nv=console;wv=Nv;const Iv=window.React;var Dv=Iv.createContext(void 0),Pv=Iv.createContext(!1);function zv(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Dv),window.ReactQueryClientContext):Dv}var Fv=function(){var e=Iv.useContext(zv(Iv.useContext(Pv)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Bv=function(e){var t=e.client,n=e.contextSharing,i=void 0!==n&&n,r=e.children;Iv.useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var o=zv(i);return Iv.createElement(Pv.Provider,{value:i},Iv.createElement(o.Provider,{value:t},r))};const Hv=window.React;var Wv,Uv=Hv.createContext((Wv=!1,{clearReset:function(){Wv=!1},reset:function(){Wv=!0},isReset:function(){return Wv}}));function Vv(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}const Gv=window.React;function Yv(e,t,n){var r=Gv.useRef(!1),o=Gv.useState(0)[1],a=function(e,t,n){return lv(e)?"function"==typeof t?i({},n,{mutationKey:e,mutationFn:t}):i({},t,{mutationKey:e}):"function"==typeof e?i({},t,{mutationFn:e}):i({},e)}(e,t,n),s=Fv(),l=Gv.useRef();l.current?l.current.setOptions(a):l.current=new jv(s,a);var c=l.current.getCurrentResult();Gv.useEffect((function(){r.current=!0;var e=l.current.subscribe(bv.batchCalls((function(){r.current&&o((function(e){return e+1}))})));return function(){r.current=!1,e()}}),[]);var d=Gv.useCallback((function(e,t){l.current.mutate(e,t).catch(Yy)}),[]);if(c.error&&Vv(void 0,l.current.options.useErrorBoundary,[c.error]))throw c.error;return i({},c,{mutate:d,mutateAsync:c.mutate})}const Kv=window.React;function Qv(e,t,n){return function(e,t){var n=Kv.useRef(!1),i=Kv.useState(0)[1],r=Fv(),o=Hv.useContext(Uv),a=r.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=bv.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=bv.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=bv.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(o.isReset()||(a.retryOnMount=!1));var s=Kv.useState((function(){return new t(r,a)}))[0],l=s.getOptimisticResult(a);if(Kv.useEffect((function(){n.current=!0,o.clearReset();var e=s.subscribe(bv.batchCalls((function(){n.current&&i((function(e){return e+1}))})));return s.updateResult(),function(){n.current=!1,e()}}),[o,s]),Kv.useEffect((function(){s.setOptions(a,{listeners:!1})}),[a,s]),a.suspense&&l.isLoading)throw s.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){o.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(l.isError&&!o.isReset()&&!l.isFetching&&Vv(a.suspense,a.useErrorBoundary,[l.error,s.getCurrentQuery()]))throw l.error;return"tracked"===a.notifyOnChangeProps&&(l=s.trackResult(l,a)),l}(Zy(e,t,n),Mv)}var qv=Symbol.for("immer-nothing"),Zv=Symbol.for("immer-draftable"),Xv=Symbol.for("immer-state");function Jv(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var eb=Object.getPrototypeOf;function tb(e){return!!e&&!!e[Xv]}function nb(e){var t;return!!e&&(rb(e)||Array.isArray(e)||!!e[Zv]||!!(null==(t=e.constructor)?void 0:t[Zv])||cb(e)||db(e))}var ib=Object.prototype.constructor.toString();function rb(e){if(!e||"object"!=typeof e)return!1;const t=eb(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ib}function ob(e,t){0===ab(e)?Object.entries(e).forEach((([n,i])=>{t(n,i,e)})):e.forEach(((n,i)=>t(i,n,e)))}function ab(e){const t=e[Xv];return t?t.type_:Array.isArray(e)?1:cb(e)?2:db(e)?3:0}function sb(e,t){return 2===ab(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lb(e,t,n){const i=ab(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function cb(e){return e instanceof Map}function db(e){return e instanceof Set}function ub(e){return e.copy_||e.base_}function hb(e,t){if(cb(e))return new Map(e);if(db(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&rb(e)){if(!eb(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Xv];let i=Reflect.ownKeys(n);for(let r=0;r1&&(e.set=e.add=e.clear=e.delete=mb),Object.freeze(e),t&&ob(e,((e,t)=>pb(t,!0)))),e}function mb(){Jv(2)}function fb(e){return Object.isFrozen(e)}var gb,yb={};function vb(e){const t=yb[e];return t||Jv(0),t}function bb(){return gb}function wb(e,t){t&&(vb("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xb(e){_b(e),e.drafts_.forEach(Sb),e.drafts_=null}function _b(e){e===gb&&(gb=e.parent_)}function Cb(e){return gb={drafts_:[],parent_:gb,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Sb(e){const t=e[Xv];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function kb(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Xv].modified_&&(xb(t),Jv(4)),nb(e)&&(e=Eb(t,e),t.parent_||Mb(t,e)),t.patches_&&vb("Patches").generateReplacementPatches_(n[Xv].base_,e,t.patches_,t.inversePatches_)):e=Eb(t,n,[]),xb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qv?e:void 0}function Eb(e,t,n){if(fb(t))return t;const i=t[Xv];if(!i)return ob(t,((r,o)=>$b(e,i,t,r,o,n))),t;if(i.scope_!==e)return t;if(!i.modified_)return Mb(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const t=i.copy_;let r=t,o=!1;3===i.type_&&(r=new Set(t),t.clear(),o=!0),ob(r,((r,a)=>$b(e,i,t,r,a,n,o))),Mb(e,t,!1),n&&e.patches_&&vb("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function $b(e,t,n,i,r,o,a){if(tb(r)){const a=Eb(e,r,o&&t&&3!==t.type_&&!sb(t.assigned_,i)?o.concat(i):void 0);if(lb(n,i,a),!tb(a))return;e.canAutoFreeze_=!1}else a&&n.add(r);if(nb(r)&&!fb(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Eb(e,r),t&&t.scope_.parent_||Mb(e,r)}}function Mb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pb(t,n)}var Rb={get(e,t){if(t===Xv)return e;const n=ub(e);if(!sb(n,t))return function(e,t,n){var i;const r=Lb(t,n);return r?"value"in r?r.value:null==(i=r.get)?void 0:i.call(e.draft_):void 0}(e,n,t);const i=n[t];return e.finalized_||!nb(i)?i:i===Tb(e.base_,t)?(Ob(e),e.copy_[t]=Nb(i,e)):i},has:(e,t)=>t in ub(e),ownKeys:e=>Reflect.ownKeys(ub(e)),set(e,t,n){const i=Lb(ub(e),t);if(null==i?void 0:i.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const i=Tb(ub(e),t),a=null==i?void 0:i[Xv];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((r=n)===(o=i)?0!==r||1/r==1/o:r!=r&&o!=o)&&(void 0!==n||sb(e.base_,t)))return!0;Ob(e),jb(e)}var r,o;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Tb(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Ob(e),jb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=ub(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){Jv(11)},getPrototypeOf:e=>eb(e.base_),setPrototypeOf(){Jv(12)}},Ab={};function Tb(e,t){const n=e[Xv];return(n?ub(n):e)[t]}function Lb(e,t){if(!(t in e))return;let n=eb(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=eb(n)}}function jb(e){e.modified_||(e.modified_=!0,e.parent_&&jb(e.parent_))}function Ob(e){e.copy_||(e.copy_=hb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Nb(e,t){const n=cb(e)?vb("MapSet").proxyMap_(e,t):db(e)?vb("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:bb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=i,o=Rb;n&&(r=[i],o=Ab);const{revoke:a,proxy:s}=Proxy.revocable(r,o);return i.draft_=s,i.revoke_=a,s}(e,t);return(t?t.scope_:bb()).drafts_.push(n),n}function Ib(e){if(!nb(e)||fb(e))return e;const t=e[Xv];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=hb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=hb(e,!0);return ob(n,((e,t)=>{lb(n,e,Ib(t))})),t&&(t.finalized_=!1),n}ob(Rb,((e,t)=>{Ab[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ab.deleteProperty=function(e,t){return Ab.set.call(this,e,t,void 0)},Ab.set=function(e,t,n){return Rb.set.call(this,e[0],t,n,e[0])};var Db=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const i=this;return function(e=n,...r){return i.produce(e,(e=>t.call(this,e,...r)))}}let i;if("function"!=typeof t&&Jv(6),void 0!==n&&"function"!=typeof n&&Jv(7),nb(e)){const r=Cb(this),o=Nb(e,void 0);let a=!0;try{i=t(o),a=!1}finally{a?xb(r):_b(r)}return wb(r,n),kb(i,r)}if(!e||"object"!=typeof e){if(i=t(e),void 0===i&&(i=e),i===qv&&(i=void 0),this.autoFreeze_&&pb(i,!0),n){const t=[],r=[];vb("Patches").generateReplacementPatches_(e,i,t,r),n(t,r)}return i}Jv(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,i;return[this.produce(e,t,((e,t)=>{n=e,i=t})),n,i]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;nb(e)||Jv(8),tb(e)&&(tb(t=e)||Jv(10),e=Ib(t));const n=Cb(this),i=Nb(e,void 0);return i[Xv].isManual_=!0,_b(n),i}finishDraft(e,t){const n=e&&e[Xv];n&&n.isManual_||Jv(9);const{scope_:i}=n;return wb(i,t),kb(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));const i=vb("Patches").applyPatches_;return tb(e)?i(e,t):this.produce(e,(e=>i(e,t)))}},Pb=Db.produce;Db.produceWithPatches.bind(Db);var zb=Db.setAutoFreeze.bind(Db);Db.setUseStrictShallowCopy.bind(Db),Db.applyPatches.bind(Db),Db.createDraft.bind(Db),Db.finishDraft.bind(Db);const Fb=new Map,Bb=e=>{const t=Fb.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},Hb=(e,t={})=>(n,i,r)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let c;try{c=null!=o&&o&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(f){}if(!c)return e(n,i,r);const{connection:d,...u}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const i=Fb.get(n.name);if(i)return{type:"tracked",store:e,...i};const r={connection:t.connect(n),stores:{}};return Fb.set(n.name,r),{type:"tracked",store:e,...r}})(s,c,l);let h=!0;r.setState=(e,t,o)=>{const c=n(e,t);if(!h)return c;const u=void 0===o?{type:a||"anonymous"}:"string"==typeof o?{type:o}:o;return void 0===s?(null==d||d.send(u,i()),c):(null==d||d.send({...u,type:`${s}/${u.type}`},{...Bb(l.name),[s]:r.getState()}),c)};const p=(...e)=>{const t=h;h=!1,n(...e),h=t},m=e(r.setState,i,r);if("untracked"===u.type?null==d||d.init(m):(u.stores[u.store]=r,null==d||d.init(Object.fromEntries(Object.entries(u.stores).map((([e,t])=>[e,e===u.store?m:t.getState()]))))),r.dispatchFromDevtools&&"function"==typeof r.dispatch){const e=r.dispatch;r.dispatch=(...t)=>{e(...t)}}return d.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):Wb(e.payload,(e=>{if("__setState"!==e.type)r.dispatchFromDevtools&&"function"==typeof r.dispatch&&r.dispatch(e);else{if(void 0===s)return void p(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[s];if(null==t)return;JSON.stringify(r.getState())!==JSON.stringify(t)&&p(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return p(m),void 0===s?null==d?void 0:d.init(r.getState()):null==d?void 0:d.init(Bb(l.name));case"COMMIT":return void 0===s?void(null==d||d.init(r.getState())):null==d?void 0:d.init(Bb(l.name));case"ROLLBACK":return Wb(e.state,(e=>{if(void 0===s)return p(e),void(null==d||d.init(r.getState()));p(e[s]),null==d||d.init(Bb(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Wb(e.state,(e=>{void 0!==s?JSON.stringify(r.getState())!==JSON.stringify(e[s])&&p(e[s]):p(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,i=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!i)return;return p(void 0===s?i:i[s]),void(null==d||d.send(null,n))}case"PAUSE_RECORDING":return h=!h}return}})),m},Wb=(e,t)=>{let n;try{n=JSON.parse(e)}catch(i){console.error("[zustand devtools middleware] Could not parse the received json",i)}void 0!==n&&t(n)},Ub=e=>(t,n,i)=>{const r=i.subscribe;return i.subscribe=(e,t,n)=>{let o=e;if(t){const r=(null==n?void 0:n.equalityFn)||Object.is;let a=e(i.getState());o=n=>{const i=e(n);if(!r(a,i)){const e=a;t(a=i,e)}},(null==n?void 0:n.fireImmediately)&&t(a,a)}return r(o)},e(t,n,i)},Vb=e=>(t,n,i)=>(i.setState=(e,n,...i)=>{const r="function"==typeof e?Pb(e):e;return t(r,n,...i)},e(i.setState,n,i));function Gb(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const n=nf(e),i=(e,i=t)=>function(e,t=e.getState,n){const i=Kb(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return Yb(i),i}(n,e,i);return Object.assign(i,n),i},qb=(e,t)=>e?Qb(e,t):Qb;zb(!1);const Zb=qb()(Ub(Hb(Vb(((e,t)=>({settings:null,hasChanged:!1,updateSettings:t=>{e((e=>{e.settings={...e.settings,...t}}))},updateSettingsStatus:t=>{e((e=>{e.hasChanged=t}))}}))))),Gb);async function Xb(e,t,n){try{const i=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_preview_mail_for_woo",nonce:window.yaymailData.admin_ajax.nonce,template_name:e||"",search_order_id:t,email_address:n}});if(!i.success)throw new Error("Call ajax failed");return i}catch(i){throw console.error(i),i}}async function Jb(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_review",nonce:window.yaymailData.admin_ajax.nonce}});if(!e.success)throw new Error("Call ajax failed");return e}catch(e){throw console.error(e),e}}async function ew(e){try{const t=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_change_ghf_tour",nonce:window.yaymailData.admin_ajax.nonce,next_move:e}});if(!t.success)throw new Error("Call ajax failed");return t}catch(t){throw console.error(t),t}}let tw=null,nw=null;function iw(e,t){return null!=e&&(null==t||"object"!=typeof e||Object.prototype.hasOwnProperty.call(e,t))}function rw(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ow(e){return e.replace(/_/g," ")}function aw(e){return Math.round(100*(e+Number.EPSILON))/100}function sw(e){const t=[];return e.forEach((e=>{Array.isArray(e)?e.forEach((e=>{t.push(e)})):t.push(e)})),t}function lw(e){return e.toLowerCase().replace(/ /g,"-")}var cw,dw,uw,hw,pw;cw={},function(){var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(n){return function(n,i){var r,o,a,s,l,c,d,u,h,p=1,m=n.length,f="";for(o=0;o=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?f+=r:(!e.number.test(s.type)||u&&!s.sign?h="":(h=u?"+":"-",r=r.toString().replace(e.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",d=s.width-(h+r).length,l=s.width&&d>0?c.repeat(d):"",f+=s.align?h+r+l:"0"===c?h+l+r:l+h+r)}return f}(function(t){if(i[t])return i[t];for(var n,r=t,o=[],a=0;r;){if(null!==(n=e.text.exec(r)))o.push(n[0]);else if(null!==(n=e.modulo.exec(r)))o.push("%");else{if(null===(n=e.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){a|=1;var s=[],l=n[2],c=[];if(null===(c=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=e.key_access.exec(l)))s.push(c[1]);else{if(null===(c=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}n[2]=s}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}r=r.substring(n[0].length)}return i[t]=o}(n),arguments)}function n(e,n){return t.apply(null,[e].concat(n||[]))}var i=Object.create(null);cw.sprintf=t,cw.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=n)}(),dw={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},uw=["(","?"],hw={")":["("],":":["?","?:"]},pw=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var mw={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};var fw={contextDelimiter:"",onMissingKey:null};function gw(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},fw)this.options[n]=void 0!==t&&n in t?t[n]:fw[n]}gw.prototype.getPluralForm=function(e,t){var n,i,r,o,a,s=this.pluralForms[e];return s||("function"!=typeof(r=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(i=function(e){var t,n,i;for(t=e.split(";"),n=0;n=0||dw[r]1===e?0:1},vw=/^i18n\.(n?gettext|has_translation)(_|$)/;function bw(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}function ww(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}function xw(e,t){return function(n,i,r,o=10){const a=e[t];if(!ww(n))return;if(!bw(i))return;if("function"!=typeof r)return void console.error("The hook callback must be a function.");if("number"!=typeof o)return void console.error("If specified, the hook priority must be a number.");const s={callback:r,priority:o,namespace:i};if(a[n]){const e=a[n].handlers;let t;for(t=e.length;t>0&&!(o>=e[t-1].priority);t--);t===e.length?e[t]=s:e.splice(t,0,s),a.__current.forEach((e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex++}))}else a[n]={handlers:[s],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,i,r,o)}}function _w(e,t,n=!1){return function(i,r){const o=e[t];if(!ww(i))return;if(!n&&!bw(r))return;if(!o[i])return 0;let a=0;if(n)a=o[i].handlers.length,o[i]={runs:o[i].runs,handlers:[]};else{const e=o[i].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===r&&(e.splice(t,1),a++,o.__current.forEach((e=>{e.name===i&&e.currentIndex>=t&&e.currentIndex--})))}return"hookRemoved"!==i&&e.doAction("hookRemoved",i,r),a}}function Cw(e,t){return function(n,i){const r=e[t];return void 0!==i?n in r&&r[n].handlers.some((e=>e.namespace===i)):n in r}}function Sw(e,t,n,i){return function(r,...o){const a=e[t];a[r]||(a[r]={handlers:[],runs:0}),a[r].runs++;const s=a[r].handlers;if(!s||!s.length)return n?o[0]:void 0;const l={name:r,currentIndex:0};return(i?async function(){try{a.__current.add(l);let e=n?o[0]:void 0;for(;l.currentIndex0:Array.from(i.__current).some((e=>e.name===n))}}function $w(e,t){return function(n){const i=e[t];if(ww(n))return i[n]&&i[n].runs?i[n].runs:0}}const Mw=((e,t,n)=>{const i=new gw({}),r=new Set,o=()=>{r.forEach((e=>e()))},a=(e,t="default")=>{var n;i.data[t]={...i.data[t],...e},i.data[t][""]={...yw,...null==(n=i.data[t])?void 0:n[""]},delete i.pluralForms[t]},s=(e,t)=>{a(e,t),o()},l=(e="default",t,n,r,o)=>(i.data[e]||a(void 0,e),i.dcnpgettext(e,t,n,r,o)),c=(e="default")=>e,_x=(e,t,i)=>{let r=l(i,t,e);return n?(r=n.applyFilters("i18n.gettext_with_context",r,e,t,i),n.applyFilters("i18n.gettext_with_context_"+c(i),r,e,t,i)):r};if(n){const e=e=>{vw.test(e)&&o()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>i.data[e],setLocaleData:s,addLocaleData:(e,t="default")=>{var n;i.data[t]={...i.data[t],...e,"":{...yw,...null==(n=i.data[t])?void 0:n[""],...null==e?void 0:e[""]}},delete i.pluralForms[t],o()},resetLocaleData:(e,t)=>{i.data={},i.pluralForms={},s(e,t)},subscribe:e=>(r.add(e),()=>r.delete(e)),__:(e,t)=>{let i=l(t,void 0,e);return n?(i=n.applyFilters("i18n.gettext",i,e,t),n.applyFilters("i18n.gettext_"+c(t),i,e,t)):i},_x:_x,_n:(e,t,i,r)=>{let o=l(r,void 0,e,t,i);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,i,r),n.applyFilters("i18n.ngettext_"+c(r),o,e,t,i,r)):o},_nx:(e,t,i,r,o)=>{let a=l(o,r,e,t,i);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,i,r,o),n.applyFilters("i18n.ngettext_with_context_"+c(o),a,e,t,i,r,o)):a},isRTL:()=>"rtl"===_x("ltr","text direction"),hasTranslation:(e,t,r)=>{var o,a;const s=t?t+""+e:e;let l=!!(null==(a=null==(o=i.data)?void 0:o[null!=r?r:"default"])?void 0:a[s]);return n&&(l=n.applyFilters("i18n.has_translation",l,e,t,r),l=n.applyFilters("i18n.has_translation_"+c(r),l,e,t,r)),l}}})(0,0,new class{constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=xw(this,"actions"),this.addFilter=xw(this,"filters"),this.removeAction=_w(this,"actions"),this.removeFilter=_w(this,"filters"),this.hasAction=Cw(this,"actions"),this.hasFilter=Cw(this,"filters"),this.removeAllActions=_w(this,"actions",!0),this.removeAllFilters=_w(this,"filters",!0),this.doAction=Sw(this,"actions",!1,!1),this.doActionAsync=Sw(this,"actions",!1,!0),this.applyFilters=Sw(this,"filters",!0,!1),this.applyFiltersAsync=Sw(this,"filters",!0,!0),this.currentAction=kw(this,"actions"),this.currentFilter=kw(this,"filters"),this.doingAction=Ew(this,"actions"),this.doingFilter=Ew(this,"filters"),this.didAction=$w(this,"actions"),this.didFilter=$w(this,"filters")}});Mw.getLocaleData.bind(Mw);const Rw=Mw.setLocaleData.bind(Mw);Mw.resetLocaleData.bind(Mw),Mw.subscribe.bind(Mw);const __=Mw.__.bind(Mw);Mw._x.bind(Mw),Mw._n.bind(Mw),Mw._nx.bind(Mw),Mw.isRTL.bind(Mw),Mw.hasTranslation.bind(Mw);const Aw=window.React.useEffect,Tw=window.React.useState;function Lw(e,t,n,i){const[r,o]=Tw(null);return Aw((()=>{const r=window.wp.media({id:e,title:__("Select a media","yaymail"),library:{type:i??"image"},button:{text:__("Use this image","yaymail")},multiple:!!iw(n)&&n});r.on("select",(()=>{const e=r.state().get("selection").first(),n=e.toJSON().url;t(n,e)})),o(r)}),[n,t,e]),Aw((()=>()=>{window.jQuery(`#${e}`).closest('[id^="__wp-uploader-id"]').remove(),window.jQuery('button[type="button"].browser').remove()}),[]),{mediaUploader:r}}var jw=/^\s+|\s+$/g,Ow=/^[-+]0x[0-9a-f]+$/i,Nw=/^0b[01]+$/i,Iw=/^0o[0-7]+$/i,Dw=parseInt,Pw="object"==typeof Ae&&Ae&&Ae.Object===Object&&Ae,zw="object"==typeof self&&self&&self.Object===Object&&self,Fw=Pw||zw||Function("return this")(),Bw=Object.prototype.toString,Hw=Math.max,Ww=Math.min,Uw=function(){return Fw.Date.now()};function Vw(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Gw(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Bw.call(e)}(e))return NaN;if(Vw(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Vw(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(jw,"");var n=Nw.test(e);return n||Iw.test(e)?Dw(e.slice(2),n?2:8):Ow.test(e)?NaN:+e}var Yw=function(e,t,n){var i,r,o,a,s,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=i,o=r;return i=r=void 0,c=t,a=e.apply(o,n)}function m(e){var n=e-l;return void 0===l||n>=t||n<0||u&&e-c>=o}function f(){var e=Uw();if(m(e))return g(e);s=setTimeout(f,function(e){var n=t-(e-l);return u?Ww(n,o-(e-c)):n}(e))}function g(e){return s=void 0,h&&i?p(e):(i=r=void 0,a)}function y(){var e=Uw(),n=m(e);if(i=arguments,r=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(f,t),d?p(e):a}(l);if(u)return s=setTimeout(f,t),p(l)}return void 0===s&&(s=setTimeout(f,t)),a}return t=Gw(t)||0,Vw(n)&&(d=!!n.leading,o=(u="maxWait"in n)?Hw(Gw(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=r=s=void 0},y.flush=function(){return void 0===s?a:g(Uw())},y};const Kw=Me(Yw),Qw=window.React.useCallback,qw=window.React.useMemo,Zw=window.React.useState,Xw=({colorType:e,initialValue:t,editorId:n,onChange:i})=>{const[r,o]=Zw(t),a=qw((()=>window.tinymce.get(n)),[n]),s=Kw((t=>{const r=window.tinymce.get(n);if(r){const n=t.toHexString();o(n),r.execCommand(e,!1,n),i(r.getContent())}}),200),l=Qw((t=>{t.stopPropagation(),a.execCommand(e,!1,r),i(a.getContent())}),[a,r]);return Vt.jsx(yd,{className:"yaymail-color-picker-wrapper",defaultValue:r,onChange:s,children:Vt.jsxs("div",{className:"mce-widget mce-btn mce-splitbtn mce-colorbutton",role:"button","aria-haspopup":"true","aria-label":"Background color",children:[Vt.jsxs("button",{role:"presentation",type:"button",onClick:l,children:[Vt.jsx("i",{className:h("mce-ico","ForeColor"===e?"mce-i-forecolor":"mce-i-backcolor")}),Vt.jsx("span",{className:"mce-preview",style:{background:r}})]}),Vt.jsx("button",{type:"button",className:"mce-open",children:Vt.jsx("i",{className:"mce-caret"})})]})})},Jw=(e,t="px")=>`${e}${t}`,ex=(e,t)=>{if(null!=t)return t.split(".").reduce(((e,t)=>null==e?void 0:e[t]),e)},tx=(e,t,n)=>{if(null==t)return;const i=t.split(".");i.reduce(((e,t,r)=>{if(r!==i.length-1)return(null==e?void 0:e[t])??{[t]:null};e[t]=n}),e)},nx=(e,t)=>e.replace(/{{(.*?)}}|\[\[(.*?)\]\]/g,((e,n,i)=>{const r=(n||i).trim();if(Object.prototype.hasOwnProperty.call(t,r)){if("show_product_item_cost"===r){let e=t[r];return"true"===e?e=!0:"false"===e&&(e=!1),Boolean(e)?"3":"2"}return t[r]}return e}));function ix(e,t){return null!=e&&(null==t||"object"!=typeof e||Object.prototype.hasOwnProperty.call(e,t))}let rx;const ox=new Uint8Array(16);function ax(){if(!rx&&(rx="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rx))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rx(ox)}const sx=/^(?:[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,lx=[];for(let e=0;e<256;++e)lx.push((e+256).toString(16).slice(1));const cx={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function dx(e,t,n){if(cx.randomUUID&&!t&&!e)return cx.randomUUID();const i=(e=e||{}).random||(e.rng||ax)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return(lx[e[t+0]]+lx[e[t+1]]+lx[e[t+2]]+lx[e[t+3]]+"-"+lx[e[t+4]]+lx[e[t+5]]+"-"+lx[e[t+6]]+lx[e[t+7]]+"-"+lx[e[t+8]]+lx[e[t+9]]+"-"+lx[e[t+10]]+lx[e[t+11]]+lx[e[t+12]]+lx[e[t+13]]+lx[e[t+14]]+lx[e[t+15]]).toLowerCase()}(i)}const ux="yaymail-customizer-element-nested-column-content",hx="yaymail-sortable-elements-container",px="yaymail-customizer-sidebar-element__disabled",mx=(e,t)=>{for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=mx(e,n.children);if(t)return t}}return null},fx=(e,t)=>{for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){if(n.children.find((t=>t.id===e)))return n;const t=fx(e,n.children);if(t)return t}}return null},gx=(e,t,n)=>{for(let i=0;i0&&gx(e,t[i].children,n))return!0}return!1},yx=(e,t)=>structuredClone(t).filter((t=>!e.includes(t.id))).map((t=>({...t,...t.children?{children:yx(e,t.children)}:{}}))),vx=(e,t)=>{const n=structuredClone(t),i=[];let r=0;return n.forEach(((t,o)=>{e.includes(t.id)&&(i.push(Mx(t)),r=o+1),null!=t.children&&(n[o].children=vx(e,t.children))})),n.splice(r,0,...i),n},bx=(e,t,n)=>{if(null==n)return!1;for(let i=0;i0&&bx(e,t[i].children,n))return!0}return!1},wx=e=>{if(!e||!e.data)return e;const t=Object.values(e.data).some((e=>null!=e.value_path)),n={...e,data:Object.fromEntries(Object.entries(e.data).filter((([e,n])=>!t||null!=n.value_path)).map((([e,t])=>[e,(null==t?void 0:t.default_value)??t]))),children:ix(e.children)&&e.children.length>0?e.children.map((e=>wx(e))):e.children};return window.yaymailData.yaymailHooks.applyFilters("yaymail_reduced_element_data_before_add",n)},xx=(e,t,n,i)=>{if(!e.item.dataset.yaymailElementId)return console.debug("YayMail: Please provide Element data in data attribute"),null;if(!ix(e.from.classList)||!ix(e.to.classList))return console.debug("YayMail: Could not detect source/target"),null;const r=e.item.dataset.yaymailElementType,o="true"===e.item.dataset.yaymailElementIsPattern;if(!r&&!o)return console.debug("YayMail: Please provide element data attribute: type"),null;const a=e.item.dataset.yaymailElementId;if(!a)return console.debug("YayMail: Please provide element data attribute: id"),null;const s=Xx.getState().elements.find((e=>e.type===r));if(!(o||s&&s.available))return console.debug("YayMail: Invalid element type"),null;const l=e.to.classList.contains(ux),c=e.from.classList.contains(hx);let d=structuredClone(t);if(o){let t=window.yaymailData.builder.patterns.find((e=>e.type===r)),n=null==t?void 0:t.name;if(null==t)return console.debug("YayMail: Cannot find pattern from window variable!"),null;const i=t.elements;if(l&&i.some((e=>"column_layout"===e.type)))return null;let o=i.map((e=>Mx(wx(e))));return d.splice(e.newIndex??d.length,0,...o),{addedList:d,addedElementName:n??""}}let u=null;if(u=c?Xx.getState().elements.find((e=>e.id===a))??null:mx(a,t),!u)return console.debug("YayMail: Failed to get element data"),null;delete u.parentId,d=yx([u.id],d);const h="string"==typeof(p=u.id)&&sx.test(p)?u.id:dx();var p;if(u=wx(u),l){if("column_layout"===r)return null;if(!ix(n)||!ix(i))return console.debug("YayMail: Undefined parentId or columnIndex"),null;const t=mx(n,d);if(!t||!t.children)return null;u={...u,id:h,parentId:t.children[i].id},null==t.children[i].children&&(t.children[i].children=[]);const o=structuredClone(t.children[i].children);null==o||o.splice(e.newIndex??o.length,0,u),t.children[i].children=o}else u={...u,id:h},d.splice(e.newIndex??d.length,0,u);return{addedList:d,addedElementName:u.name??""}},Cx=(e,t)=>{var n;if("image_box"===e||"image_list"===e||"text_list"===e)return Object.entries(t).reduce(((e,[t,n])=>(n&&"object"==typeof n&&"type"in n&&"style"===n.type&&(e[t]=n),e)),{});const i=null==(n=Xx.getState().elements.find((t=>t.type===e)))?void 0:n.data;return Object.entries(i||{}).reduce(((e,[n,i])=>(i&&"object"==typeof i&&"type"in i&&"style"===i.type&&n in t&&(e[n]=t[n]),e)),{})},Sx=(e,t="px")=>`${e}${t}`,kx=e=>e.reduce(((e,t)=>{const n={name:t.name,description:t.description,attributes:t.attributes};return t.group in e?e[t.group].shortcodes.push(n):""!==t.group&&(e[t.group]={groupLabel:t.group.replaceAll("_"," "),shortcodes:[n]}),e}),{}),Ex=e=>e?e.map((e=>({...e,icon:"",...e.children?{children:Ex(e.children)}:{}}))):[],$x=(e,t)=>{const n=mx(e,t);return n?fx(n.id,t):null};function Mx(e,t){const n=structuredClone(e);return n.id=dx(),n.parentId=null!=t?t.id:void 0,null==n.children||n.children.length<1||(n.children=n.children.map((e=>Mx(e,n)))),n}const Rx=window.React.useCallback,Ax=window.React.useEffect,Tx=window.React.useMemo,Lx=window.ReactDOM.createRoot,jx=e=>{const t=Tx((()=>e.id),[e.id]),n=Tx((()=>(null==e?void 0:e.title)??__("Content","yaymail")),[null==e?void 0:e.title]),i=Tx((()=>null==e?void 0:e.description),[null==e?void 0:e.description]),r=Tx((()=>null==e?void 0:e.value),[null==e?void 0:e.value]),o=Xx((e=>e.shortcodes)),a=Rx((t=>{var n;return null==(n=e.onChange)?void 0:n.call(e,t)}),[e.onChange]),s=Rx(((e,n)=>{const i=window.tinymce.get(t);if(e&&(null==n?void 0:n.attributes)){const{width:t,height:r,alt:o}=n.attributes,a=`${o}`;i.execCommand("mceInsertContent",!1,a)}}),[t]),{mediaUploader:l}=Lw("yaymail-rich-text-editor-image-uploader",s),c=e.customButtonsRenderer??Rx((e=>[{id:"shortcodeList",type:"menubutton",text:__("Shortcode","yaymail"),icon:!1,menu:Object.values(kx(o)).filter((e=>"none"!==e.groupLabel)).map((t=>({text:t.groupLabel,menu:t.shortcodes.map((t=>({text:t.description,onclick:function(){const n=`[${t.name}]`;e.insertContent(n),a(e.getContent())}})))})))}]),[o,a]);return Ax((()=>{let e;return window.wp.editor.initialize(t,{tinymce:{toolbar1:"undo redo | styleselect | bold italic underline fontsizeselect | customforecolor custombackcolor hr alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | mediaImageLibrary | mediaimagelibrary fullscreen shortcodeList",style_formats_merge:!0,style_formats:[{title:"Font Weights",items:[{title:"Light (300)",inline:"span",styles:{"font-weight":"300"}},{title:"Normal (400)",inline:"span",styles:{"font-weight":"400"}},{title:"Medium (500)",inline:"span",styles:{"font-weight":"500"}},{title:"Semi Bold (600)",inline:"span",styles:{"font-weight":"600"}},{title:"Bold (700)",inline:"span",styles:{"font-weight":"700"}},{title:"Extra Bold (800)",inline:"span",styles:{"font-weight":"800"}}]}],forced_root_block:"div",plugins:["searchreplace","code","visualblocks","fullscreen","image","link","table","charmap","hr","insertdatetime","textcolor","lists"],menu:{file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualblocks | fullscreen"},insert:{title:"Insert",items:"image link inserttable | charmap hr | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | blockformats align | removeformat"},tools:{title:"Tools",items:"code"},table:{title:"Table",items:"inserttable tableprops deletetable row column | cell"}},menubar:"file edit view insert format tools table",directionality:window.yaymailData.is_rtl?"rtl":"ltr",fontsize_formats:"8px 9px 10px 11px 12px 13px 14px 15px 16px 18px 20px 24px 30px 36px 40px",content_style:'body {\n font-size: 14px;\n font-family: "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif ;\n }\n p {\n margin: 0px;\n }',setup:n=>{n.on("keyup ExecCommand change",(()=>{a(n.getContent())})),n.addButton("mediaimagelibrary",{text:__("Media Image Library","yaymail"),onclick:()=>{null==l||l.open()}}),c(n).forEach((e=>{n.addButton(e.id,e)})),n.addButton("customforecolor",{id:`yaymail-editor-custom-fore-color_${t}`,tooltip:"Text color"}),n.addButton("custombackcolor",{id:`yaymail-editor-custom-back-color_${t}`,tooltip:"Background color"}),e=setTimeout((()=>{const e=(e,t)=>{const n=document.getElementById(e);n&&Lx(n).render(t)};t&&(e(`yaymail-editor-custom-fore-color_${t}`,Vt.jsx(Xw,{colorType:"ForeColor",initialValue:"#636363",editorId:t,onChange:a})),e(`yaymail-editor-custom-back-color_${t}`,Vt.jsx(Xw,{colorType:"BackColor",initialValue:"#636363",editorId:t,onChange:a})))}),100)}}}),()=>{window.wp.editor.remove(t),clearTimeout(e)}}),[l,a,c,t]),Vt.jsxs("div",{className:e.className?e.className:"yaymail-editor-property yaymail-editor-property-rich-text",children:[n&&Vt.jsx("div",{className:"yaymail-title",children:n}),i&&Vt.jsx("div",{className:"yaymail-editor-property-description",dangerouslySetInnerHTML:{__html:i}}),Vt.jsx("textarea",{id:t,defaultValue:r,style:{fontSize:"14px"}})]},t)};function Ox(e,t,n){return function(e,t,n){const i=t<0?e.length+t:t;if(i>=0&&i{Px.getState().pushNewChange(Fx.getState().list,e)},Ix=Kw(Nx,200),Dx={hasUndo:!1,hasRedo:!1,changes:[],timeTravelingIndex:0,isAfterUndoRedo:!1},Px=qb()(Ub(Hb(Vb(((e,t)=>({...Dx,pushNewChange:(n,i)=>{t().isAfterUndoRedo||null!=i&&e((e=>{const r={data:n,info:i??null};if(e.changes.length>=50&&e.changes.splice(1,1),null!==e.timeTravelingIndex&&e.timeTravelingIndex{var t;return"initialized"===(null==(t=e.info)?void 0:t.action)})))e.changes=[];else if(t().changes.length>0)return;e.changes.push(r),e.timeTravelingIndex=e.changes.length-1}))},setTimeTravelingIndex:t=>{e((e=>{e.timeTravelingIndex=t}))},setHasUndo:t=>{e((e=>{e.hasUndo=t}))},setHasRedo:t=>{e((e=>{e.hasRedo=t}))},undo:()=>{null!==t().timeTravelingIndex&&t().timeTravelingIndex>0&&e((e=>{e.timeTravelingIndex--,e.isAfterUndoRedo=!0}))},redo:()=>{null!==t().timeTravelingIndex&&t().timeTravelingIndex{e.timeTravelingIndex++,e.isAfterUndoRedo=!0}))},setIsAfterUndoRedo:t=>{e((e=>{e.isAfterUndoRedo=t}))},jumpToChange:t=>{e((e=>{e.timeTravelingIndex=t,e.isAfterUndoRedo=!0}))},reset:()=>{e(Dx)}}))))),Gb);Px.subscribe((e=>e.timeTravelingIndex),(e=>{var t;const n=Px.getState().changes;if(Px.getState().setHasUndo(Boolean(e)),Px.getState().setHasRedo(Boolean(null!==e&&e({list:[],chosenElement:null,copiedElement:null,copiedStylesElement:null,hasChanged:!1,isDiscardChangesConfirmModalDisplayed:!1,navigatingPath:null,multiSelectedList:[],lastChosenElement:null,specialEditorScreen:null,setSpecialEditorScreen:t=>{e((e=>{e.specialEditorScreen=t}))},updateList:(t,n)=>{e((e=>{e.list=t})),null!=n&&Nx(n)},chooseElement:n=>e((e=>{e.chosenElement=n;let i=n;n.parentId&&(i=$x(n.parentId,t().list)),e.lastChosenElement=i})),deMultiSelect:()=>e((e=>{e.multiSelectedList=[],e.lastChosenElement=null})),unchooseElement:()=>e((()=>({chosenElement:null}))),changeContentStatus:t=>e((()=>({hasChanged:t}))),updateChosenElementData:(n,i)=>{var r;e((e=>{var t;n((null==(t=e.chosenElement)?void 0:t.data)??{})})),null!=i.attribute&&Ix({...i,action:"edited",elementName:(null==(r=t().chosenElement)?void 0:r.name)??""})},updateChosenElementChildren:(n,i)=>{var r;e((e=>{var t;n(null==(t=e.chosenElement)?void 0:t.children)})),Ix({...i,action:"edited",elementName:(null==(r=t().chosenElement)?void 0:r.name)??""})},swapWithPreviousElement:n=>{var i;const r=t().list,o=r.findIndex((e=>e.id===n));if(o>0&&o({list:n}))),Nx({action:"moved",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""})}},swapWithNextElement:n=>{var i;const r=t().list,o=r.findIndex((e=>e.id===n));if(o>=0&&o({list:n}))),Nx({action:"moved",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""})}},swapGroupWithPreviousElement:n=>{const i=t().list,r=i.findIndex((e=>e.id===n[0].id));if(r>0&&r{const n=i.findIndex((t=>t.id===e.id));t=Ox(t,n,n-1)})),e((()=>({list:t}))),Nx({action:"moved",elementName:__("Group","yaymail")})}},swapGroupWithNextElement:n=>{const i=t().list,r=i.findIndex((e=>e.id===n[0].id));if(r>=0&&r{const n=i.findIndex((t=>t.id===e.id));t=Ox(t,n,n+1)})),e((()=>({list:t}))),Nx({action:"moved",elementName:__("Group","yaymail")})}},duplicateElement:()=>{const n=t().chosenElement,i=t().multiSelectedList,r=i.length>1;let o=[];if(o=r?i.map((e=>e.id)):(null==n?void 0:n.id)?[n.id]:[],o.length<1)return;const a=vx(o,t().list);e((e=>{e.list=a})),Nx({action:"duplicated",elementName:r?"Pattern":(null==n?void 0:n.name)??"Element"})},copyElement:t=>e((()=>({copiedElement:t}))),pasteElement:()=>{const n=t().chosenElement,i=t().copiedElement;if(!(n&&i&&n.id&&i.id))return;const r=structuredClone(t().list);bx(null==n?void 0:n.id,r,i)&&(e((e=>{e.list=r})),Nx({action:"pasted",elementName:i.name}))},copyStylesElement:()=>{const n=structuredClone(t().chosenElement);if(null===n)return;const i={...n};if("image_box"===i.type||"image_list"===i.type||"text_list"===i.type){const e=Object.entries(i.data).map((([e,t])=>{if("image_box"===e||"image_list"===e||"text_list"===e){const n=(null==t?void 0:t.default_value)??t;return n.column_1&&(n.column_1=Cx(e,n.column_1)),n.column_2&&(n.column_2=Cx(e,n.column_2)),n.column_3&&(n.column_3=Cx(e,n.column_3)),[e,n]}return[e,(null==t?void 0:t.default_value)??t]}));i.data=Object.fromEntries(e)}else i.data=Cx(i.type,i.data);e((e=>{e.copiedStylesElement=i}))},pasteStylesElement:()=>{const n=structuredClone(t().chosenElement),i=structuredClone(t().copiedStylesElement);null!==i&&null!=n&&("image_box"!==i.type&&"image_list"!==i.type&&"text_list"!==i.type||(i.data.number_column&&delete i.data.number_column,i.data[i.type].column_1&&(i.data[i.type].column_1={...n.data[i.type].column_1,...i.data[i.type].column_1}),i.data[i.type].column_2&&(i.data[i.type].column_2={...n.data[i.type].column_2,...i.data[i.type].column_2}),i.data[i.type].column_3&&(i.data[i.type].column_3={...n.data[i.type].column_3,...i.data[i.type].column_3})),e((e=>{null!==e.chosenElement&&(e.chosenElement.data={...n.data,...i.data})})),Nx({action:"pasted_styles",elementName:i.name}))},removeElements:n=>{var i;if(!n)return;const r=yx(n,t().list);e((e=>{e.list=r})),t().deMultiSelect(),Nx({action:"removed",elementName:(null==(i=t().chosenElement)?void 0:i.name)??""}),t().unchooseElement()},removeAllElements:n=>{e(n?e=>{e.list=t().list.filter((e=>n.includes(e.type)))}:e=>{e.list=[]}),Nx({action:"removed",elementName:"All Elements"}),t().unchooseElement()},changeListBackgroundColor:t=>{e((e=>{e.list.forEach((e=>{e.data.background_color&&(e.data.background_color=t)})),Ix({elementName:"Content background",action:"edited"})}))},clearNavigatingPath:()=>{e((e=>{e.navigatingPath=null}))},displayDiscardChangesConfirmModal:t=>{e((e=>{e.isDiscardChangesConfirmModalDisplayed=!0,e.navigatingPath=t}))},hideDiscardChangesConfirmModal:()=>{e((e=>{e.isDiscardChangesConfirmModalDisplayed=!1,e.navigatingPath=null}))},selectParentColumnElement:n=>{if(!n)return;const i=$x(n,t().list);i&&e((e=>{e.chosenElement=i}))},multiSelect:n=>{var i;const r=n.id;let o=-1,a=-1;const s=t().list;for(let e=0;e{e.multiSelectedList=d.find((e=>"skeleton_divider"===e.type))?[]:d}))},setMultiSelectedList:t=>{e((e=>{e.multiSelectedList=t}))}}))))),Gb),Fx=zx,Bx=window.React.useCallback,Hx=window.React.useRef,Wx=()=>{const e=cy(),t=Fx((e=>e.hasChanged)),n=Fx((e=>e.displayDiscardChangesConfirmModal)),i=Hx((()=>{}));return Bx((r=>{t?n(r):(r&&e(r),i.current())}),[t,n,e,i.current])};function Ux(){const e=Wx();return()=>{e("/customizer/?template=yaymail_global_header_footer")}}const Vx=window.React.useCallback,Gx={content_override:!1,footer_content:"",hidden:!1};function Yx(){const e=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),t=Xx((e=>e.updateTemplateSettingsObject)),n=Xx((e=>e.hideTemplateGlobalFooter)),i=Fx((e=>e.changeContentStatus)),r=Ux(),o=Vx((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_footer_settings)?t.templateData.global_footer_settings.footer_content=e:t.templateData.global_footer_settings={...Gx,footer_content:e}})),i(!0)}),[]),a=Vx((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_footer_settings)?t.templateData.global_footer_settings.content_override=e:t.templateData.global_footer_settings={...Gx,content_override:e}})),i(!0)}),[]),s=Vx((e=>{n(e),i(!0)}),[]);return Vt.jsxs("div",{children:[Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-footer-link"),children:Vt.jsxs("div",{className:"yaymail-title",children:[__("This is the Global footer element, you can customize it by go to ","yaymail"),Vt.jsx("a",{onClick:r,children:__("Global footer","yaymail")})]})}),Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-footer-display"),children:Vt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Vt.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Hide on this template","yaymail")}),Vt.jsx(wm,{checkedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("yes","yaymail")}),checked:null==e?void 0:e.hidden,onChange:s,unCheckedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("no","yaymail")})})]})}),!(null==e?void 0:e.hidden)&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-footer-override-content"),children:Vt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Vt.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Override content","yaymail")}),Vt.jsx(wm,{checkedChildren:Vt.jsxs("span",{className:"yaymail-setting-switch-label",children:[" ",__("on","yaymail")," "]}),checked:null==e?void 0:e.content_override,onChange:a,unCheckedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("off","yaymail")})})]})}),(null==e?void 0:e.content_override)&&Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-footer-footer"),children:Vt.jsx(jx,{value:null==e?void 0:e.footer_content,id:"global_footer_footer_content",title:__("Footer content","yaymail"),description:__("This will change the content of all Footer elements in Global Footer section.","yaymail"),onChange:o})})]})]})}const Kx=window.React.useCallback,Qx={content_override:!1,heading_content:"",hidden:!1};function qx(){const e=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),t=Xx((e=>e.updateTemplateSettingsObject)),n=Xx((e=>e.hideTemplateGlobalHeader)),i=Fx((e=>e.changeContentStatus)),r=Ux(),o=Kx((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_header_settings)?t.templateData.global_header_settings.heading_content=e:t.templateData.global_header_settings={...Qx,heading_content:e}})),i(!0)}),[]),a=Kx((e=>{t((t=>{var n;(null==(n=t.templateData)?void 0:n.global_header_settings)?t.templateData.global_header_settings.content_override=e:t.templateData.global_header_settings={...Qx,content_override:e}})),i(!0)}),[]),s=Kx((e=>{n(e),i(!0)}),[]);return Vt.jsxs("div",{children:[Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-header-link"),children:Vt.jsxs("div",{className:"yaymail-title",children:[__("This is the Global header element, you can customize it by go to ","yaymail"),Vt.jsx("a",{onClick:r,children:__("Global header","yaymail")})]})}),Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-header-display"),children:Vt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Vt.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Hide on this template","yaymail")}),Vt.jsx(wm,{checkedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("yes","yaymail")}),checked:null==e?void 0:e.hidden,onChange:s,unCheckedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("no","yaymail")})})]})}),!(null==e?void 0:e.hidden)&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-header-override-content"),children:Vt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,justifyContent:"space-between"},children:[Vt.jsx("div",{className:"yaymail-title",style:{marginBottom:0},children:__("Override content","yaymail")}),Vt.jsx(wm,{checkedChildren:Vt.jsxs("span",{className:"yaymail-setting-switch-label",children:[" ",__("on","yaymail")," "]}),checked:null==e?void 0:e.content_override,onChange:a,unCheckedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:__("off","yaymail")})})]})}),(null==e?void 0:e.content_override)&&Vt.jsx("div",{className:h("yaymail-editor-property","yaymail-editor-global-header-heading"),children:Vt.jsx(jx,{value:null==e?void 0:e.heading_content,id:"global_header_heading_content",title:__("Email Heading content","yaymail"),description:__("This will change the content of all Email Heading elements in Global Header section.","yaymail"),onChange:o})})]})]})}zb(!1);const Zx={globalHeaderElements:window.yaymailData.builder.global_headers_footers.global_header_elements,globalFooterElements:window.yaymailData.builder.global_headers_footers.global_footer_elements},Xx=qb()(Ub(Hb(Vb(((e,t)=>({templates:[],shortcodes:[],elements:[],currentTemplate:null,templateData:null,isPageLoading:!1,isReviewed:window.yaymailData.reviewed,globalHeaderFooter:Zx,setTemplates:t=>{e((e=>{e.templates=t}))},setElements:t=>{e((e=>{e.elements=t}))},setShortcodes:t=>{e((e=>{e.shortcodes=t}))},updateTemplates:t=>{e((e=>{e.templates=t}))},updateTemplateData:t=>{e((e=>{e.templateData=t}))},updateCurrentTemplate:t=>e((e=>{e.currentTemplate=t})),setIsPageLoading:t=>{e((e=>{e.isPageLoading=t}))},setIsReviewed:t=>{e((e=>{e.isReviewed=t}))},updateTemplateSettings:(t,n)=>e((e=>{e.templateData&&(e.templateData[t]=n)})),updateTemplateSettingsObject:t=>e((e=>{t(e)})),updateItemTemplates:(t,n)=>{e((e=>{e.templates&&t(e.templates.find((e=>e.name===n)))}))},setGlobalHeaderFooter:t=>{e((e=>{e.globalHeaderFooter=t}))},hideTemplateGlobalHeader:t=>{e((e=>{var n;e.templateData&&((null==(n=e.templateData)?void 0:n.global_header_settings)?e.templateData.global_header_settings.hidden=t:e.templateData.global_header_settings={...Qx,hidden:t})}))},hideTemplateGlobalFooter:t=>{e((e=>{var n;e.templateData&&((null==(n=e.templateData)?void 0:n.global_footer_settings)?e.templateData.global_footer_settings.hidden=t:e.templateData.global_footer_settings={...Gx,hidden:t})}))}}))))),Gb),Jx=Kw((([e,t])=>{const n=`.yaymail-customizer-email-template-container.yaymail-template-${e} a:not([role="button"])`;t&&window.jQuery(n).css("color",t)}),200);Xx.subscribe((e=>{var t;return[e.currentTemplate,null==(t=e.templateData)?void 0:t.text_link_color]}),Jx);const e_=window.React.useEffect;function t_(e,t){return function(){return e.apply(t,arguments)}}const{toString:n_}=Object.prototype,{getPrototypeOf:i_}=Object,r_=(o_=Object.create(null),e=>{const t=n_.call(e);return o_[t]||(o_[t]=t.slice(8,-1).toLowerCase())});var o_;const a_=e=>(e=e.toLowerCase(),t=>r_(t)===e),s_=e=>t=>typeof t===e,{isArray:l_}=Array,c_=s_("undefined"),d_=a_("ArrayBuffer"),u_=s_("string"),h_=s_("function"),p_=s_("number"),m_=e=>null!==e&&"object"==typeof e,f_=e=>{if("object"!==r_(e))return!1;const t=i_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g_=a_("Date"),y_=a_("File"),v_=a_("Blob"),b_=a_("FileList"),w_=a_("URLSearchParams");function x_(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),l_(e))for(i=0,r=e.length;i0;)if(i=n[r],t===i.toLowerCase())return i;return null}const S_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k_=e=>!c_(e)&&e!==S_,E_=($_="undefined"!=typeof Uint8Array&&i_(Uint8Array),e=>$_&&e instanceof $_);var $_;const M_=a_("HTMLFormElement"),R_=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),A_=a_("RegExp"),T_=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};x_(n,((n,r)=>{!1!==t(n,r,e)&&(i[r]=n)})),Object.defineProperties(e,i)},L_="abcdefghijklmnopqrstuvwxyz",j_="0123456789",O_={DIGIT:j_,ALPHA:L_,ALPHA_DIGIT:L_+L_.toUpperCase()+j_},N_=a_("AsyncFunction"),I_={isArray:l_,isArrayBuffer:d_,isBuffer:function(e){return null!==e&&!c_(e)&&null!==e.constructor&&!c_(e.constructor)&&h_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h_(e.append)&&("formdata"===(t=r_(e))||"object"===t&&h_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d_(e.buffer),t},isString:u_,isNumber:p_,isBoolean:e=>!0===e||!1===e,isObject:m_,isPlainObject:f_,isUndefined:c_,isDate:g_,isFile:y_,isBlob:v_,isRegExp:A_,isFunction:h_,isStream:e=>m_(e)&&h_(e.pipe),isURLSearchParams:w_,isTypedArray:E_,isFileList:b_,forEach:x_,merge:function e(){const{caseless:t}=k_(this)&&this||{},n={},i=(i,r)=>{const o=t&&C_(n,r)||r;f_(n[o])&&f_(i)?n[o]=e(n[o],i):f_(i)?n[o]=e({},i):l_(i)?n[o]=i.slice():n[o]=i};for(let r=0,o=arguments.length;r(x_(t,((t,i)=>{n&&h_(t)?e[i]=t_(t,n):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,a;const s={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)a=r[o],i&&!i(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&i_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:r_,kindOfTest:a_,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(l_(e))return e;let t=e.length;if(!p_(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:M_,hasOwnProperty:R_,hasOwnProp:R_,reduceDescriptors:T_,freezeMethods:e=>{T_(e,((t,n)=>{if(h_(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];h_(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return l_(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C_,global:S_,isContextDefined:k_,ALPHABET:O_,generateString:(e=16,t=O_.ALPHA_DIGIT)=>{let n="";const{length:i}=t;for(;e--;)n+=t[Math.random()*i|0];return n},isSpecCompliantForm:function(e){return!!(e&&h_(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(m_(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const r=l_(e)?[]:{};return x_(e,((e,t)=>{const o=n(e,i+1);!c_(o)&&(r[t]=o)})),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:N_,isThenable:e=>e&&(m_(e)||h_(e))&&h_(e.then)&&h_(e.catch)};function D_(e,t,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}I_.inherits(D_,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:I_.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const P_=D_.prototype,z_={};function F_(e){return I_.isPlainObject(e)||I_.isArray(e)}function B_(e){return I_.endsWith(e,"[]")?e.slice(0,-2):e}function H_(e,t,n){return e?e.concat(t).map((function(e,t){return e=B_(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["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((e=>{z_[e]={value:e}})),Object.defineProperties(D_,z_),Object.defineProperty(P_,"isAxiosError",{value:!0}),D_.from=(e,t,n,i,r,o)=>{const a=Object.create(P_);return I_.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),D_.call(a,e.message,t,n,i,r),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const W_=I_.toFlatObject(I_,{},null,(function(e){return/^is[A-Z]/.test(e)}));function U_(e,t,n){if(!I_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=I_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!I_.isUndefined(t[e])}))).metaTokens,r=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&I_.isSpecCompliantForm(t);if(!I_.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(I_.isDate(e))return e.toISOString();if(!s&&I_.isBlob(e))throw new D_("Blob is not supported. Use a Buffer instead.");return I_.isArrayBuffer(e)||I_.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let s=e;if(e&&!r&&"object"==typeof e)if(I_.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(I_.isArray(e)&&function(e){return I_.isArray(e)&&!e.some(F_)}(e)||(I_.isFileList(e)||I_.endsWith(n,"[]"))&&(s=I_.toArray(e)))return n=B_(n),s.forEach((function(e,i){!I_.isUndefined(e)&&null!==e&&t.append(!0===a?H_([n],i,o):null===a?n:n+"[]",l(e))})),!1;return!!F_(e)||(t.append(H_(r,n,o),l(e)),!1)}const d=[],u=Object.assign(W_,{defaultVisitor:c,convertValue:l,isVisitable:F_});if(!I_.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!I_.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),I_.forEach(n,(function(n,o){!0===(!(I_.isUndefined(n)||null===n)&&r.call(t,n,I_.isString(o)?o.trim():o,i,u))&&e(n,i?i.concat(o):[o])})),d.pop()}}(e),t}function V_(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function G_(e,t){this._pairs=[],e&&U_(e,this,t)}const Y_=G_.prototype;function K_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q_(e,t,n){if(!t)return e;const i=n&&n.encode||K_,r=n&&n.serialize;let o;if(o=r?r(t,n):I_.isURLSearchParams(t)?t.toString():new G_(t,n).toString(i),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Y_.append=function(e,t){this._pairs.push([e,t])},Y_.toString=function(e){const t=e?function(t){return e.call(this,t,V_)}:V_;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const q_=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){I_.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},X_={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:G_,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"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 J_(e){function t(e,n,i,r){let o=e[r++];const a=Number.isFinite(+o),s=r>=e.length;return o=!o&&I_.isArray(i)?i.length:o,s?(I_.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!a):(i[o]&&I_.isObject(i[o])||(i[o]=[]),t(e,n,i[o],r)&&I_.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i{t(function(e){return I_.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null}const eC={"Content-Type":void 0},tC={transitional:Z_,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,r=I_.isObject(e);if(r&&I_.isHTMLForm(e)&&(e=new FormData(e)),I_.isFormData(e))return i&&i?JSON.stringify(J_(e)):e;if(I_.isArrayBuffer(e)||I_.isBuffer(e)||I_.isStream(e)||I_.isFile(e)||I_.isBlob(e))return e;if(I_.isArrayBufferView(e))return e.buffer;if(I_.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return U_(e,new X_.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return X_.isNode&&I_.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=I_.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return U_(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||i?(t.setContentType("application/json",!1),function(e){if(I_.isString(e))try{return(0,JSON.parse)(e),I_.trim(e)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||tC.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&I_.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(r){if(n){if("SyntaxError"===r.name)throw D_.from(r,D_.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:X_.classes.FormData,Blob:X_.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};I_.forEach(["delete","get","head"],(function(e){tC.headers[e]={}})),I_.forEach(["post","put","patch"],(function(e){tC.headers[e]=I_.merge(eC)}));const nC=tC,iC=I_.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"]),rC=Symbol("internals");function oC(e){return e&&String(e).trim().toLowerCase()}function aC(e){return!1===e||null==e?e:I_.isArray(e)?e.map(aC):String(e)}function sC(e,t,n,i,r){return I_.isFunction(i)?i.call(this,t,n):(r&&(t=n),I_.isString(t)?I_.isString(i)?-1!==t.indexOf(i):I_.isRegExp(i)?i.test(t):void 0:void 0)}class lC{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(e,t,n){const r=oC(t);if(!r)throw new Error("header name must be a non-empty string");const o=I_.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||t]=aC(e))}const o=(e,t)=>I_.forEach(e,((e,n)=>r(e,n,t)));return I_.isPlainObject(e)||e instanceof this.constructor?o(e,t):I_.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&iC[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t):null!=e&&r(t,e,n),this}get(e,t){if(e=oC(e)){const n=I_.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(I_.isFunction(t))return t.call(this,e,n);if(I_.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oC(e)){const n=I_.findKey(this,e);return!(!n||void 0===this[n]||t&&!sC(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function r(e){if(e=oC(e)){const r=I_.findKey(n,e);!r||t&&!sC(0,n[r],r,t)||(delete n[r],i=!0)}}return I_.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!sC(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return I_.forEach(this,((i,r)=>{const o=I_.findKey(n,r);if(o)return t[o]=aC(i),void delete t[r];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();a!==r&&delete t[r],t[a]=aC(i),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return I_.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&I_.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[rC]=this[rC]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=oC(e);t[i]||(function(e,t){const n=I_.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[i]=!0)}return I_.isArray(e)?e.forEach(i):i(e),this}}lC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I_.freezeMethods(lC.prototype),I_.freezeMethods(lC);const cC=lC;function dC(e,t){const n=this||nC,i=t||n,r=cC.from(i.headers);let o=i.data;return I_.forEach(e,(function(e){o=e.call(n,o,r.normalize(),t?t.status:void 0)})),r.normalize(),o}function uC(e){return!(!e||!e.__CANCEL__)}function hC(e,t,n){D_.call(this,null==e?"canceled":e,D_.ERR_CANCELED,t,n),this.name="CanceledError"}I_.inherits(hC,D_,{__CANCEL__:!0});const pC=X_.isStandardBrowserEnv?{write:function(e,t,n,i,r,o){const a=[];a.push(e+"="+encodeURIComponent(t)),I_.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),I_.isString(i)&&a.push("path="+i),I_.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function mC(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const fC=X_.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(n){let i=n;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(e){const t=I_.isString(e)?i(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function gC(e,t){let n=0;const i=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=i[a];r||(r=l),n[o]=s,i[o]=l;let d=a,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-r{const o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,l=i(s);n=o;const c={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:r};c[t?"download":"upload"]=!0,e(c)}}const yC={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let i=e.data;const r=cC.from(e.headers).normalize(),o=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}I_.isFormData(i)&&(X_.isStandardBrowserEnv||X_.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(t+":"+n))}const c=mC(e.baseURL,e.url);function d(){if(!l)return;const i=cC.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new D_("Request failed with status code "+n.status,[D_.ERR_BAD_REQUEST,D_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:o&&"text"!==o&&"json"!==o?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:i,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Q_(c,e.params,e.paramsSerializer),!0),l.timeout=e.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 D_("Request aborted",D_.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new D_("Network Error",D_.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||Z_;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new D_(t,i.clarifyTimeoutError?D_.ETIMEDOUT:D_.ECONNABORTED,e,l)),l=null},X_.isStandardBrowserEnv){const t=(e.withCredentials||fC(c))&&e.xsrfCookieName&&pC.read(e.xsrfCookieName);t&&r.set(e.xsrfHeaderName,t)}void 0===i&&r.setContentType(null),"setRequestHeader"in l&&I_.forEach(r.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),I_.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),o&&"json"!==o&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",gC(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",gC(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new hC(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const u=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);u&&-1===X_.protocols.indexOf(u)?n(new D_("Unsupported protocol "+u+":",D_.ERR_BAD_REQUEST,e)):l.send(i||null)}))}};I_.forEach(yC,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));function vC(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hC(null,e)}function bC(e){return vC(e),e.headers=cC.from(e.headers),e.data=dC.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=I_.isArray(e)?e:[e];const{length:t}=e;let n,i;for(let r=0;re instanceof cC?e.toJSON():e;function xC(e,t){t=t||{};const n={};function i(e,t,n){return I_.isPlainObject(e)&&I_.isPlainObject(t)?I_.merge.call({caseless:n},e,t):I_.isPlainObject(t)?I_.merge({},t):I_.isArray(t)?t.slice():t}function r(e,t,n){return I_.isUndefined(t)?I_.isUndefined(e)?void 0:i(void 0,e,n):i(e,t,n)}function o(e,t){if(!I_.isUndefined(t))return i(void 0,t)}function a(e,t){return I_.isUndefined(t)?I_.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const l={url:o,method:o,data:o,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,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>r(wC(e),wC(t),!0)};return I_.forEach(Object.keys(Object.assign({},e,t)),(function(i){const o=l[i]||r,a=o(e[i],t[i],i);I_.isUndefined(a)&&o!==s||(n[i]=a)})),n}const _C={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{_C[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const CC={};_C.transitional=function(e,t,n){function i(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new D_(i(r," has been removed"+(t?" in "+t:"")),D_.ERR_DEPRECATED);return t&&!CC[r]&&(CC[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}};const SC={assertOptions:function(e,t,n){if("object"!=typeof e)throw new D_("options must be an object",D_.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new D_("option "+o+" must be "+n,D_.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new D_("Unknown option "+o,D_.ERR_BAD_OPTION)}},validators:_C},kC=SC.validators;class EC{constructor(e){this.defaults=e,this.interceptors={request:new q_,response:new q_}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=xC(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:r}=t;let o;void 0!==n&&SC.assertOptions(n,{silentJSONParsing:kC.transitional(kC.boolean),forcedJSONParsing:kC.transitional(kC.boolean),clarifyTimeoutError:kC.transitional(kC.boolean)},!1),null!=i&&(I_.isFunction(i)?t.paramsSerializer={serialize:i}:SC.assertOptions(i,{encode:kC.function,serialize:kC.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),o=r&&I_.merge(r.common,r[t.method]),o&&I_.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=cC.concat(o,r);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!s){const e=[bC.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),d=e.length,c=Promise.resolve(t);u{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new hC(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new MC((function(t){e=t})),cancel:e}}}const RC=MC,AC={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(AC).forEach((([e,t])=>{AC[t]=e}));const TC=AC,LC=function e(t){const n=new $C(t),i=t_($C.prototype.request,n);return I_.extend(i,$C.prototype,n,{allOwnKeys:!0}),I_.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(xC(t,n))},i}(nC);LC.Axios=$C,LC.CanceledError=hC,LC.CancelToken=RC,LC.isCancel=uC,LC.VERSION="1.4.0",LC.toFormData=U_,LC.AxiosError=D_,LC.Cancel=LC.CanceledError,LC.all=function(e){return Promise.all(e)},LC.spread=function(e){return function(t){return e.apply(null,t)}},LC.isAxiosError=function(e){return I_.isObject(e)&&!0===e.isAxiosError},LC.mergeConfig=xC,LC.AxiosHeaders=cC,LC.formToJSON=e=>J_(I_.isHTMLForm(e)?new FormData(e):e),LC.HttpStatusCode=TC,LC.default=LC;const jC=LC,OC=window.yaymailData.rest_path,NC=jC.create({baseURL:`${OC.root}${OC.base}`,headers:{"Content-Type":"application/json","X-WP-Nonce":OC.nonce},withCredentials:!0}),IC=(e,t)=>NC.get(e,t),DC=(e,t,n)=>NC.post(e,t,n);async function PC(e){const t=e.template_id;return await DC(`/templates/${t}`,{...e})}async function zC(e){return(await DC("/templates/change-status",{list_id:e.list_id,status:e.status})).data}async function FC(e){return(await DC("/templates/reset",{list_id:e})).data}async function BC(e){return(await DC("/templates/copy-template",{template_id:e.template_id,from_template:e.from_template})).data}const HC=window.React.useEffect;async function WC(e){return(await DC("/settings",{settings:e})).data}function UC(e){const t=Fv();return{...Qv({queryKey:["settings"],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return null;const e=await async function(){return await IC("/settings")}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,enabled:(null==e?void 0:e.fetch)??!0,keepPreviousData:!0}),saveSettingsMutation:Yv({mutationFn:WC,onMutate:()=>{Xx.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{Xx.setState((e=>{e.isPageLoading=!1}))},onSuccess:(e,n)=>{Zb.setState((e=>{e.hasChanged=!1})),t.setQueryData(["settings"],(e=>null==e?e:{...e,...n}))}})}}const VC=window.React.useEffect;function GC(e){const t=Fv(),{template_name:n="new_order"}=e??{};window.yaymailData.isInitialTemplateDataLoading=window.yaymailData.isInitialTemplateDataLoading??!0;const i=Qv({queryKey:["template",n,window.yaymailData.isInitialTemplateDataLoading],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return null;const e=await async function(e){return await IC("/templates/get-template-by-name",{params:{template_name:e}})}(n??"new_order");if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0,enabled:(null==e?void 0:e.fetch)??!0});return{...i,updateTemplateMutation:Yv({mutationFn:PC,onMutate:()=>{Xx.setState((e=>{e.isPageLoading=!0}))},onSuccess:e=>{t.setQueriesData(["template",n],(()=>e.data))},onSettled:()=>{Xx.setState((e=>{e.isPageLoading=!1}))}}),resetTemplateMutation:Yv({mutationFn:FC,onSuccess:e=>{if(null==e.list_template_data||e.list_template_data.length<1)return;const i=e.list_template_data[0];t.setQueriesData(["template",n],(()=>i)),Fx.getState().updateList(i.elements),Xx.getState().updateTemplateSettings("background_color",i.background_color),Xx.getState().updateTemplateSettings("content_background_color",i.content_background_color),Xx.getState().updateTemplateSettings("text_link_color",i.text_link_color),Xx.getState().hideTemplateGlobalFooter(!0),Xx.getState().hideTemplateGlobalHeader(!0)},onMutate:()=>{Xx.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{Xx.setState((e=>{e.isPageLoading=!1}))}}),changeStatusMutation:Yv({mutationFn:zC,onSuccess:(e,n)=>{t.setQueryData(["templates"],(e=>null==e?void 0:e.map((e=>n.list_id.includes(e.id.toString())?{...e,status:n.status}:e))))},onMutate:()=>{Xx.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{Xx.setState((e=>{e.isPageLoading=!1}))}}),copyTemplateMutation:Yv({mutationFn:BC,onSuccess:e=>{e.success&&(t.invalidateQueries({queryKey:["template",n]}),t.invalidateQueries({queryKey:["revision",n]}))},onMutate:()=>{Xx.setState((e=>{e.isPageLoading=!0}))},onSettled:()=>{Xx.setState((e=>{e.isPageLoading=!1}))}})}}const YC=window.React.useEffect;function KC(e){const t=Fv(),n=!e&&window.yaymailData.isInitialTemplateDataLoading,i=Xx((e=>e.setTemplates)),r=Qv({queryKey:["templates"],queryFn:async()=>{if(n)return;const e=await async function(){return await IC("/templates")}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return t.invalidateQueries({queryKey:["template"]}),e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0}),o=Yv({mutationFn:zC,onSuccess:(e,n)=>{t.setQueryData(["templates"],(e=>null==e?e:e.map((e=>n.list_id.includes(e.id)?{...e,status:n.status}:e)))),t.invalidateQueries({queryKey:["template"]})}}),a=Yv({mutationFn:FC,onSuccess:()=>t.invalidateQueries({predicate:e=>"template"===e.queryKey[0]})});return YC((()=>{i(r.data??[])}),[r.data]),{...r,changeStatusesMutation:o,resetTemplatesMutation:a}}const QC=window.React.createContext,qC=window.React.memo,ZC=window.React.useMemo,XC=window.React.useState,JC=QC({}),eS=window.yaymailData.list_orders,tS=qC((function(e){const[t,n]=XC(eS[0].id),i=ZC((()=>({selectedOrderID:t,setSelectedOrderID:n,listOrders:eS})),[t,n]);return Vt.jsx(JC.Provider,{value:i,children:e.children})})),nS=window.React.createContext,iS=window.React.useContext,rS=window.React.useEffect,oS=window.React.useMemo,aS=nS({isPageFetching:!1}),sS=e=>{const{children:t,templateId:n,...i}=e,{selectedOrderID:r}=iS(JC),o=sy(),a=new URLSearchParams(o.search),s=Xx((e=>e.updateCurrentTemplate)),l=Xx((e=>e.updateTemplateData)),c=Fx((e=>e.updateList)),d=Fx((e=>e.changeContentStatus)),u=Px((e=>e.pushNewChange)),h=oS((()=>a.get("template")),[a]),p=Xx((e=>h??e.currentTemplate??n));rS((()=>{s(n??h)}),[n,h]),function(e){const{template_name:t="new_order",order_id:n="sample_order"}=e??{},i=Fv(),r=Xx((e=>e.setTemplates)),o=Xx((e=>e.setElements)),a=Xx((e=>e.setShortcodes)),s=Zb((e=>e.updateSettings));e_((()=>{(async()=>{var l,c;try{Xx.setState((e=>{e.isPageLoading=!0})),window.yaymailData.isInitialTemplateDataLoading=!0;const d=await(c={...e??{}},4!==(null==nw?void 0:nw.readyState)&&(null==nw||nw.abort()),nw=window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_get_template_data_onload",nonce:window.yaymailData.admin_ajax.nonce,data:c}}),nw),u=null==d?void 0:d.data;i.setQueryData(["settings"],null==u?void 0:u.settings_data),s(null==u?void 0:u.settings_data),i.setQueryData(["templates"],null==u?void 0:u.templates_data),r(null==u?void 0:u.templates_data),i.setQueryData(["template",t??"new_order",!1],null==u?void 0:u.selected_template_data);const h=sw(Object.values(null==u?void 0:u.elements_data));i.setQueryData(["elements",t],h),o(h),i.setQueryData(["shortcodes",t,n],null==u?void 0:u.shortcodes_data),a((null==(l=null==d?void 0:d.data)?void 0:l.shortcodes_data)??[])}catch(d){console.debug("YayMail: ","Error trying to load template data\n",d)}finally{window.yaymailData.isInitialTemplateDataLoading=!1,Xx.setState((e=>{e.isPageLoading=!1}))}})()}),[])}({template_name:p,order_id:r});const{isFetching:m}=function(e){const t=Xx((e=>e.setElements)),{template_name:n="new_order"}=e??{},i=Qv({queryKey:["elements",n],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return[];const e=await async function(e){return await IC(`/templates/${e}/all-elements`)}(n);if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return sw(Object.values(e.data))},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0});return HC((()=>{t(i.data??[])}),[i.data]),{...i}}({template_name:p}),{isFetching:f}=function(e){const t=Xx((e=>e.setShortcodes)),{template_name:n="new_order",order_id:i="sample_order"}=e??{},r=Qv({queryKey:["shortcodes",n,i],queryFn:async()=>{if(window.yaymailData.isInitialTemplateDataLoading)return[];const e=await async function(e,t){const n=t||"sample_order";return await IC(`/templates/${e}/all-shortcodes/${n}`)}(n,i);if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0});return VC((()=>{t(r.data??[])}),[r.data]),{...r}}({template_name:p,order_id:r}),{data:g,isFetching:y}=GC({template_name:p}),{isFetching:v}=UC(),{isFetching:b}=KC();rS((()=>{l(g),c((null==g?void 0:g.elements)??[]),d(!1),u((null==g?void 0:g.elements)??[],{action:"initialized"})}),[g]);const w=oS((()=>({isPageFetching:window.yaymailData.isInitialTemplateDataLoading||m||f||v||b||y,hasTemplateSelector:!0,hasOrderSelector:!0,hasTemplateImporter:!0,hasActivationButton:!0,hasSendTestMailButton:!0,...i})),[p,window.yaymailData.isInitialTemplateDataLoading,m,f,y,v,b,i]);return Vt.jsx(aS.Provider,{value:w,children:t})},lS=()=>{const e=Fx((e=>e.hasChanged)),t=__("You have unsaved changes. Are you sure you want to leave?","yaymail");(function(e){let{when:t,message:n}=e,i=function(e){let{router:t,basename:n}=wy(gy.UseBlocker),i=xy(vy.UseBlocker),[r,o]=Xg.useState(""),[a,s]=Xg.useState(wg),l=Xg.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===n)return e(t);let{currentLocation:i,nextLocation:r,historyAction:o}=t;return e({currentLocation:Jg({},i,{pathname:ng(i.pathname,n)||i.pathname}),nextLocation:Jg({},r,{pathname:ng(r.pathname,n)||r.pathname}),historyAction:o})}),[n,e]);return Xg.useEffect((()=>{let e=String(++Cy);return s(t.getBlocker(e,l)),o(e),()=>t.deleteBlocker(e)}),[t,s,o,l]),r&&i.blockers.has(r)?i.blockers.get(r):a}(t);jy.useEffect((()=>{"blocked"!==i.state||t||i.reset()}),[i,t]),jy.useEffect((()=>{"blocked"===i.state&&(window.confirm(n)?setTimeout(i.proceed,0):i.reset())}),[i,n])})({message:t,when:e}),function(e){let{capture:t}={};jy.useEffect((()=>{let n=null!=t?{capture:t}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}}),[e,t])}((n=>{if(e)return n.returnValue=t,t}))},cS=window.jQuery,dS=(e,t)=>{const n=e.filter((e=>e.type===(null==t?void 0:t.type)));return!!(n&&n.length>0)&&n[0].available};var uS={exports:{}},hS={},pS=Symbol.for("react.element"),mS=Symbol.for("react.portal"),fS=Symbol.for("react.fragment"),gS=Symbol.for("react.strict_mode"),yS=Symbol.for("react.profiler"),vS=Symbol.for("react.provider"),bS=Symbol.for("react.context"),wS=Symbol.for("react.forward_ref"),xS=Symbol.for("react.suspense"),_S=Symbol.for("react.memo"),CS=Symbol.for("react.lazy"),SS=Symbol.iterator,kS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ES=Object.assign,$S={};function MS(e,t,n){this.props=e,this.context=t,this.refs=$S,this.updater=n||kS}function RS(){}function AS(e,t,n){this.props=e,this.context=t,this.refs=$S,this.updater=n||kS}MS.prototype.isReactComponent={},MS.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},MS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},RS.prototype=MS.prototype;var TS=AS.prototype=new RS;TS.constructor=AS,ES(TS,MS.prototype),TS.isPureReactComponent=!0;var LS=Array.isArray,jS=Object.prototype.hasOwnProperty,OS={current:null},NS={key:!0,ref:!0,__self:!0,__source:!0};function IS(e,t,n){var i,r={},o=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)jS.call(t,i)&&!NS.hasOwnProperty(i)&&(r[i]=t[i]);var s=arguments.length-2;if(1===s)r.children=n;else if(1GS.createElement("svg",{viewBox:"64 64 896 896","data-icon":"exclamation-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false",...e},GS.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"})),KS=()=>{var e;const t=Xx((e=>e.templateData)),n=(null==(e=null==t?void 0:t.addon_info)?void 0:e.link_upgrade)??"";return Vt.jsxs("div",{children:[Vt.jsx("i",{className:"yaymail-notice-icon",children:Vt.jsx(YS,{})}),Vt.jsxs("p",{children:[Vt.jsx("span",{children:__(" This email template can be fully customized with YayMail Premium Addon. ","yaymail")}),Vt.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:n,target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Buy Now","yaymail")})]})]})},QS=window.React.useMemo,qS=()=>{const e=Xx((e=>e.templateData)),t=QS((()=>{const t=(e=>{const t=(null==e?void 0:e.template_base)??"";if(0===t.length||!t.includes("/plugins/"))return"";const n=t.split("/plugins/");return Array.isArray(n)&&n.length>0?n[1].split("/")[0]:""})((t=>{for(const[n,i]of Object.entries(t))if((null==i?void 0:i.id)===(null==e?void 0:e.name))return i})(window.yaymailData.wc_emails)),n=window.yaymailData.supported_plugins;for(const[e,i]of Object.entries(n)){if(Array.isArray(i.slug_name))for(const e of i.slug_name)if(e===t)return{status:!0,plugin_name:i.plugin_name};if(i.slug_name===t)return{status:!0,plugin_name:i.plugin_name}}return{status:!1,plugin_name:""}}),[e]);return Vt.jsxs("div",{children:[Vt.jsx("i",{className:"yaymail-notice-icon",children:Vt.jsx(YS,{})}),Vt.jsxs("p",{children:[Vt.jsx("span",{children:__(" This template is unavailable at the moment. ","yaymail")}),Vt.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/support/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Contact us","yaymail")}),Vt.jsx("span",{children:__(" to see if it can be customized with ","yaymail")}),Vt.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/yaymail-addons/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("YayMail Addon.","yaymail")}),t.status&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("br",{}),Vt.jsx("span",{children:__("We already support several other emails for %s plugin.","yaymail").replace("%s",t?null==t?void 0:t.plugin_name:"this")}),Vt.jsx("span",{children:__("Please contact us to request features.","yaymail")})]})]})]})},ZS=()=>Vt.jsxs("div",{children:[Vt.jsx("i",{className:"yaymail-notice-icon",children:Vt.jsx(YS,{})}),Vt.jsxs("p",{children:[Vt.jsxs("span",{children:[" ",__(" This email template can be fully customized with YayMail Pro. ","yaymail")]}),Vt.jsx("a",{style:{fontWeight:"bold",textDecoration:"underline"},className:"yaymail-link-upgrade",href:"https://yaycommerce.com/yaymail-woocommerce-email-customizer/",target:"_blank",onClick:e=>{e.stopPropagation()},rel:"noreferrer",children:__("Upgrade Now","yaymail")})]})]}),XS=window.React.useMemo;function JS(){const e=Zb((e=>e.settings));return XS((()=>(null==e?void 0:e.direction)??"rtl"),[e])}const ek=window.React.useMemo,tk=()=>{const e=Zb((e=>e.settings)),t=Xx((e=>e.templateData)),n=JS(),i=ek((()=>e&&e.container_width&&!isNaN(e.container_width)?null==e?void 0:e.container_width:605),[e]),r=ek((()=>({width:Jw(i),direction:"rtl"==n?"rtl":"initial"})),[i,n]);return Vt.jsx("div",{className:"yaymail-notice-message",style:r,children:(o=null==t?void 0:t.support_status,"addon_needed"===o?Vt.jsx(KS,{}):"pro_needed"===o?Vt.jsx(ZS,{}):"not_supported"===o?Vt.jsx(qS,{}):null)});var o};var nk={exports:{}};function ik(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function rk(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,i=new Array(t);n"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function wk(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function xk(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&bk(e,t):bk(e,t))||i&&e===n)return e;if(e===n)break}while(e=wk(e))}return null}var _k,Ck=/\s+/g;function Sk(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Ck," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(Ck," ")}}function kk(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function Ek(e,t){var n="";if("string"==typeof e)n=e;else do{var i=kk(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function $k(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,o=i.length;if(n)for(;r=o:r<=o))return i;if(i===Mk())break;i=Nk(i,!1)}return!1}function Tk(e,t,n,i){for(var r=0,o=0,a=e.children;o2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,r=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,Yk);Vk.pluginEvent.bind(FE)(e,t,rk({dragEl:qk,parentEl:Zk,ghostEl:Xk,rootEl:Jk,nextEl:eE,lastDownEl:tE,cloneEl:nE,cloneHidden:iE,dragStarted:gE,putSortable:cE,activeSortable:FE.active,originalEvent:i,oldIndex:rE,oldDraggableIndex:aE,newIndex:oE,newDraggableIndex:sE,hideGhostForTarget:IE,unhideGhostForTarget:DE,cloneNowHidden:function(){iE=!0},cloneNowShown:function(){iE=!1},dispatchSortableEvent:function(e){Qk({sortable:t,name:e,originalEvent:i})}},r))};function Qk(e){Gk(rk({putSortable:cE,cloneEl:nE,targetEl:qk,rootEl:Jk,oldIndex:rE,oldDraggableIndex:aE,newIndex:oE,newDraggableIndex:sE},e))}var qk,Zk,Xk,Jk,eE,tE,nE,iE,rE,oE,aE,sE,lE,cE,dE,uE,hE,pE,mE,fE,gE,yE,vE,bE,wE,xE=!1,_E=!1,CE=[],SE=!1,kE=!1,EE=[],$E=!1,ME=[],RE="undefined"!=typeof document,AE=mk,TE=uk||dk?"cssFloat":"float",LE=RE&&!fk&&!mk&&"draggable"in document.createElement("div"),jE=function(){if(RE){if(dk)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),OE=function(e,t){var n=kk(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=Tk(e,0,t),o=Tk(e,1,t),a=r&&kk(r),s=o&&kk(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Rk(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Rk(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=i&&"none"===n[TE]||o&&"none"===n[TE]&&l+c>i)?"vertical":"horizontal"},NE=function(e){function t(e,n){return function(i,r,o,a){var s=i.options.group.name&&r.options.group.name&&i.options.group.name===r.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(i,r,o,a),n)(i,r,o,a);var l=(n?i:r).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},i=e.group;i&&"object"==ok(i)||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},IE=function(){!jE&&Xk&&kk(Xk,"display","none")},DE=function(){!jE&&Xk&&kk(Xk,"display","")};RE&&!fk&&document.addEventListener("click",(function(e){if(_E)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_E=!1,!1}),!0);var PE=function(e){if(qk){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,o=e.clientY,CE.some((function(e){var t=e[Hk].options.emptyInsertThreshold;if(t&&!Lk(e)){var n=Rk(e),i=r>=n.left-t&&r<=n.right+t,s=o>=n.top-t&&o<=n.bottom+t;return i&&s?a=e:void 0}})),a);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Hk]._onDragOver(n)}}var r,o,a},zE=function(e){qk&&qk.parentNode[Hk]._isOutsideThisEl(e.target)};function FE(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=sk({},t),e[Hk]=this;var n,i,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return OE(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==FE.supportPointer&&"PointerEvent"in window&&!pk,emptyInsertThreshold:5};for(var o in Vk.initializePlugins(this,e,r),r)!(o in t)&&(t[o]=r[o]);for(var a in NE(t),this)"_"===a.charAt(0)&&"function"==typeof this[a]&&(this[a]=this[a].bind(this));this.nativeDraggable=!t.forceFallback&&LE,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?yk(e,"pointerdown",this._onTapStart):(yk(e,"mousedown",this._onTapStart),yk(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(yk(e,"dragover",this),yk(e,"dragenter",this)),CE.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),sk(this,(i=[],{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==kk(e,"display")&&e!==FE.ghost){i.push({target:e,rect:Rk(e)});var t=rk({},i[i.length-1].rect);if(e.thisAnimationDuration){var n=Ek(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){i.push(e)},removeAnimationState:function(e){i.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(i,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var r=!1,o=0;i.forEach((function(e){var n=0,i=e.target,a=i.fromRect,s=Rk(i),l=i.prevFromRect,c=i.prevToRect,d=e.rect,u=Ek(i,!0);u&&(s.top-=u.f,s.left-=u.e),i.toRect=s,i.thisAnimationDuration&&Ik(l,s)&&!Ik(a,s)&&(d.top-s.top)/(d.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(n=function(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}(d,l,c,t.options)),Ik(s,a)||(i.prevFromRect=a,i.prevToRect=s,n||(n=t.options.animation),t.animate(i,d,s,n)),n&&(r=!0,o=Math.max(o,n),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),n),i.thisAnimationDuration=n)})),clearTimeout(n),r?n=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),i=[]},animate:function(e,t,n,i){if(i){kk(e,"transition",""),kk(e,"transform","");var r=Ek(this.el),o=r&&r.a,a=r&&r.d,s=(t.left-n.left)/(o||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,kk(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),kk(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),kk(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){kk(e,"transition",""),kk(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i)}}}))}function BE(e,t,n,i,r,o,a,s){var l,c,d=e[Hk],u=d.options.onMove;return!window.CustomEvent||dk||uk?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=r||t,l.relatedRect=o||Rk(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),u&&(c=u.call(d,l,a)),c}function HE(e){e.draggable=!1}function WE(){$E=!1}function UE(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function VE(e){return setTimeout(e,0)}function GE(e){return clearTimeout(e)}FE.prototype={constructor:FE,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(yE=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,qk):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,r=i.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(function(e){ME.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&ME.push(i)}}(n),!qk&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!pk||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=xk(s,i.draggable,n,!1))&&s.animated||tE===s)){if(rE=jk(s),aE=jk(s,i.draggable),"function"==typeof c){if(c.call(this,e,s,this))return Qk({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Kk("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(i){if(i=xk(l,i.trim(),n,!1))return Qk({sortable:t,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),Kk("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());i.handle&&!xk(l,i.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var i,r=this,o=r.el,a=r.options,s=o.ownerDocument;if(n&&!qk&&n.parentNode===o){var l=Rk(n);if(Jk=o,Zk=(qk=n).parentNode,eE=qk.nextSibling,tE=n,lE=a.group,FE.dragged=qk,dE={target:qk,clientX:(t||e).clientX,clientY:(t||e).clientY},mE=dE.clientX-l.left,fE=dE.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,qk.style["will-change"]="all",i=function(){Kk("delayEnded",r,{evt:e}),FE.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!hk&&r.nativeDraggable&&(qk.draggable=!0),r._triggerDragStart(e,t),Qk({sortable:r,name:"choose",originalEvent:e}),Sk(qk,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){$k(qk,e.trim(),HE)})),yk(s,"dragover",PE),yk(s,"mousemove",PE),yk(s,"touchmove",PE),yk(s,"mouseup",r._onDrop),yk(s,"touchend",r._onDrop),yk(s,"touchcancel",r._onDrop),hk&&this.nativeDraggable&&(this.options.touchStartThreshold=4,qk.draggable=!0),Kk("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(uk||dk))i();else{if(FE.eventCanceled)return void this._onDrop();yk(s,"mouseup",r._disableDelayedDrag),yk(s,"touchend",r._disableDelayedDrag),yk(s,"touchcancel",r._disableDelayedDrag),yk(s,"mousemove",r._delayedDragTouchMoveHandler),yk(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&yk(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){qk&&HE(qk),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;vk(e,"mouseup",this._disableDelayedDrag),vk(e,"touchend",this._disableDelayedDrag),vk(e,"touchcancel",this._disableDelayedDrag),vk(e,"mousemove",this._delayedDragTouchMoveHandler),vk(e,"touchmove",this._delayedDragTouchMoveHandler),vk(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?yk(document,"pointermove",this._onTouchMove):yk(document,t?"touchmove":"mousemove",this._onTouchMove):(yk(qk,"dragend",this),yk(Jk,"dragstart",this._onDragStart));try{document.selection?VE((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(xE=!1,Jk&&qk){Kk("dragStarted",this,{evt:t}),this.nativeDraggable&&yk(document,"dragover",zE);var n=this.options;!e&&Sk(qk,n.dragClass,!1),Sk(qk,n.ghostClass,!0),FE.active=this,e&&this._appendGhost(),Qk({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(uE){this._lastX=uE.clientX,this._lastY=uE.clientY,IE();for(var e=document.elementFromPoint(uE.clientX,uE.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(uE.clientX,uE.clientY))!==t;)t=e;if(qk.parentNode[Hk]._isOutsideThisEl(e),t)do{if(t[Hk]&&t[Hk]._onDragOver({clientX:uE.clientX,clientY:uE.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);DE()}},_onTouchMove:function(e){if(dE){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,r=e.touches?e.touches[0]:e,o=Xk&&Ek(Xk,!0),a=Xk&&o&&o.a,s=Xk&&o&&o.d,l=AE&&wE&&Ok(wE),c=(r.clientX-dE.clientX+i.x)/(a||1)+(l?l[0]-EE[0]:0)/(a||1),d=(r.clientY-dE.clientY+i.y)/(s||1)+(l?l[1]-EE[1]:0)/(s||1);if(!FE.active&&!xE){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))i.right+10||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+10}(e,r,this)&&!f.animated){if(f===qk)return T(!1);if(f&&o===e.target&&(a=f),a&&(n=Rk(a)),!1!==BE(Jk,o,qk,t,a,n,e,!!a))return A(),f&&f.nextSibling?o.insertBefore(qk,f.nextSibling):o.appendChild(qk),Zk=o,L(),T(!0)}else if(f&&function(e,t,n){var i=Rk(Tk(n.el,0,n.options,!0));return t?e.clientXd+c*o/2:lu-bE)return-vE}else if(l>d+c*(1-r)/2&&lu-c*o/2)?l>d+c/2?1:-1:0}(e,a,n,r,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,kE,yE===a),0!==y){var k=jk(qk);do{k-=y,b=Zk.children[k]}while(b&&("none"===kk(b,"display")||b===Xk))}if(0===y||b===a)return T(!1);yE=a,vE=y;var E=a.nextElementSibling,$=!1,M=BE(Jk,o,qk,t,a,n,e,$=1===y);if(!1!==M)return 1!==M&&-1!==M||($=1===M),$E=!0,setTimeout(WE,30),A(),$&&!E?o.appendChild(qk):a.parentNode.insertBefore(qk,$?E:a),C&&Pk(C,0,S-C.scrollTop),Zk=qk.parentNode,void 0===v||kE||(bE=Math.abs(v-Rk(a)[_])),L(),T(!0)}if(o.contains(qk))return T(!1)}return!1}function R(s,l){Kk(s,p,rk({evt:e,isOwner:d,axis:r?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:u,fromSortable:h,target:a,completed:T,onMove:function(n,i){return BE(Jk,o,qk,t,n,Rk(n),e,i)},changed:L},l))}function A(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function T(t){return R("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(p),p!==h&&(Sk(qk,cE?cE.options.ghostClass:c.options.ghostClass,!1),Sk(qk,s.ghostClass,!0)),cE!==p&&p!==FE.active?cE=p:p===FE.active&&cE&&(cE=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===qk&&!qk.animated||a===o&&!a.animated)&&(yE=null),s.dragoverBubble||e.rootEl||a===document||(qk.parentNode[Hk]._isOutsideThisEl(e.target),!t&&PE(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function L(){oE=jk(qk),sE=jk(qk,s.draggable),Qk({sortable:p,name:"change",toEl:o,newIndex:oE,newDraggableIndex:sE,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){vk(document,"mousemove",this._onTouchMove),vk(document,"touchmove",this._onTouchMove),vk(document,"pointermove",this._onTouchMove),vk(document,"dragover",PE),vk(document,"mousemove",PE),vk(document,"touchmove",PE)},_offUpEvents:function(){var e=this.el.ownerDocument;vk(e,"mouseup",this._onDrop),vk(e,"touchend",this._onDrop),vk(e,"pointerup",this._onDrop),vk(e,"touchcancel",this._onDrop),vk(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;oE=jk(qk),sE=jk(qk,n.draggable),Kk("drop",this,{evt:e}),Zk=qk&&qk.parentNode,oE=jk(qk),sE=jk(qk,n.draggable),FE.eventCanceled||(xE=!1,kE=!1,SE=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),GE(this.cloneId),GE(this._dragStartId),this.nativeDraggable&&(vk(document,"drop",this),vk(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),pk&&kk(document.body,"user-select",""),kk(qk,"transform",""),e&&(gE&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Xk&&Xk.parentNode&&Xk.parentNode.removeChild(Xk),(Jk===Zk||cE&&"clone"!==cE.lastPutMode)&&nE&&nE.parentNode&&nE.parentNode.removeChild(nE),qk&&(this.nativeDraggable&&vk(qk,"dragend",this),HE(qk),qk.style["will-change"]="",gE&&!xE&&Sk(qk,cE?cE.options.ghostClass:this.options.ghostClass,!1),Sk(qk,this.options.chosenClass,!1),Qk({sortable:this,name:"unchoose",toEl:Zk,newIndex:null,newDraggableIndex:null,originalEvent:e}),Jk!==Zk?(oE>=0&&(Qk({rootEl:Zk,name:"add",toEl:Zk,fromEl:Jk,originalEvent:e}),Qk({sortable:this,name:"remove",toEl:Zk,originalEvent:e}),Qk({rootEl:Zk,name:"sort",toEl:Zk,fromEl:Jk,originalEvent:e}),Qk({sortable:this,name:"sort",toEl:Zk,originalEvent:e})),cE&&cE.save()):oE!==rE&&oE>=0&&(Qk({sortable:this,name:"update",toEl:Zk,originalEvent:e}),Qk({sortable:this,name:"sort",toEl:Zk,originalEvent:e})),FE.active&&(null!=oE&&-1!==oE||(oE=rE,sE=aE),Qk({sortable:this,name:"end",toEl:Zk,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Kk("nulling",this),Jk=qk=Zk=Xk=eE=nE=tE=iE=dE=uE=gE=oE=sE=rE=aE=yE=vE=cE=lE=FE.dragged=FE.ghost=FE.clone=FE.active=null,ME.forEach((function(e){e.checked=!0})),ME.length=hE=pE=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":qk&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,r=n.length,o=this.options;i1&&(p$.forEach((function(e){i.addAnimationState({target:e,rect:g$?Rk(e):r}),Bk(e),e.fromRect=r,t.removeAnimationState(e)})),g$=!1,function(e,t){p$.forEach((function(n,i){var r=t.children[n.sortableIndex+(e?Number(i):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,i=e.insertion,r=e.activeSortable,o=e.parentEl,a=e.putSortable,s=this.options;if(i){if(n&&r._hideClone(),f$=!1,s.animation&&p$.length>1&&(g$||!n&&!r.options.sort&&!a)){var l=Rk(d$,!1,!0,!0);p$.forEach((function(e){e!==d$&&(Fk(e,l),o.appendChild(e))})),g$=!0}if(!n)if(g$||b$(),p$.length>1){var c=h$;r._showClone(t),r.options.animation&&!h$&&c&&m$.forEach((function(e){r.addAnimationState({target:e,rect:u$}),e.fromRect=u$,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,i=e.activeSortable;if(p$.forEach((function(e){e.thisAnimationDuration=null})),i.options.animation&&!n&&i.multiDrag.isMultiDrag){u$=sk({},t);var r=Ek(d$,!0);u$.top-=r.f,u$.left-=r.e}},dragOverAnimationComplete:function(){g$&&(g$=!1,b$())},drop:function(e){var t=e.originalEvent,n=e.rootEl,i=e.parentEl,r=e.sortable,o=e.dispatchSortableEvent,a=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,d=i.children;if(!y$)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Sk(d$,c.selectedClass,!~p$.indexOf(d$)),~p$.indexOf(d$))p$.splice(p$.indexOf(d$),1),l$=null,Gk({sortable:r,rootEl:n,name:"deselect",targetEl:d$,originalEvent:t});else{if(p$.push(d$),Gk({sortable:r,rootEl:n,name:"select",targetEl:d$,originalEvent:t}),t.shiftKey&&l$&&r.el.contains(l$)){var u,h,p=jk(l$),m=jk(d$);if(~p&&~m&&p!==m)for(m>p?(h=p,u=m):(h=m,u=p+1);h1){var f=Rk(d$),g=jk(d$,":not(."+this.options.selectedClass+")");if(!f$&&c.animation&&(d$.thisAnimationDuration=null),l.captureAnimationState(),!f$&&(c.animation&&(d$.fromRect=f,p$.forEach((function(e){if(e.thisAnimationDuration=null,e!==d$){var t=g$?Rk(e):f;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),b$(),p$.forEach((function(e){d[g]?i.insertBefore(e,d[g]):i.appendChild(e),g++})),a===jk(d$))){var y=!1;p$.forEach((function(e){e.sortableIndex===jk(e)||(y=!0)})),y&&o("update")}p$.forEach((function(e){Bk(e)})),l.animateAll()}c$=l}(n===i||s&&"clone"!==s.lastPutMode)&&m$.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=y$=!1,m$.length=0},destroyGlobal:function(){this._deselectMultiDrag(),vk(document,"pointerup",this._deselectMultiDrag),vk(document,"mouseup",this._deselectMultiDrag),vk(document,"touchend",this._deselectMultiDrag),vk(document,"keydown",this._checkKeyDown),vk(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==y$&&y$||c$!==this.sortable||e&&xk(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;p$.length;){var t=p$[0];Sk(t,this.options.selectedClass,!1),p$.shift(),Gk({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},sk(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Hk];t&&t.options.multiDrag&&!~p$.indexOf(e)&&(c$&&c$!==t&&(c$.multiDrag._deselectMultiDrag(),c$=t),Sk(e,t.options.selectedClass,!0),p$.push(e))},deselect:function(e){var t=e.parentNode[Hk],n=p$.indexOf(e);t&&t.options.multiDrag&&~n&&(Sk(e,t.options.selectedClass,!1),p$.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],i=[];return p$.forEach((function(e){var r;n.push({multiDragElement:e,index:e.sortableIndex}),r=g$&&e!==d$?-1:g$?jk(e,":not(."+t.options.selectedClass+")"):jk(e),i.push({multiDragElement:e,index:r})})),{items:(e=p$,function(e){if(Array.isArray(e))return lk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lk(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(m$),oldIndicies:n,newIndicies:i}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})},Sortable:FE,Swap:function(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;i$=t},dragOverValid:function(e){var t=e.completed,n=e.target,i=e.onMove,r=e.activeSortable,o=e.changed,a=e.cancel;if(r.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=i$;!1!==i(n)?(Sk(n,l.swapClass,!0),i$=n):i$=null,c&&c!==i$&&Sk(c,l.swapClass,!1)}o(),t(!0),a()}},drop:function(e){var t,n,i,r,o,a,s=e.activeSortable,l=e.putSortable,c=e.dragEl,d=l||this.sortable,u=this.options;i$&&Sk(i$,u.swapClass,!1),i$&&(u.swap||l&&l.options.swap)&&c!==i$&&(d.captureAnimationState(),d!==s&&s.captureAnimationState(),n=i$,o=(t=c).parentNode,a=n.parentNode,o&&a&&!o.isEqualNode(n)&&!a.isEqualNode(t)&&(i=jk(t),r=jk(n),o.isEqualNode(a)&&il(e.element)))}function d(e){e.forEach((e=>{!function(e,t,n){const i=e.children[n]||null;e.insertBefore(t,i)}(e.parentElement,e.element,e.oldIndex)}))}function u(e,t){const n=m(e),i={parentElement:e.from};let r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...i},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...i}];break;case"multidrag":r=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...i})))}const o=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return o}function h(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function p(e,t,n,i){const r=[...t];return e.forEach((e=>{const t=i&&n&&i(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}function m(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(t.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(t.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(t.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(t.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(t.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(t.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(t.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(t.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(t.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(t.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(t.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(t.exports,"ReactSortable",(()=>g));const f={dragging:null};class g extends r.Component{constructor(e){super(e),this.ref=(0,r.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,f),a(o)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();a(n).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:i}=this.props,o={style:t,className:n,id:i},a=e&&null!==e?e:"div";return(0,r.createElement)(a,{ref:this.ref,...o},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:o="sortable-chosen",dragClass:s="sortable-drag",fallbackClass:l="sortable-falback",ghostClass:c="sortable-ghost",swapClass:d="sortable-swap-highlight",filter:u="sortable-filter",list:h}=this.props;if(!e||null==e)return null;const p=t||"data-id";return r.Children.map(e,((e,t)=>{if(void 0===e)return;const s=h[t]||{},{className:l}=e.props,c="string"==typeof u&&{[u.replace(".","")]:!!s.filtered},d=a(i)(l,{[n]:s.selected,[o]:s.chosen,...c});return(0,r.cloneElement)(e,{[p]:e.key,className:d})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:i,tag:r,style:o,className:a,clone:s,onAdd:l,onChange:c,onChoose:d,onClone:u,onEnd:h,onFilter:p,onRemove:m,onSort:f,onStart:g,onUnchoose:y,onUpdate:v,onMove:b,onSpill:w,onSelect:x,onDeselect:_,...C}=e;return C}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,i=e.willInsertAfter||-1;if(!n)return i;const r=n(e,t,this.sortable,f);return void 0!==r&&r}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,f)}onAdd(e){const{list:t,setList:n,clone:i}=this.props,r=u(e,[...f.dragging.props.list]);c(r),n(p(r,t,e,i).map((e=>Object.assign(e,{selected:!1}))),this.sortable,f)}onRemove(e){const{list:t,setList:n}=this.props,i=m(e),r=u(e,t);d(r);let s=[...t];if("clone"!==e.pullMode)s=h(r,s);else{let t=r;switch(i){case"multidrag":t=r.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:a(o)(!0,`mode "${i}" cannot clone. Please remove "props.clone" from when using the "${i}" plugin`)}c(t),r.forEach((t=>{const n=t.oldIndex,i=this.props.clone(t.item,e);s.splice(n,1,i)}))}s=s.map((e=>Object.assign(e,{selected:!1}))),n(s,this.sortable,f)}onUpdate(e){const{list:t,setList:n}=this.props,i=u(e,t);c(i),d(i);const r=function(e,t){return p(e,h(e,t))}(i,t);return n(r,this.sortable,f)}onStart(){f.dragging=this}onEnd(){f.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let i=t;return n===e.oldIndex&&(i=Object.assign(t,{chosen:!0})),i})),this.sortable,f)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let i=t;return n===e.oldIndex&&(i=Object.assign(i,{chosen:!1})),i})),this.sortable,f)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&l(e.item)}onSelect(e){const{list:t,setList:n}=this.props,i=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);i[n].selected=!0})),n(i,this.sortable,f)}onDeselect(e){const{list:t,setList:n}=this.props,i=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(i[t].selected=!0)})),n(i,this.sortable,f)}}var y,v;((t,n,i)=>{((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i)})(g,"defaultProps",{clone:e=>e}),y=t.exports,v={},Object.keys(v).forEach((function(e){"default"===e||"__esModule"===e||y.hasOwnProperty(e)||Object.defineProperty(y,e,{enumerable:!0,get:function(){return v[e]}})}))}(nk);var $$=nk.exports;const M$=window.React.useCallback,R$=({list:e,setList:t,clone:n=!1,parentList:i=null,parentId:r=null,columnIndex:o=null,className:a="",sort:s=!0,children:l,style:c,useHandle:d=!1})=>{const u=M$((n=>{var a;let s;null!=(null==(a=n.to)?void 0:a.querySelector(".yaymail-customizer-email-global-header-footer-container"))&&(n.oldIndex=n.oldIndex?n.oldIndex-1:0,n.newIndex=n.newIndex?n.newIndex-1:0),s=null!=i&&null!=r&&null!=o?xx(n,i,r,o):xx(n,e),s&&t(s.addedList??[],{elementName:s.addedElementName??"",action:"added"})}),[e,t,i]),h=M$((n=>{var r,o,a;null!=(null==(r=n.to)?void 0:r.querySelector(".yaymail-customizer-email-global-header-footer-container"))&&(n.oldIndex=n.oldIndex?n.oldIndex-1:0,n.newIndex=n.newIndex?n.newIndex-1:0);const s=n.item.dataset.yaymailElementId;if(!s)return console.debug("YayMail: Please provide Element data in data attribute"),null;const l=((e,t)=>{if(e.from!==e.to)return null;if(void 0===e.newIndex)return console.debug("YayMail: Could not detect sortable new index"),null;let n=structuredClone(t);return n=(({array:e,oldIndex:t,newIndex:n})=>{if(t<0||t>=e.length||n<0||n>=e.length)throw new Error("Invalid index");if(t===n)return e;const i=[...e],[r]=i.splice(t,1);return i.splice(n,0,r),i})({array:n,oldIndex:e.oldIndex??0,newIndex:e.newIndex??0}),n})(n,e);if(null==l)return;const c=null==(o=mx(s,l))?void 0:o.name;if(null===i)return void t(l,{elementName:c,action:"moved"});const d=null==(a=l[0])?void 0:a.parentId;if(null==d)return;const u=structuredClone(i);let h=mx(d,u);h&&(h={...h,children:l},gx(d,u,h),t(u,{elementName:c,action:"moved"}))}),[e,t,i]);return Vt.jsx($$.ReactSortable,{group:{name:"yaymail",...n?{pull:"clone",put:!1}:{}},list:e,onAdd:u,onSort:h,setList:()=>!1,filter:`.${px},.yaymail-sortable-static`,preventOnFilter:!0,ghostClass:"yaymail-sortable-ghost",...n?{}:{animation:100,easing:"ease-in-out"},className:a,sort:s,swapThreshold:1,invertSwap:!0,direction:"vertical",handle:d?".yaymail-chosen-element__handle-drag":void 0,style:c,onMove:e=>-1===e.related.className.indexOf("yaymail-sortable-static"),children:l})},A$=window.React.useMemo,T$=({reference:e})=>{const{isFirst:t,isLast:n,handleMoveElementUp:i,handleMoveElementDown:r}=L$(e);return Vt.jsx("div",{className:"yaymail-chosen-element__control-bar",onClick:e=>{e.stopPropagation()},children:Vt.jsxs("div",{className:"control-group",children:[Vt.jsx("span",{className:t?"disabled":"",children:Vt.jsx(wt,{onClick:i})}),"element"===e&&Vt.jsx("span",{className:"yaymail-chosen-element__handle-drag",children:Vt.jsx(Kh,{})}),Vt.jsx("span",{className:n?"disabled":"",children:Vt.jsx(xt,{onClick:r})})]})})},L$=e=>{const t=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),n=Fx((e=>e.swapWithNextElement)),i=Fx((e=>e.swapWithPreviousElement)),r=Fx((e=>e.swapGroupWithPreviousElement)),o=Fx((e=>e.swapGroupWithNextElement)),a=Fx((e=>e.list)),s=Fx((e=>e.multiSelectedList));return{isFirst:"element"===e?A$((()=>!!t&&a[0].id===t),[t,a,s]):A$((()=>!(s.length<1)&&a[0].id===s[0].id),[s,a]),isLast:"element"===e?A$((()=>!!t&&a[a.length-1].id===t),[t,a,s]):A$((()=>!(s.length<1)&&a[a.length-1].id===s[s.length-1].id),[s,a]),handleMoveElementUp:()=>{((e="element")=>new Promise((t=>{const n=cS(".yaymail-customizer-main"),i=cS("element"===e?".yaymail-customizer-main .yaymail-chosen-element":".yaymail-customizer-main .yaymail-multi-selected"),r=cS(i).first().prev();i.css("z-index","40");const o=r.innerHeight();n.animate({scrollTop:Number(n.scrollTop())-Number(r.innerHeight())},"slow"),i.animate({bottom:o,opacity:.7},300,(function(){const n=i.innerHeight();r.animate({top:n,opacity:.7},"element"===e?100:0,(function(){i.css({bottom:"",zIndex:"",opacity:""}),r.css({top:"",opacity:""}),t(!0)}))}))})))(e).then((()=>{"element"===e?i(t??""):r(s)}))},handleMoveElementDown:()=>{((e="element")=>new Promise((t=>{const n=cS(".yaymail-customizer-main"),i=cS("element"===e?".yaymail-customizer-main .yaymail-chosen-element":".yaymail-customizer-main .yaymail-multi-selected"),r=cS(i).last().next();i.css("z-index","40");const o=r.innerHeight()??0;n.animate({scrollTop:Number(r.height())+Number(n.scrollTop())},"slow"),i.animate({top:o,opacity:.7},300,(function(){const n=i.innerHeight();r.animate({bottom:n,opacity:.7},"element"===e?100:0,(function(){i.css({top:"",zIndex:"",opacity:""}),r.css({bottom:"",opacity:""}),t(!0)}))}))})))(e).then((()=>{"element"===e?n(t??""):o(s)}))}}},j$=window.React.useCallback,O$=window.React.useEffect,N$=(e,t=!0,n,i)=>{const{boundaryElementSelectors:r,ignoredElementsCssSelectors:o,ignoredClassnames:a}=n||{},s=j$((e=>a&&a.some((t=>e.classList.contains(t)))),[a]),l=j$((e=>o&&o.some((t=>e.closest(t)))),[o]),c=j$((e=>r&&r.some((t=>e.matches(t)))),[r]),d=j$((n=>{if(!t)return;const i=n.target,o=c(i),a=!o&&(s(i)||l(i));(o||!r&&!a)&&e()}),[t,c,s,l,r,e]);O$((()=>{t?document.addEventListener("click",d):document.removeEventListener("click",d);const e=i?document.querySelectorAll(i):"";return e&&e.forEach((function(e){e.addEventListener("click",(e=>d(e)))})),()=>{document.removeEventListener("click",d),e&&e.forEach((function(e){e.removeEventListener("click",(e=>d(e)))}))}}),[d])},I$=e=>GS.createElement("svg",{"data-v-2503513a":"",x:"0px",y:"0px",width:"1em",height:"1em",viewBox:"0 0 60 60",...e},GS.createElement("g",{"data-v-2503513a":""},GS.createElement("path",{"data-v-2503513a":"",d:"M30,15c3.9,0,7-3.1,7-7s-3.1-7-7-7s-7,3.1-7,7S26.1,15,30,15z"}),GS.createElement("path",{"data-v-2503513a":"",d:"M30,45c-3.9,0-7,3.1-7,7s3.1,7,7,7s7-3.1,7-7S33.9,45,30,45z"}),GS.createElement("path",{"data-v-2503513a":"",d:"M30,23c-3.9,0-7,3.1-7,7s3.1,7,7,7s7-3.1,7-7S33.9,23,30,23z"}))),D$="_modal_header_title_11qgr_7",P$="_modal-header-right_11qgr_12",z$=({isLoading:e,okText:t,cancelText:n,onOk:i,onCancel:r,isButtonOkDisabled:o})=>Vt.jsxs("div",{className:"modal__footer",children:[Vt.jsx(Pe,{type:"primary",loading:e,onClick:i,disabled:o,children:__(t)},"ok"),Vt.jsx(Pe,{onClick:r,disabled:e,children:n??__("Cancel","yaymail")},"back")]}),F$=({content:e})=>Vt.jsx("div",{className:"_modal_header_11qgr_1",children:e}),B$=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Are you sure you want to remove this element?","yaymail")})}),H$=({elementIds:e,isOpen:t,onClose:n})=>{const i=Fx((e=>e.removeElements));return Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(B$,{})}),className:"yaymail-global__modal yaymail-remove-element__modal",open:t,onCancel:n,centered:!0,width:"500px",footer:Vt.jsx(z$,{onOk:()=>{i(e),n()},onCancel:()=>{n()},okText:"Yes, sure!"}),destroyOnClose:!0})},W$=window.React.useMemo,U$=window.React.useState,V$=({element:e})=>{const t=e.id,n=Xx((e=>e.elements)),i=Fx((e=>e.copiedElement)),r=Fx((e=>e.chosenElement)),o=Fx((e=>e.copiedStylesElement)),a=Fx((e=>e.multiSelectedList.map((e=>e.id)))),s=W$((()=>a.length>1),[a]),l=Fx((e=>e.copyElement)),c=Fx((e=>e.copyStylesElement)),d=Fx((e=>e.pasteElement)),u=Fx((e=>e.pasteStylesElement)),h=Fx((e=>e.duplicateElement)),[p,m]=U$(!1),[f,g]=Nu.useMessage({top:30,duration:1}),y=()=>{m(!0)},v=Fx((e=>e.selectParentColumnElement)),b=W$((()=>null===i||!dS(n,i)),[i,dS]),w=W$((()=>null===o||!((e,t)=>null!==t&&null!==e&&e.type===t.type)(r,o)),[]),x=W$((()=>{const t=[{label:__("Duplicate","yaymail"),key:"duplicate",icon:Vt.jsx(Lh,{}),onClick:()=>{h()}},...s?[]:[{label:__("Copy this element","yaymail"),key:"copy_element",icon:Vt.jsx(Uh,{}),onClick:()=>{l(e),f.success("Element copied")}},{label:__("Paste element","yaymail"),key:"pasteElement",icon:Vt.jsx(np,{}),disabled:b,onClick:()=>{d(),f.success("Element pasted")}},{label:__("Copy styles","yaymail"),key:"copy_styles",icon:Vt.jsx(dp,{}),onClick:()=>{c(),f.success("Styles copied")}},{label:__("Paste styles","yaymail"),key:"pasteStyles",icon:Vt.jsx(np,{}),disabled:w,onClick:()=>{u(),f.success("Styles pasted")}}],{label:Vt.jsx(G,{title:__("This feature is available in the PRO version","yaymail"),children:Vt.jsx("span",{children:__("Save to library","yaymail")})}),key:"save_to_library",icon:Vt.jsx(Xh,{}),disabled:!0},{label:__("Remove","yaymail"),key:"remove",icon:Vt.jsx(Fh,{}),onClick:y}];return e.parentId&&!s&&t.push({label:__("Select parent","yaymail"),key:"selectParent",icon:Vt.jsx(gh,{}),onClick:()=>{v(e.parentId)}}),t}),[e.parentId,b,s]);return Vt.jsxs(Vt.Fragment,{children:[g,Vt.jsxs("div",{className:"yaymail-customizer-element__extra-options",onClick:e=>{e.stopPropagation()},children:[Vt.jsx(_t,{menu:{items:x},trigger:["click"],children:Vt.jsx("div",{className:"extra-options__activator",children:Vt.jsx(I$,{style:{fill:Xm.button.color.grey[200]}})})}),Vt.jsx(H$,{elementIds:s?a:[t],isOpen:p,onClose:()=>{m(!1)}})]})]})},G$=window.React.useCallback,Y$=window.React.useMemo;let K$=!1;const Q$=e=>{var t;const{children:n,className:i,selectable:r=!0,element:o,isSidebar:a=!1,style:s,onClick:l,isPattern:c=!1,...d}=e,u=sy(),p=new URLSearchParams(u.search),m=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),f=Fx((e=>e.chooseElement)),g=Fx((e=>e.unchooseElement)),y=Fx((e=>e.deMultiSelect)),v=G$((e=>t=>{t.stopPropagation(),f(e)}),[f]),b=Y$((()=>o.id===m),[o.id,m]),[w,x]=qu.useNotification(),_=Y$((()=>{var e;return a?"":(null==(e=o.data)?void 0:e.custom_css_classes)??""}),[null==(t=o.data)?void 0:t.custom_css_classes]),C=Fx((e=>e.multiSelectedList)),S=Fx((e=>e.multiSelect)),k=Fx((e=>e.setMultiSelectedList)),E=Y$((()=>C.length>1&&C.map((e=>e.id)).includes(o.id)),[C,o.id]),$=G$((e=>{if(null==l||l(),e.shiftKey)return(()=>{var e,t,n,i;window.getSelection&&((null==(e=window.getSelection())?void 0:e.empty)?null==(t=window.getSelection())||t.empty():(null==(n=window.getSelection())?void 0:n.removeAllRanges)&&(null==(i=window.getSelection())||i.removeAllRanges()))})(),S(o),void g();"yes"!==window.yaymailData.show_multi_select_notice&&"test"!==p.get("mode")||K$||(K$?w.destroy():(w.info({message:__("New feature","yaymail"),description:Vt.jsx("span",{dangerouslySetInnerHTML:{__html:__("You can now select multiple elements by holding %s key while clicking on an element","yaymail").replace("%s","SHIFT")}}),duration:0}),async function(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_dismiss_multi_select_notice",nonce:window.yaymailData.admin_ajax.nonce}});if(!e.success)throw new Error("Call ajax failed");return e}catch(e){throw console.error(e),e}}(),window.yaymailData.show_multi_select_notice="no",K$=!0)),o.parentId?y():k([o]),r&&v(o)(e)}),[r,o]),M=Y$((()=>!a&&(b||C.length>1&&C[0].id===o.id)),[C,b,a]);N$((()=>{g(),y()}),(b||C.length>0)&&!a,{boundaryElementSelectors:[".yaymail-customizer-template-section","[class^=yaymail-email-customizer__header]",".yaymail-customizer-main"]});const R=Y$((()=>{if(C.length<=1||b||a)return{};const e={},t=C.findIndex((e=>e.id===o.id));return 0===t&&(e.marginTop="20px",e.borderTop="2px solid #000000"),-1!==t&&(e.borderRight="2px solid #000000",e.borderLeft="2px solid #000000"),t===C.length-1&&(e.marginBottom="20px",e.borderBottom="2px solid #000000"),e}),[C,b,a,o.id]),A=window.yaymailData.yaymailHooks.applyFilters("yaymail-element-wrapper-styles",R,e,b,E),T=Y$((()=>h("yaymail-customizer-element","yaymail-element",b&&"yaymail-chosen-element",E&&"yaymail-multi-selected",i,_)),[b,E,i,_]),L=window.yaymailData.yaymailHooks.applyFilters("yaymail-element-wrapper-class",T,e,b,E),j=Y$((()=>{var e;return b?{display:!0,reference:"element"}:{display:(null==(e=C[0])?void 0:e.id)===o.id,reference:"group"}}),[b,C,o.id]);return Vt.jsxs("div",{"data-yaymail-element-id":o.id,"data-yaymail-element-type":o.type,"data-yaymail-element-is-pattern":c,className:L,onClick:$,style:A,...d,children:[x,j.display&&Vt.jsx(T$,{reference:j.reference}),a?Vt.jsx("div",{className:"yaymail-chosen-element__handle-drag",children:n}):Vt.jsx("table",{className:h("yaymail-element__content"),style:s,cellPadding:0,cellSpacing:0,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{children:n})})})}),M&&Vt.jsx(V$,{element:o})]})},q$=window.React.useId,Z$=e=>{const{onChange:t,className:n,style:i,label:r,...o}=e,a=q$();return Vt.jsxs(Ct,{direction:"vertical",className:h("yaymail-number-input",n),style:i,children:[r&&Vt.jsx("label",{htmlFor:a,className:"yaymail-number-input-label",children:r}),Vt.jsx(hc,{id:a,onChange:e=>{ix(e)&&(null==t||t(e))},...o})]})},X$=window.React.useCallback,J$=e=>{var t;const{title:n,children:i,options:r,defaultValue:o,onChange:a,value:s,onPopupScroll:l,onPopupScrollBottom:c,style:d,className:u,...p}=e||{},m=X$((e=>{if(l&&l(e),!c)return;const t=e.target;t.scrollTop+t.offsetHeight===t.scrollHeight&&c()}),[c,l]);return Vt.jsxs("div",{className:h("yaymail-editor-property","yaymail-editor-selector",u),children:[""!==n&&Vt.jsx("div",{className:"yaymail-title",children:__(n??"Select")}),Vt.jsx(st,{style:{width:"100%",...d},options:iw(i)?void 0:r,value:s||o||(null==(t=null==r?void 0:r[0])?void 0:t.value),onChange:a,onPopupScroll:m,...p,children:i})]})},eM=e=>{var t;return Vt.jsx("div",{className:"yaymail-layout-grid-column",children:null==(t=null==e?void 0:e.itemList)?void 0:t.map(((e,t)=>{const n=e.Component,i=e.props;return Vt.jsx("div",{className:"yaymail-layout-grid-column__item",children:Vt.jsx(n,{...i})},t)}))})},tM=window.React.useCallback,nM=e=>{const t=e.attribute||"align",n=Fx((e=>{var n;return ex(null==(n=e.chosenElement)?void 0:n.data,t)})),i=Fx((e=>e.updateChosenElementData));if(!ix(n))return null;const r=tM((n=>{i((e=>{tx(e,t,n.target.value)}),{attribute:(null==e?void 0:e.title)??"Align"})}),[i,n,t]),{title:o}=e||{};return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-align",children:[Vt.jsx("div",{className:"yaymail-title",children:__(o??"Align")}),Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsxs(St.Group,{defaultValue:"left",size:"large",className:"yaymail-align-radio-group",value:n,onChange:r,children:[Vt.jsx(St.Button,{value:"left",className:"yaymail-align-radio-group-option",children:Vt.jsx(rh,{})}),Vt.jsx(St.Button,{value:"center",className:"yaymail-align-radio-group-option",children:Vt.jsx(eh,{})}),Vt.jsx(St.Button,{value:"right",className:"yaymail-align-radio-group-option",children:Vt.jsx(lh,{})})]})})]})},iM=window.React.memo,rM=(e,t)=>iM(e,t??rw),oM=rM((e=>Vt.jsxs("div",{className:h("yaymail-editor-property",e.className),children:[Vt.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Vt.jsx("div",{className:"yaymail-title",children:__(e.title)}),Vt.jsxs("div",{className:"yaymail-current-value",children:[e.value,e.displayUnit]})]}),Vt.jsx(sm,{railStyle:{background:"#383B3D"},trackStyle:{background:Xm.color.wcPurple.default},handleStyle:{border:"none"},style:{margin:"0 7px 0 0"},min:e.min,max:e.max,value:e.value,onChange:e.onChange,tooltip:{placement:"topRight"}})]}))),aM=window.React.useCallback,sM=window.React.useMemo,lM=rM((e=>{const t=sM((()=>(null==e?void 0:e.mediaType)??"image"),[null==e?void 0:e.mediaType]),{value:n,mediaUrlUpdateCallback:i}=e||{};if(!i)return null;const{mediaUploader:r}=Lw("yaymail-logo-element-uploader",i,!1,t),o=aM((()=>{r&&r.open()}),[r]),a=aM((e=>{iw(e.target.value)&&i(e.target.value)}),[i]),s=sM((()=>(null==e?void 0:e.title)??__("Image URL","yaymail")),[null==e?void 0:e.title]),l=sM((()=>(null==e?void 0:e.buttonTitle)??"Change image"),[null==e?void 0:e.buttonTitle]),c=sM((()=>(null==e?void 0:e.hidePreviewOnEmptyUrl)?Boolean(n&&((null==e?void 0:e.showPreview)??!0)):(null==e?void 0:e.showPreview)??!0),[null==e?void 0:e.showPreview,n,null==e?void 0:e.hidePreviewOnEmptyUrl]),d=sM((()=>null==e?void 0:e.showDeleteButton),[null==e?void 0:e.showDeleteButton]),u=sM((()=>!n),[n]),p=aM(((e,t)=>{e.stopPropagation(),t||i("")}),[i]);return Vt.jsxs("div",{className:h("yaymail-editor-property","yaymail-editor-property-image",null==e?void 0:e.className),children:[Vt.jsx("div",{className:"yaymail-title",children:__(s)}),Vt.jsxs(Ct,{direction:"vertical",size:12,style:{width:"100%"},children:[Vt.jsx(at,{className:"yaymail-custom-input",placeholder:null==e?void 0:e.urlInputPlaceHolder,value:n,onChange:a}),Vt.jsxs(Pe,{className:"yaymail-change-image-btn",onClick:o,children:[__(l),d&&Vt.jsx(Fh,{className:h("yaymail-btn-delete",u&&"yaymail-disabled"),onClick:e=>p(e,u),disabled:u})]}),c&&Vt.jsx(Su,{className:"yaymail-preview-image",fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",src:n??"",preview:!1,width:"100%"})]})]})})),cM=window.React.useCallback,dM=window.React.useMemo,{Option:uM}=st,hM=e=>Vt.jsx(Vt.Fragment,{children:e.map((e=>Vt.jsx(uM,{value:e,label:e,children:Vt.jsx("span",{style:{textTransform:"capitalize"},children:ow(e)})},e)))}),pM=["default","center_center","center_left","center_right","top_center","top_left","top_right","bottom_center","bottom_left","bottom_right","custom"],mM=["default","auto","cover","contain","custom"],fM=hM(pM),gM=hM(["default","no-repeat","repeat","repeat-x","repeat-y"]),yM=hM(mM),vM=e=>{const t=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,"background_image")})),n=Fx((e=>e.updateChosenElementData)),i=dM((()=>null==t?void 0:t.url),[null==t?void 0:t.url]),r=cM((e=>{n((t=>{tx(t,"background_image.url",e)}),{attribute:__("Background Image URL","yaymail")})}),[n]),o=dM((()=>null==t?void 0:t.position),[null==t?void 0:t.position]),a=cM((e=>{n((t=>{tx(t,"background_image.position",e)}),{attribute:__("Background Image Position","yaymail")})}),[n]),s=dM((()=>"custom"===o),[o]),l=dM((()=>(null==t?void 0:t.x_position)??0),[null==t?void 0:t.x_position]),c=cM((e=>{n((t=>{tx(t,"background_image.x_position",e)}),{attribute:__("Background Image Position X","yaymail")})}),[n]),d=dM((()=>(null==t?void 0:t.y_position)??0),[null==t?void 0:t.y_position]),u=cM((e=>{n((t=>{tx(t,"background_image.y_position",e)}),{attribute:__("Background Image Position Y","yaymail")})}),[n]),h=dM((()=>null==t?void 0:t.repeat),[null==t?void 0:t.repeat]),p=cM((e=>{n((t=>{tx(t,"background_image.repeat",e)}),{attribute:__("Background Image Size","yaymail")})}),[n]),m=dM((()=>null==t?void 0:t.size),[null==t?void 0:t.size]),f=cM((e=>{n((t=>{tx(t,"background_image.size",e)}),{attribute:__("Background Image Position Repeat","yaymail")})}),[n]),g=dM((()=>"custom"===m),[m]),y=dM((()=>(null==t?void 0:t.custom_size)??100),[null==t?void 0:t.custom_size]),v=cM((e=>{n((t=>{tx(t,"background_image.custom_size",e)}),{attribute:__("Background Image Custom Size","yaymail")})}),[n]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(lM,{value:i??"",mediaUrlUpdateCallback:r,...e}),Boolean(i)&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(J$,{title:__("Background position","yaymail"),value:o,onChange:a,defaultValue:pM[0],children:fM}),s&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(oM,{className:"yaymail-background-custom-position",title:__("X Position","yaymail"),value:l,displayUnit:"%",min:-100,max:100,onChange:c}),Vt.jsx(oM,{className:"yaymail-background-custom-position",title:__("Y Position","yaymail"),value:d,displayUnit:"%",min:-100,max:100,onChange:u})]}),Vt.jsx(J$,{title:__("Background repeat","yaymail"),value:h,onChange:p,defaultValue:pM[0],children:gM}),Vt.jsx(J$,{title:__("Background size","yaymail"),value:m,onChange:f,defaultValue:mM[0],children:yM}),g&&Vt.jsx(oM,{className:"yaymail-background-custom-slider",title:__("Width","yaymail"),value:y,displayUnit:"%",min:0,max:100,onChange:v})]})]})},bM=(e,t)=>{if(null!=t)return t.split(".").reduce(((e,t)=>null==e?void 0:e[t]),e)},wM=(e,t,n)=>{if(null==t)return;const i=t.split(".");i.reduce(((e,t,r)=>r===i.length-1?(e[t]=n,e):(void 0!==e[t]&&null!==e[t]||(e[t]={}),e[t])),e)},xM=window.React.useCallback,_M=window.React.useMemo,CM=e=>{const{attribute:t,options:n,defaultValue:i,numberOfColumns:r}=e||{},o=_M((()=>t??"items"),[t]),a=Fx((e=>{var t;return(null==(t=e.chosenElement)?void 0:t.data).showing_items})),s=Fx((e=>e.updateChosenElementData));if(!iw(a))return null;const{title:l}=e||{},c=_M((()=>Math.floor(24/(r||1))),[r]),d=xM(((e,t)=>"string"==typeof e||"number"==typeof e?e:e[t]),[]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-checkbox-group",children:[Vt.jsx("div",{className:"yaymail-title",children:__(l??"Items")}),Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsx(kt.Group,{defaultValue:i,onChange:(null==e?void 0:e.onChange)??(t=>{const n=t.map((e=>"string"==typeof e?e:e.toString()));s((e=>{wM(e,o,n)}),{attribute:(null==e?void 0:e.title)??__("Items","yaymail")})}),value:a,children:Vt.jsx(Le,{children:null==n?void 0:n.map(((e,t)=>Vt.jsx(je,{span:c,children:Vt.jsx(kt,{value:d(e,"value"),style:{color:Xm.color.white},children:d(e,"label")})},t)))})})})]})},SM=window.React.useMemo,kM=e=>{const{defaultValue:t,buttonLabel:n,value:i,title:r,onChange:o,...a}=e,s=SM((()=>{let e=i??t??Xm.color.wcPurple.default;return"string"==typeof e?e:(null==e?void 0:e.default_value)??""}),[i,t]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-custom-color-picker",children:[r&&Vt.jsx("div",{className:"yaymail-title",children:r}),Vt.jsx(yd,{defaultValue:s,value:s,onChange:o,...a,children:Vt.jsxs("span",{className:h("yaymail-custom-color-picker-button",{disabled:a.disabled}),children:[Vt.jsx("span",{className:"yaymail-custom-color-picker__sample",style:{backgroundColor:s}}),Vt.jsx("span",{className:"yaymail-custom-color-picker__label",children:n??"Select Color"})]})})]})},EM=window.React.useCallback,$M=window.React.useMemo,MM=e=>{const t=$M((()=>(null==e?void 0:e.attribute)??"background_color"),[null==e?void 0:e.attribute]),n=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t)})),i=Fx((e=>e.updateChosenElementData)),r=EM(Kw(((n,r)=>{i((e=>{wM(e,t,r)}),{attribute:(null==e?void 0:e.title)??"Color"})}),0),[i,n,t]),o=$M((()=>n??"#F0F0F1"),[n]),{...a}=e||{};return Vt.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-color",children:Vt.jsx(kM,{value:o,onChange:r,...a})})},RM=window.React.useCallback,AM=window.React.useMemo,TM=Xm.customizer.percentColumnMinWidth,LM=e=>{const{title:t,amount:n}=e||{};if(1===n)return null;const i=Fx((e=>{var t,n;return null==(n=null==(t=e.chosenElement)?void 0:t.children)?void 0:n.map((e=>e.data.width))}))??[],r=Fx((e=>e.updateChosenElementChildren)),o=RM((e=>`${__("Column","yaymail")} ${e+1}`),[]),a=RM(((e,t)=>{r((n=>{if(!n)return;const i=((e,t)=>{const n=e.length;return n<=1?[]:0===t?[t+1]:t===n-1?[t-1]:[t-1,t+1]})(n,t),r=n.reduce(((e,n,r)=>[...i,t].includes(r)?e+(n.data.width??0):e),0);if(0===i.length)return;const o=r-i.length*TM;if(o({index:e,width:n[e].data.width-s})));2===l.length&&l.forEach((e=>{if(e.widtht.index!==e.index));n&&(n.width-=t)}})),l.every((e=>e.width{n[e.index].data.width=e.width})),n[t].data.width=a)}),{attribute:__("Width","yaymail")})}),[r]),s=AM((()=>100-(((null==e?void 0:e.amount)||1)-1)*TM),[null==e?void 0:e.amount]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-column-width",children:[Vt.jsx("div",{className:"yaymail-title",children:t}),Vt.jsx(Ct,{className:"yaymail-controls-container",children:i.map(((e,t)=>Vt.jsx(Z$,{label:o(t),value:e,onChange:e=>a(e,t),max:s},t)))})]})},jM=window.React.useCallback,OM=window.React.useState,{Option:NM}=st,IM=({store:e})=>{const t=e((e=>e.selectedColumn)),[n,i]=OM(!1),r=jM((()=>{i(!1)}),[]),o=jM((()=>{i(!0)}),[]);return Vt.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-copy-column",children:Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsxs("div",{className:"yaymail-title",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[Vt.jsxs("span",{children:[__("Selecting column:","yaymail")," ",`${t}`]}),Vt.jsx(Pe,{type:"primary",onClick:o,children:__("Copy content","yaymail")}),Vt.jsx(DM,{currentColumn:t,isModalOpen:n,onClose:r})]})})})},DM=e=>{const t=Fx((e=>e.updateChosenElementData)),n=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,"image_list.column_1")})),i=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,"image_list.column_2")})),r=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,"image_list.column_3")})),[o,a]=OM("copy_to"),[s,l]=OM("1"!=e.currentColumn?"1":"2");return Vt.jsx(Fu,{title:__("You are selecting column","yaymail")+` ${e.currentColumn}`,open:e.isModalOpen,onCancel:e.onClose,footer:null,centered:!0,destroyOnClose:!0,wrapClassName:"yaymail-copy-column-modal",children:Vt.jsx("table",{children:Vt.jsx("tbody",{children:Vt.jsxs("tr",{children:[Vt.jsx("td",{children:Vt.jsx(Pe,{type:"primary",onClick:()=>{const a="1"==e.currentColumn?n:"2"==e.currentColumn?i:r,l="1"==s?n:"2"==s?i:r;t("copy_to"==o?e=>{wM(e,"image_list.column_"+s,a)}:t=>{wM(t,"image_list.column_"+e.currentColumn,l)},{attribute:__("Copy column","yaymail")})},children:__("Copy content","yaymail")})}),Vt.jsx("td",{children:Vt.jsxs(st,{style:{width:"120px"},className:"yaymail-global__select",defaultValue:o,onChange:e=>{a(e)},popupMatchSelectWidth:!1,children:[Vt.jsx(NM,{value:"copy_to",children:Vt.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("To","yaymail")})}),Vt.jsx(NM,{value:"copy_from",children:Vt.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("From","yaymail")})})]})}),Vt.jsx("td",{children:Vt.jsxs(st,{style:{width:"170px"},className:"yaymail-global__select",defaultValue:s,onChange:e=>{l(e)},popupMatchSelectWidth:!1,children:[Vt.jsx(NM,{value:"1",children:Vt.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 1","yaymail")})}),Vt.jsx(NM,{value:"2",children:Vt.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 2","yaymail")})}),Vt.jsx(NM,{value:"3",children:Vt.jsx("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:__("Column 3","yaymail")})})]})})]})})})})},PM=window.React.useCallback,zM=window.React.useMemo,FM=e=>{const{attribute:t,unit:n}=e||{},i=t||"width",r=zM((()=>(null==e?void 0:e.min)??0),[null==e?void 0:e.min]),o=zM((()=>(null==e?void 0:e.max)??605),[null==e?void 0:e.max]),a=zM((()=>(null==e?void 0:e.default)??172),[null==e?void 0:e.default]),s=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,i)})),l=Fx((e=>e.updateChosenElementData)),c=zM((()=>function(e){if(!ix(e))return 0;if("number"==typeof e)return e;const t=parseFloat(e);return isNaN(t)?0:t}(s??a)),[s,a]),d=zM((()=>(null==e?void 0:e.title)??__("Dimension","yaymail")),[]),u=PM(Kw((e=>{"number"==typeof e&&l((t=>{tx(t,i,e)}),{attribute:d})}),0),[l,i]),h=zM((()=>n??"px"),[n]);return Vt.jsx(oM,{className:"yaymail-editor-property-width",title:d,value:c,displayUnit:h,min:r,max:o,onChange:u})},BM=window.React.useCallback,HM=window.React.useMemo,WM=e=>{const{attribute:t,initialValue:n,title:i,onChange:r,value:o,validationMessage:a}=e||{},s=HM((()=>t??"text"),[t]),l=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,s)})),c=Fx((e=>e.updateChosenElementData)),d=BM((e=>{c((t=>{wM(t,s,e.target.value)}),{attribute:i})}),[c,s,i]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-text",children:[Vt.jsx("div",{className:"yaymail-title",children:__(i??"Text")}),Vt.jsx(at.TextArea,{className:"yaymail-custom-input",placeholder:null==e?void 0:e.placeholder,value:o??l??n,onChange:r??d,rows:null==e?void 0:e.rows,autoSize:!(null==e?void 0:e.multiple)&&{minRows:1,maxRows:10}}),Boolean(a)&&Vt.jsx("p",{className:"yaymail-custom-input-validation-message",children:a})]})},UM=window.React.useCallback,VM=window.React.useMemo,GM=window.React.useState,{Option:YM}=st,KM=["woocommerce_email_before_order_table","woocommerce_email_after_order_table","yaydp_on_sale_products"],QM=JM("your_hook"),qM=(ZM=KM,Vt.jsxs(Vt.Fragment,{children:[ZM.map((e=>Vt.jsx(YM,{value:JM(e),label:e,children:Vt.jsx("span",{children:e})},e))),Vt.jsx(YM,{value:QM,children:Vt.jsx("span",{children:__("Custom","yaymail")})},"custom")]}));var ZM;const XM=()=>{const e=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,"hook_shortcode")})),t=Fx((e=>e.updateChosenElementData)),n=UM((e=>{t((t=>{wM(t,"hook_shortcode",e)}),{attribute:__("Custom Hook","yaymail")})}),[t]),i=VM((()=>KM.some((t=>null==e?void 0:e.includes(t)))?e:QM),[e]),[r,o]=GM(i===QM),a=UM((e=>{o(e===QM),n(e)}),[o,n]),[s,l]=GM(null),c=UM((e=>{e.target.value&&(/^\[yaymail_custom_hook(?=.*\bhook=".+").*]$/.test(e.target.value)?l(null):l("Valid shortcode should look like: "+QM),n(e.target.value))}),[n,l]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(J$,{title:__("Hook","yaymail"),value:i,onChange:a,children:qM}),r&&Vt.jsx(WM,{title:__("Custom Hook","yaymail"),value:e,onChange:c,validationMessage:s})]})};function JM(e){return e?(e.startsWith('[yaymail_custom_hook hook="')||(e=`[yaymail_custom_hook hook="${e}"`),e.includes("yaydp_on_sale_products")&&(e+=' limit="6" ',e+=' sale_price_color="#ec4770" ',e+=' regular_price_color="#808080" ',e+=' product_name_color="#636363" ',e+=' button_background_color="#ec4770" ',e+=' button_text_color="#ffffff" '),e.endsWith("]")||(e+="]"),e):""}const eR=window.React.useCallback,tR=window.React.useMemo,nR=e=>{const{attribute:t,...n}=e||{},i=t??"src",r=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,i)})),o=Fx((e=>e.updateChosenElementData)),a=eR((t=>{o((e=>{tx(e,i,t)}),{attribute:(null==e?void 0:e.title)??__("Image src","yaymail")})}),[o,i]),s=tR((()=>(null==e?void 0:e.mediaType)??"image"),[null==e?void 0:e.mediaType]),l=tR((()=>(null==e?void 0:e.buttonTitle)??__("Choose","yaymail")),[null==e?void 0:e.buttonTitle]),c=tR((()=>!ix(null==e?void 0:e.showPreview)||(null==e?void 0:e.showPreview)),[null==e?void 0:e.showPreview]);return Vt.jsx(lM,{value:r,mediaUrlUpdateCallback:a,mediaType:s,buttonTitle:l,showPreview:c,...n})},iR=window.React.useCallback,rR=window.React.useEffect,oR=e=>{const{attribute:t,title:n,min:i,max:r,onChange:o,style:a,extras_data:s}=e??{};if(!t)return null;const l=Fx((e=>{var n;return ex(null==(n=e.chosenElement)?void 0:n.data,t)})),c=Fx((e=>e.chosenElement)),d=Fx((e=>e.updateChosenElementData)),u=iR(((e,t)=>ex(t,e)),[]);rR((()=>{const e=null==s?void 0:s.max_dependency;if(e&&(null==c?void 0:c.data)){const i=u(e,c.data);Number(l)>i&&d((e=>{tx(e,t,i)}),{attribute:n})}}),[l,t,null==c?void 0:c.data,null==s?void 0:s.max_dependency,u,d,n]);const h=iR((()=>{const e=null==s?void 0:s.max_dependency;if(e&&(null==c?void 0:c.data)){const t=u(e,c.data);if(void 0!==t)return t}return r??10}),[null==s?void 0:s.max_dependency,null==c?void 0:c.data,u,r]),p=iR((e=>{d((n=>{tx(n,t,e)}),{attribute:n})}),[d,n]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-number-input",children:[Vt.jsx("div",{className:"yaymail-title",children:__(n??"Number Input")}),Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsx(Z$,{style:a??{width:"100%"},value:l??0,onChange:p??o,min:i??0,max:h()})})]})},aR=window.React.useCallback,sR=window.React.useMemo,lR=e=>{var t;const n=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),i=null==(t=void 0===(null==e?void 0:e.editorId)?n:e.editorId)?void 0:t.toString(),r=(null==e?void 0:e.attribute)??"rich_text",o=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,r)})),a=Fx((e=>e.updateChosenElementData)),s=sR((()=>(null==e?void 0:e.title)??__("Content","yaymail")),[]),l=aR((t=>{a((e=>{tx(e,r,t)}),{attribute:(null==e?void 0:e.title)??__("Content","yaymail")})}),[a,r]);return Vt.jsx(jx,{id:i,value:o,onChange:l,title:s})},cR=window.React.useCallback,dR=e=>{const t=e.attribute||"number_column",n=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t)})),i=Fx((e=>e.updateChosenElementData)),r=cR((n=>{i((e=>{wM(e,t,n.target.value)}),{attribute:e.title??__("Select number column","yaymail")})}),[i,t]),{title:o}=e||{};return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-select-number",children:[Vt.jsx("div",{className:"yaymail-title",children:__(o??"Select number column")}),Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsxs(St.Group,{defaultValue:"two",size:"large",className:"yaymail-select-number-radio-group",value:+n,onChange:r,children:[Vt.jsx(St.Button,{value:1,className:"yaymail-select-number-radio-group-option",children:Vt.jsx("span",{children:"1"})}),Vt.jsx(St.Button,{value:2,className:"yaymail-select-number-radio-group-option",children:Vt.jsx("span",{children:"2"})}),Vt.jsx(St.Button,{value:3,className:"yaymail-select-number-radio-group-option",children:Vt.jsx("span",{children:"3"})})]})})]})},uR=window.React.useCallback,hR=e=>{const{attribute:t,...n}=e||{};if(!t)return null;const i=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t??"")})),r=Fx((e=>e.updateChosenElementData)),o=uR((n=>{(null==e?void 0:e.onChange)?e.onChange(n):r((e=>{wM(e,t,n)}),{attribute:null==e?void 0:e.title})}),[r,t]);return Vt.jsx(J$,{onChange:o,value:i,...n})},pR=window.React.useCallback,mR=window.React.useMemo,fR=[{key:"top",label:"Top"},{key:"bottom",label:"Bottom"},{key:"left",label:"Left"},{key:"right",label:"Right"}],gR=[{key:"top_left",label:"Top Left"},{key:"top_right",label:"Top Right"},{key:"bottom_left",label:"Bottom left"},{key:"bottom_right",label:"Bottom right"}],yR=e=>{const{title:t,attribute:n,extras_data:i}=e||{},r=n??"padding",o=Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,r)})),a=Fx((e=>e.updateChosenElementData)),s=mR((()=>t??__("Spacing","yaymail")),[t]),l=pR((e=>t=>{const n={...o};n[e]=t,a((e=>{wM(e,r,n)}),{attribute:s})}),[a,o]),c=mR((()=>(null==i?void 0:i.is_border_radius)?gR:fR),[null==i?void 0:i.is_border_radius]),d=mR((()=>(null==i?void 0:i.class_name)??""),[null==i?void 0:i.class_name]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-padding",children:[Vt.jsx("div",{className:"yaymail-title",children:__(s)}),Vt.jsx(Ct,{className:h("yaymail-controls-container ",d),children:null==c?void 0:c.map((({key:e,label:t})=>Vt.jsx(Z$,{max:300,label:t,value:(null==o?void 0:o[e])||0,onChange:l(e)},e)))})]})},vR=window.React.useEffect,bR=(e,t)=>{const n=new CustomEvent(e,{detail:t});document.dispatchEvent(n)},{Option:wR}=st,xR=Vt.jsx(Vt.Fragment,{children:window.yaymailData.builder.font_families.map((e=>Vt.jsx(wR,{value:e,label:e,children:Vt.jsx("span",{style:{fontFamily:e,fontWeight:400},children:e})},e)))}),_R=[{label:__("Default","yaymail"),value:"default",color:"#3498db"},{label:__("Info","yaymail"),value:"info",color:"#5bc0de"},{label:__("Success","yaymail"),value:"success",color:"#5cb85c"},{label:__("Warning","yaymail"),value:"warning",color:"#f0ad4e"},{label:__("Danger","yaymail"),value:"danger",color:"#d9534f"}],CR=[{label:__("Inherit","yaymail"),value:"inherit"},{label:__("Normal","yaymail"),value:"normal"},{label:__("Bold","yaymail"),value:"bold"},{label:__("Bolder","yaymail"),value:"bolder"},{label:__("Lighter","yaymail"),value:"lighter"},{label:"100",value:"100"},{label:"200",value:"200"},{label:"300",value:"300"},{label:"400",value:"400"},{label:"500",value:"500"},{label:"600",value:"600"},{label:"700",value:"700"},{label:"800",value:"800"},{label:"900",value:"900"}],SR=[{label:__("Default","yaymail"),value:"default",size:26},{label:__("Small","yaymail"),value:"small",size:15},{label:__("Medium","yaymail"),value:"medium",size:19},{label:__("Large","yaymail"),value:"large",size:29},{label:__("XL","yaymail"),value:"xl",size:39},{label:__("XXL","yaymail"),value:"xxl",size:59}],kR=[{label:__("Solid","yaymail"),value:"solid"},{label:__("Double","yaymail"),value:"double"},{label:__("Dotted","yaymail"),value:"dotted"},{label:__("Dashed","yaymail"),value:"dashed"}],ER=null==(Nt=null==(Ot=window.yaymailData.builder.social_icons)?void 0:Ot.themes)?void 0:Nt.map((e=>{return{key:e,value:e,label:__((t=e,t.split(/(?=[A-Z])/).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" ")))};var t}));__("Solid","yaymail"),__("Dashed","yaymail"),__("Dotted","yaymail");const $R=window.React.useState,MR=()=>Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(yR,{attribute:"image_box.column_1.padding.value",title:__("Padding","yaymail")}),Vt.jsx(nM,{attribute:"image_box.column_1.align.value"}),Vt.jsx(nR,{attribute:"image_box.column_1.image.value"}),Vt.jsx(FM,{attribute:"image_box.column_1.width.value",title:__("Width","yaymail")}),Vt.jsx(WM,{attribute:"image_box.column_1.url.value",initialValue:"#",title:__("URL","yaymail")}),Vt.jsx(WM,{attribute:"image_box.column_1.alt.value",title:__("ALT text","yaymail"),initialValue:""})]}),RR=()=>Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(yR,{attribute:"image_box.column_2.padding.value"}),Vt.jsx(hR,{attribute:"image_box.column_2.font_family.value",title:__("Font family","yaymail"),children:xR}),Vt.jsx(lR,{attribute:"image_box.column_2.rich_text.value",editorId:"yaymail-image-box-text-editor"})]}),AR=()=>{const[e,t]=$R("column_1");return vR((()=>(((e,t)=>{document.addEventListener(e,t)})(n,i),()=>{((e,t)=>{document.removeEventListener(e,t)})(n,i)})),[n="onYayMailImageBoxColumnSelected",i=e=>{t(e.detail)}]),Vt.jsxs(Vt.Fragment,{children:["column_1"===e&&Vt.jsx(MR,{}),"column_2"===e&&Vt.jsx(RR,{})]});var n,i},TR=qb()(Ub(Hb(Vb((e=>({selectedColumn:null,selectedElement:null,selectColumn:t=>{e((e=>{e.selectedColumn=t}))}}))))),Gb),LR=()=>{const e=TR((e=>e.selectedColumn));return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(IM,{title:__("Copy column","yaymail"),store:TR}),Vt.jsxs("div",{style:{display:1==e?"block":"none"},children:[Vt.jsx(yR,{attribute:"image_list.column_1.padding.value",title:__("Padding","yaymail")}),Vt.jsx(nM,{attribute:"image_list.column_1.align.value"}),Vt.jsx(nR,{attribute:"image_list.column_1.image.value"}),Vt.jsx(FM,{attribute:"image_list.column_1.width.value",min:0,max:140,title:__("Width","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_1.url.value",initialValue:"#",title:__("URL","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_1.alt.value",title:__("ALT text","yaymail"),initialValue:""})]}),Vt.jsxs("div",{style:{display:2==e?"block":"none"},children:[Vt.jsx(yR,{attribute:"image_list.column_2.padding.value",title:__("Padding","yaymail")}),Vt.jsx(nM,{attribute:"image_list.column_2.align.value"}),Vt.jsx(nR,{attribute:"image_list.column_2.image.value"}),Vt.jsx(FM,{attribute:"image_list.column_2.width.value",min:0,max:140,title:__("Width","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_2.url.value",initialValue:"#",title:__("URL","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_2.alt.value",title:__("ALT text","yaymail"),initialValue:""})]}),Vt.jsxs("div",{style:{display:3==e?"block":"none"},children:[Vt.jsx(yR,{attribute:"image_list.column_3.padding.value",title:__("Padding","yaymail")}),Vt.jsx(nM,{attribute:"image_list.column_3.align.value"}),Vt.jsx(nR,{attribute:"image_list.column_3.image.value"}),Vt.jsx(FM,{attribute:"image_list.column_3.width.value",min:0,max:140,title:__("Width","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_3.url.value",initialValue:"#",title:__("URL","yaymail")}),Vt.jsx(WM,{attribute:"image_list.column_3.alt.value",title:__("ALT text","yaymail"),initialValue:""})]})]})},jR=window.React.useCallback,OR=window.React.useMemo,NR=window.React.useState,IR=(window.yaymailData.builder.social_icons.images??[]).map((e=>{var t;return{name:e.name,src:null==(t=e.data.find((e=>"Colorful"===e.theme)))?void 0:t.src}})),DR=e=>{const{title:t}=e||{},n=OR((()=>__(t??"Sortable List")),[]),i=Fx((e=>e.updateChosenElementData)),r=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,"icon_list")})),o=jR((()=>{i((e=>{const t=IR.filter((t=>(e.icon_list??[]).every((e=>e.icon!==t.name))));tx(e,"icon_list",[...r??[],{url:"#",icon:(t[0]??IR[0]).name??""}])}),{attribute:__("Add social item","yaymail")})}),[r,i]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-social-list",children:[Vt.jsx("div",{className:"yaymail-title",children:n}),Vt.jsx(PR,{}),Vt.jsxs("div",{className:"yaymail-btn-add-social",onClick:o,children:["+ ",__("Add social","yaymail")]})]})};function PR(){const e=Fx((e=>{var t;return(ex(null==(t=e.chosenElement)?void 0:t.data,"icon_list")??[]).map((({icon:e,url:t},n)=>({id:n,icon:e,url:t})))})),t=Fx((e=>e.updateChosenElementData));return Vt.jsx($$.ReactSortable,{list:e,setList:e=>{const n=e.map((({icon:e,url:t})=>({icon:e,url:t})));t((e=>{tx(e,"icon_list",n)}),{attribute:__("Add item","yaymail")})},handle:".yaymail-social-item__handle",ghostClass:"yaymail-ghost-social-icons",group:{name:"yaymail-social-icons",pull:!1},children:e.map(((e,t)=>Vt.jsx(zR,{item:e,position:t},e.id)))})}function zR({item:e,position:t}){const[n,i]=NR(!1),r=Fx((e=>e.updateChosenElementData)),o=jR((e=>{e.stopPropagation(),r((e=>{tx(e,"icon_list",e.icon_list.filter(((e,n)=>n!=t)))}),{attribute:__("Delete item","yaymail")})}),[r,t]),a=jR((e=>{r((n=>{tx(n,"icon_list",n.icon_list.map(((n,i)=>i==t?{...n,icon:e}:n)))}),{attribute:__("Change icon","yaymail")})}),[r,t]),s=jR((e=>{r((n=>{tx(n,"icon_list",n.icon_list.map(((n,i)=>i==t?{...n,url:e.target.value}:n)))}),{attribute:__("Change url","yaymail")})}),[r,t]);return Vt.jsxs("div",{className:"yaymail-social-item"+(n?" editing":""),children:[Vt.jsxs("div",{className:"yaymail-social-item__header",onClick:()=>i((e=>!e)),children:[Vt.jsx("span",{className:"yaymail-social-item__handle",children:Vt.jsx(Et,{style:{fontSize:14}})}),Vt.jsx("span",{className:"yaymail-social-item__label yaymail-capitalized",children:e.icon}),Vt.jsx("span",{className:"yaymail-social-item__btn-delete",onClick:o,children:Vt.jsx(Fh,{})})]}),n&&Vt.jsxs("div",{className:"yaymail-social-item__edit-section",children:[Vt.jsx(st,{style:{width:"100%"},value:e.icon,onChange:a,children:IR.map((({name:e,src:t})=>Vt.jsx(st.Option,{value:e,label:e,children:Vt.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[Vt.jsx("img",{src:t,alt:e,height:12}),Vt.jsx("span",{style:{textTransform:"capitalize",marginLeft:10},children:e})]})},e)))}),Vt.jsx(at,{className:"yaymail-custom-input",value:e.url,onChange:s})]})]},e.id)}const FR=qb()(Ub(Hb(Vb((e=>({selectedColumn:null,selectedElement:null,selectColumn:t=>{e((e=>{e.selectedColumn=t}))},selectElement:t=>{e((e=>{e.selectedElement=t}))}}))))),Gb),BR=window.React.useCallback,HR=[1,2,3],WR=()=>{const e=Number(Fx((e=>{var t;return bM(null==(t=e.chosenElement)?void 0:t.data,"number_column")}))),t=BR((e=>`text_list.column_${e}.show_button`),[]),n=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t(1))})),i=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t(2))})),r=Fx((e=>{var n;return bM(null==(n=e.chosenElement)?void 0:n.data,t(3))})),o=Fx((e=>e.updateChosenElementData)),a=BR((e=>{const n=t(e);o((e=>{const t=bM(e,n);wM(e,n,!t)}),{attribute:__("Show/Hide button","yaymail")})}),[o]),s=BR((e=>({1:Boolean(n),2:Boolean(i),3:Boolean(r)}[e])),[n,i,r]),l=BR((t=>{let n=["yaymail-select-button-option"];return(e??1)>=t&&n.push("yaymail-select-button-option-show"),s(t)&&n.push("yaymail-select-button-option-active"),n.join(" ")}),[e,s]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-select-button",children:[Vt.jsx("div",{className:"yaymail-title",children:__("Show button in column:","yaymail")}),Vt.jsx("div",{className:"yaymail-controls-container",children:Vt.jsx("div",{className:"yaymail-select-button-wrapper",children:HR.map((e=>Vt.jsx("div",{className:l(e),onClick:()=>a(e),children:Vt.jsx("span",{children:e})},e)))})})]})},UR=window.React.useCallback,VR=[1,2,3],GR=()=>{const e=FR((e=>e.selectedColumn))??0;return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(WR,{}),Vt.jsx(IM,{title:__("Copy column","yaymail"),store:FR}),VR.includes(e)&&Vt.jsx(YR,{columnNumber:e})]})};function YR({columnNumber:e}){const t=FR((e=>e.selectedElement)),n=Fx((e=>e.updateChosenElementData)),i=UR((t=>`text_list.column_${e}.${t}.value`),[e]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{style:{display:1==t?"block":"none"},children:[Vt.jsx(yR,{attribute:i("padding"),title:__("Padding","yaymail")}),Vt.jsx(hR,{attribute:i("font_family"),title:__("Font family","yaymail"),children:xR}),Vt.jsx(lR,{attribute:i("rich_text"),editorId:`text-list-element-editor-column-${e}`})]}),Vt.jsxs("div",{style:{display:2==t?"block":"none"},children:[Vt.jsx(hR,{attribute:i("button_type"),options:_R,defaultValue:_R[0]??"default",title:__("Type","yaymail"),onChange:e=>{var t;const r=(null==(t=_R.find((t=>t.value===e)))?void 0:t.color)??"";n((t=>{wM(t,i("button_type"),e)}),{attribute:__("Button Type","yaymail")}),n((e=>{wM(e,i("background_color"),r)}),{})}}),Vt.jsx(nM,{attribute:i("button_align")}),Vt.jsx(yR,{attribute:i("button_padding"),title:__("Padding","yaymail")}),Vt.jsx(yR,{attribute:i("button_border_radius"),title:__("Border radius","yaymail"),extras_data:{is_border_radius:!0,class_name:"yaymail-border-radius"}}),Vt.jsx(WM,{attribute:i("button_text"),title:__("Button text","yaymail"),initialValue:__("Click me","yaymail")}),Vt.jsx(WM,{attribute:i("button_url"),title:__("URL","yaymail"),initialValue:"#"}),Vt.jsx(eM,{itemList:[{Component:MM,props:{attribute:i("button_background_color")}},{Component:MM,props:{attribute:i("button_text_color")}}]}),Vt.jsx(FM,{attribute:i("button_font_size"),min:10,max:40,title:__("Font size","yaymail")}),Vt.jsx(FM,{attribute:i("button_height"),min:0,max:100,title:__("Height","yaymail")}),Vt.jsx(FM,{attribute:i("button_width"),min:0,max:100,unit:"%",title:__("Width","yaymail")}),Vt.jsx(hR,{attribute:i("button_weight"),options:CR,defaultValue:CR[0]??"normal",title:__("Weight","yaymail")}),Vt.jsx(hR,{attribute:i("button_font_family"),defaultValue:window.yaymailData.builder.font_families[0]??"",title:__("Font family","yaymail"),children:xR})]})]})}const KR=window.React.useCallback,QR=window.React.useMemo,qR=e=>{const{attribute:t,initialValue:n,title:i,layout:r}=e||{},o=QR((()=>t??"value"),[t]),a=Fx((e=>{var t;return ex(null==(t=e.chosenElement)?void 0:t.data,o)})),s=Fx((e=>e.updateChosenElementData)),l=KR((e=>{s((t=>{tx(t,o,e)}),{attribute:i??""})}),[s,o,i]);return Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-switcher","data-layout":r??"inline",children:[Vt.jsx("div",{className:"yaymail-title",children:__(i??"Text")}),Vt.jsx(wm,{checked:a??n,onChange:l})]})},ZR=()=>Vt.jsx("div",{className:"yaymail-editor-property yaymail-editor-property-line-breaker",children:Vt.jsx(Cl,{style:{borderColor:"var(--yaymail-sidebar-color-grey-light)",margin:0}})}),XR=e=>Vt.jsxs("div",{className:"yaymail-editor-property yaymail-editor-property-group-definition",children:[e.title&&Vt.jsx("div",{dangerouslySetInnerHTML:{__html:e.title},className:"yaymail-editor-property-group-definition__title"}),e.description&&Vt.jsx("div",{dangerouslySetInnerHTML:{__html:e.description},className:"yaymail-editor-property-group-definition__description"})]}),JR=Object.freeze(Object.defineProperty({__proto__:null,Align:nM,BackgroundImage:vM,CheckboxGroup:CM,Color:MM,ColumnWidth:LM,CopyColumn:IM,Dimension:FM,GridLayout:eM,GroupDefinition:XR,HookSelector:XM,Image:nR,ImageBox:AR,ImageList:LR,LineBreaker:ZR,NumberColumn:dR,NumberInput:oR,NumberInputBase:Z$,RichTextEditor:lR,Selector:hR,SelectorBase:J$,SocialList:DR,Spacing:yR,Switcher:qR,TextInput:WM,TextList:GR},Symbol.toStringTag,{value:"Module"})),eA=window.React.useCallback,tA=/\[yaymail_[^\]]*\]/,nA=/\[(yaymail_[_\w:]+)[\s\]]/,iA=/([^= ]+)=("[^"]*")/g;function rA(e){const t=e.match(nA);return t&&t[1]||null}function oA(e){const t=e.match(iA);return null==t?{}:t.filter(aA).map(sA).reduce(((e,t)=>({...e,...t})),{})}function aA(e){return!0}function sA(e){const t=e.match(/([^\s]*)="/),n=e.match(/"([^"]*)"/);return{[t&&t[1]||""]:n&&n[1]||""}}function lA(){const e=Xx((e=>e.shortcodes));return{doShortcode:eA((t=>{if(!t)return"";const n=t.match(new RegExp(tA,"g"));return null==n||n.forEach((n=>{const i=function(e){return{name:rA(e),attributes:oA(e)}}(n),r=(e??[]).find((e=>i.name===e.name));if(r){let e=r.content;const o=i.attributes;Array.isArray(o)||(e=nx(e,o)),t=t.replaceAll(n,e)}})),t}),[e])}}zb(!1);const cA=qb()(Ub(Hb(Vb(((e,t)=>({addonComponents:[],addonCustomPropertyEditors:[],registerElement:(t,n)=>{e((e=>{e.addonComponents.push({type:t,component:n})}))},registerAddonCustomPropertyEditor:(t,n)=>{e((e=>{e.addonCustomPropertyEditors.push({name:t,component:n})}))}}))))),Gb),dA=window.React.useMemo,uA=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=dA((()=>({paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),r=dA((()=>({color:t.text_color??Xm.color.black[700],padding:Sx(12)})),[t.text_color,Sx]),o=dA((()=>({color:t.title_color??Xm.color.black[700],margin:"0 0 7px 0",fontSize:Sx(20),fontWeight:600})),[t.title_color,Sx]),a=dA((()=>n(t.title??"")),[t.title,n]),s=dA((()=>n(t.rich_text??"")),[t.rich_text,n]);return Vt.jsxs(Q$,{className:"yaymail-customizer-element-billing-address",element:e,style:i,children:[Vt.jsx("div",{style:o,dangerouslySetInnerHTML:{__html:a}}),Vt.jsx("div",{style:{border:`1px solid ${t.border_color??"#e5e5e5"}`},children:s?Vt.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:s}}):Vt.jsx("div",{style:r,children:Vt.jsx("address",{children:__("No Billing address set.","yaymail")})})})]})})),hA=window.React.memo,pA=window.React.useMemo,mA=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=pA((()=>({paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),r=pA((()=>n(t.billing_title??"")),[t.billing_title,n]),o=pA((()=>n(t.shipping_title??"")),[t.shipping_title,n]),a=pA((()=>n(t.billing_address_content??"")),[t.billing_address_content,n]),s=pA((()=>n(t.shipping_address_content??"")),[t.shipping_address_content,n]),l=pA((()=>__("No Billing address set.","yaymail")),[]),c=pA((()=>__("No Billing address set.","yaymail")),[]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-billing-shipping-address",element:e,style:i,children:Vt.jsx("table",{className:"yaymail-table-billing-shipping-address",style:{borderSpacing:"5px"},children:Vt.jsx("tbody",{children:Vt.jsxs("tr",{children:[Vt.jsx(fA,{title:r,content:a,titleColor:t.title_color,textColor:t.text_color,borderColor:t.border_color,emptyContent:l,isBilling:!0}),Vt.jsx(fA,{title:o,content:s,titleColor:t.title_color,textColor:t.text_color,borderColor:t.border_color,emptyContent:c,isBilling:!1})]})})})})})),fA=hA((e=>{const t=pA((()=>({color:e.titleColor??Xm.color.black[700],padding:Jw(0),margin:"0 0 7px 0"})),[e.titleColor]),n=pA((()=>({borderWidth:1,borderStyle:"solid",borderColor:e.borderColor??"#e5e5e5",color:e.textColor??Xm.color.black[700],padding:Jw(12)})),[e.borderColor,e.textColor]);return Vt.jsx("td",{style:{width:"50%",verticalAlign:"top"},children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",width:"100%",style:{borderSpacing:0},children:Vt.jsxs("tbody",{children:[Vt.jsx("tr",{children:Vt.jsx("td",{children:Vt.jsx("div",{className:e.isBilling?"yaymail-billing-title":"yaymail-shipping-title",style:t,dangerouslySetInnerHTML:{__html:e.title??"Address"}})})}),Vt.jsx("tr",{children:Vt.jsx("td",{children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",width:"100%",style:{borderSpacing:0},children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{className:e.isBilling?"yaymail-billing-address-wrap":"yaymail-shipping-address-wrap",style:n,children:e.content?Vt.jsx("div",{dangerouslySetInnerHTML:{__html:e.content}}):Vt.jsx("div",{children:Vt.jsx("address",{children:e.emptyContent??"No Address set."})})})})})})})})]})})})})),gA=window.React.useMemo,yA=rM((({element:e})=>{const t=e.data,n=t.align,{doShortcode:i}=lA(),r=gA((()=>({textAlign:"center",backgroundColor:t.background_color||"transparent"})),[t.background_color]),o=gA((()=>({paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),width:Sx(t.width,"%"),margin:"center"===n?"0 auto":"auto",float:"left"===n||"right"===n?n:"unset"})),[e.data.padding,e.data.width,n]),a=gA((()=>({borderTopLeftRadius:Sx(t.border_radius.top_left),borderTopRightRadius:Sx(t.border_radius.top_right),borderBottomRightRadius:Sx(t.border_radius.bottom_right),borderBottomLeftRadius:Sx(t.border_radius.bottom_left),fontSize:Sx(t.font_size??13),fontWeight:t.weight||"inherit",backgroundColor:t.button_background_color||Xm.color.wcPurple.default,wordBreak:"break-word"})),[t.border_radius,t.font_size,t.weight,t.button_background_color]),s=gA((()=>({fontFamily:t.font_family??"initial",lineHeight:Sx(t.height??21),color:t.text_color||Xm.color.white})),[t.font_family,t.height,t.text_color]),l=gA((()=>i(t.text??"")),[t.text,i]),c=gA((()=>i(t.url??"")),[t.url,i]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-button",element:e,style:r,children:Vt.jsx("table",{style:o,align:n,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{style:{padding:0},children:Vt.jsx("a",{className:"yaymail-customizer-element-button__anchor",href:c,style:a,target:"_blank",rel:"noreferrer",children:Vt.jsx("span",{style:s,children:l})})})})})})})}));zb(!1);const vA=Xm.customizer.percentColumnMinWidth,bA=qb()(Ub(Hb(Vb(((e,t)=>({isResizing:!1,startX:null,rightColumnIndex:null,resizingColumns:null,startResizing:(t,n)=>e((e=>{var i;e.isResizing=!0,e.startX=t,e.rightColumnIndex=n,e.resizingColumns=null==(i=Fx.getState().chosenElement)?void 0:i.children})),stopResizing:()=>e((e=>{e.isResizing=!1,e.startX=null,e.rightColumnIndex=null,e.resizingColumns=null})),resize:t=>{e((e=>{var n,i,r;if(!e.resizingColumns||!e.startX||!e.rightColumnIndex||e.rightColumnIndex<=0||e.rightColumnIndex>=e.resizingColumns.length)return;const o=100-5*(e.resizingColumns.length-1),a=t-e.startX,s=null==(n=e.resizingColumns[e.rightColumnIndex-1])?void 0:n.data,l=null==(i=e.resizingColumns[e.rightColumnIndex])?void 0:i.data,c=(null==s?void 0:s.width)??vA,d=(null==l?void 0:l.width)??vA;let u=a/(Number(null==(r=Zb.getState().settings)?void 0:r.container_width)-10)*100;u=aw(u);const h=Math.min(o,Math.max(vA,c+u)),p=Math.min(o,Math.max(vA,d-u));h<=vA||p<=vA||Fx.getState().updateChosenElementChildren((t=>{t&&(t[e.rightColumnIndex-1].data.width=aw(h),t[e.rightColumnIndex].data.width=aw(p))}),{attribute:__("Width","yaymail")})}))}}))))),Gb),wA=window.React.memo,xA=window.React.useCallback,_A=window.React.useMemo,CA=wA((({children:e,columnIndex:t,parentId:n,list:i=[],width:r})=>{var o;const a=Fx((e=>e.list)),s=Fx((e=>e.updateList)),l=_A((()=>Boolean(e&&i.length>0)),[e,i]),c=bA((e=>e.startResizing)),d=xA((e=>{c(e.clientX,t)}),[t]),u=_A((()=>mx(n??"",a)),[a,n]),h=_A((()=>{var e;return(null==(e=null==u?void 0:u.data)?void 0:e.column_spacing)??0}),[u]),p=_A((()=>{var e;return(null==(e=null==u?void 0:u.data)?void 0:e.amount_of_columns)??0}),[null==(o=null==u?void 0:u.data)?void 0:o.amount_of_columns]),m=_A((()=>({width:r+"%",maxWidth:r+"%",verticalAlign:"top",...0===t?{paddingLeft:"0",paddingRight:Jw(h/2)}:{paddingRight:Jw(h/4),paddingLeft:Jw(h/4)},...p-1===t?{paddingRight:"0",paddingLeft:Jw(h/2)}:{}})),[r,p,t,h]);return Vt.jsxs("td",{style:m,className:"yaymail-customizer-element-column",children:[t>0&&Vt.jsx("div",{className:"yaymail-resize-handle",onMouseDown:d}),Vt.jsx(R$,{list:i,setList:s,className:ux,parentList:a,parentId:n,columnIndex:t,style:l?{border:"none"}:{},children:e})]})})),SA=window.React.useCallback,kA=window.React.useMemo,EA=({children:e,element:t})=>{var n;const i=t.data,r=null==(n=null==i?void 0:i.background_image)?void 0:n.url,o=kA((()=>{var e,t,n;const r=null==(e=null==i?void 0:i.background_image)?void 0:e.position;return r&&"default"!==r?"custom"===r?`${(null==(t=i.background_image)?void 0:t.x_position)??0}% ${(null==(n=i.background_image)?void 0:n.y_position)??0}%`:ow(r):"unset"}),[i.background_image]),a=kA((()=>{var e;const t=null==(e=i.background_image)?void 0:e.repeat;return t&&"default"!==t?t:"unset"}),[i.background_image]),s=kA((()=>{var e,t;const n=null==(e=i.background_image)?void 0:e.size;return n&&"default"!==n?"custom"===n?`${(null==(t=i.background_image)?void 0:t.custom_size)??100}%`:n:"unset"}),[i.background_image]),l=kA((()=>{var e,t,n,l,c,d,u,h;return{paddingTop:Jw(null==(e=i.padding)?void 0:e.top),paddingRight:Jw(null==(t=i.padding)?void 0:t.right),paddingBottom:Jw(null==(n=i.padding)?void 0:n.bottom),paddingLeft:Jw(null==(l=i.padding)?void 0:l.left),backgroundColor:i.background_color||"transparent",borderTopLeftRadius:Jw((null==(c=i.border_radius)?void 0:c.top_left)??0),borderTopRightRadius:Jw((null==(d=i.border_radius)?void 0:d.top_right)??0),borderBottomLeftRadius:Jw((null==(u=i.border_radius)?void 0:u.bottom_left)??0),borderBottomRightRadius:Jw((null==(h=i.border_radius)?void 0:h.bottom_right)??0),overflow:"hidden",...r?{backgroundImage:`url(${r})`,backgroundPosition:o,backgroundRepeat:a,backgroundSize:s}:{}}}),[t.data.padding,t.data.border_radius,t.data.background_color,t.data.background_image,r]),c=kA((()=>{var e,t,n,r;return{borderTopLeftRadius:Jw((null==(e=i.inner_border_radius)?void 0:e.top_left)??0),borderTopRightRadius:Jw((null==(t=i.inner_border_radius)?void 0:t.top_right)??0),borderBottomLeftRadius:Jw((null==(n=i.inner_border_radius)?void 0:n.bottom_left)??0),borderBottomRightRadius:Jw((null==(r=i.inner_border_radius)?void 0:r.bottom_right)??0),backgroundColor:i.inner_background_color??"#fff",overflow:"hidden"}}),[i.inner_border_radius,i.inner_background_color]),d=bA((e=>e.stopResizing)),u=bA((e=>e.resize)),h=SA(Kw((e=>{u(e.clientX)}),0),[u]);return Vt.jsx(Q$,{element:t,className:"yaymail-customizer-element-column_layout",style:l,onMouseMove:h,onMouseUp:d,children:Vt.jsx("div",{className:"yaymail-inner-customizer-element-column",style:c,children:Vt.jsx("table",{style:{width:"100%",backgroundColor:"inherit"},cellPadding:0,cellSpacing:0,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:e})})})})})},$A=window.React.useMemo,MA=rM((({element:e})=>{const t=e.data,n=$A((()=>({paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t.background_color,t.padding]),i=$A((()=>{const e="center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0";return{width:Sx(t.width??100,"%"),borderTopWidth:Sx(t.height??6),borderTopColor:t.divider_color||"#333",borderTopStyle:t.divider_type||"solid",padding:0,margin:e,lineHeight:0}}),[t]),r=$A((()=>({borderCollapse:"collapse",width:Sx(t.width??100,"%"),margin:"center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0"})),[t]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-divider",element:e,style:n,children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:r,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{style:i,children:" "})})})})})})),RA=window.React.useMemo,AA=rM((({element:e})=>{const t=e.data,n=Xx((t=>t.globalHeaderFooter.globalFooterElements.find((t=>t.id===e.id)))),i=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),r=Zb((e=>{var t;return null==(t=e.settings)?void 0:t.global_header_footer_enabled})),o=RA((()=>r&&n&&(null==i?void 0:i.content_override)?null==i?void 0:i.footer_content:t.rich_text),[n,i,t.rich_text,r]),{doShortcode:a}=lA(),s=RA((()=>({paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),backgroundColor:t.background_color})),[t.padding,t.background_color]),l=RA((()=>({fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.black[700]})),[t.font_family,t.text_color]),c=RA((()=>a(o)??""),[o,a]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-footer",element:e,style:s,children:Vt.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})})),TA=window.React.useMemo,LA=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=Xx((t=>t.globalHeaderFooter.globalHeaderElements.find((t=>t.id===e.id)))),r=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),o=Zb((e=>{var t;return null==(t=e.settings)?void 0:t.global_header_footer_enabled})),a=TA((()=>o&&i&&(null==r?void 0:r.content_override)?null==r?void 0:r.heading_content:t.rich_text),[i,r,t.rich_text,o]),s=TA((()=>({paddingTop:Jw(t.padding.top??15),paddingRight:Jw(t.padding.right??50),paddingBottom:Jw(t.padding.bottom??15),paddingLeft:Jw(t.padding.left??50),backgroundColor:t.background_color||"transparent"})),[t]),l=TA((()=>({fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.white})),[t.font_family,t.text_color]),c=TA((()=>n(a)??""),[a,n]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-heading",element:e,style:s,children:Vt.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})})),jA=window.React.useCallback,OA=window.React.useContext,NA=window.React.useEffect,IA=window.React.useMemo,DA=window.React.useState,PA=rM((({element:e})=>{const t=e.data,{selectedOrderID:n}=OA(JC),i=Xx((e=>e.templateData)),r=IA((()=>({paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),[o,a]=DA(!1),s=IA((()=>({fontFamily:t.font_family||"initial",color:t.text_color||Xm.color.black[700]})),[t.font_family,t.text_color,o]),[l,c]=DA(""),d=jA(Kw((async e=>{const t=oA(e);var r;if(Object.keys(t).some((e=>"hook"===e)))try{const o=(r={template_data:i,order_id:n,attributes:t},tw=window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_get_custom_hook_html",nonce:window.yaymailData.admin_ajax.nonce,data:r}}),tw);a(!0);const s=await o.promise();a(!1),c(s.data.html||e)}catch(o){c(e)}}),400),[n,i]);return NA((()=>{d(t.hook_shortcode)}),[t.hook_shortcode,n,d]),Vt.jsx(Q$,{className:"yaymail-customizer-element-hook",element:e,style:r,children:o?Vt.jsx("div",{style:{...s,textAlign:"center"},children:Vt.jsx(Mt,{})}):Vt.jsx("div",{style:s,dangerouslySetInnerHTML:{__html:l}})})})),zA=window.React.useMemo,FA=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=zA((()=>t.rich_text),[t.rich_text]),r=zA((()=>({textAlign:i.length>0?"unset":"center"})),[i]),o=zA((()=>n(i??"")),[i,n]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-html",element:e,style:r,children:i.length>0?Vt.jsx("div",{dangerouslySetInnerHTML:{__html:o}}):Vt.jsx(Mh,{style:{color:"#c2cbd2",fontSize:"22px"}})})})),BA=window.React.useMemo,HA=rM((({element:e})=>{const t=e.data,n=BA((()=>({textAlign:t.align??"center",paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),i=BA((()=>({width:Sx(t.width??172)})),[t.width]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-image",element:e,style:n,children:Vt.jsx("a",{className:"yaymail-customizer-element-image__anchor",href:t.url,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{src:t.src,style:i,alt:t.alt??""})})})})),WA=window.React.useMemo,UA=window.React.useState,VA=rM((({element:e})=>{var t;const n=e.data,{doShortcode:i}=lA(),r=WA((()=>({backgroundColor:n.background_color||"transparent"})),[n.background_color]),o=WA((()=>{var e,t,i,r;return{paddingTop:Sx(null==(e=n.image_box.column_1)?void 0:e.padding.value.top),paddingRight:Sx(null==(t=n.image_box.column_1)?void 0:t.padding.value.right),paddingBottom:Sx(null==(i=n.image_box.column_1)?void 0:i.padding.value.bottom),paddingLeft:Sx(null==(r=n.image_box.column_1)?void 0:r.padding.value.left)}}),[n.image_box.column_1.padding.value]),a=WA((()=>{var e,t,i,r;return{paddingTop:Sx(null==(e=n.image_box.column_2)?void 0:e.padding.value.top),paddingRight:Sx(null==(t=n.image_box.column_2)?void 0:t.padding.value.right),paddingBottom:Sx(null==(i=n.image_box.column_2)?void 0:i.padding.value.bottom),paddingLeft:Sx(null==(r=n.image_box.column_2)?void 0:r.padding.value.left)}}),[n.image_box.column_2.padding.value]),s=WA((()=>({width:Sx(n.image_box.column_1.width.value)})),[n.image_box.column_1.width.value]),l=WA((()=>({fontFamily:n.image_box.column_2.font_family.value??"initial",color:n.text_color??Xm.color.black[700]})),[n.image_box.column_2.font_family.value,n.text_color]),c=WA((()=>i(n.image_box.column_2.rich_text.value)),[n.image_box.column_2.rich_text.value,i]),[d,u]=UA(null),h=e=>{bR("onYayMailImageBoxColumnSelected",e),u(e)};return Vt.jsx(Q$,{className:"yaymail-customizer-element-image-box",element:e,style:r,children:Vt.jsx("table",{className:"yaymail-table-image-box",children:Vt.jsx("tbody",{children:Vt.jsxs("tr",{children:[Vt.jsx("td",{onClick:()=>h("column_1"),align:n.image_box.column_1.align.value,style:o,className:"yaymail-table-image-box-column "+("column_1"===d?"active":""),children:Vt.jsx("div",{children:Vt.jsx("a",{className:"yaymail-customizer-element-image-box__anchor",href:n.image_box.column_1.url.value,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{style:s,src:n.image_box.column_1.image.value,alt:(null==(t=n.image_box.column_1.alt)?void 0:t.value)??""})})})}),Vt.jsx("td",{onClick:()=>h("column_2"),style:a,className:"yaymail-table-image-box-column "+("column_2"===d?"active":""),children:Vt.jsx("div",{style:l,dangerouslySetInnerHTML:{__html:c}})})]})})})})})),GA=window.React.useCallback,YA=window.React.useMemo,KA=rM((({element:e})=>{var t,n,i;const r=YA((()=>+e.data.number_column),[e.data.number_column]),o=YA((()=>{return 100/(void 0===(e=r)||void 0===e.default_value?"":e.default_value);var e}),[r]),a=YA((()=>({backgroundColor:e.data.background_color||"transparent"})),[e.data.background_color]),s=YA((()=>{var t,n,i,r,o;return{paddingTop:Sx((null==(t=e.data.image_list.column_1)?void 0:t.padding.value.top)??0),paddingRight:Sx((null==(n=e.data.image_list.column_1)?void 0:n.padding.value.right)??0),paddingBottom:Sx((null==(i=e.data.image_list.column_1)?void 0:i.padding.value.bottom)??0),paddingLeft:Sx((null==(r=e.data.image_list.column_1)?void 0:r.padding.value.left)??0),textAlign:(null==(o=e.data.image_list.column_1)?void 0:o.align.value)||"center"}}),[e.data.image_list.column_1.padding.value,e.data.image_list.column_1.align.value]),l=YA((()=>{var t,n,i,r,o;return{paddingTop:Sx((null==(t=e.data.image_list.column_2)?void 0:t.padding.value.top)??0),paddingRight:Sx((null==(n=e.data.image_list.column_2)?void 0:n.padding.value.right)??0),paddingBottom:Sx((null==(i=e.data.image_list.column_2)?void 0:i.padding.value.bottom)??0),paddingLeft:Sx((null==(r=e.data.image_list.column_2)?void 0:r.padding.value.left)??0),textAlign:(null==(o=e.data.image_list.column_2)?void 0:o.align.value)||"center"}}),[e.data.image_list.column_2.padding.value,e.data.image_list.column_2.align.value]),c=YA((()=>{var t,n,i,r,o;return{paddingTop:Sx((null==(t=e.data.image_list.column_3)?void 0:t.padding.value.top)??0),paddingRight:Sx((null==(n=e.data.image_list.column_3)?void 0:n.padding.value.right)??0),paddingBottom:Sx((null==(i=e.data.image_list.column_3)?void 0:i.padding.value.bottom)??0),paddingLeft:Sx((null==(r=e.data.image_list.column_3)?void 0:r.padding.value.left)??0),textAlign:(null==(o=e.data.image_list.column_3)?void 0:o.align.value)||"center"}}),[e.data.image_list.column_3.padding.value,e.data.image_list.column_3.align.value]),d=YA((()=>{var t;return{width:Sx((null==(t=e.data.image_list.column_1)?void 0:t.width.value)??100)}}),[e.data.image_list.column_1.width.value]),u=YA((()=>{var t;return{width:Sx((null==(t=e.data.image_list.column_2)?void 0:t.width.value)??100)}}),[e.data.image_list.column_2.width.value]),h=YA((()=>{var t;return{width:Sx((null==(t=e.data.image_list.column_3)?void 0:t.width.value)??100)}}),[e.data.image_list.column_3.width.value]),p=TR((e=>e.selectColumn)),m=TR((e=>e.selectedColumn)),f=GA((e=>{p(e)}),[p]);return Vt.jsx(Vt.Fragment,{children:Vt.jsx(Q$,{className:"yaymail-customizer-element-image-list",element:e,style:a,children:Vt.jsx("table",{className:"yaymail-table-image-list",children:Vt.jsx("tbody",{children:Vt.jsxs("tr",{children:[Vt.jsx("td",{onClick:()=>f(1),valign:"top",style:{width:Sx(o,"%")},"data-column":"1",className:"yaymail-table-image-list-column "+(1===m?"active":""),children:Vt.jsx("div",{style:s,children:Vt.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_1.url.value,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{style:d,src:e.data.image_list.column_1.image.value,alt:(null==(t=e.data.image_list.column_1.alt)?void 0:t.value)??""})})})}),r>1&&Vt.jsx("td",{onClick:()=>f(2),valign:"top","data-column":"2",style:{width:Sx(o,"%")},className:"yaymail-table-image-list-column "+(2===m?"active":""),children:Vt.jsx("div",{style:l,children:Vt.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_2.url.value,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{style:u,src:e.data.image_list.column_2.image.value,alt:(null==(n=e.data.image_list.column_2.alt)?void 0:n.value)??""})})})}),3===r&&Vt.jsx("td",{onClick:()=>f(3),valign:"top","data-column":"3",style:{width:Sx(o,"%")},className:"yaymail-table-image-list-column "+(3===m?"active":""),children:Vt.jsx("div",{style:c,children:Vt.jsx("a",{className:"yaymail-customizer-element-image-list__anchor",href:e.data.image_list.column_3.url.value,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{style:h,src:e.data.image_list.column_3.image.value,alt:(null==(i=e.data.image_list.column_3.alt)?void 0:i.value)??""})})})})]})})})})})})),QA=window.React.useMemo,qA=rM((({element:e})=>{const t=e.data,n=QA((()=>({textAlign:t.align??"center",paddingTop:Jw(t.padding.top??0),paddingRight:Jw(t.padding.right??0),paddingBottom:Jw(t.padding.bottom??0),paddingLeft:Jw(t.padding.left??0),backgroundColor:t.background_color||"transparent"})),[t]),i=QA((()=>({width:Jw(t.width)??172})),[t.width]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-logo",element:e,style:n,children:Vt.jsx("a",{className:"yaymail-customizer-element-logo__anchor",href:t.url,target:"_blank",rel:"noreferrer",children:Vt.jsx("img",{src:t.src,style:i,alt:t.alt??""})})})})),ZA=window.React.useMemo,XA=rM((({element:e})=>{const t=e.data,n=Zb((e=>e.settings)),{doShortcode:i}=lA(),r=ZA((()=>({paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t.padding,t.background_color,t.font_family]),o=ZA((()=>({color:t.text_color??Xm.color.black[700],border:`1px solid ${t.border_color??"#e5e5e5"}`,width:"100%"})),[t.text_color,t.border_color,Jw]),a=ZA((()=>({color:t.title_color??Xm.color.black[700],marginTop:Jw(0),fontFamily:t.font_family??"initial",marginBottom:Jw(7)})),[t.title_color,t.font_family,Jw]),s=ZA((()=>i(t.title??"")),[t.title,i]),l=ZA((()=>i(t.rich_text??"")),[t.rich_text,i]),c=ZA((()=>({product_title:t.product_title,cost_title:t.cost_title,price_title:t.price_title,quantity_title:t.quantity_title,cart_subtotal_title:t.cart_subtotal_title,discount_title:t.discount_title,payment_method_title:t.payment_method_title,order_total_title:t.order_total_title,order_note_title:t.order_note_title,shipping_title:t.shipping_title})),[t.product_title,t.cost_title,t.price_title,t.quantity_title,t.cart_subtotal_title,t.discount_title,t.payment_method_title,t.order_total_title,t.order_note_title,t.shipping_title]),d=ZA((()=>nx(l,{...c,...n})),[l,c,n]),u=ZA((()=>(null==n?void 0:n.show_product_image)??!1),[null==n?void 0:n.show_product_image]),h=ZA((()=>(null==n?void 0:n.product_image_position)??"top"),[null==n?void 0:n.product_image_position]),p=ZA((()=>(null==n?void 0:n.show_product_description)??!1),[null==n?void 0:n.show_product_description]),m=ZA((()=>(null==n?void 0:n.show_product_sku)??!1),[null==n?void 0:n.show_product_sku]),f=ZA((()=>(null==n?void 0:n.show_product_hyper_links)??!1),[null==n?void 0:n.show_product_hyper_links]),g=ZA((()=>(null==n?void 0:n.show_product_regular_price)??!1),[null==n?void 0:n.show_product_regular_price]),y=ZA((()=>(null==n?void 0:n.show_product_item_cost)??!1),[null==n?void 0:n.show_product_item_cost]),v=ZA((()=>"modern"===t.layout_type),[t.layout_type]),b=ZA((()=>!1!==t.show_table_header),[t.show_table_header]),w=ZA((()=>({...u?{"product-image-position":h}:{},...p?{"data-show-product-description":!0}:{},...m?{"data-show-product-sku":!0}:{},...f?{"data-show-product-hyper-link":!0}:{},...g?{"data-show-product-regular-price":!0}:{},...y?{"data-show-product-item-cost":!0}:{},...v?{"data-layout-type-modern":!0}:{},...b?{"data-show-table-header":!0}:{"data-show-table-header":!1}})),[u,h,p,m,f,g,y,v,b]),x=ZA((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern]{\n border: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] th,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] td {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n \n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_price_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_price_content,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_element_foot_order_details tr td {\n text-align: right !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_quantity_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_quantity_content,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_cost_title,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail_item_cost_content {\n text-align: center !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-quantity-type-modern {\n display: inline-block;\n }\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-show-table-header='false'] .yaymail_element_head_order_details {\n display: none !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .order_item:last-child td {\n border-bottom: 1px solid ${t.border_color??"#e5e5e5"} !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-order-detail-row-payment_method td,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-table[data-layout-type-modern] .yaymail-order-detail-row-payment_method th {\n border-bottom: 1px solid ${t.border_color??"#e5e5e5"} !important;\n }\n `),[e.id,t]);return Vt.jsxs(Q$,{className:"yaymail-customizer-element-order-details",element:e,style:r,children:[Vt.jsx("style",{children:x}),Vt.jsx("div",{className:"yaymail-order-details-title",style:a,dangerouslySetInnerHTML:{__html:s}}),Vt.jsx("table",{className:"yaymail-order-details-table",...w,cellSpacing:"0",cellPadding:"6",style:o,border:1,dangerouslySetInnerHTML:{__html:d}})]})})),JA=window.React.useMemo,eT=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=Zb((e=>e.settings)),r=JA((()=>(null==i?void 0:i.show_product_image)??!1),[null==i?void 0:i.show_product_image]),o=JA((()=>(null==i?void 0:i.product_image_position)??"top"),[null==i?void 0:i.product_image_position]),a=JA((()=>({paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t.padding,t.background_color,t.font_family]),s=JA((()=>({color:t.title_color??Xm.color.black[700],marginTop:Jw(0),fontFamily:t.font_family??"initial",marginBottom:Jw(7)})),[t.title_color,t.font_family,Jw]),l=JA((()=>({border:`1px solid ${t.border_color}`,fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.black[700],width:"100%"})),[t.font_family,t.text_color,t.border_color]),c=JA((()=>"modern"===t.layout_type),[t.layout_type]),d=JA((()=>({...r?{"product-image-position":o}:{},...c?{"data-layout-type-modern":!0}:{}})),[r,o,c]),u=JA((()=>n(t.title??"")),[e.data.title,n]),h=JA((()=>n(t.rich_text??"")),[e.data.rich_text,n]),p=JA((()=>{const e=t.product_title,n=t.expires_title,r=t.download_title;return nx(h,{product_title:e,expires_title:n,download_title:r,...i})}),[h,t.product_title,t.expires_title,t.download_title,i]),m=JA((()=>`\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] {\n border: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] th,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] td {\n border: 0 !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] .yaymail-order-details-download-title--download,\n [data-yaymail-element-id="${e.id}"] .yaymail-order-details-download-content[data-layout-type-modern] .yaymail-order-details-download-content--download {\n text-align: right !important;\n }\n `),[e.id,t.title_color]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-order-details-download",element:e,style:a,children:""!==p&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("style",{children:m}),Vt.jsx("div",{className:"yaymail-order-details-download-title",style:s,dangerouslySetInnerHTML:{__html:u}}),Vt.jsx("table",{...d,className:"yaymail-order-details-download-content",cellSpacing:"0",cellPadding:"6",style:l,border:1,dangerouslySetInnerHTML:{__html:p}})]})})})),tT=window.React.useMemo,nT=rM((({element:e})=>{const t=e.data,n=tT((()=>({textAlign:t.align??"center",paddingTop:Jw(t.padding.top??0),paddingRight:Jw(t.padding.right??0),paddingBottom:Jw(t.padding.bottom??0),paddingLeft:Jw(t.padding.left??0),backgroundColor:t.background_color||"transparent"})),[t.align,t.padding,t.background_color]),i=tT((()=>({display:"inline-table",borderCollapse:"collapse"})),[]),r=tT((()=>t.active_stars),[t.active_stars]),o=tT((()=>Math.round(t.total_stars)),[t.total_stars]),a=tT((()=>Jw(t.size)),[t.size]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-rating-stars",element:e,style:n,children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:i,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{children:Array.from({length:o}).map(((e,n)=>{const i={color:n{const t=e.data,{doShortcode:n}=lA(),i=iT((()=>({paddingTop:Sx(t.padding.top),paddingRight:Sx(t.padding.right),paddingBottom:Sx(t.padding.bottom),paddingLeft:Sx(t.padding.left),backgroundColor:t.background_color||"transparent",fontFamily:t.font_family??"initial"})),[t]),r=iT((()=>({color:t.text_color??Xm.color.black[700],padding:Sx(12)})),[t.text_color,Sx]),o=iT((()=>({color:t.title_color??Xm.color.black[700],margin:"0 0 7px 0",fontSize:Sx(20),fontWeight:600})),[t.title_color,Sx]),a=iT((()=>n(t.title??"")),[t.title,n]),s=iT((()=>n(t.rich_text??"")),[t.rich_text,n]);return Vt.jsxs(Q$,{className:"yaymail-customizer-element-shipping_addrees",element:e,style:i,children:[Vt.jsx("div",{style:o,dangerouslySetInnerHTML:{__html:a}}),Vt.jsx("div",{style:{border:`1px solid ${t.border_color??"#e5e5e5"}`},children:s?Vt.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:s}}):Vt.jsx("div",{style:r,children:Vt.jsx("address",{children:__("No Shipping address set.","yaymail")})})})]})})),oT=()=>Vt.jsxs("div",{className:"yaymail-skeleton-divider",children:[Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"30%"},style:{marginBottom:10}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"},className:"yaymail-skeleton-divider__image",style:{marginBottom:10}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"70%"}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}})]}),aT=window.React.useMemo,sT=rM((({element:e})=>{const t=e.data,n=aT((()=>t.icon_list.map((({icon:e})=>{const n=(window.yaymailData.builder.social_icons.images??[]).find((t=>t.name===e)),i=null==n?void 0:n.data.find((e=>e.theme===t.theme));return{iconName:e,...i}}))),[t.icon_list,t.theme]),i=aT((()=>({backgroundColor:t.background_color??"transparent",paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.right)})),[t.padding,t.background_color]),r=aT((()=>({borderCollapse:"collapse",margin:"center"===t.align?"0 auto":"right"===t.align?"0 0 0 auto":"0",width:"auto"})),[t.align]),o=aT((()=>({width:Jw(t.width_icon??0)})),[t.width_icon]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-social",element:e,style:i,children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:r,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{style:{textAlign:t.align??"center",verticalAlign:"top",padding:0},children:null==n?void 0:n.map(((e,n)=>Vt.jsx("span",{style:{paddingLeft:Jw((t.spacing??0)/2),paddingRight:Jw((t.spacing??0)/2),paddingTop:0,paddingBottom:0,verticalAlign:"top",textAlign:"center",margin:"5px 0",display:"inline-block"},className:"yaymail-social-icon-item",children:Vt.jsx("a",{style:{border:"none",textDecoration:"none",display:"inline-block"},children:Vt.jsx("img",{src:null==e?void 0:e.src,alt:(null==e?void 0:e.name)??"",style:{...o,display:"block",border:0,margin:0,padding:0,outline:"none"}})})},n)))})})})})})})),lT=window.React.useMemo,cT=rM((({element:e})=>{const t=e.data,n=lT((()=>({backgroundColor:t.background_color||"transparent"})),[t.background_color]),i=lT((()=>({height:Sx(t.height??40),fontSize:0,backgroundColor:t.background_color||"transparent"})),[t.height,t.background_color]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-space",element:e,style:n,children:Vt.jsx("table",{cellPadding:"0",cellSpacing:"0",role:"presentation",style:{borderCollapse:"collapse",width:"100%"},children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{style:i,children:" "})})})})})})),dT=window.React.useMemo,uT=rM((({element:e})=>{const t=e.data,{doShortcode:n}=lA(),i=dT((()=>({paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent"})),[t]),r=dT((()=>({fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.black[700]})),[t.font_family,t.text_color]),o=dT((()=>n(t.rich_text??"")),[t.rich_text,n]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-text",element:e,style:i,children:Vt.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:o}})})})),hT=window.React.useMemo;function pT({columnWidth:e,index:t,columnSettings:n,onSelect:i}){const{doShortcode:r}=lA(),o=FR((e=>e.selectedColumn===t)),a=FR((e=>e.selectedElement)),s=hT((()=>n.button_align.value),[n.button_align.value]),l=hT((()=>({paddingTop:Jw((null==n?void 0:n.padding.value.top)??0),paddingRight:Jw((null==n?void 0:n.padding.value.right)??0),paddingBottom:Jw((null==n?void 0:n.padding.value.bottom)??0),paddingLeft:Jw((null==n?void 0:n.padding.value.left)??0),fontFamily:(null==n?void 0:n.font_family.value)??"initial"})),[null==n?void 0:n.padding.value,null==n?void 0:n.font_family.value]),c=hT((()=>({paddingTop:Jw(n.button_padding.value.top||0),paddingRight:Jw(n.button_padding.value.right||0),paddingBottom:Jw(n.button_padding.value.bottom||0),paddingLeft:Jw(n.button_padding.value.left||0),width:Jw(n.button_width.value??50,"%"),margin:"center"===s?"0 auto":"auto",float:"left"===s||"right"===s?s:"unset"})),[n.button_padding.value,n.button_width.value,s]),d=hT((()=>({borderTopLeftRadius:Jw(n.button_border_radius.value.top_left??5),borderTopRightRadius:Jw(n.button_border_radius.value.top_right??5),borderBottomRightRadius:Jw(n.button_border_radius.value.bottom_right??5),borderBottomLeftRadius:Jw(n.button_border_radius.value.bottom_left??5),fontSize:Jw(n.button_font_size.value??13),fontWeight:n.button_weight.value||"inherit",backgroundColor:n.button_background_color.value||Xm.color.wcPurple.default,textAlign:"center"})),[n.button_border_radius.value,n.button_font_size.value,n.button_weight.value,n.button_background_color.value]),u=hT((()=>({fontFamily:n.button_font_family.value??"initial",lineHeight:Jw(n.button_height.value??21),color:n.button_text_color.value||Xm.color.white})),[n.button_font_family.value,n.button_height.value,n.button_text_color.value]),h=hT((()=>r((null==n?void 0:n.rich_text.value)??"")),[n.rich_text.value,r]);return Vt.jsx("td",{valign:"top",style:{width:Jw(e,"%")},"data-column":t,children:Vt.jsx("table",{children:Vt.jsxs("tbody",{children:[Vt.jsx("tr",{children:Vt.jsx("td",{children:Vt.jsx("div",{onClick:()=>i(t,1),className:"yaymail-table-text-list-column "+(o&&1===a?"active":""),style:l,dangerouslySetInnerHTML:{__html:h}})})}),(null==n?void 0:n.show_button)&&Vt.jsx("tr",{children:Vt.jsx("td",{onClick:()=>i(t,2),className:"yaymail-table-text-list-column "+(o&&2===a?"active":""),children:Vt.jsx("table",{style:c,align:s,children:Vt.jsx("tbody",{children:Vt.jsx("tr",{children:Vt.jsx("td",{children:Vt.jsx("a",{className:"yaymail-customizer-element-text-list-button__anchor",href:n.button_url.value,style:d,target:"_blank",rel:"noreferrer",children:Vt.jsx("span",{style:u,children:n.button_text.value})})})})})})})})]})})})}const mT=rM((({element:e})=>{const t=e.data,n=hT((()=>100/Number(t.number_column)),[t.number_column]),i=hT((()=>({backgroundColor:t.background_color||"transparent"})),[t.background_color]),r=hT((()=>({color:t.text_color||"transparent"})),[t.text_color]),o=FR((e=>e.selectColumn)),a=FR((e=>e.selectElement)),s=(e,t)=>{o(e),a(t)};return Vt.jsx(Q$,{className:"yaymail-customizer-element-text-list",element:e,style:i,children:Vt.jsx("table",{className:"yaymail-table-text-list",children:Vt.jsx("tbody",{children:Vt.jsx("tr",{style:r,children:[...Array(Number(t.number_column)).keys()].map((t=>Vt.jsx(pT,{index:t+1,columnWidth:n,columnSettings:e.data.text_list[`column_${t+1}`],onSelect:s},t+1)))})})})})})),fT=window.React.useMemo,gT=(e,t=!1)=>{var n;const i=(null==(n=SR.find((t=>t.value===e)))?void 0:n.size)??16;return"default"===e&&t?13:i},yT=rM((({element:e})=>{const t=e.data,n=fT((()=>gT(t.title_size)),[t.title_size]),i=fT((()=>gT(t.subtitle_size,!0)),[t.subtitle_size]),r=fT((()=>({textAlign:t.align??"center",paddingTop:Jw(t.padding.top),paddingRight:Jw(t.padding.right),paddingBottom:Jw(t.padding.bottom),paddingLeft:Jw(t.padding.left),backgroundColor:t.background_color||"transparent",lineHeight:"normal"})),[t.align,t.padding,t.background_color]),o=fT((()=>({fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.black[700],fontSize:Jw(n),margin:0})),[e.data.text_color,e.data.font_family,n]),a=fT((()=>({fontFamily:t.font_family??"initial",color:t.text_color??Xm.color.black[700],fontSize:Jw(i),margin:0})),[t.text_color,t.font_family,i]);return Vt.jsxs(Q$,{className:"yaymail-customizer-element-title",element:e,style:r,children:[Vt.jsx("h1",{className:"yaymail-customizer-element-title__title",style:o,children:t.title}),Vt.jsx("h4",{className:"yaymail-customizer-element-title__subtitle",style:a,children:t.subtitle})]})})),vT=e=>GS.createElement("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{"data-name":"Layer 13"},GS.createElement("circle",{cx:16,cy:16,r:14,fill:"#ffffff",className:"fill-f2d8c2"}),GS.createElement("path",{d:"M23.49 15.11 12.78 9.56a1 1 0 0 0-1.46.89v11.1a1 1 0 0 0 .48.86 1.07 1.07 0 0 0 .52.14 1 1 0 0 0 .46-.11l10.71-5.55a1 1 0 0 0 0-1.78Z",fill:"#000000",className:"fill-568c78"}))),bT=window.React.useMemo,[wT,xT]=[172,172],_T=rM((({element:e})=>{const t=e.data,n=bT((()=>({textAlign:"center",paddingTop:Sx(t.padding.top??0),paddingRight:Sx(t.padding.top??0),paddingBottom:Sx(t.padding.bottom??0),paddingLeft:Sx(t.padding.left??0),backgroundColor:t.background_color||"transparent"})),[t]),i=bT((()=>({display:"table-cell",verticalAlign:"middle",width:Sx(t.width??wT),height:Sx(t.height??xT),...t.src&&{backgroundImage:`url(${t.src})`,backgroundSize:"cover",backgroundPosition:"center"}})),[t.width,t.height,t.src]),r=bT((()=>({width:"56px",height:"56px"})),[]);return Vt.jsx(Q$,{className:"yaymail-customizer-element-video",element:e,style:n,children:Vt.jsx("a",{className:"yaymail-customizer-element-video__anchor",href:t.url,target:"_blank",rel:"noreferrer",children:Vt.jsx("div",{className:"yaymail-customizer-element-video__thumbnail",style:i,children:Vt.jsx(vT,{className:"yaymail-customizer-element-video__btn-play",style:r})})})})})),CT=window.React.useMemo,ST=({element:e,columnIndex:t,parentId:n})=>{const i=CT((()=>e.id),[e.id]),r=function(e){const t=cA.getState().addonComponents.find((t=>t.type===e));return t?t.component:()=>null}(e.type);switch(e.type){case"logo":return Vt.jsx(qA,{element:e},i);case"heading":return Vt.jsx(LA,{element:e},i);case"video":return Vt.jsx(_T,{element:e},i);case"image":return Vt.jsx(HA,{element:e},i);case"image_box":return Vt.jsx(VA,{element:e},i);case"image_list":return Vt.jsx(KA,{element:e},i);case"title":return Vt.jsx(yT,{element:e},i);case"button":return Vt.jsx(yA,{element:e},i);case"text":return Vt.jsx(uT,{element:e},i);case"text_list":return Vt.jsx(mT,{element:e},i);case"footer":return Vt.jsx(AA,{element:e},i);case"html":return Vt.jsx(FA,{element:e},i);case"space":return Vt.jsx(cT,{element:e},i);case"divider":return Vt.jsx(MA,{element:e},i);case"column_layout":return Vt.jsx(EA,{element:e,children:Vt.jsx(kT,{parentId:e.id,elements:e.children})},i);case"column":return ix(t)?Vt.jsx(CA,{columnIndex:t,list:e.children,parentId:n,width:e.data.width,children:Vt.jsx(kT,{parentId:e.id,elements:e.children})},i):null;case"shipping_address":return Vt.jsx(rT,{element:e},i);case"billing_shipping_address":return Vt.jsx(mA,{element:e},i);case"billing_address":return Vt.jsx(uA,{element:e},i);case"social_icon":return Vt.jsx(sT,{element:e},i);case"hook":return Vt.jsx(PA,{element:e},i);case"order_details":return Vt.jsx(XA,{element:e},i);case"order_details_download":return Vt.jsx(eT,{element:e},i);case"skeleton_divider":return Vt.jsx(oT,{});case"rating_stars":return Vt.jsx(nT,{element:e},i);default:return null!==r?Vt.jsx(r,{element:e},i):null}},kT=({parentId:e,elements:t})=>t?Vt.jsx(ET,{parentId:e,list:t}):null,ET=({list:e,parentId:t})=>{const n=Xx((e=>e.elements)),i=null==n?void 0:n.map((e=>e.type));return Vt.jsx(Vt.Fragment,{children:null==e?void 0:e.map(((e,n)=>i.includes(e.type)?Vt.jsx(ST,{element:e,columnIndex:n,parentId:t},e.id):null))})},$T=window.React.useMemo;function MT({section:e,...t}){const n=Zb((e=>e.settings)),{globalHeaderElements:i,globalFooterElements:r}=Xx((e=>e.globalHeaderFooter)),o=Xx((e=>e.currentTemplate)),a=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_header_settings})),s=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.global_footer_settings})),l=Fx((e=>e.specialEditorScreen)),c=Fx((e=>e.setSpecialEditorScreen)),d=Fx((e=>e.unchooseElement)),u=$T((()=>(null==n?void 0:n.global_header_footer_enabled)??!1),[null==n?void 0:n.global_header_footer_enabled]),p=$T((()=>"header"===e?i:r),[e,i,r]),m=$T((()=>"header"===e?null==a?void 0:a.hidden:null==s?void 0:s.hidden),[e,null==a?void 0:a.hidden,null==s?void 0:s.hidden]),f=$T((()=>(null==l?void 0:l.key)===("header"===e?"global_header":"global_footer")),[null==l?void 0:l.key,e]);return"yaymail_global_header_footer"==o?null:u&&p&&0!==p.length?Vt.jsx(G,{title:__("Click to edit","yaymail").replace("%s",e),placement:"left",children:Vt.jsx("div",{...t,className:h("yaymail-customizer-email-global-header-footer-container","yaymail-sortable-static","yaymail-customizer-element",{"yaymail-customizer-email-global-header-footer-container-selected":f}),...m?{"data-hidden":!0}:{},...f?{"data-selected":!0}:{},"data-type":e,onClick:()=>{c({key:"header"===e?"global_header":"global_footer",title:__("header"===e?"Global Header":"Global Footer","yaymail")}),d()},children:m?Vt.jsx("div",{className:"yaymail-customizer-email-global-header-footer-container-hidden",children:"header"===e?Vt.jsx(RT,{}):Vt.jsx(AT,{})}):Vt.jsx(ET,{list:p})})}):null}const RT=()=>Vt.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("path",{d:"M18.5833 1.66667V18.3333H1.91667V1.66667H18.5833ZM19.1389 0H1.36111C0.75 0 0.25 0.5 0.25 1.11111V18.8889C0.25 19.5 0.75 20 1.36111 20H19.1389C19.75 20 20.25 19.5 20.25 18.8889V1.11111C20.25 0.5 19.75 0 19.1389 0Z",fill:"#AAACBA"}),Vt.jsx("path",{d:"M17.728 2.09961H2.7613C2.61402 2.09961 2.49463 2.219 2.49463 2.36628V6.27739C2.49463 6.42466 2.61402 6.54405 2.7613 6.54405H17.728C17.8752 6.54405 17.9946 6.42466 17.9946 6.27739V2.36628C17.9946 2.219 17.8752 2.09961 17.728 2.09961Z",fill:"#AAACBA"})]}),AT=()=>Vt.jsxs("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("path",{d:"M19.0833 1.66667V18.3333H2.41667V1.66667H19.0833ZM19.6389 0H1.86111C1.25 0 0.75 0.5 0.75 1.11111V18.8889C0.75 19.5 1.25 20 1.86111 20H19.6389C20.25 20 20.75 19.5 20.75 18.8889V1.11111C20.75 0.5 20.25 0 19.6389 0Z",fill:"#AAACBA"}),Vt.jsx("path",{d:"M18.228 13.3447H3.2613C3.11402 13.3447 2.99463 13.4641 2.99463 13.6114V17.5225C2.99463 17.6698 3.11402 17.7892 3.2613 17.7892H18.228C18.3752 17.7892 18.4946 17.6698 18.4946 17.5225V13.6114C18.4946 13.4641 18.3752 13.3447 18.228 13.3447Z",fill:"#AAACBA"})]}),TT=window.React.useEffect,LT=window.React.useMemo,jT=()=>{const e=Zb((e=>e.settings)),t=Xx((e=>e.currentTemplate)),n=Xx((e=>e.templateData)),i=JS(),r=Fx((e=>e.list)),o=Fx((e=>e.updateList));TT((()=>{const e=Fx.subscribe((e=>e.chosenElement),(e=>{if(null==e?void 0:e.id){const t=structuredClone(r);gx((null==e?void 0:e.id)||0,t,e),Fx.setState((()=>({list:t})))}}),{equalityFn:Gb});return()=>{e()}}),[r]);const a=Fx((e=>e.unchooseElement));TT((()=>{a()}),[]);const s=LT((()=>e&&e.container_width&&!isNaN(e.container_width)?null==e?void 0:e.container_width:605),[e]),l=LT((()=>({width:Jw(s),direction:"rtl"==i?"rtl":"initial"})),[s,i]);return TT((()=>{var e;e="rtl"==i?"right":"left",cS(".yaymail-customizer-email-template-container table").each(((t,n)=>{const i=cS(n);i.css("text-align")||i.css("text-align",e)}))}),[i]),Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(tk,{}),Vt.jsx(NT,{}),Vt.jsxs(R$,{list:r,setList:o,useHandle:!0,style:l,className:`yaymail-customizer-email-template-container yaymail-template-${t} ${"already_supported"!==(null==n?void 0:n.support_status)&&"yaymail-uneditable-template"}`,children:[Vt.jsx(MT,{section:"header",style:l}),Vt.jsx(OT,{list:r,style:l,children:Vt.jsx(ET,{list:r})}),Vt.jsx(MT,{section:"footer",style:l})]})]})};function OT({children:e,list:t,style:n}){return Vt.jsx(Vt.Fragment,{children:t.length>0?e:Vt.jsxs("div",{className:"yaymail-customizer-email-template-container__empty",style:n,children:[Vt.jsx("h2",{children:__("Your template is empty","yaymail")}),Vt.jsx("p",{children:__("Drag elements here to start customizing","yaymail")})]})})}const NT=()=>{const e=Zb((e=>{var t;return(null==(t=e.settings)?void 0:t.custom_css)??""}));return""==e?null:Vt.jsx("style",{className:"yaymail-setting-custom_css",children:`\n .yaymail-customizer-email-template-container {\n ${e}\n }\n `})},IT=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M12.6973 3.30273L14.7803 5.38672L15 5.60645V11.25C15 13.321 13.3209 14.9998 11.25 15H4.75C2.67893 15 1 13.3211 1 11.25V4.75C1.00016 2.67907 2.67903 1 4.75 1H10.3945L12.6973 3.30273ZM4.75 2.5C3.50746 2.5 2.50016 3.5075 2.5 4.75V11.25C2.5 12.4926 3.50736 13.5 4.75 13.5H11.25C12.4925 13.4998 13.5 12.4925 13.5 11.25V6.66699H11.084C10.1176 6.66699 9.33411 5.88338 9.33398 4.91699V2.5H4.75ZM10.834 4.91699C10.8341 5.05495 10.946 5.16699 11.084 5.16699H12.4404L10.834 3.56055V4.91699Z",fill:"currentColor"})),DT=()=>Vt.jsx("h4",{className:D$,children:__("Are you sure you want to empty this template?","yaymail")}),PT=({isOpen:e,onClose:t})=>{const n=Fx((e=>e.removeAllElements)),i=Xx((e=>e.hideTemplateGlobalHeader)),r=Xx((e=>e.hideTemplateGlobalFooter));return Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(DT,{})}),className:"yaymail-global__modal yaymail-blank-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:Vt.jsx(z$,{onOk:()=>{n(["skeleton_divider"]),i(!0),r(!0),t()},onCancel:()=>{t()},okText:"Empty"}),destroyOnClose:!0,children:Vt.jsx("div",{className:"modal__content",children:__("Your template content will be empty, but it isn't saved yet.","yaymail")})})},zT=window.React.useMemo,FT=window.React.useState,BT=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=FT(!1),i=Fx((e=>{var t;return 0===(null==(t=e.list)?void 0:t.length)})),r=()=>{n(!0)},o=zT((()=>i||!e),[i,e]);return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(G,{placement:"bottom",title:__("Empty layout","yaymail"),children:Vt.jsx(Pe,{onClick:r,disabled:o,className:"yaymail-btn--icon-only",children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(IT,{})})})}),!o&&Vt.jsx(PT,{isOpen:t,onOpen:r,onClose:()=>{n(!1)}})]})},HT=window.React.useCallback,WT=window.React.useMemo,UT=()=>{const[e,t]=qu.useNotification({maxCount:1}),n=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.status)??"inactive"})),i=Xx((e=>e.currentTemplate)),r=Xx((e=>e.templateData)),o=Xx((e=>e.updateItemTemplates)),{changeStatusMutation:a}=GC({template_name:i,fetch:!1}),s=(t,n)=>{e[t]({message:n,placement:"bottomRight",duration:3})},l=HT((async()=>{try{const e="active"===n?"inactive":"active";!0===(await a.mutateAsync({list_id:[(null==r?void 0:r.id)||""],status:e})).success?(r&&(r.status=e),i&&o((t=>{tx(t,"status",e)}),i),s("success",__("active"===e?"This template is enabled":"This template is disabled","yaymail"))):s("error",__("Can't change status template","yaymail"))}catch(e){console.error("An error occurred:",e)}}),[n,r,a]),c=WT((()=>"already_supported"===(null==r?void 0:r.support_status)),[null==r?void 0:r.support_status]);return Vt.jsxs(Vt.Fragment,{children:[t,Vt.jsx("div",{className:"header__enable-template-switcher",children:Vt.jsx(G,{placement:"bottom",title:"active"===(null==r?void 0:r.status)?__("Disable this template","yaymail"):__("Enable this template","yaymail"),children:Vt.jsx(wm,{checked:"active"===(null==r?void 0:r.status),onChange:l,disabled:!c})})})]})},VT=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_542_13490)"},GS.createElement("path",{d:"M14.498 7.32227C14.9122 7.32237 15.248 7.65812 15.248 8.07227C15.248 10.0197 14.5781 11.82 13.3125 13.1377C12.0418 14.4606 10.2155 15.25 7.99902 15.25C5.78251 15.25 3.95623 14.4605 2.68555 13.1377C1.41998 11.82 0.750042 10.0197 0.75 8.07227C0.75 7.65805 1.08579 7.32227 1.5 7.32227C1.91412 7.32237 2.25 7.65812 2.25 8.07227C2.25004 9.67611 2.79916 11.0903 3.76758 12.0986C4.73092 13.1014 6.15412 13.75 7.99902 13.75C9.84394 13.75 11.2672 13.1015 12.2305 12.0986C13.1989 11.0903 13.748 9.67611 13.748 8.07227C13.748 7.6581 14.0839 7.32234 14.498 7.32227ZM7.90137 0.75C8.31558 0.75 8.65137 1.08579 8.65137 1.5V7.92871L9.45215 7.1377L9.50977 7.08691C9.80563 6.84834 10.2396 6.86756 10.5127 7.14355C10.7857 7.41967 10.8005 7.85424 10.5586 8.14746L10.5068 8.2041L8.42773 10.2607C8.15383 10.5316 7.72321 10.5485 7.42969 10.3115L7.37305 10.2607L5.29297 8.2041L5.24121 8.14746C4.99929 7.85421 5.01403 7.41966 5.28711 7.14355C5.56017 6.86757 5.99418 6.84835 6.29004 7.08691L6.34766 7.1377L7.15137 7.93164V1.5C7.15137 1.08579 7.48715 0.75 7.90137 0.75Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_542_13490"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),GT=window.React.useMemo,YT=window.React.useState,KT=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Import content from other template","yaymail")})}),QT=({isOpen:e,onClose:t})=>{const n=Xx((e=>e.templates)),i=Xx((e=>e.templateData)),r=Xx((e=>e.currentTemplate)),o=Fx((e=>e.unchooseElement)),a=Af((e=>e.notify)),[s,l]=YT(null),[c,d]=YT(!1),{copyTemplateMutation:u}=GC({template_name:r,fetch:!1}),h=GT((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>55})))),[n]);return Vt.jsx(Vt.Fragment,{children:Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(KT,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Vt.jsxs("div",{className:"modal__content",children:[Vt.jsx("div",{style:{marginBottom:10},children:__("All your current configurations for this template will be lost after you import data.","yaymail")}),Vt.jsxs("div",{style:{marginTop:10},children:[Vt.jsx("h4",{style:{marginBottom:5,fontWeight:"normal"},children:__("From template","yaymail")}),Vt.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Vt.jsx(st,{style:{width:"100%",marginRight:"10px"},className:"yaymail-global__select",value:s,placeholder:"Select template",onChange:e=>{l(e)},popupMatchSelectWidth:!1,children:h.map((e=>Vt.jsxs(st.Option,{value:e.name,disabled:r===e.name,className:"option-template",children:[Vt.jsx(G,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Vt.jsx("span",{className:"option-template__text",children:e.template_title})}),Vt.jsx("span",{className:"option-template__template-status","data-status":e.status})]},e.name)))}),Vt.jsx(Pe,{type:"primary",loading:c,onClick:async()=>{d(!0);try{const e=await u.mutateAsync({template_id:(null==i?void 0:i.id)||"",from_template:s||""});if(!0!==e.success)throw new Error(e.message??__("Import template failed"));t()}catch(e){null==a||a("error",e.message??__("Import template failed","yaymail"))}finally{o(),d(!1)}},disabled:null===s,children:"Import"},"ok")]})]})]})})})},qT=window.React.useState,ZT=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=qT(!1),i=()=>{n(!0)};return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(G,{placement:"bottom",title:"Import template",children:Vt.jsx(Pe,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(VT,{})})})}),e&&Vt.jsx(QT,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},XT=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M8 1.5C10.7552 1.50017 13.2377 3.1365 14.917 5.79492L15.0586 6.04199C15.3636 6.63449 15.499 7.33435 15.499 7.99902C15.499 8.75821 15.3212 9.56255 14.917 10.2012L14.918 10.2021C13.2387 12.861 10.7554 14.4979 8 14.498C5.24438 14.498 2.76043 12.8611 1.08105 10.2021L1.08203 10.2012C0.677866 9.56256 0.500034 8.75819 0.5 7.99902C0.5 7.23931 0.677276 6.43379 1.08203 5.79492C2.7614 3.13633 5.2446 1.5 8 1.5ZM8 3C5.88577 3 3.82946 4.25356 2.34961 6.59668L2.34863 6.59766C2.13288 6.93832 2 7.44602 2 7.99902C2.00003 8.4829 2.10242 8.9318 2.27246 9.26465L2.34863 9.40039L2.34961 9.40137L2.63379 9.82812C4.08672 11.8963 6.01799 12.998 8 12.998C10.114 12.9979 12.1697 11.7442 13.6494 9.40137L13.6504 9.40039L13.7266 9.26465C13.8966 8.93179 13.999 8.48293 13.999 7.99902C13.999 7.44599 13.8662 6.93832 13.6504 6.59766L13.6494 6.59668C12.1697 4.25372 10.1141 3.00017 8 3ZM8 4.76562C9.78491 4.76578 11.2188 6.21829 11.2188 8.00293C11.2185 9.78732 9.78473 11.2401 8 11.2402C6.21514 11.2402 4.78057 9.78741 4.78027 8.00293C4.78027 6.21819 6.21495 4.76562 8 4.76562ZM8 6.26562C7.05349 6.26562 6.28027 7.03648 6.28027 8.00293C6.28057 8.96912 7.05367 9.74023 8 9.74023C8.9462 9.74008 9.71845 8.96902 9.71875 8.00293C9.71875 7.03657 8.94638 6.26578 8 6.26562Z",fill:"currentColor"})),JT=()=>Vt.jsx("div",{className:"yaymail-customizer-preview-email__empty-container",children:Vt.jsx(Rt,{className:"yaymail-customizer-preview-email__empty-content",image:Vt.jsx(ap,{}),imageStyle:{marginBottom:20,marginTop:20,color:"#9E9E9E",height:"fit-content"},description:Vt.jsxs("span",{className:"yaymail-customizer-preview-email__message",children:["An error occurred while trying to get the previewing content.",Vt.jsx("br",{}),"Please"," ",Vt.jsx(By,{to:"https://yaycommerce.com/support/",target:"_blank",className:"yaymail-navlink",children:"contact YayMail Support"})," ","for help."]})})}),eL=e=>{const t="yaymail-template-content__mobile",n=window.jQuery(".yaymail-preview-template__modal .yaymail-preview-template-content");e?n.addClass(t):n.removeClass(t)},tL=e=>GS.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},GS.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.25 16.4371C6.16445 15.2755 5.5 13.7153 5.5 12C5.5 8.41015 8.41015 5.5 12 5.5C15.5899 5.5 18.5 8.41015 18.5 12C18.5 13.7153 17.8356 15.2755 16.75 16.4371V16C16.75 14.4812 15.5188 13.25 14 13.25H10C8.48122 13.25 7.25 14.4812 7.25 16V16.4371ZM8.75 17.6304C9.70606 18.1835 10.8161 18.5 12 18.5C13.1839 18.5 14.2939 18.1835 15.25 17.6304V16C15.25 15.3096 14.6904 14.75 14 14.75H10C9.30964 14.75 8.75 15.3096 8.75 16V17.6304ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM14 10C14 11.1046 13.1046 12 12 12C10.8954 12 10 11.1046 10 10C10 8.89543 10.8954 8 12 8C13.1046 8 14 8.89543 14 10Z",fill:"#8526FF"})),nL=e=>GS.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_4482_4090)"},GS.createElement("path",{d:"M19 18H5C3.34 18 2 16.66 2 15V5C2 3.34 3.34 2 5 2H19C20.66 2 22 3.34 22 5V15C22 16.66 20.66 18 19 18Z",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),GS.createElement("path",{d:"M2 13H22",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),GS.createElement("path",{d:"M14 18H10V22H14V18Z",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),GS.createElement("path",{d:"M8 22H16",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_4482_4090"},GS.createElement("rect",{width:24,height:24,fill:"none"})))),iL=e=>GS.createElement("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_4482_313)"},GS.createElement("path",{d:"M15.5 22H8.5C6.03 22 4 19.98 4 17.5V6.5C4 4.03 6.03 2 8.5 2H15.5C17.98 2 20 4.03 20 6.5V17.5C20 19.98 17.98 22 15.5 22Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),GS.createElement("path",{d:"M10 6H14",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),GS.createElement("path",{d:"M11.9902 18H12.0102",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_4482_313"},GS.createElement("rect",{width:24,height:24,fill:"none"}))));function rL({onChange:e,currentDevice:t}){return Vt.jsxs("div",{className:"yaymail-preview-device-switcher",children:[Vt.jsx(G,{placement:"bottom",title:"Desktop preview",children:Vt.jsx("div",{className:"yaymail-preview-device-switcher__item yaymail-preview-device-switcher--dekstop "+("desktop"===t?"yaymail-preview-device-switcher--active":""),onClick:()=>{e("desktop")},children:Vt.jsx(nL,{style:{width:"16px",height:"16px"}})})}),Vt.jsx(G,{placement:"bottom",title:"Mobile preview",children:Vt.jsx("div",{className:"yaymail-preview-device-switcher__item yaymail-preview-device-switcher--mobile "+("mobile"===t?"yaymail-preview-device-switcher--active":""),onClick:()=>{e("mobile")},children:Vt.jsx(iL,{style:{width:"16px",height:"16px"}})})})]})}const oL=window.React.useState,aL=()=>{const[e,t]=oL("desktop");return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("h4",{className:D$,children:__("Email preview","yaymail")}),Vt.jsx("div",{className:P$,children:Vt.jsx(rL,{onChange:n=>{n!==e&&(eL("mobile"===n),t(n))},currentDevice:e})})]})},sL=({isOpen:e,onClose:t,data:n,isLoading:i})=>{const r=(null==n?void 0:n.html)?Vt.jsxs("div",{className:"yaymail-preview-email__preview__content yaymail-preview-template-content",children:[Vt.jsxs("div",{className:"yaymail-preview-email__preview__content__subject",children:[Vt.jsx("h2",{style:{marginTop:0},children:(null==n?void 0:n.subject)??__("No subject","yaymail")}),Vt.jsxs("div",{className:"yaymail-preview-email__preview__content__subject__email-address",children:[Vt.jsx("div",{className:"yaymail-preview-email__preview__content__subject__email-address__icon",children:Vt.jsx(tL,{})}),Vt.jsxs("p",{style:{margin:0,display:"flex",alignItems:"center",flexWrap:"wrap"},children:[Vt.jsx("span",{style:{fontWeight:"bold",marginRight:"3px"},children:window.yaymailData.site_title}),Vt.jsx("span",{children:`<${window.yaymailData.test_email_address}>`})]})]})]}),Vt.jsx("div",{className:"modal__content",dangerouslySetInnerHTML:{__html:n.html},style:{overflow:"auto"}})]}):Vt.jsx(JT,{});return Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(aL,{})}),className:"yaymail-global__modal yaymail-preview-template__modal",open:e,onCancel:()=>{t()},centered:!0,width:"70%",footer:null,destroyOnClose:!0,children:i?Vt.jsx(Mt,{className:"yaymail-loading-preview-template"}):r})},lL=window.React.useContext,cL=window.React.useState,dL=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),{selectedOrderID:t}=lL(JC),[n,i]=cL(!1),[r,o]=cL(!1),[a,s]=cL(null);return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(G,{placement:"bottom",title:"Preview email",children:Vt.jsx(Pe,{onClick:()=>{(async()=>{o(!0);try{let e=Xx.getState().templateData;const n=Fx.getState().list,i=await async function(e,t){try{const n=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_preview_mail",nonce:window.yaymailData.admin_ajax.nonce,order_id:t,template_data:e,unsaved_settings:Zb.getState().settings}});if(!n.success)throw new Error("Call ajax failed");return n}catch(n){throw console.error(n),n}}({...e,elements:n},t);i.success&&s({html:i.data.html,subject:i.data.subject})}catch(e){console.error(e)}finally{o(!1)}})(),i(!0)},disabled:!e,className:"yaymail-btn--icon-only",children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(XT,{})})})}),Vt.jsx(sL,{isOpen:n,isLoading:r,data:a,onClose:()=>{i(!1),s(null)}})]})},uL=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M6.58301 0.750768C6.85867 0.44168 7.33245 0.414604 7.6416 0.690221C7.95056 0.965898 7.97773 1.43971 7.70215 1.74881L7.18066 2.3328C7.44448 2.30465 7.71756 2.28983 8 2.28983C11.7114 2.29003 14.749 5.22916 14.749 8.8953C14.7488 12.5612 11.7112 15.5006 8 15.5008C4.28859 15.5008 1.25027 12.5613 1.25 8.8953C1.25 7.53543 1.6729 6.26737 2.39062 5.21659C2.62427 4.87458 3.09157 4.78667 3.43359 5.0203C3.77549 5.25398 3.86349 5.72129 3.62988 6.06327C3.07455 6.87635 2.75 7.85114 2.75 8.8953C2.75027 11.6987 5.08239 14.0008 8 14.0008C10.9174 14.0006 13.2488 11.6986 13.249 8.8953C13.249 6.0918 10.9176 3.79003 8 3.78983C7.64023 3.78983 7.29861 3.82048 6.97363 3.87479L7.91113 4.54374C8.24821 4.78422 8.32631 5.25243 8.08594 5.58964C7.84548 5.92671 7.37725 6.00571 7.04004 5.76542L4.70801 4.10233L4.64844 4.05546C4.64499 4.05243 4.64205 4.04876 4.63867 4.04569C4.61239 4.02174 4.5885 3.99613 4.56641 3.96952C4.55869 3.9602 4.55116 3.95083 4.54395 3.9412C4.5384 3.93381 4.53454 3.9253 4.5293 3.91776C4.50872 3.88805 4.48953 3.85796 4.47363 3.82596C4.46413 3.80691 4.45701 3.78703 4.44922 3.76737C4.43926 3.74216 4.42904 3.71725 4.42188 3.6912C4.41629 3.67093 4.41304 3.65028 4.40918 3.62967C4.40499 3.60726 4.40058 3.58501 4.39844 3.56229C4.39595 3.53595 4.39619 3.50965 4.39648 3.48319C4.39672 3.46232 4.39646 3.44154 4.39844 3.42069C4.4007 3.39675 4.40461 3.37311 4.40918 3.3494C4.41363 3.32641 4.41912 3.3037 4.42578 3.28104C4.43226 3.25893 4.43967 3.2372 4.44824 3.21561C4.45773 3.19177 4.46837 3.16839 4.48047 3.1453C4.50848 3.09179 4.54198 3.0401 4.58398 2.99296L6.58301 0.750768Z",fill:"currentColor"})),hL=window.React.useCallback,pL=window.React.useState,mL=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Are you sure you want to reset this template?","yaymail")})}),fL=({isOpen:e,onClose:t})=>{const[n,i]=qu.useNotification({maxCount:1}),r=Xx((e=>e.currentTemplate)),o=Fx((e=>e.unchooseElement)),[a,s]=pL(!1),l=Xx((e=>e.templateData)),{resetTemplateMutation:c}=GC({template_name:r,fetch:!1}),d=(e,t)=>{n[e]({message:t,placement:"bottomRight",duration:3})},u=Xx((e=>e.setGlobalHeaderFooter)),h=hL((async()=>{try{s(!0);const e=await c.mutateAsync([(null==l?void 0:l.id)||""]);if(!0===e.success){if(d("success",__("Template reset successfully.","yaymail")),0!==e.list_template_data.length){const t=e.list_template_data[0].elements;if(0!==t.length){const e=t.findIndex((e=>"skeleton_divider"===e.type));if(e<0)return;const n=t.slice(0,e),i=t.slice(e+1);u({globalHeaderElements:n,globalFooterElements:i})}}}else d("error",__("Reset failed","yaymail"))}catch(e){console.error("An error occurred:",e)}finally{o(),s(!1),t()}}),[l,a,s]);return Vt.jsxs(Vt.Fragment,{children:[i,Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(mL,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:Vt.jsx(z$,{onOk:h,onCancel:t,okText:__("Reset","yaymail"),isLoading:a}),destroyOnClose:!0,children:Vt.jsx("div",{className:"modal__content",children:__("All changes you made won't be saved.","yaymail")})})]})},gL=window.React.useState,yL=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=gL(!1),i=()=>{n(!0)};return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(G,{placement:"bottom",title:__("Reset template","yaymail"),children:Vt.jsx(Pe,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(uL,{})})})}),e&&Vt.jsx(fL,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},vL=window.React.useCallback,bL=window.React.useState,wL=e=>{const{onSaveSuccess:t,onSaveFailed:n}=e||{},i=Xx((e=>e.templateData)),r=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??window.yaymailData.colors.default_background_color})),o=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.text_link_color)??window.yaymailData.colors.default_text_link_color})),a=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_background_color)??"#ffffff"})),s=Xx((e=>e.currentTemplate)),{updateTemplateMutation:l}=GC({template_name:s,fetch:!1}),c=Af((e=>e.notify)),d=cy(),u=Fx((e=>e.navigatingPath)),h=Fx((e=>e.clearNavigatingPath)),p=Fv(),{data:m}=GC({template_name:s}),[f,g]=bL(!1),y=async()=>{g(!0);const e={template_id:((null==i?void 0:i.id)??"").toString(),template_elements:Ex(Fx.getState().list),background_color:r,text_link_color:o,content_background_color:a,global_header_settings:null==i?void 0:i.global_header_settings,global_footer_settings:null==i?void 0:i.global_footer_settings};try{if(await l.mutateAsync(e))return Fx.setState((()=>({hasChanged:!1}))),p.setQueryData(["template",s],{...m,background_color:e.background_color,content_background_color:e.content_background_color,text_link_color:e.text_link_color,elements:e.template_elements}),null==c||c("success",__("Save success","yaymail")),null==t||t(e),void(u&&d(u));null==c||c("error",__("Save failed","yaymail")),null==n||n()}catch(f){console.error("YayMail Error during save: ",f),null==c||c("error",__("Save failed","yaymail")),null==n||n()}finally{g(!1),h()}};return{saveFunction:vL((async()=>{window.yaymailData.shared.activated_addons.includes("yaymail_addon_conditional_logic")?"save"===await new Promise(((e,t)=>{bR("onYayMailBeforeSaveTemplate",{resolve:e,reject:t})}))&&y():y()}),[y]),isLoading:f}},xL=window.React.useContext,_L=window.React.useMemo,CL=({hasIcon:e,text:t,btnClassName:n,hasLoading:i,savingText:r,style:o,...a})=>{const s=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),{onSaveSuccess:l}=xL(aS),c=Fx((e=>e.hasChanged)),{saveFunction:d,isLoading:u}=wL({onSaveSuccess:l}),h=_L((()=>a.disabled||!c||!s),[c,s,a.disabled]);return Vt.jsx("section",{className:"yaymail-email-customizer__action yaymail-email-customizer__action__save-template",children:Vt.jsx(Pe,{type:"primary",disabled:h,onClick:d,className:n,loading:i&&u,icon:i&&u?Vt.jsx(k,{}):void 0,style:{minWidth:69,textAlign:"center",...o},children:i&&u?r??__("Saving...","yaymail"):t??__("Save","yaymail")})})},SL=window.React.useContext,kL=window.React.useMemo,EL=({...e})=>{const{selectedOrderID:t,setSelectedOrderID:n,listOrders:i}=SL(JC),r=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)}));return kL((()=>Vt.jsx(st,{className:"yaymail-global__select",onChange:n,popupMatchSelectWidth:!1,value:t,disabled:!r,autoClearSearchValue:!0,notFoundContent:Vt.jsx(Rt,{description:"No order found"}),showSearch:!0,filterOption:(e,t)=>((null==t?void 0:t.label)??"").toLowerCase().includes(e.toLowerCase()),options:(i??[]).map((e=>({label:"sample_order"===e.id?e.title:`Order: #${e.title}`,value:e.id}))),...e})),[t,n,r,e,i])},$L=window.React.useMemo,ML=({...e})=>{const t=Xx((e=>e.currentTemplate)),n=Xx((e=>e.templates)),i=Fx((e=>e.unchooseElement)),r=Wx(),o=$L((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>33})))),[n]);return Vt.jsx(st,{placeholder:"Select template",className:"yaymail-global__select header__select-template",value:t,onChange:e=>{r(`/customizer/?template=${e}`),i()},popupMatchSelectWidth:!1,popupClassName:"header__select-template--popup",...e,children:o.map((e=>{const t=e.recipient?e.recipient:__("Recipient","yaymail");let n="cyan",i="option-template__template-recipient--third";t===__("Customer","woocommerce")&&(n="blue",i="option-template__template-recipient--primary");const r=t.length>11;return Vt.jsxs(st.Option,{value:e.name,className:"option-template",children:[Vt.jsx(G,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Vt.jsxs("span",{style:{display:"flex",alignItems:"center",gap:7},children:[Vt.jsx(Tr,{status:"active"===e.status?"success":"default",className:"option-template__template-status"}),Vt.jsx("span",{className:"option-template__text",children:e.template_title})]})}),Vt.jsx(G,{placement:"right",title:r?t:"",overlayInnerStyle:{width:"max-content"},children:Vt.jsx(Tr,{style:{marginLeft:3},count:t,color:n,className:`option-template__template-recipient ${i}`})})]},e.name)}))})},RL=e=>GS.createElement("svg",{width:18,height:18,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M12 0C5.38293 0 0 5.38293 0 12C0 18.6171 5.38293 24 12 24C18.6171 24 24 18.6171 24 12C24 5.38293 18.6171 0 12 0ZM18.082 9.45703L11.582 15.9569C11.387 16.1519 11.131 16.2501 10.875 16.2501C10.619 16.2501 10.363 16.1519 10.168 15.9569L6.91809 12.707C6.52698 12.316 6.52698 11.684 6.91809 11.293C7.30902 10.9019 7.94092 10.9019 8.33203 11.293L10.875 13.836L16.6681 8.04309C17.059 7.65198 17.6909 7.65198 18.082 8.04309C18.473 8.43402 18.473 9.06592 18.082 9.45703Z",fill:"#29B569"})),AL=e=>GS.createElement("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:80,height:80,viewBox:"0 0 1200 1200",enableBackground:"new 0 0 1200 1200",xmlSpace:"preserve",...e},GS.createElement("g",null,GS.createElement("g",null,GS.createElement("path",{fill:"#FFFFFF",d:"M1200,271.547c-23,0-41.645-18.645-41.645-41.645S1177,188.257,1200,188.257l0,0v-64.75l0,0 c-23,0-41.645-18.645-41.645-41.645S1177,40.219,1200,40.219l0,0V0h-40.22c0,22.998-18.645,41.643-41.645,41.643 c-23,0-41.645-18.645-41.645-41.643h-64.75c0,22.998-18.645,41.643-41.645,41.643S928.452,22.998,928.452,0h-64.75 c0,22.998-18.645,41.643-41.644,41.643S780.414,22.998,780.414,0h-64.75c-0.001,22.998-18.646,41.643-41.645,41.643 c-22.999,0-41.644-18.645-41.645-41.643h-64.749c0,22.998-18.645,41.643-41.645,41.643c-23,0-41.645-18.645-41.645-41.643h-64.75 c0,22.998-18.645,41.643-41.645,41.643S336.298,22.998,336.298,0h-64.75c0,22.998-18.645,41.643-41.645,41.643 c-22.998,0-41.643-18.645-41.644-41.643h-64.75c-0.001,22.998-18.646,41.643-41.645,41.643S40.222,22.998,40.221,0H0v40.219 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.643c0,23-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645s-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0v64.75 c0.001,0,0.001,0,0.001,0c23,0,41.645,18.645,41.645,41.645c0,22.998-18.645,41.645-41.645,41.645c0,0,0,0-0.001,0V1200h40.221 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.644-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.749 c0-0.001,0-0.001,0-0.001c0-23,18.646-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c22.999,0,41.644,18.645,41.644,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645s41.645,18.645,41.645,41.645c0,0,0,0,0,0.001h64.75 c0-0.001,0-0.001,0-0.001c0-23,18.645-41.645,41.645-41.645c23,0,41.645,18.645,41.645,41.645c0,0,0,0,0,0.001H1200v-40.222l0,0 c-23,0-41.645-18.646-41.645-41.645c0-23,18.645-41.645,41.645-41.645l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645 S1177,928.45,1200,928.45l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645S1177,780.411,1200,780.411l0,0v-64.75l0,0 c-23,0-41.645-18.645-41.645-41.645S1177,632.373,1200,632.373l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645 c0-22.998,18.645-41.643,41.645-41.643l0,0v-64.75l0,0c-23,0-41.645-18.645-41.645-41.645S1177,336.296,1200,336.296l0,0V271.547 L1200,271.547z"})),GS.createElement("g",null,GS.createElement("defs",null,GS.createElement("rect",{id:"SVGID_1_",x:81.956,y:81.955,width:1036.09,height:1036.09})),GS.createElement("clipPath",{id:"SVGID_00000076592278453146880290000017819136221974491042_"},GS.createElement("use",{xlinkHref:"#SVGID_1_",overflow:"visible"})),GS.createElement("g",{clipPath:"url(#SVGID_00000076592278453146880290000017819136221974491042_)"},GS.createElement("g",null,GS.createElement("path",{fill:"#FFE2A0",d:"M1118.045,81.955H81.956v849.45c176.76-126.812,248.885-189.33,312.209-404.078 c64.86-219.957,291.193-192.271,331.906-165.815c0,0,121.17,54.568,83.833,203.102c-36.977,147.1-41.376,167.188-99.739,249.859 c-62.213,88.125-65.353,146.873-65.353,146.873s-29.713-48.616-13.328-106.501c-8.055,26.26-40.452,133.922-70.636,263.199 h557.197V81.955z"}),GS.createElement("path",{fill:"#FFFFFF",d:"M633.379,848.713c0,0-0.665,2.122-1.896,6.132c-16.385,57.885,13.328,106.501,13.328,106.501 s3.14-58.748,65.353-146.873c58.363-82.671,62.762-102.759,99.739-249.859c37.337-148.534-83.833-203.102-83.833-203.102 c-40.714-26.456-267.046-54.142-331.906,165.815C330.841,742.076,258.715,804.593,81.956,931.405v186.639h478.892 c30.183-129.278,62.58-236.939,70.636-263.199C632.059,852.812,632.686,850.768,633.379,848.713z"}),GS.createElement("path",{fill:"#FFFFFF",d:"M631.483,854.845c1.23-4.011,1.896-6.132,1.896-6.132C632.686,850.768,632.059,852.812,631.483,854.845z "})),GS.createElement("path",{fill:"#FFBB11",d:"M815.117,537.943c0,0,125.878,73.14,244.874,79.807c27.606-1.398-1.536,98.017-272.812,115.88 c-136.884,3.949-207.35-55.941-143.121-84.5C708.287,620.572,784.376,593.706,815.117,537.943z"}),GS.createElement("ellipse",{transform:"matrix(0.9714 -0.2374 0.2374 0.9714 -113.9812 164.9534)",fill:"#1C304E",cx:627.872,cy:555.71,rx:23.245,ry:49.395}),GS.createElement("g",null,GS.createElement("path",{fill:"#3A53DB",d:"M353.302,527.707c0,0,10.093,39.587,26.105,47.535s100.604-93.827,196.279-130.356 S814.234,262.93,814.234,262.93s-52.149-19.568-130.436,60.713C619.703,389.371,372.252,394.783,353.302,527.707z"}),GS.createElement("path",{fill:"#2E2647",d:"M780.188,405.189c0,0,88.574-119.685,39.224-140.625c-30.913-13.117-78.949,30.273-102.445,69.991 c-17.992,30.413-28.107,40.114-28.107,40.114S748.182,364.6,780.188,405.189z"}),GS.createElement("g",null,GS.createElement("path",{fill:"#4F6AFF",d:"M654.707,298.206c-39.489-11.631-64.043-46.387-54.841-77.63c2.171-7.371,6.076-13.852,11.219-19.356 c-58.076-2.636-76.85,44.938-106.531,102.211c-47.445-8.729-108.873-8.601-159.358,5.994 c-62.907,18.186-102.949,81.867-85.93,145.099c19.331,71.823,94.036,73.181,94.036,73.181s58.546-110.765,172.099-127.995 c109.769-16.656,194.05-105.692,199.545-111.607C707.603,301.383,681.182,306.004,654.707,298.206z"}),GS.createElement("path",{fill:"#FFFFFF",d:"M725.247,287.779c0,0-15.415-66.508-91.742-83.552c-8.131-1.815-15.495-2.691-22.42-3.006 c-5.144,5.503-9.048,11.984-11.219,19.356c-9.202,31.243,15.352,65.999,54.841,77.63c26.475,7.798,52.896,3.176,70.24-10.102 C725.136,287.9,725.247,287.779,725.247,287.779z"})),GS.createElement("path",{fill:"#215EA2",d:"M428.841,376.31c7.701-4.762,15.112-9.711,22.314-14.897c7.156-5.242,14.084-10.718,20.577-16.649 l4.841-4.476l4.572-4.736c1.602-1.515,3.005-3.197,4.433-4.864l2.156-2.493c0.761-0.801,1.464-1.646,2.103-2.537 c5.6-6.831,10.152-14.359,14.716-22.227c-2.156,8.77-5.727,17.384-10.817,25.032c-5.055,7.651-11.052,14.724-17.866,20.853 c-6.846,6.087-14.215,11.559-22.11,16.111C445.885,369.975,437.594,373.87,428.841,376.31z"})))),GS.createElement("path",{fill:"#666666",d:"M52.184,891.034c-0.501-0.105-24.522-5.99-52.184-12.771V867.48c0.914,0.382,1.899,0.733,2.755,1.142 c0.618-0.772,1.258-1.576,2.081-2.609c7.15,1.809,49.031,11.415,54.142,12.476c46.582,9.549,93.453,15.238,140.131,10.994 c4.039-0.31,8.133-0.836,12.196-1.396c2.32,2.305,7.441,4.002,11.527,5.726c0.451,0.191,3.519-1.823,5.076-2.657 c-1.469-1.701-2.84-3.3-4.225-4.91c6.422-1.091,12.858-2.407,19.27-3.93c0.809-0.191,1.615-0.403,2.422-0.601 c6.287-1.551,12.568-3.249,18.831-5.252c11.67-3.664,23.244-8.196,34.818-13.597c1.481-0.649,3.049-1.39,4.538-2.131 c0.809,0.83,1.396,2.579,1.138,3.619c-0.461,1.856-1.794,3.799-3.63,5.332c-4.046,3.383-2.357,5.375,0.592,7.043 c-5.122,2.331-10.271,4.406-15.387,6.403c-2.422,0.936-4.842,1.877-7.263,2.74c-2.187,0.789-4.374,1.474-6.561,2.208 c-5.949,1.966-11.897,3.794-17.846,5.386c-2.368-1.922-5.071-3.715-7.686-5.542c-1.253,0.896-2.504,1.791-5.173,3.698 c2.095,1.34,5.781,3.698,5.781,3.698c-5.559,1.345-11.12,2.496-16.682,3.529c-2.984-0.891-8.218-0.972-12.28-1.222 c-2.144-0.131-4.487,0.597-7.025,0.975c0.847,0.896,1.52,1.811,2.519,2.639c-1.827,0.565-3.984,0.965-6.173,1.166 c-13.599,1.64-27.099,2.314-40.699,2.314c-34.238,0-68.377-4.436-102.325-11.09c-0.3-0.06-0.603-0.125-0.905-0.185 c0.816-0.493,1.419-0.981,1.442-1.362c0.153-2.371-2.421-4.795-4.951-9.026c-5.296,3.398-9.859,5.359-9.429,6.236 C51.308,889.886,51.707,890.468,52.184,891.034z M97.809,809.674c7.174,1.061,14.351,2.029,22.057,2.861 c6.741,0.727,13.489,1.276,20.238,1.716c1.732,0.114,3.465,0.219,5.197,0.311c7.004,0.376,14.01,0.645,21.018,0.661 c4.728,0,9.355,0,14.08-0.29c4.659-0.162,9.316-0.436,13.973-0.796c3.078-0.23,6.152-0.565,9.228-0.882 c1.359-0.141,2.721-0.257,4.082-0.419c3.943-0.457,7.886-1.017,11.826-1.625c0.363-0.056,0.727-0.107,1.09-0.164 c4.272-0.673,8.567-1.452,12.833-2.31c7.168,2.4,7.952,7.204,0.945,11.876c-1.535,1.022-2.048,1.812-2.058,2.448 c-7.235,1.384-14.469,2.434-21.701,3.32c-1.54,0.188-3.08,0.362-4.62,0.527c-7.119,0.771-14.239,1.39-21.355,1.719 c-4.822,0.192-17.455,0.386-17.455,0.386c-6.306,0-12.61-0.192-18.915-0.481c-1.682-0.078-3.363-0.189-5.043-0.283 c-5.007-0.289-10.012-0.643-15.016-1.093c-1.353-0.119-2.703-0.231-4.057-0.362c-13.243-1.295-26.471-3.081-39.666-5.284 c-0.235-0.292-0.552-0.585-0.772-0.879c-3.77-5.024-7.393-10.082-11.03-15.14c7.008,1.301,14.022,2.471,21.039,3.557 C95.088,809.261,96.448,809.472,97.809,809.674z M174.614,817.352c1.318,2.412,2.045,5.031,4.179,7.155 c1.231,1.222,4.642,1.805,7.265,2.328c0.851,0.17,2.315-0.768,3.583-1.231c-4.103-3.285-7.366-6.032-10.966-8.617 C178.227,816.664,176.012,817.209,174.614,817.352z M293.374,789.74c1.381,1.653,2.835,3.287,4.329,4.904 c0.275,0.298,2.595,0.304,3.372-0.035c0.815-0.355,1.523-1.407,1.225-1.952c-1.011-1.836-2.13-3.655-3.332-5.454 C297.104,788.074,295.241,788.918,293.374,789.74z M303.75,1012.062c-42.821,20.928-86.123,29.317-129.426,30.09 c-7.041,0.194-14.08,0.096-21.121-0.194c-7.811-0.192-15.719-0.675-23.532-1.349c-10.031-0.963-20.06-2.122-30.091-3.568 c-33.364-4.861-66.613-12.539-99.58-20.834v14.034c15.404,3.856,30.867,7.573,46.393,10.924c1.896,0.409,3.794,0.812,5.692,1.21 c8.509,1.784,17.039,3.489,25.578,5.003c0,0,6.836-3.816,12.259-6.845c3.32,4.235,5.883,6.065,5.919,7.892 c0.013,0.588,0.128,1.268,0.201,1.957c6.221,0.924,12.447,1.755,18.68,2.477c10.223,1.157,20.542,2.12,30.765,2.603 c7.234,0.385,14.466,0.58,21.7,0.58h2.411c7.135-0.098,14.369-0.29,21.507-0.772c39.54-2.507,79.178-11.669,118.624-30.958 c3.375-1.639,4.822-5.689,3.086-9.162C311.174,1011.772,307.124,1010.421,303.75,1012.062z M36.701,736.333 c-4.037-0.878-29.616-7.096-36.701-8.832v-14.206c17.003,4.214,35.087,8.665,37.568,9.247c11.36,2.552,22.753,4.91,34.164,7.042 c0.217,0.041,0.434,0.078,0.65,0.119c11.405,2.122,22.827,3.972,34.259,5.49c1.53,0.811,3.205,1.546,5.197,2.117 c9.997,2.854,8.218,6.023,7.032,10.026c-0.316,1.067-2.869,2.218-4.979,2.667c-0.141-0.016-1.667-0.179-1.667-0.179 c-1.105-0.542-2.519-1.691-3.379-2.495c-4.301-4.035-4.095-4.003-9.02-0.44c-0.546,0.395-1.291,0.697-2.001,1.013 c-6.681-0.974-13.36-2.078-20.028-3.26c-0.902-0.161-22-4.211-22-4.211c-1.144-2.165-3.674-2.553-6.261-1.295 C45.254,738.225,40.975,737.298,36.701,736.333z M91.751,743.983c2.927-2.128,5.856-4.257,10.169-7.397 c-4.121-0.878-7.493-1.991-8.007-1.637c-2.411,1.667-4.583,3.635-5.67,5.715C87.823,741.473,90.491,742.86,91.751,743.983z M274.054,736.297c5.965-2.027,11.931-4.266,18.026-6.779c2.335-2.821-0.657-4.42-4.171-6.796 c-0.421-0.284-0.854-0.567-1.287-0.851c-0.768-0.098-1.518-0.176-2.3-0.295c-4.621,0.98-14.255,2.135-14.165,3.151 c0.591,6.699-10.495,10.609-14.065,16.155c-0.164,0.254-0.192,0.595-0.15,0.956C261.851,740.224,267.76,738.416,274.054,736.297z M300.645,724.532c-0.678-0.267-1.204-0.541-2.002-0.802c-4.277-1.395-7.275-4.837-9.417-7.855 c-2.446,1.032-4.903,1.964-7.351,2.92c1.576,1.034,3.187,2.054,4.746,3.078c5.335,0.67,10.239,0.944,12.958,2.245 C299.856,724.248,300.256,724.389,300.645,724.532z M300.645,724.532c0.44,0.158,0.867,0.347,1.391,0.518 C301.633,724.869,301.1,724.711,300.645,724.532z M218.062,749.66c4.614-0.669,9.228-1.458,13.84-2.338 c0.377-0.072,0.754-0.141,1.132-0.216c4.646-0.903,9.307-1.909,13.952-3.03c-0.781-2.51-2.541-4.863-6.871-6.776 c2.598-2.349,1.89-4.113,0.198-5.709c-4.657,1.055-9.319,1.957-13.982,2.782c-0.319,0.056-0.638,0.128-0.957,0.182 c-4.839,0.842-9.706,1.552-14.55,2.161c1.918,3.957,3.868,7.911,5.984,11.833C216.994,748.891,217.483,749.278,218.062,749.66z M255.326,727.807c-0.419,0.12-0.87,0.263-1.29,0.379c0.298,0.209,0.614,0.413,0.898,0.627 C255.073,728.476,255.182,728.143,255.326,727.807z M159.972,753.232c2.405,0.045,11.65,0.077,11.65,0.077 c4.529-0.059,9.06-0.261,13.59-0.479c-7.231-3.154-14.977-5.955-20.133-10.398c-3.758-3.24-4.619-0.027-5.527,1.573 c-0.567,1.002-1.52,2.335-0.881,3.108C160.79,749.672,160.879,751.635,159.972,753.232z M39.69,798.731 c-0.518-0.116-1.971-0.467-4.127-0.996c0.943,2.182,4.704,11.041,5.546,15.303c0.131,0.03,0.307,0.071,0.416,0.095 c1.059-1.277,1.77-2.14,2.434-2.944c2.876,1.767,5.752,3.534,8.627,5.299c7.314,1.533,14.637,2.986,21.976,4.316 c-3.82-5.371-7.603-10.748-11.315-16.146C55.388,802.105,47.534,800.477,39.69,798.731z M274.044,948.892 c-3.843,1.399-7.648,2.537-11.463,3.706c0.742,0.343,1.48,0.699,2.24,1.002c-3.426,0.573-6.853,1.145-12.514,1.937 c-14.317,3.912-28.681,6.659-43.053,8.414c-0.599,0.074-1.197,0.15-1.794,0.219c-18.834,2.193-37.701,2.734-56.572,1.96 c-0.925-0.038-1.848-0.074-2.773-0.116c-4.498-0.215-8.996-0.478-13.493-0.83c-0.43,0.768-2.062,1.812-2.929,2.679 c-2.45-1.044-6.552-1.924-6.869-3.527c-7.871-0.778-15.738-1.682-23.602-2.81c-6.076-0.87-12.152-1.833-18.229-2.894 c-6.654-1.061-13.211-2.314-19.867-3.665c-8.294-1.64-16.588-3.375-24.883-5.207c-0.203-0.047-0.403-0.099-0.606-0.146 c0.672,1.503,3.357,7.89,3.892,14.795c1.863,0.413,3.721,0.861,5.587,1.264c8.584,1.832,17.167,3.568,25.848,5.112 c6.75,1.253,13.597,2.41,20.35,3.471c6.267,0.965,12.541,1.886,18.806,2.603c18.337,2.099,36.648,3.471,55.068,3.471 c2.3,0,4.602-0.074,6.901-0.114c-1.399-3.465-2.63-6.974-3.053-10.527c-0.11-0.929,4.996-2.666,8.005-3.165 c1.709-0.284,5.838,1.198,5.804,1.866c-0.204,3.855-0.747,7.706-1.377,11.556c14.231-0.603,28.486-2.068,42.748-4.495 c0.843-0.143,1.688-0.279,2.532-0.431c6.604-1.178,13.208-2.583,19.813-4.22c1.047-0.26,2.096-0.552,3.145-0.825 c6.741-1.746,13.481-3.673,20.217-5.943c5.304-1.736,10.706-3.664,16.106-5.883c7.233-2.797,14.467-5.979,21.699-9.547 c3.375-1.639,4.822-5.691,3.086-9.066c-1.64-3.375-5.69-4.822-9.065-3.183C293.911,941.178,283.979,945.325,274.044,948.892z"}))),TL=window.React.useContext,LL=window.React.useEffect,jL=window.React.useState,OL=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Send Email","yaymail")})}),NL=({usingWooFunc:e,template:t,orderId:n})=>{const[i,r]=jL(window.yaymailData.test_email_address),[o,a]=jL(!1),[s,l]=jL(!1),c=Xx((e=>{var t;return null==(t=e.templateData)?void 0:t.name})),{selectedOrderID:d}=TL(JC),u=Xx((e=>e.isReviewed)),h=Xx((e=>e.setIsReviewed)),[p,m]=qu.useNotification({maxCount:1}),f=(e,t)=>{p[e]({message:t,placement:"bottomRight",duration:3})};return Vt.jsxs(Vt.Fragment,{children:[m,Vt.jsxs("div",{className:"yaymail-send-email",children:[Vt.jsx("h4",{children:__("Email address for testing","yaymail")}),Vt.jsxs("div",{className:"yaymail-send-email__content",children:[Vt.jsx(at,{type:"email",className:"yaymail-send-email__content__text",placeholder:"Ex: help.yaycommerce@gmail.com",value:i,onChange:e=>r(e.target.value)}),Vt.jsx(Pe,{className:"yaymail-send-email__content__btn-send",type:"primary",loading:s,onClick:async()=>{try{l(!0),a(!1);const r=e?await Xb(t??c,n??d,i):await async function(e,t,n){try{const i=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_send_test_mail",nonce:window.yaymailData.admin_ajax.nonce,template_name:e||"",email:n,order_id:t}});if(!i.success)throw new Error("Call ajax failed");return window.yaymailData.test_email_address=i.data.email,i}catch(i){throw console.error(i),i}}(t??c,n??d,i);r.success?(l(!1),a(!0),f("success","Send mail success")):(l(!1),f("error","Send mail failed"))}catch(r){l(!1),f("error","Send mail failed"),console.error(r)}},children:"Send Email"},"ok")]}),o&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("p",{className:"yaymail-send-email__success",children:[Vt.jsx("i",{className:"yaymail-send-email__success__icon",children:Vt.jsx(RL,{})}),Vt.jsxs("span",{children:[Vt.jsx("span",{children:"Yay! Email sent successfully. "}),Vt.jsx("a",{target:"_blank",href:"https://mail.google.com/",className:"yaymail-link-gmail",rel:"noreferrer",children:"Open mailbox"})]})]}),!window.yaymailData.reviewed&&(u?Vt.jsx("p",{className:"yaymail-send-email__success",children:Vt.jsx("span",{className:"yaymail-footer-review-text",children:__("Thank you for using YayMail.","yaymail")})}):Vt.jsx("p",{className:"yaymail-send-email__success",children:Vt.jsxs("span",{className:"yaymail-footer-review-text",children:[__("Are you happy with YayMail? You can give a review to motivate our developers","yaymail"),Vt.jsxs("svg",{style:{transform:"translateY(2px)"},width:"15",height:"15",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("path",{d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint0_radial)"}),Vt.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint1_radial)"}),Vt.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint2_radial)"}),Vt.jsx("path",{opacity:"0.5",d:"M40.0001 70.4762C56.8316 70.4762 70.4763 56.8315 70.4763 40C70.4763 23.1685 56.8316 9.5238 40.0001 9.5238C23.1686 9.5238 9.52393 23.1685 9.52393 40C9.52393 56.8315 23.1686 70.4762 40.0001 70.4762Z",fill:"url(#paint3_radial)"}),Vt.jsx("path",{d:"M40 60.2665C31.219 60.2665 28.419 50.857 31.0857 52.3237C34.6667 54.3046 36.9524 54.4951 40 54.4951C43.0476 54.4951 45.3143 54.3046 48.9143 52.3237C51.5809 50.857 48.7809 60.2665 40 60.2665Z",fill:"#643800"}),Vt.jsx("path",{d:"M48.9144 52.3238C45.3335 54.3048 43.0478 54.4952 40.0001 54.4952C36.9525 54.4952 34.6859 54.3048 31.0859 52.3238C30.1525 51.8095 29.8859 52.6095 30.3049 53.8857C30.3049 53.8667 30.4382 52.4952 31.6954 53.4476C31.6954 53.4476 36.324 56.2286 39.9811 56.2286C43.6382 56.2286 48.2668 53.4476 48.2668 53.4476C49.5239 52.5143 49.6573 53.8667 49.6573 53.8857C50.1144 52.6095 49.8478 51.8095 48.9144 52.3238Z",fill:"url(#paint4_linear)"}),Vt.jsx("path",{d:"M33.3525 28.8761C33.5239 27.6571 32.3049 26.7238 30.0573 26.4381C28.1335 26.1714 23.8097 26.6666 20.4001 30C19.7716 30.6095 20.5525 31.1047 21.124 30.7238C23.1049 29.4476 28.1335 28.1523 31.7906 29.0476C33.2763 29.4285 33.3525 28.8761 33.3525 28.8761Z",fill:"url(#paint5_linear)"}),Vt.jsx("path",{d:"M46.6478 28.8761C46.4763 27.657 47.6954 26.7237 49.943 26.438C51.8668 26.1903 56.1906 26.6665 59.6002 29.9999C60.2287 30.6094 59.4478 31.1046 58.8764 30.7237C56.8954 29.4475 51.8668 28.1523 48.2097 29.0475C46.724 29.4284 46.6478 28.8761 46.6478 28.8761Z",fill:"url(#paint6_linear)"}),Vt.jsx("path",{d:"M52.6287 36.3045C52.6287 36.3045 57.6572 37.1807 58.7811 41.1045C58.8572 41.3522 58.8763 41.6188 58.8572 41.8664C58.8191 42.3807 58.3049 42.876 57.4477 42.3236C52.1144 38.876 48.8192 40.076 46.362 40.9141C45.4096 41.2379 44.6477 40.2283 44.9906 39.4283C45.0858 39.1998 45.162 38.9522 45.3144 38.7426C47.6001 35.4093 52.6287 36.3045 52.6287 36.3045Z",fill:"url(#paint7_radial)"}),Vt.jsx("path",{d:"M52.4193 37.5046C52.4193 37.5046 56.5145 38.2094 58.8383 41.5618C58.8193 41.4094 58.8002 41.257 58.7621 41.1046C57.6383 37.1808 52.6097 36.3046 52.6097 36.3046C52.6097 36.3046 47.6002 35.4094 45.2764 38.7237C45.1812 38.857 45.124 38.9903 45.0669 39.1237C48.3431 36.7618 52.4193 37.5046 52.4193 37.5046Z",fill:"url(#paint8_linear)"}),Vt.jsx("path",{d:"M27.3714 36.3045C27.3714 36.3045 22.3429 37.1807 21.219 41.1045C21.1429 41.3522 21.1238 41.6188 21.1429 41.8664C21.181 42.3807 21.6952 42.876 22.5524 42.3236C27.8857 38.876 31.1809 40.076 33.6381 40.9141C34.5905 41.2379 35.3524 40.2283 35.0095 39.4283C34.9143 39.1998 34.8381 38.9522 34.6857 38.7426C32.4 35.4093 27.3714 36.3045 27.3714 36.3045Z",fill:"url(#paint9_radial)"}),Vt.jsx("path",{d:"M27.5809 37.5046C27.5809 37.5046 23.4857 38.2094 21.1619 41.5618C21.1809 41.4094 21.2 41.257 21.2381 41.1046C22.3619 37.1808 27.3904 36.3046 27.3904 36.3046C27.3904 36.3046 32.4 35.4094 34.7238 38.7237C34.819 38.857 34.8762 38.9903 34.9333 39.1237C31.6571 36.7618 27.5809 37.5046 27.5809 37.5046Z",fill:"url(#paint10_linear)"}),Vt.jsxs("defs",{children:[Vt.jsxs("radialGradient",{id:"paint0_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(34.0039 27.649) scale(36.7656)",children:[Vt.jsx("stop",{"stop-color":"#FFE030"}),Vt.jsx("stop",{offset:"1","stop-color":"#FFB92E"})]}),Vt.jsxs("radialGradient",{id:"paint1_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(34.0039 27.649) scale(28.9251)",children:[Vt.jsx("stop",{"stop-color":"#FFEA5F"}),Vt.jsx("stop",{offset:"1","stop-color":"#FFBC47","stop-opacity":"0"})]}),Vt.jsxs("radialGradient",{id:"paint2_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(23.3965 47.5816) rotate(-2.7703) scale(12.819 10.143)",children:[Vt.jsx("stop",{"stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.1542","stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.1795","stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.3996","stop-color":"#FB4C0B","stop-opacity":"0.7318"}),Vt.jsx("stop",{offset:"0.7799","stop-color":"#EF4B27","stop-opacity":"0.2683"}),Vt.jsx("stop",{offset:"1","stop-color":"#E74A3A","stop-opacity":"0"})]}),Vt.jsxs("radialGradient",{id:"paint3_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(56.5951 47.5816) rotate(-177.23) scale(12.819 10.143)",children:[Vt.jsx("stop",{"stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.1542","stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.1795","stop-color":"#FF4C00"}),Vt.jsx("stop",{offset:"0.3996","stop-color":"#FB4C0B","stop-opacity":"0.7318"}),Vt.jsx("stop",{offset:"0.7799","stop-color":"#EF4B27","stop-opacity":"0.2683"}),Vt.jsx("stop",{offset:"1","stop-color":"#E74A3A","stop-opacity":"0"})]}),Vt.jsxs("linearGradient",{id:"paint4_linear",x1:"39.9997",y1:"48.8487",x2:"39.9997",y2:"56.0166",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Vt.jsx("stop",{offset:"1","stop-color":"#512D00"})]}),Vt.jsxs("linearGradient",{id:"paint5_linear",x1:"26.7086",y1:"30.0508",x2:"27.1357",y2:"26.868",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Vt.jsx("stop",{offset:"1","stop-color":"#7A4400"})]}),Vt.jsxs("linearGradient",{id:"paint6_linear",x1:"53.2907",y1:"30.0509",x2:"52.8636",y2:"26.8681",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Vt.jsx("stop",{offset:"1","stop-color":"#7A4400"})]}),Vt.jsxs("radialGradient",{id:"paint7_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(52.1362 39.13) rotate(9.98082) scale(5.47711 2.64266)",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#7A4400"}),Vt.jsx("stop",{offset:"1","stop-color":"#643800"})]}),Vt.jsxs("linearGradient",{id:"paint8_linear",x1:"52.9287",y1:"34.7224",x2:"52.3353",y2:"38.2109",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Vt.jsx("stop",{offset:"1","stop-color":"#512D00"})]}),Vt.jsxs("radialGradient",{id:"paint9_radial",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(27.9428 39.0431) rotate(170.019) scale(5.47711 2.64266)",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#7A4400"}),Vt.jsx("stop",{offset:"1","stop-color":"#643800"})]}),Vt.jsxs("linearGradient",{id:"paint10_linear",x1:"27.0206",y1:"34.6925",x2:"27.614",y2:"38.1811",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{offset:"0.00132565","stop-color":"#3C2200"}),Vt.jsx("stop",{offset:"1","stop-color":"#512D00"})]})]})]}),Vt.jsx(By,{target:"_blank",to:"https://wordpress.org/support/plugin/yaymail/reviews/",onClick:async()=>{try{h(!0),await Jb()}catch(e){console.error(e)}},style:{marginLeft:"5px",verticalAlign:"bottom",textDecoration:"underline"},children:__("Rate now","yaymail")})]})}))]})]})]})},IL=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsxs("div",{children:[Vt.jsx("span",{children:"YaySMTP installed successfully."}),Vt.jsx("a",{href:window.yaymailData.smtp.setting,target:"blank",children:"Get started!"})]})}),DL=()=>{const[e,t]=jL(!1),[n,i]=jL(window.yaymailData.smtp.is_active),[r,o]=qu.useNotification({maxCount:1}),a=(e,t)=>{r[e]({message:t,placement:"bottomRight",duration:5,className:"yaymail-recommend__smtp__notifications"})};return LL((()=>{const e=new MutationObserver((e=>{for(const t of e)if("childList"===t.type){const e=document.getElementById("TB_window");e&&e.classList.add("plugin-details-modal")}}));return e.observe(document.body,{childList:!0,subtree:!0}),()=>{e.disconnect()}}),[]),Vt.jsxs(Vt.Fragment,{children:[o,!n&&Vt.jsxs("div",{className:"yaymail-recommend-content",children:[Vt.jsx("h4",{children:__("To send emails to inbox, we recommend:","yaymail")}),Vt.jsxs("div",{className:"yaymail-recommend",children:[Vt.jsx("div",{className:"yaymail-recommend__smtp__img",children:Vt.jsx(AL,{})}),Vt.jsxs("div",{className:"yaymail-recommend__smtp",children:[Vt.jsx("h2",{className:"yaymail-recommend__smtp__title",children:"YaySMTP – Simple WP SMTP Mail"}),Vt.jsxs("div",{className:"yaymail-recommend__smtp__action",children:[Vt.jsx("a",{className:"yaymail-recommend__smtp__detail button button thickbox open-plugin-details-modal",target:"_blank",href:window.yaymailData.smtp.link_detail,rel:"noreferrer",children:"Details"}),Vt.jsx(Pe,{className:"yaymail-recommend__smtp__btn-install button button-primary",type:"primary",loading:e,onClick:async()=>{try{t(!0),(await async function(){try{const e=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_install_yaysmtp",nonce:window.yaymailData.admin_ajax.nonce,template_name:"",email:void 0,order_id:void 0}});if(!e.success)throw new Error("Call ajax failed");return e.data.installed&&(window.yaymailData.smtp.is_active=!0),e}catch(e){throw console.error(e),e}}()).success?(t(!1),i(!0),a("success",Vt.jsx(IL,{}))):(t(!1),a("error","Installed failed"))}catch(e){t(!1),a("error","Installed failed"),console.error(e)}},children:"Free Install Now"},"ok")]})]})]})]})]})},PL=({isOpen:e,onClose:t,...n})=>Vt.jsx(Vt.Fragment,{children:Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(OL,{})}),className:"yaymail-global__modal yaymail-send-test-mail__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Vt.jsxs("div",{className:"modal__content",children:[Vt.jsx(NL,{...n}),!window.yaymailData.smtp.is_active&&Vt.jsx(DL,{})]})})}),zL=window.React.useState,FL=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=zL(!1),i=()=>{n(!0)};return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(Pe,{onClick:i,disabled:!e,children:__("Send test email","yaymail")}),e&&Vt.jsx(PL,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},BL=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_542_603)"},GS.createElement("path",{d:"M8.88232 1.07594C8.97855 0.673128 9.38279 0.424115 9.78564 0.520275C10.1882 0.61655 10.4371 1.02099 10.3413 1.4236L7.11864 14.9226C7.02251 15.3254 6.61806 15.5741 6.21532 15.4783C5.81252 15.3821 5.56366 14.9778 5.65966 14.575L8.88232 1.07594ZM3.48485 4.05348C3.7738 3.80621 4.20878 3.81354 4.48974 4.0818C4.78868 4.36785 4.79983 4.84197 4.51415 5.14137L1.78564 7.99781L4.51415 10.8552L4.56396 10.9138C4.79702 11.2139 4.77045 11.6477 4.48974 11.9158C4.20896 12.1838 3.77378 12.1909 3.48485 11.9441L3.42919 11.8914L0.207511 8.51637C-0.0691977 8.22656 -0.069143 7.77008 0.207511 7.48024L3.42919 4.10621L3.48485 4.05348ZM11.5083 4.0818C11.7892 3.81364 12.2233 3.80648 12.5122 4.05348L12.5679 4.10621L15.7905 7.48024C16.0669 7.77007 16.0671 8.22664 15.7905 8.51637L12.5679 11.8914L12.5122 11.9441C12.2234 12.1907 11.7891 12.1834 11.5083 11.9158C11.2087 11.6298 11.1979 11.1548 11.4839 10.8552L14.2104 7.99781L11.4839 5.14137L11.4331 5.08375C11.1997 4.78374 11.2275 4.34998 11.5083 4.0818Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_542_603"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),HL=window.React.useMemo,WL=window.React.useState,UL=({searchText:e,onChangeSearchText:t})=>Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("h4",{className:D$,children:"Shortcodes"}),Vt.jsx("div",{className:P$,children:Vt.jsx(at,{type:"text",className:"modal__header--search",placeholder:"Search",suffix:Vt.jsx(At,{}),value:e,onChange:e=>{t(e.target.value)}})})]}),VL=({isOpen:e,onClose:t})=>{const[n,i]=Nu.useMessage({top:30,duration:1}),[r,o]=WL(""),a=Xx((e=>e.shortcodes)),s=HL((()=>{const e=r.toLowerCase();return a.filter((t=>t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)))}),[r,a]),l=HL((()=>Object.values(kx(s))),[s]);return Vt.jsxs(Vt.Fragment,{children:[i,Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(UL,{searchText:r,onChangeSearchText:o})}),className:"yaymail-global__modal yaymail-shortcodes-information__modal",open:e,onCancel:()=>{o(""),t()},footer:null,width:800,centered:!0,destroyOnClose:!0,children:l.length>0?l.map((({shortcodes:e,groupLabel:t},i)=>Vt.jsxs("div",{className:"modal__content__shortcode-group",children:[Vt.jsxs("h4",{className:"modal__content__shortcode-group__title",children:[t," :"]}),Vt.jsx("table",{className:"modal__content__shortcode-group__table",children:Vt.jsx("tbody",{children:e.map(((e,t)=>{const i=((e,t)=>{if(!t)return`[${e}]`;const n=e.includes("yaymail_order_meta:");return`[${e}${Object.entries(t).filter((([,e])=>!n||e)).map((([e,t])=>` ${e}="${t}"`)).join("")}]`})(e.name,e.attributes);return Vt.jsxs("tr",{className:"shortcode-item",children:[Vt.jsx("td",{className:"shortcode-item__name",onClick:(r=i,()=>{n.success("Shortcode copied"),Zm(r,{format:"text/plain"})}),children:Vt.jsx("span",{dangerouslySetInnerHTML:{__html:i}})}),Vt.jsxs("td",{className:"shortcode-item__description",children:["- ",e.description]})]},t);var r}))})})]},i))):Vt.jsx("div",{className:"yaymail-shortcodes-information__modal__empty",children:Vt.jsx(Rt,{description:"No shortcode found"})})})]})},GL=window.React.useState,YL=()=>{const e=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)})),[t,n]=GL(!1),i=()=>{n(!0)};return Vt.jsxs("div",{className:"header__btn--action",children:[Vt.jsx(G,{placement:"bottom",title:"Shortcodes",children:Vt.jsx(Pe,{onClick:i,disabled:!e,className:"yaymail-btn--icon-only",children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(BL,{})})})}),Vt.jsx(VL,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},KL=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M12.9355 2.17763C12.6458 1.93183 12.2115 1.94009 11.9316 2.20888C11.6518 2.47807 11.6258 2.91261 11.8603 3.21181L11.9101 3.26943L12.7441 4.13564L5.4951 4.17861V4.17958C2.84776 4.1823 0.750105 6.40789 0.749978 9.08876C0.750142 11.7713 2.85039 13.9989 5.49998 13.9989H11.9004L11.9765 13.995C12.3546 13.9566 12.6502 13.6371 12.6504 13.2489C12.6502 12.8608 12.3546 12.5412 11.9765 12.5028L11.9004 12.4989H5.49998C3.73381 12.4989 2.25014 10.9989 2.24998 9.08876C2.2501 7.17858 3.73379 5.67861 5.49998 5.67861H5.50388L12.7324 5.63564L11.9101 6.49013C11.6233 6.78874 11.6331 7.26369 11.9316 7.55068C12.2302 7.83737 12.7052 7.82851 12.9922 7.53017L15.04 5.39931C15.3187 5.10909 15.3187 4.65048 15.04 4.36025L12.9922 2.23037L12.9355 2.17763Z",fill:"currentColor"})),QL=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M3.0635 2.17763C3.35319 1.93183 3.78751 1.94009 4.0674 2.20888C4.34725 2.47807 4.3732 2.91261 4.13869 3.21181L4.08889 3.26943L3.2549 4.13564L10.5039 4.17861V4.17958C13.1513 4.1823 15.2489 6.40789 15.249 9.08876C15.2489 11.7713 13.1486 13.9989 10.499 13.9989H4.09865L4.02248 13.995C3.64441 13.9566 3.34881 13.6371 3.34865 13.2489C3.34883 12.8608 3.64442 12.5412 4.02248 12.5028L4.09865 12.4989H10.499C12.2652 12.4989 13.7489 10.9989 13.749 9.08876C13.7489 7.17858 12.2652 5.67861 10.499 5.67861H10.4951L3.26662 5.63564L4.08889 6.49013C4.37569 6.78874 4.3659 7.26369 4.0674 7.55068C3.76884 7.83737 3.29384 7.82851 3.00686 7.53017L0.959006 5.39931C0.680325 5.10909 0.680338 4.65048 0.959006 4.36025L3.00686 2.23037L3.0635 2.17763Z",fill:"currentColor"})),qL=window.React.useEffect,ZL=window.React.useMemo,XL=()=>{const e=Px((e=>e.hasUndo)),t=Px((e=>e.hasRedo)),n=Px((e=>e.undo)),i=Px((e=>e.redo)),r=ZL((()=>(()=>{let e="window";return-1!=window.navigator.userAgent.indexOf("Mac")&&(e="mac"),e})()),[]);qL((()=>{const e=e=>{let t=null;("window"===r&&e.ctrlKey||"mac"===r&&e.metaKey)&&("z"!==e.key.toLowerCase()||e.shiftKey||(t="undo"),"z"===e.key.toLowerCase()&&e.shiftKey&&(t="redo")),null!=t&&("undo"==t&&n(),"redo"==t&&i())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[n,i,r]);const o=ZL((()=>{let e="(Ctrl + Z)";return"mac"===r&&(e="(⌘ + Z)"),`${__("Undo","yaymail")} ${e}`}),[r]),a=ZL((()=>{let e="(Ctrl + Shift + Z)";return"mac"===r&&(e="(⌘ + Shift + Z)"),`${__("Redo","yaymail")} ${e}`}),[r]),s=Xx((e=>{var t;return"already_supported"===(null==(t=e.templateData)?void 0:t.support_status)}));return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:"header__btn--action",children:Vt.jsx(G,{placement:"bottom",title:o,children:Vt.jsx(Pe,{disabled:!e||!s,onClick:n,children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(QL,{})})})})}),Vt.jsx("div",{className:"header__btn--action",children:Vt.jsx(G,{placement:"bottom",title:a,children:Vt.jsx(Pe,{disabled:!t||!s,onClick:i,children:Vt.jsx("span",{className:"anticon",style:{display:"flex"},children:Vt.jsx(KL,{})})})})})]})},JL=window.React.useCallback,ej=window.React.useMemo,tj=window.React.useState;function nj(){const e=Zb((e=>e.settings)),[t,n]=qu.useNotification({maxCount:1}),i=Zb((e=>e.updateSettings)),[r,o]=tj(!1),a=ej((()=>(null==e?void 0:e.global_header_footer_enabled)??!1),[e]),s=(e,n)=>{t[e]({message:n,placement:"bottomRight",duration:3})},l=JL((async e=>{o(!0);const t=await async function(e){return(await DC("/templates/global-header-footer/change-status",{status:e})).data}(e);o(!1),t?(setTimeout((()=>{i({global_header_footer_enabled:e})}),10),s("success",__("Global header/footer is ","yaymail")+__(e?"enabled":"disabled","yaymail"))):s("error",__("Change status failed","yaymail"))}),[]);return Vt.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[n,Vt.jsx(G,{title:__("%s global header/footer","yaymail").replace("%s",__(a?"Disable":"Enable","yaymail")),children:Vt.jsx(wm,{id:"yaymail-global-header-footer-toggle",checked:a,onChange:l,loading:r})})]})}const ij=window.React.memo,rj=window.React.useContext,oj=ij((()=>{const{hasTemplateSelector:e,hasOrderSelector:t,hasTemplateImporter:n,hasActivationButton:i,hasSendTestMailButton:r}=rj(aS),o=Xx((e=>e.currentTemplate));return Vt.jsxs("section",{className:"yaymail-email-customizer__header",children:[Vt.jsxs("div",{className:"yaymail-email-customizer__header--left",children:[e&&Vt.jsx(ML,{}),t&&Vt.jsx(EL,{}),Vt.jsxs("div",{className:"header__actions",children:[Vt.jsx(YL,{}),Vt.jsx(BT,{}),n&&Vt.jsx(ZT,{}),Vt.jsx(yL,{}),Vt.jsx(XL,{})]})]}),Vt.jsxs("div",{className:"yaymail-email-customizer__header--right",children:["yaymail_global_header_footer"===o&&Vt.jsx(aj,{}),Vt.jsx(dL,{}),r&&Vt.jsx(FL,{}),i&&Vt.jsx(UT,{}),Vt.jsx(CL,{hasLoading:!0,savingText:""})]})]})}));function aj(){const e=Zb((e=>{var t;return(null==(t=e.settings)?void 0:t.global_header_footer_enabled)??!1}));return Vt.jsx(hn,{message:Vt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[__("Global header/footer is %1s","yaymail").replace("%1s",__(e?"ON":"OFF","yaymail"))+(e?".":__(", please %2s it globally.","yaymail").replace("%2s",__(e?"disable":"enable","yaymail"))),Vt.jsx(nj,{})]}),type:"info",showIcon:!0})}const sj=window.React.useMemo;function lj(){const e=Xx((e=>e.templateData));return{isTemplateExist:sj((()=>e&&null!=(null==e?void 0:e.id)),[e])}}const cj=window.React.useContext,dj=window.React.useMemo,uj=()=>{const{isPageFetching:e}=cj(aS),{isTemplateExist:t}=lj(),n=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??"transparent"})),i=dj((()=>({backgroundColor:n||"transparent"})),[n]);return lS(),Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(oj,{}),Vt.jsx("main",{style:i,className:`yaymail-customizer-template-section ${!t&&"yaymail-customizer-template-section__not-found"}`,children:t?Vt.jsx(jT,{}):!e&&Vt.jsx(Rt,{description:__("Template not found","yaymail")})})]})},hj=window.React.useEffect,pj=window.React.useMemo,mj=({isCrossPage:e})=>{sy();const t=pj((()=>[__("Get recent editing revisions","yaymail"),__("Custom fields & meta support","yaymail"),__("Save custom blocks for reuse","yaymail"),__("%s plugin integrations","yaymail").replace("%s",``+__("30+ third-party","yaymail")+""),__("Multilingual support","yaymail"),__("Fast updates","yaymail"),__("VIP live chat support","yaymail")]),[e]);return hj((()=>{function e(){var e;window.jQuery("html, body").animate({scrollTop:(null==(e=window.jQuery("#third-party-integrations").offset())?void 0:e.top)??0})}return window.jQuery(document).on("click","#view-third-party-integrations",e),()=>{window.jQuery(document).off("click","#view-third-party-integrations",e)}}),[]),Vt.jsx("div",{className:"upgrade-content-container",children:Vt.jsxs("div",{className:"upgrade-content__main",children:[Vt.jsxs("div",{className:"upgrade-content__header",children:[Vt.jsxs("div",{className:"upgrade-content__header-title",children:[Vt.jsx("h2",{children:__("YayMail Pro!","yaymail")}),Vt.jsxs("span",{className:"upgrade-content__header-title__badge",children:[Vt.jsx(Ih,{}),__("Pro","yaymail")]})]}),Vt.jsx("p",{className:"upgrade-content__subtitle",children:__("Get all features when you upgrade to YayMail Pro.","yaymail")})]}),Vt.jsx("div",{className:"upgrade-content__features",children:Vt.jsx("div",{className:"upgrade-content__feature-group",children:Vt.jsx("ul",{className:"upgrade-content__feature-list",children:t.map(((e,t)=>Vt.jsxs("li",{className:"upgrade-content__feature-item",children:[Vt.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("circle",{cx:"11",cy:"11",r:"11",fill:"#FEF5DA"}),Vt.jsx("path",{d:"M6 12L8.72727 15L16 7",fill:"#FEF5DA"}),Vt.jsx("path",{d:"M6 12L8.72727 15L16 7",stroke:"#FEC900","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),Vt.jsx("div",{dangerouslySetInnerHTML:{__html:e}})]},t)))})})})]})})};function fj(e){return Vt.jsx(Pe,{type:"primary",href:"https://yaycommerce.com/yaymail-woocommerce-email-customizer/",target:"_blank",...e,className:`yaymail-go-pro__buy-now-button ${e.className}`,children:e.children?e.children:__("Get YayMail Pro","yaymail")})}const gj=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Smart move — you’re going to love what’s next.","yaymail")})}),yj=({isOpen:e,onClose:t})=>Vt.jsx(Vt.Fragment,{children:Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(gj,{})}),className:"yaymail-global__modal yaymail-go-pro__modal",open:e,onCancel:()=>{t()},centered:!0,footer:null,children:Vt.jsxs("div",{className:"modal__content",children:[Vt.jsx(mj,{isCrossPage:!0}),Vt.jsx(fj,{})]})})}),vj=window.React.useCallback,bj=window.React.useRef,wj=()=>Vt.jsx("h4",{className:D$,children:__("Save template?","yaymail")}),xj=()=>{const e=Fx((e=>e.changeContentStatus)),t=Fx((e=>e.isDiscardChangesConfirmModalDisplayed)),n=Fx((e=>e.hideDiscardChangesConfirmModal)),i=vj((()=>{n()}),[]),{saveFunction:r}=wL(),o=bj((()=>{})),a=cy(),s=Fx((e=>e.navigatingPath)),l=vj((async()=>{i(),await new Promise((t=>{e(!1),t()})),o.current(),s&&a(s)}),[i,s,e]),c=vj((()=>{i(),r(),o.current()}),[r,i]);return Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(wj,{})}),className:"yaymail-global__modal yaymail-blank-template__modal",open:t,onCancel:i,centered:!0,width:"500px",footer:Vt.jsx(z$,{onOk:c,onCancel:l,okText:__("Save","yaymail"),cancelText:__("No, don't save")}),destroyOnClose:!0,children:__("Do you want to save before moving to another template?","yaymail")})};function _j(){const e=`paint0_linear_${dx()}`;return Vt.jsxs("svg",{width:"37",height:"20",viewBox:"0 0 37 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("rect",{x:"1.25",y:"0.5",width:"35",height:"19",rx:"4.5",fill:"#18191A"}),Vt.jsx("rect",{x:"1.25",y:"0.5",width:"35",height:"19",rx:"4.5",stroke:"#8F6C07"}),Vt.jsx("path",{d:"M8.86504 6.4541H11.6238C12.3139 6.4541 12.8738 6.6722 13.3035 7.1084C13.7332 7.54134 13.948 8.10612 13.948 8.80273C13.948 9.48958 13.7283 10.0495 13.2889 10.4824C12.8494 10.9121 12.283 11.127 11.5896 11.127H9.95879V13.5H8.86504V6.4541ZM9.95879 7.4209V10.165H11.3357C11.8077 10.165 12.174 10.0479 12.4344 9.81348C12.698 9.57585 12.8299 9.23893 12.8299 8.80273C12.8299 8.35677 12.7013 8.01497 12.4441 7.77734C12.187 7.53971 11.8175 7.4209 11.3357 7.4209H9.95879ZM16.7529 7.41602V9.88184H18.3252C18.7484 9.88184 19.0755 9.77441 19.3066 9.55957C19.541 9.34473 19.6582 9.04036 19.6582 8.64648C19.6582 8.26237 19.5361 7.96126 19.292 7.74316C19.0511 7.52507 18.7191 7.41602 18.2959 7.41602H16.7529ZM16.7529 10.8145V13.5H15.6592V6.4541H18.4473C19.1569 6.4541 19.7233 6.65104 20.1465 7.04492C20.5697 7.43555 20.7812 7.96126 20.7812 8.62207C20.7812 9.09733 20.6592 9.51562 20.415 9.87695C20.1742 10.235 19.8405 10.4873 19.4141 10.6338L20.9961 13.5H19.7314L18.2959 10.8145H16.7529ZM25.6418 6.2832C26.6574 6.2832 27.4582 6.61523 28.0441 7.2793C28.6301 7.9401 28.923 8.83854 28.923 9.97461C28.923 11.1107 28.6301 12.0107 28.0441 12.6748C27.4582 13.3389 26.6574 13.6709 25.6418 13.6709C24.6229 13.6709 23.8189 13.3405 23.2297 12.6797C22.6438 12.0156 22.3508 11.1139 22.3508 9.97461C22.3508 8.83854 22.6454 7.9401 23.2346 7.2793C23.827 6.61523 24.6294 6.2832 25.6418 6.2832ZM25.6418 7.30371C24.9777 7.30371 24.4488 7.5446 24.0549 8.02637C23.6643 8.50814 23.4689 9.15755 23.4689 9.97461C23.4689 10.7917 23.6626 11.4427 24.05 11.9277C24.4374 12.4095 24.968 12.6504 25.6418 12.6504C26.3091 12.6504 26.8365 12.4095 27.2238 11.9277C27.6112 11.4427 27.8049 10.7917 27.8049 9.97461C27.8049 9.1543 27.6112 8.50488 27.2238 8.02637C26.8365 7.5446 26.3091 7.30371 25.6418 7.30371Z",fill:`url(#${e})`}),Vt.jsx("defs",{children:Vt.jsxs("linearGradient",{id:e,x1:"7.75",y1:"10",x2:"29.75",y2:"10",gradientUnits:"userSpaceOnUse",children:[Vt.jsx("stop",{"stop-color":"#FFD965"}),Vt.jsx("stop",{offset:"0.25","stop-color":"#CDA534"}),Vt.jsx("stop",{offset:"0.75","stop-color":"#B38615"}),Vt.jsx("stop",{offset:"1","stop-color":"#FFD965"})]})})]})}zb(!1);const Cj=qb()(Ub(Hb(Vb(((e,t)=>({activeTab:"patterns",isOpen:!1,currentSectionTemplate:{},openPanel:()=>e((e=>{e.isOpen=!0})),closePanel:()=>e((e=>{e.isOpen=!1})),setCurrentSectionTemplate:t=>e((e=>{e.currentSectionTemplate=t})),setActiveTab:t=>e((e=>{e.activeTab=t}))}))))),Gb);var Sj={},kj={},Ej={exports:{}},$j={exports:{}};(function(){var e,t,n,i,r,o;"undefined"!=typeof performance&&null!==performance&&performance.now?$j.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?($j.exports=function(){return(e()-r)/1e6},t=process.hrtime,i=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),o=1e9*process.uptime(),r=i-o):Date.now?($j.exports=function(){return Date.now()-n},n=Date.now()):($j.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(Ae);for(var Mj=$j.exports,Rj="undefined"==typeof window?Ae:window,Aj=["moz","webkit"],Tj="AnimationFrame",Lj=Rj["request"+Tj],jj=Rj["cancel"+Tj]||Rj["cancelRequest"+Tj],Oj=0;!Lj&&Oj=0;i--){var r=Hj[i]+n;if(r in t)return r}return!1}(t);return Zj[t]=Zj[e]=Zj[n]=n,n}(t)),i){if(void 0===n)return e.style[i];e.style[i]=function(e,t){return"number"!=typeof t||Qj[e]?t:t+"px"}(i,n)}}function Jj(){2===arguments.length?"string"==typeof arguments[1]?arguments[0].style.cssText=arguments[1]:function(e,t){for(var n in t)t.hasOwnProperty(n)&&Xj(e,n,t[n])}(arguments[0],arguments[1]):Xj(arguments[0],arguments[1],arguments[2])}Fj.exports=Jj,Fj.exports.set=Jj,Fj.exports.get=function(e,t){return Array.isArray(t)?t.reduce((function(t,n){return t[n]=Xj(e,n||""),t}),{}):Xj(e,t||"")};var eO=Fj.exports,tO={exports:{}};function nO(){}function iO(){}iO.resetWarningCache=nO,tO.exports=function(){function e(e,t,n,i,r,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:iO,resetWarningCache:nO};return n.PropTypes=n,n}();var rO=tO.exports,oO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return"string"==typeof e}}(oO);var aO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if((!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&!1!==i)return i;if("undefined"!=typeof document){var e=document.createElement("div");(0,n.default)(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),i=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else i=0;return i||0};var t,n=(t=eO)&&t.__esModule?t:{default:t},i=!1}(aO);var sO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return!1}}(sO);var lO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=e.clientWidth,n=getComputedStyle(e),i=n.paddingLeft,r=n.paddingRight;return t-parseFloat(i)-parseFloat(r)}}(lO);var cO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=e.clientHeight,n=getComputedStyle(e),i=n.paddingTop,r=n.paddingBottom;return t-parseFloat(i)-parseFloat(r)}}(cO);var dO={};Object.defineProperty(dO,"__esModule",{value:!0}),dO.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"},dO.containerStyleAutoHeight={height:"auto"},dO.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"},dO.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0},dO.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0},dO.trackHorizontalStyleDefault={position:"absolute",height:6},dO.trackVerticalStyleDefault={position:"absolute",width:6},dO.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"},dO.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"},dO.disableSelectStyle={userSelect:"none"},dO.disableSelectStyleReset={userSelect:""};var uO={};Object.defineProperty(uO,"__esModule",{value:!0});var hO=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:"scrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,i=this.thumbHorizontal,r=this.thumbVertical;e.addEventListener("scroll",this.handleScroll),(0,c.default)()&&(t.addEventListener("mouseenter",this.handleTrackMouseEnter),t.addEventListener("mouseleave",this.handleTrackMouseLeave),t.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.addEventListener("mouseenter",this.handleTrackMouseEnter),n.addEventListener("mouseleave",this.handleTrackMouseLeave),n.addEventListener("mousedown",this.handleVerticalTrackMouseDown),i.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),r.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if("undefined"!=typeof document&&this.view){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,i=this.thumbHorizontal,r=this.thumbVertical;e.removeEventListener("scroll",this.handleScroll),(0,c.default)()&&(t.removeEventListener("mouseenter",this.handleTrackMouseEnter),t.removeEventListener("mouseleave",this.handleTrackMouseLeave),t.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),n.removeEventListener("mouseenter",this.handleTrackMouseEnter),n.removeEventListener("mouseleave",this.handleTrackMouseLeave),n.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),i.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),r.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(e){var t=this,n=this.props,i=n.onScroll,r=n.onScrollFrame;i&&i(e),this.update((function(e){var n=e.scrollLeft,i=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=i,r&&r(e)})),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleScrollStop",value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleWindowResize",value:function(){(0,c.default)(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientX,i=t.getBoundingClientRect().left,r=this.getThumbHorizontalWidth(),o=Math.abs(i-n)-r/2;this.view.scrollLeft=this.getScrollLeftForOffset(o)}},{key:"handleVerticalTrackMouseDown",value:function(e){e.preventDefault();var t=e.target,n=e.clientY,i=t.getBoundingClientRect().top,r=this.getThumbVerticalHeight(),o=Math.abs(i-n)-r/2;this.view.scrollTop=this.getScrollTopForOffset(o)}},{key:"handleHorizontalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,i=t.offsetWidth,r=t.getBoundingClientRect().left;this.prevPageX=i-(n-r)}},{key:"handleVerticalThumbMouseDown",value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,i=t.offsetHeight,r=t.getBoundingClientRect().top;this.prevPageY=i-(n-r)}},{key:"setupDragging",value:function(){(0,o.default)(document.body,p.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=d.default}},{key:"teardownDragging",value:function(){(0,o.default)(document.body,p.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(e){if(this.prevPageX){var t=e.clientX,n=-this.trackHorizontal.getBoundingClientRect().left+t-(this.getThumbHorizontalWidth()-this.prevPageX);this.view.scrollLeft=this.getScrollLeftForOffset(n)}if(this.prevPageY){var i=e.clientY,r=-this.trackVertical.getBoundingClientRect().top+i-(this.getThumbVerticalHeight()-this.prevPageY);this.view.scrollTop=this.getScrollTopForOffset(r)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){this.props.autoHide&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){this.props.autoHide&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,o.default)(this.trackHorizontal,{opacity:1}),(0,o.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout((function(){(0,o.default)(e.trackHorizontal,{opacity:0}),(0,o.default)(e.trackVertical,{opacity:0})}),t)}}},{key:"detectScrolling",value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval((function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop}),100))}},{key:"raf",value:function(e){var t=this;this.requestFrame&&r.default.cancel(this.requestFrame),this.requestFrame=(0,r.default)((function(){t.requestFrame=void 0,e()}))}},{key:"update",value:function(e){var t=this;this.raf((function(){return t._update(e)}))}},{key:"_update",value:function(e){var t=this.props,n=t.onUpdate,i=t.hideTracksWhenNotNeeded,r=this.getValues();if((0,c.default)()){var a=r.scrollLeft,s=r.clientWidth,l=r.scrollWidth,d=(0,u.default)(this.trackHorizontal),p=this.getThumbHorizontalWidth(),m={width:p,transform:"translateX("+a/(l-s)*(d-p)+"px)"},f=r.scrollTop,g=r.clientHeight,y=r.scrollHeight,v=(0,h.default)(this.trackVertical),b=this.getThumbVerticalHeight(),w={height:b,transform:"translateY("+f/(y-g)*(v-b)+"px)"};if(i){var x={visibility:l>s?"visible":"hidden"},_={visibility:y>g?"visible":"hidden"};(0,o.default)(this.trackHorizontal,x),(0,o.default)(this.trackVertical,_)}(0,o.default)(this.thumbHorizontal,m),(0,o.default)(this.thumbVertical,w)}n&&n(r),"function"==typeof e&&e(r)}},{key:"render",value:function(){var e=this,n=(0,c.default)(),i=this.props;i.onScroll,i.onScrollFrame,i.onScrollStart,i.onScrollStop,i.onUpdate;var r=i.renderView,o=i.renderTrackHorizontal,s=i.renderTrackVertical,d=i.renderThumbHorizontal,u=i.renderThumbVertical,h=i.tagName;i.hideTracksWhenNotNeeded;var m=i.autoHide;i.autoHideTimeout;var f=i.autoHideDuration;i.thumbSize,i.thumbMinSize;var g=i.universal,y=i.autoHeight,v=i.autoHeightMin,b=i.autoHeightMax,w=i.style,x=i.children,_=function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(i,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),C=this.state.didMountUniversal,S=t({},p.containerStyleDefault,y&&t({},p.containerStyleAutoHeight,{minHeight:v,maxHeight:b}),w),k=t({},p.viewStyleDefault,{marginRight:n?-n:0,marginBottom:n?-n:0},y&&t({},p.viewStyleAutoHeight,{minHeight:(0,l.default)(v)?"calc("+v+" + "+n+"px)":v+n,maxHeight:(0,l.default)(b)?"calc("+b+" + "+n+"px)":b+n}),y&&g&&!C&&{minHeight:v,maxHeight:b},g&&!C&&p.viewStyleUniversalInitial),E={transition:"opacity "+f+"ms",opacity:0},$=t({},p.trackHorizontalStyleDefault,m&&E,(!n||g&&!C)&&{display:"none"}),M=t({},p.trackVerticalStyleDefault,m&&E,(!n||g&&!C)&&{display:"none"});return(0,a.createElement)(h,t({},_,{style:S,ref:function(t){e.container=t}}),[(0,a.cloneElement)(r({style:k}),{key:"view",ref:function(t){e.view=t}},x),(0,a.cloneElement)(o({style:$}),{key:"trackHorizontal",ref:function(t){e.trackHorizontal=t}},(0,a.cloneElement)(d({style:p.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,a.cloneElement)(s({style:M}),{key:"trackVertical",ref:function(t){e.trackVertical=t}},(0,a.cloneElement)(u({style:p.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),s}(a.Component);e.default=g,g.propTypes={onScroll:s.default.func,onScrollFrame:s.default.func,onScrollStart:s.default.func,onScrollStop:s.default.func,onUpdate:s.default.func,renderView:s.default.func,renderTrackHorizontal:s.default.func,renderTrackVertical:s.default.func,renderThumbHorizontal:s.default.func,renderThumbVertical:s.default.func,tagName:s.default.string,thumbSize:s.default.number,thumbMinSize:s.default.number,hideTracksWhenNotNeeded:s.default.bool,autoHide:s.default.bool,autoHideTimeout:s.default.number,autoHideDuration:s.default.number,autoHeight:s.default.bool,autoHeightMin:s.default.oneOfType([s.default.number,s.default.string]),autoHeightMax:s.default.oneOfType([s.default.number,s.default.string]),universal:s.default.bool,style:s.default.object,children:s.default.node},g.defaultProps={renderView:m.renderViewDefault,renderTrackHorizontal:m.renderTrackHorizontalDefault,renderTrackVertical:m.renderTrackVerticalDefault,renderThumbHorizontal:m.renderThumbHorizontalDefault,renderThumbVertical:m.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}}(kj),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=function(e){return e&&e.__esModule?e:{default:e}}(kj);e.default=t.default,e.Scrollbars=t.default}(Sj);const gO=window.React.forwardRef,yO=window.React.useState,vO=({style:e,...t})=>Vt.jsx("div",{...t,style:{...e,cursor:"pointer",borderRadius:"inherit",width:"3px"}}),bO=gO((({children:e},t)=>{const[n,i]=yO(!1);return Vt.jsx(Sj.Scrollbars,{ref:t,renderThumbVertical:vO,className:h("yaymail-custom-scrollbar",n&&"yaymail-scrolling"),onScrollStart:()=>i(!0),onScrollStop:()=>i(!1),...window.yaymailData.is_rtl?{renderView:e=>Vt.jsx("div",{...e,style:{...e.style,marginLeft:e.style.marginRight,marginRight:0,overflowX:"hidden"}})}:{},children:Vt.jsx("div",{className:"yaymail-customizer-scroll-content",children:e})})})),wO=window.React.useMemo,xO=({element:e,onClick:t,className:n})=>{const{name:i,style:r,icon:o,available:a,status_info:s,disabled_reason:l}=e,c=wO((()=>((null==i?void 0:i.length)??0)>=43),[i]),d=wO((()=>!c&&a?"":Vt.jsxs("div",{style:{textAlign:"center"},children:[c&&Vt.jsx("div",{children:i}),!a&&Vt.jsx("div",{children:l||__("Not available in this template","yaymail")})]})),[a,c,i,l]);return Vt.jsx(Q$,{element:e,style:r,selectable:!1,isSidebar:!0,onClick:t,className:n,children:Vt.jsxs(G,{placement:"bottom",title:d,overlayInnerStyle:{fontSize:"11px"},children:[Vt.jsxs("div",{className:`yaymail-customizer-sidebar-element ${a?"":px}`,children:[Vt.jsx("div",{className:"yaymail-element__icon yaymail-pointer-events-none",dangerouslySetInnerHTML:{__html:o}}),Vt.jsx("div",{className:"yaymail-customizer-sidebar-element__name yaymail-pointer-events-none",children:i}),Vt.jsx("div",{className:"yaymail-customizer-sidebar-element__status-info",children:void 0!==s&&Vt.jsx(Tr,{count:s,color:"#CD9F35"})})]}),Vt.jsx("div",{className:"yaymail-ghost-element",children:Vt.jsx("div",{className:"yaymail-element__icon yaymail-pointer-events-none",dangerouslySetInnerHTML:{__html:o}})})]})})},_O=window.React.useMemo,CO=e=>{const{elements:t,isDragdropEnabled:n=!0,itemClass:i,className:r}=e,o=_O((()=>e.children?e.children:t?t.map((e=>Vt.jsx(xO,{className:i,element:e,onClick:e.onClick},e.id))):""),[t]);return n?Vt.jsx(R$,{list:t,className:h(hx,r),setList:()=>!1,clone:!0,sort:!1,children:o}):Vt.jsx("div",{className:hx,children:o})},SO=window.React.useEffect,kO=window.React.useRef;function EO(e){const t=Zb((e=>e.settings)),{patterns:n}=e;return SO((()=>{let e=0;function n(){window.jQuery(".yaymail-pattern-item").each(((e,n)=>{const i=window.jQuery(n).find(".yaymail-pattern-item__preview");i.css("height","");const r=i.height()??0;let o=276/((null==t?void 0:t.container_width)??900);i.css("height",r*o+"px")}))}n();let i=setInterval((()=>{n(),e++,e>10&&clearInterval(i)}),100);return()=>{clearInterval(i)}}),[n]),Vt.jsx(CO,{elements:n.map((e=>e.elements)),className:"yaymail-pattern-list",children:n.map((e=>(e.elements=((e,t)=>{const n=structuredClone(t),i=[];return n.forEach(((t,r)=>{e.includes(t.id)&&i.push(Mx(t)),null!=t.children&&(n[r].children=vx(e,t.children))})),i})(e.elements.map((e=>e.id)),e.elements),Vt.jsx($O,{pattern:e,containerWidth:(null==t?void 0:t.container_width)??900},e.id))))})}function $O(e){const{pattern:t,containerWidth:n}=e,i=kO(null);return SO((()=>{if(null==i.current)return;const e=window.jQuery(i.current).find(".yaymail-pattern-item").get(0);if(!e)return;const t=window.jQuery(i.current).find(".yaymail-pattern-item__preview"),n=t.height()??0,r=window.getComputedStyle(e);let o=parseFloat(r.getPropertyValue("--yaymail-pattern-preview-iframe-scale").trim());t.css("height",n*o+"px")}),[i.current,t.id]),Vt.jsxs("div",{className:"yaymail-pattern-item-wrapper yaymail-customizer-main","data-yaymail-element-is-pattern":!0,"data-yaymail-element-type":t.type??"","data-yaymail-element-id":t.id,children:[Vt.jsxs("div",{className:"yaymail-customizer-sidebar-element yaymail-pattern-item",style:{"--yaymail-pattern-preview-iframe-width":n+"px","--yaymail-pattern-preview-iframe-scale":""+276/n},children:[Vt.jsx("div",{className:"yaymail-pattern-item__preview",children:Vt.jsx("div",{className:"yaymail-pattern-item__preview__container",children:Vt.jsx("div",{className:"yaymail-pattern-item__preview__scale-container",children:Vt.jsx("div",{className:"yaymail-customizer-email-template-container",children:Vt.jsx(ET,{list:t.elements})})})})}),Vt.jsxs("span",{className:"yaymail-pattern-item__name",children:[" ",t.name]})]}),Vt.jsx("div",{className:"yaymail-ghost-element yaymail-ghost-pattern-element",style:{width:n+"px"},children:Vt.jsx("div",{className:"yaymail-pattern-ghost-list",children:Vt.jsx(ET,{list:t.elements})})})]})}const MO=window.React.useMemo,RO=window.React.useState,AO=()=>{const e=Cj((e=>e.currentSectionTemplate)),[t,n]=RO(""),i=MO((()=>Boolean(t)),[t]),r=MO((()=>{var n;const i=null==(n=null==e?void 0:e.patterns)?void 0:n.sort(((e,t)=>e.position-t.position));return t?null==i?void 0:i.filter((e=>{var n;return null==(n=e.name)?void 0:n.toLowerCase().includes(t.toLowerCase())})):i}),[null==e?void 0:e.patterns,t]);return Vt.jsxs("div",{className:"yaymail-patterns-panel__tab-content",style:{height:"100%"},children:[Vt.jsx(at,{className:"yaymail-custom-search",placeholder:__("Search patterns","yaymail"),onChange:e=>{n(e.target.value)},size:"small",value:t,suffix:i?Vt.jsx(g,{className:"yaymail-close-circle-filled-icon",onClick:()=>{n("")}}):Vt.jsx(At,{})}),Vt.jsxs(bO,{children:[0===(null==r?void 0:r.length)&&Vt.jsx(Rt,{className:"empty-pattern-search-result",image:Rt.PRESENTED_IMAGE_SIMPLE,description:Vt.jsx("span",{className:"empty-pattern-search-result__message",children:__("No pattern found.","yaymail")})}),Vt.jsx(EO,{patterns:r??[]})]})]})},TO=window.React.useState;function LO(){const[e,t]=TO(!1),n=()=>{t(!0)};return Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{className:"yaymail-upgrade-notice",children:[Vt.jsx("span",{className:"yaymail-upgrade-notice__text",children:__("This feature available in PRO version.","yaymail")}),Vt.jsx(Pe,{type:"primary",className:"yaymail-upgrade-notice__button",onClick:n,children:__("Upgrade Now","yaymail")})]}),Vt.jsx(yj,{isOpen:e,onOpen:n,onClose:()=>{t(!1)}})]})}const jO=()=>Vt.jsx("div",{className:"yaymail-patterns-panel__tab-content",style:{height:"100%"},children:Vt.jsxs("div",{className:"yaymail-library-tab-content__container",style:{minHeight:200,position:"relative"},children:[Vt.jsx("div",{className:"yaymail-pattern-list",style:{opacity:.1,pointerEvents:"none",userSelect:"none"},children:Array(3).fill(0).map(((e,t)=>Vt.jsx("div",{className:"yaymail-pattern-item-wrapper",children:Vt.jsxs("div",{className:"yaymail-customizer-sidebar-element yaymail-pattern-item",style:{marginBottom:10},children:[Vt.jsx("div",{style:{width:"100%",background:"#b8b8b8",height:70,borderRadius:7}}),Vt.jsxs("div",{children:[__("Pattern","yaymail")," ",t+1]})]})},t)))}),Vt.jsx(LO,{})]})}),OO=()=>{const e=[{key:"patterns",label:Vt.jsx("span",{className:"yaymail-tab-name",children:__("Patterns","yaymail")}),children:Vt.jsx(AO,{})},{key:"library",label:Vt.jsxs("span",{className:"yaymail-tab-name",children:[__("Library","yaymail"),Vt.jsx(_j,{})]}),children:Vt.jsx(jO,{}),className:"yaymail-library-tab-content"}],t=Cj((e=>e.isOpen)),n=Cj((e=>e.closePanel)),i=Cj((e=>e.activeTab)),r=Cj((e=>e.setActiveTab));return N$((()=>{var e;null==n||n(),null==(e=document.querySelector(".yaymail-pattern-collapses .is-selected"))||e.classList.remove("yaymail-collapse-item-active","is-selected")}),t,{ignoredElementsCssSelectors:[".yaymail-customizer-sidebar__patterns-panel",".yaymail-section-template",".yaymail-global__modal",".yaymail-context-menu-item",".yaymail-pattern-collapses",".yaymail-close-circle-filled-icon",".yaymail-save-to-library-notification__view-library"]},[".yaymail-tabs-nav-wrap",".yaymail-customizer-email-template-container .yaymail-customizer-element"].join(",")),Vt.jsx("div",{style:{position:"relative"},children:Vt.jsx("div",{className:h("yaymail-customizer-sidebar__patterns-panel",t?"yaymail-pattern-panel-open":""),children:Vt.jsxs("div",{style:{margin:Xm.sidebar.padding},children:[Vt.jsx("h2",{className:"yaymail-patterns-panel__title",children:__("DRAG TO USE","yaymail")}),Vt.jsx("div",{className:"yaymail-patterns-panel__tabs",children:Vt.jsx(Ka,{activeKey:i,onChange:e=>r(e),centered:!0,defaultActiveKey:e[0].key,items:e,className:"yaymail-patterns-panel__tabs_tabs",destroyInactiveTabPane:!0})}),Vt.jsx("div",{})]})})})},NO=[{Component:WM,props:{title:__("CSS classes","yaymail"),attribute:"custom_css_classes",initialValue:"",placeholder:__("Eg: classname-a classname-b","yaymail")}}],IO=window.React.useMemo,DO=()=>{const e=cA((e=>e.addonCustomPropertyEditors)),t=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.type})),n=Fx((e=>e.chosenElement)),i=IO((()=>null==n?void 0:n.data),[n]),r=Fx((e=>e.updateChosenElementData)),o=Fx((e=>{var t,n;return null==(n=null==(t=e.chosenElement)?void 0:t.children)?void 0:n.length}))??0,a=Zb((e=>{var t;return null==(t=e.settings)?void 0:t.container_width}));if(!t)return null;const s=Xx((e=>e.elements)),l=IO((()=>{var e;if(!s||0===s.length)return;let t=null==(e=s.find((e=>{var t,i,r;return e.type===(null==n?void 0:n.type)&&"column_layout"!==(null==n?void 0:n.type)||"column_layout"===(null==n?void 0:n.type)&&(null==(t=null==n?void 0:n.data)?void 0:t.amount_of_columns)==(null==(r=null==(i=e.data)?void 0:i.amount_of_columns)?void 0:r.default_value)})))?void 0:e.data;if(!t)return;let r=structuredClone(t);return Object.keys(r).forEach((e=>{Object.prototype.hasOwnProperty.call(r[e],"default_value")?r[e].default_value=i[e]:r[e]={...r[e],...i[e]}})),r}),[s,null==n?void 0:n.type,i]),c=IO((()=>{let t=[];return void 0!==l&&(t=(t=>{let n=[];return Object.values(t).map((o=>{var s,l,c,d,u,h,p,m,f,g,y,v,b,_n;const w=o.conditions??{},x=w.operator??"or";w.operator&&delete w.operator;const _="or"===x?"some":"every",C=Object.values(w)[_]((e=>{if(!t[e.attribute])return!0;const n=t[e.attribute].value_path??"",r=ex(i,n)??"";return"!="===e.comparison?r!==e.value:r&&"contain"===e.comparison&&Array.isArray(e.value)?e.value.every((e=>r.includes(e))):r&&"exclude"===e.comparison&&Array.isArray(e.value)?e.value.every((e=>!r.includes(e))):r===e.value}));if(!(Object.values(w).length>0)||C)switch(o.component){case"LineBreaker":n.push({Component:ZR});break;case"GroupDefinition":n.push({Component:XR,props:{title:o.title,description:o.description}});break;case"Align":n.push({Component:nM,props:{attribute:o.value_path,title:o.title}});break;case"Spacing":n.push({Component:yR,props:{title:o.title,attribute:o.value_path,extras_data:o.extras_data}});break;case"Image":n.push({Component:nR,props:{attribute:o.value_path,title:o.title,mediaType:null==(s=o.extras_data)?void 0:s.media_type,buttonTitle:null==(l=o.extras_data)?void 0:l.button_title,showPreview:null==(c=o.extras_data)?void 0:c.show_preview}});break;case"Dimension":n.push({Component:FM,props:{min:(null==(d=o.extras_data)?void 0:d.min)??0,max:(null==(u=o.extras_data)?void 0:u.max)??a,unit:(null==(h=o.extras_data)?void 0:h.unit)??"px",attribute:o.value_path,title:o.title}});break;case"Color":n.push({Component:MM,props:{attribute:o.value_path,title:o.title}});break;case"TextInput":n.push({Component:WM,props:{attribute:o.value_path,title:o.title,initialValue:"",placeholder:null==(p=o.extras_data)?void 0:p.placeholder,multiple:null==(m=o.extras_data)?void 0:m.multiple,rows:(null==(f=o.extras_data)?void 0:f.rows)??1}});break;case"Selector":n.push({Component:hR,props:{attribute:o.value_path,options:null==(g=o.extras_data)?void 0:g.options,defaultValue:o.default_value,title:o.title}});break;case"FontFamilySelector":n.push({Component:hR,props:{attribute:o.value_path,children:xR,defaultValue:o.default_value,title:o.title}});break;case"FontSizeSelector":n.push({Component:hR,props:{attribute:o.value_path,options:SR,defaultValue:o.default_value,title:o.title}});break;case"ButtonTypeSelector":n.push({Component:hR,props:{attribute:o.value_path,options:_R,defaultValue:o.default_value,title:o.title,onChange:e=>{if(!i)return;const t=_R.find((t=>t.value===e)),n=(null==t?void 0:t.color)||"";r((e=>{e.button_type=t,e.button_background_color=n}),{attribute:o.title})}}});break;case"FontWeightSelector":n.push({Component:hR,props:{attribute:o.value_path??"1",options:CR,defaultValue:o.default_value,title:o.title}});break;case"SocialIconThemeSelector":n.push({Component:hR,props:{attribute:o.value_path??"1",options:ER,defaultValue:o.default_value,title:o.title}});break;case"DividerTypeSelector":n.push({Component:hR,props:{attribute:o.value_path??"1",options:kR,defaultValue:o.default_value,title:o.title}});break;case"RichTextEditor":n.push({Component:lR,props:{attribute:o.value_path,title:o.title,editorId:o.editor_id}});break;case"SocialList":n.push({Component:DR,props:{attribute:o.value_path,title:o.title}});break;case"NumberColumn":n.push({Component:dR,props:{attribute:o.value_path,title:o.title}});break;case"ImageList":n.push({Component:LR});break;case"ImageBox":n.push({Component:AR});break;case"TextList":n.push({Component:GR});break;case"BackgroundImage":n.push({Component:vM,props:{title:o.title,urlInputPlaceHolder:"Eg: https://example.com/image.png",showDeleteButton:!0,hidePreviewOnEmptyUrl:!0}});break;case"ColumnWidth":n.push({Component:LM,props:{title:o.title,amount:o.default_value}});break;case"HookSelector":n.push({Component:XM,props:{title:o.title}});break;case"NumberInput":n.push({Component:oR,props:{title:o.title,attribute:o.value_path,min:(null==(y=o.extras_data)?void 0:y.min)??0,max:(null==(v=o.extras_data)?void 0:v.max)??10,extras_data:o.extras_data,style:{width:"65px"}}});break;case"CheckboxGroup":n.push({Component:CM,props:{attribute:o.value_path,title:o.title,options:(null==(b=o.extras_data)?void 0:b.options)??[]}});break;case"Switcher":n.push({Component:qR,props:{attribute:o.value_path,title:o.title,initialValue:o.default_value??!0,layout:o.layout}});break;default:const t=(null==(_n=e.find((e=>e.name===o.component)))?void 0:_n.component)??null;if(!ix(t))break;n.push({Component:t,props:{...o}})}})),n})(l)),t=t.concat(NO),t}),[t,r,o,i]);return 0===c.length?null:Vt.jsx(Vt.Fragment,{children:c.map((({Component:e,props:t},n)=>e?Vt.jsx(e,{...t},n):null))})},PO=window.React.useCallback,zO=window.React.useEffect,FO=window.React.useRef,BO=()=>{const e=Fx((e=>e.unchooseElement)),t=PO((()=>{e()}),[e]),n=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.name})),i=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),r=FO(null);return zO((()=>{var e;null==(e=r.current)||e.scrollTop(0)}),[i]),Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:"yaymail-customizer-sidebar-editor__header",children:Vt.jsxs("span",{className:"yaymail-btn-back",onClick:t,children:[Vt.jsx(hh,{className:"yaymail-btn-back__icon"}),Vt.jsxs("span",{className:"yaymail-btn-back__label",children:["Edit ",n]})]})}),Vt.jsx(bO,{ref:r,children:Vt.jsx("main",{className:"yaymail-customizer-sidebar-editor__main",children:Vt.jsx(DO,{})})})]})},HO=window.React.useCallback,WO=()=>{const e=Px((e=>e.changes)),t=Px((e=>e.timeTravelingIndex)),n=Px((e=>e.jumpToChange)),i=HO((e=>e===t),[t]),r=HO((e=>e?"initialized"===e.action?Vt.jsx("span",{className:"yaymail-item-name-element",children:"Customizing started"}):e.customMessage?Vt.jsx("span",{className:"yaymail-item-name-element",children:e.customMessage}):Vt.jsxs("div",{style:{margin:"0 20px 0 0"},children:[(null==e?void 0:e.elementName)&&Vt.jsx("span",{className:"yaymail-item-name-element",children:e.elementName}),(null==e?void 0:e.attribute)&&Vt.jsxs("span",{className:"yaymail-item-attribute",children:[" - ",e.attribute]}),(null==e?void 0:e.action)&&Vt.jsxs("span",{className:"yaymail-item-type",children:[" ","- ",Vt.jsx("span",{className:"yaymail-item-type-content",children:e.action})]})]}):null),[]);return Vt.jsx("section",{className:"yaymail-list-actions",children:e.map((({info:e},t)=>Vt.jsxs("div",{className:"yaymail-list-actions__item "+(i(t)?"yaymail-list-actions__item__active":""),onClick:()=>n(t),children:[r(e),i(t)?Vt.jsx(Tt,{}):""]},t)))})},UO=e=>GS.createElement("svg",{width:12,height:7,viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M6.4822 6.75771L11.762 1.38505C12.0793 1.0621 12.0793 0.571381 11.762 0.242216C11.4446 -0.0807387 10.9624 -0.0807387 10.6388 0.242216L5.99996 4.96268L1.3611 0.242216C1.04373 -0.0807392 0.561502 -0.0807392 0.238028 0.242215C0.0793419 0.403693 -2.47044e-08 0.56517 -3.55666e-08 0.813669C-4.2625e-08 0.975146 0.0793428 1.22364 0.158686 1.46579L5.35912 6.75771C5.5178 6.91919 5.67649 7 5.92069 7C6.15872 7 6.32351 6.91926 6.4822 6.75771Z",fill:"white",fillOpacity:.15})),VO=window.React.useMemo,GO=({items:e=[],className:t,panelStyle:n,...i})=>{const{token:r}=be.useToken(),o=VO((()=>({background:Xm.collapse.tab.background,border:"none",borderRadius:r.borderRadiusLG,fontSize:14,marginBottom:10,...n})),[r.borderRadiusLG]),a=VO((()=>e.map((e=>({...e,style:o,className:"yaymail-collapse-"+(null==e?void 0:e.key)+"-item"})))),[e,o]);return Vt.jsx(Os,{className:h("yaymail-customizer-sidebar-collapse",t),bordered:!1,expandIconPosition:"end",expandIcon:UO,items:a,style:{background:Xm.sidebar.background},...i})},YO=window.React.useContext,KO=window.React.useMemo,QO=window.React.useState,qO=e=>{const{allSearchableElements:t,groups:n,tabFor:i,isDragdropEnabled:r,onItemClick:o,itemClass:a,onSearch:s,renderElementList:l,emptyText:c=__("No element found.","yaymail"),searchBoxPlaceholder:d=__("Search elements","yaymail")}=e,[u,h]=QO(""),p=KO((()=>Boolean(u)),[u]),m=KO((()=>{if(s)return t.filter((e=>s(e,u)));const e=u.toLowerCase();return t.filter((t=>{var n;return"hidden"!==t.group&&((null==(n=t.name)?void 0:n.toLowerCase().includes(e))||t.type.toLowerCase().includes(e))}))}),[u,t,s]),{elementCollapseActiveKeys:f,setElementCollapseActiveKeys:y}=YO(QF)??{},v=Cj((e=>e.openPanel)),b=Cj((e=>e.setCurrentSectionTemplate)),w=KO((()=>{const e=t.sort(((e,t)=>(e.position??0)-(t.position??0)));return(null==n?void 0:n.map((({key:t,label:n})=>{const i=e.filter((e=>lw(e.group)===t)).map((e=>({...e,onClick:()=>null==o?void 0:o(e)})));return{key:t,label:n,children:l?l(i):Vt.jsx(CO,{isDragdropEnabled:r,elements:i,itemClass:a})}})))??[]}),[t,o]),x=KO((()=>"patterns"===i),[i]),_=KO((()=>"library"===i),[i]);return Vt.jsxs(Ct,{direction:"vertical",className:"yaymail-customizer-tab-content yaymail-customizer-tab-elements",children:["patterns"!==i&&Vt.jsx(at,{className:"yaymail-custom-search",placeholder:d,onChange:e=>{h(e.target.value)},size:"small",value:u,suffix:p?Vt.jsx(g,{onClick:e=>(e=>{e.stopPropagation(),h("")})(e)}):Vt.jsx(At,{})}),p&&m.length>0&&Vt.jsx(GO,{className:"search-result",items:[{key:"search-result",children:l?l(m):Vt.jsx(CO,{elements:m})}],activeKey:"search-result"}),p&&0===m.length&&Vt.jsx(Rt,{className:"empty-search-result",image:Rt.PRESENTED_IMAGE_SIMPLE,description:Vt.jsx("span",{className:"empty-search-result__message",children:c})}),!p&&Vt.jsx(GO,{items:w,onChange:e=>{if(null==y||y(e),"patterns"===i){const n=e=>{var t;const n=JSON.stringify(e).replace(/[[\]"]+/g,"");document.querySelectorAll(".is-selected").forEach((e=>{e.classList.remove("yaymail-collapse-item-active","is-selected")})),null==(t=document.querySelector(`.yaymail-collapse-${n}-item`))||t.classList.add("yaymail-collapse-item-active","is-selected")};(e=>{const n=JSON.stringify(e).replace(/[[\]"]+/g,""),i=t.filter((e=>e.type==n));null==v||v(),null==b||b(i[0])})(e),0!==Object.keys(e).length&&n(e)}},activeKey:_?"user_saved_patterns":x?[]:f,className:x?"yaymail-pattern-collapses":""})]})},ZO=window.React.useMemo,XO=()=>{const e=Xx((e=>e.elements)),t=ZO((()=>[{key:"basic",label:__("Basic","yaymail")},{key:"general",label:__("General","yaymail")},{key:"woocommerce",label:__("WooCommerce","yaymail")},{key:"block",label:Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("span",{className:"yaymail-collapse-item-name",children:__("Blocks","yaymail")}),Vt.jsx("span",{className:"yaymail-collapse-item-name-badge",children:Vt.jsx(_j,{})})]})}]),[]),n=ZO((()=>[...new Set(e.map((e=>e.group)))].filter((e=>"hidden"!==e&&!t.some((t=>t.key===e)))).map((e=>({key:lw(e),label:__(e.charAt(0).toUpperCase()+e.slice(1))})))),[e,t]),i=n.length>0?[...t,...n]:t;return Vt.jsx(qO,{allSearchableElements:e,groups:i})},JO=()=>{const e=Object.values(window.yaymailData.builder.section_templates),t=[{key:"header",label:__("Header","yaymail")},{key:"footer",label:__("Footer","yaymail")},{key:"banner",label:__("Banner","yaymail")},{key:"gallery",label:__("Gallery","yaymail")},{key:"shipping",label:__("Shipping","yaymail")},{key:"offer",label:__("Offer","yaymail")}];return Vt.jsx(qO,{allSearchableElements:e,groups:t,tabFor:"patterns",itemClass:"yaymail-section-template"})};var eN,tN;function nN(){return eN.apply(null,arguments)}function iN(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function rN(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function oN(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function aN(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(oN(e,t))return!1;return!0}function sN(e){return void 0===e}function lN(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function cN(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function dN(e,t){var n,i=[],r=e.length;for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}nN.suppressDeprecationWarnings=!1,nN.deprecationHandler=null,CN=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)oN(e,t)&&n.push(t);return n};var AN=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,TN=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,LN={},jN={};function ON(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(jN[e]=r),t&&(jN[t[0]]=function(){return RN(r.apply(this,arguments),t[1],t[2])}),n&&(jN[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function NN(e,t){return e.isValid()?(t=IN(t,e.localeData()),LN[t]=LN[t]||function(e){var t,n,i,r=e.match(AN);for(t=0,n=r.length;t=0&&TN.test(e);)e=e.replace(TN,i),TN.lastIndex=0,n-=1;return e}var DN={};function PN(e,t){var n=e.toLowerCase();DN[n]=DN[n+"s"]=DN[t]=e}function zN(e){return"string"==typeof e?DN[e]||DN[e.toLowerCase()]:void 0}function FN(e){var t,n,i={};for(n in e)oN(e,n)&&(t=zN(n))&&(i[t]=e[n]);return i}var BN={};function HN(e,t){BN[e]=t}function WN(e){return e%4==0&&e%100!=0||e%400==0}function UN(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function VN(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=UN(t)),n}function GN(e,t){return function(n){return null!=n?(KN(this,e,n),nN.updateOffset(this,t),this):YN(this,e)}}function YN(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function KN(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&WN(e.year())&&1===e.month()&&29===e.date()?(n=VN(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),wI(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var QN,qN=/\d/,ZN=/\d\d/,XN=/\d{3}/,JN=/\d{4}/,eI=/[+-]?\d{6}/,tI=/\d\d?/,nI=/\d\d\d\d?/,iI=/\d\d\d\d\d\d?/,rI=/\d{1,3}/,oI=/\d{1,4}/,aI=/[+-]?\d{1,6}/,sI=/\d+/,lI=/[+-]?\d+/,cI=/Z|[+-]\d\d:?\d\d/gi,dI=/Z|[+-]\d\d(?::?\d\d)?/gi,uI=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function hI(e,t,n){QN[e]=EN(t)?t:function(e,i){return e&&n?n:t}}function pI(e,t){return oN(QN,e)?QN[e](t._strict,t._locale):new RegExp(mI(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r}))))}function mI(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}QN={};var fI,gI={};function yI(e,t){var n,i,r=t;for("string"==typeof e&&(e=[e]),lN(t)&&(r=function(e,n){n[t]=VN(e)}),i=e.length,n=0;n68?1900:2e3)};var TI=GN("FullYear",!0);function LI(e,t,n,i,r,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,r,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,r,o,a),s}function jI(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function OI(e,t,n){var i=7+t-n;return-(7+jI(e,0,i).getUTCDay()-t)%7+i-1}function NI(e,t,n,i,r){var o,a,s=1+7*(t-1)+(7+n-i)%7+OI(e,i,r);return s<=0?a=AI(o=e-1)+s:s>AI(e)?(o=e+1,a=s-AI(e)):(o=e,a=s),{year:o,dayOfYear:a}}function II(e,t,n){var i,r,o=OI(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?i=a+DI(r=e.year()-1,t,n):a>DI(e.year(),t,n)?(i=a-DI(e.year(),t,n),r=e.year()+1):(r=e.year(),i=a),{week:i,year:r}}function DI(e,t,n){var i=OI(e,t,n),r=OI(e+1,t,n);return(AI(e)-i+r)/7}function PI(e,t){return e.slice(t,7).concat(e.slice(0,t))}ON("w",["ww",2],"wo","week"),ON("W",["WW",2],"Wo","isoWeek"),PN("week","w"),PN("isoWeek","W"),HN("week",5),HN("isoWeek",5),hI("w",tI),hI("ww",tI,ZN),hI("W",tI),hI("WW",tI,ZN),vI(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=VN(e)})),ON("d",0,"do","day"),ON("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),ON("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),ON("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),ON("e",0,0,"weekday"),ON("E",0,0,"isoWeekday"),PN("day","d"),PN("weekday","e"),PN("isoWeekday","E"),HN("day",11),HN("weekday",11),HN("isoWeekday",11),hI("d",tI),hI("e",tI),hI("E",tI),hI("dd",(function(e,t){return t.weekdaysMinRegex(e)})),hI("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),hI("dddd",(function(e,t){return t.weekdaysRegex(e)})),vI(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:pN(n).invalidWeekday=e})),vI(["d","e","E"],(function(e,t,n,i){t[i]=VN(e)}));var zI="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),FI="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),BI="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),HI=uI,WI=uI,UI=uI;function VI(e,t,n){var i,r,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=hN([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=fI.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=fI.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=fI.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=fI.call(this._weekdaysParse,a))||-1!==(r=fI.call(this._shortWeekdaysParse,a))||-1!==(r=fI.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=fI.call(this._shortWeekdaysParse,a))||-1!==(r=fI.call(this._weekdaysParse,a))||-1!==(r=fI.call(this._minWeekdaysParse,a))?r:null:-1!==(r=fI.call(this._minWeekdaysParse,a))||-1!==(r=fI.call(this._weekdaysParse,a))||-1!==(r=fI.call(this._shortWeekdaysParse,a))?r:null}function GI(){function e(e,t){return t.length-e.length}var t,n,i,r,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=hN([2e3,1]).day(t),i=mI(this.weekdaysMin(n,"")),r=mI(this.weekdaysShort(n,"")),o=mI(this.weekdays(n,"")),a.push(i),s.push(r),l.push(o),c.push(i),c.push(r),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function YI(){return this.hours()%12||12}function KI(e,t){ON(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function QI(e,t){return t._meridiemParse}ON("H",["HH",2],0,"hour"),ON("h",["hh",2],0,YI),ON("k",["kk",2],0,(function(){return this.hours()||24})),ON("hmm",0,0,(function(){return""+YI.apply(this)+RN(this.minutes(),2)})),ON("hmmss",0,0,(function(){return""+YI.apply(this)+RN(this.minutes(),2)+RN(this.seconds(),2)})),ON("Hmm",0,0,(function(){return""+this.hours()+RN(this.minutes(),2)})),ON("Hmmss",0,0,(function(){return""+this.hours()+RN(this.minutes(),2)+RN(this.seconds(),2)})),KI("a",!0),KI("A",!1),PN("hour","h"),HN("hour",13),hI("a",QI),hI("A",QI),hI("H",tI),hI("h",tI),hI("k",tI),hI("HH",tI,ZN),hI("hh",tI,ZN),hI("kk",tI,ZN),hI("hmm",nI),hI("hmmss",iI),hI("Hmm",nI),hI("Hmmss",iI),yI(["H","HH"],3),yI(["k","kk"],(function(e,t,n){var i=VN(e);t[3]=24===i?0:i})),yI(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),yI(["h","hh"],(function(e,t,n){t[3]=VN(e),pN(n).bigHour=!0})),yI("hmm",(function(e,t,n){var i=e.length-2;t[3]=VN(e.substr(0,i)),t[4]=VN(e.substr(i)),pN(n).bigHour=!0})),yI("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=VN(e.substr(0,i)),t[4]=VN(e.substr(i,2)),t[5]=VN(e.substr(r)),pN(n).bigHour=!0})),yI("Hmm",(function(e,t,n){var i=e.length-2;t[3]=VN(e.substr(0,i)),t[4]=VN(e.substr(i))})),yI("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=VN(e.substr(0,i)),t[4]=VN(e.substr(i,2)),t[5]=VN(e.substr(r))}));var qI,ZI=GN("Hours",!0),XI={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xI,monthsShort:_I,week:{dow:0,doy:6},weekdays:zI,weekdaysMin:BI,weekdaysShort:FI,meridiemParse:/[ap]\.?m?\.?/i},JI={},eD={};function tD(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n0;){if(i=iD(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&tD(r,n)>=t-1)break;t--}o++}return qI}(e)}function sD(e){var t,n=e._a;return n&&-2===pN(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>wI(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,pN(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),pN(e)._overflowWeeks&&-1===t&&(t=7),pN(e)._overflowWeekday&&-1===t&&(t=8),pN(e).overflow=t),e}var lD=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,cD=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dD=/Z|[+-]\d\d(?::?\d\d)?/,uD=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],hD=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pD=/^\/?Date\((-?\d+)/i,mD=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,fD={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function gD(e){var t,n,i,r,o,a,s=e._i,l=lD.exec(s)||cD.exec(s),c=uD.length,d=hD.length;if(l){for(pN(e).iso=!0,t=0,n=c;t7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=II(SD(),o,a),n=bD(t.gg,e._a[0],c.year),i=bD(t.w,c.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(l=!0)):r=o),i<1||i>DI(n,o,a)?pN(e)._overflowWeeks=!0:null!=l?pN(e)._overflowWeekday=!0:(s=NI(n,i,r,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=bD(e._a[0],i[0]),(e._dayOfYear>AI(o)||0===e._dayOfYear)&&(pN(e)._overflowDayOfYear=!0),n=jI(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?jI:LI).apply(null,a),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(pN(e).weekdayMismatch=!0)}}function xD(e){if(e._f!==nN.ISO_8601)if(e._f!==nN.RFC_2822){e._a=[],pN(e).empty=!0;var t,n,i,r,o,a,s,l=""+e._i,c=l.length,d=0;for(s=(i=IN(e._f,e._locale).match(AN)||[]).length,t=0;t0&&pN(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),jN[r]?(n?pN(e).empty=!1:pN(e).unusedTokens.push(r),bI(r,n,e)):e._strict&&!n&&pN(e).unusedTokens.push(r);pN(e).charsLeftOver=c-d,l.length>0&&pN(e).unusedInput.push(l),e._a[3]<=12&&!0===pN(e).bigHour&&e._a[3]>0&&(pN(e).bigHour=void 0),pN(e).parsedDateParts=e._a.slice(0),pN(e).meridiem=e._meridiem,e._a[3]=(u=e._locale,h=e._a[3],null==(p=e._meridiem)?h:null!=u.meridiemHour?u.meridiemHour(h,p):null!=u.isPM?((m=u.isPM(p))&&h<12&&(h+=12),m||12!==h||(h=0),h):h),null!==(a=pN(e).era)&&(e._a[0]=e._locale.erasConvertYear(a,e._a[0])),wD(e),sD(e)}else vD(e);else gD(e);var u,h,p,m}function _D(e){var t=e._i,n=e._f;return e._locale=e._locale||aD(e._l),null===t||void 0===n&&""===t?fN({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),wN(t)?new bN(sD(t)):(cN(t)?e._d=t:iN(n)?function(e){var t,n,i,r,o,a,s=!1,l=e._f.length;if(0===l)return pN(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis?this:e:fN()}));function $D(e,t){var n,i;if(1===t.length&&iN(t[0])&&(t=t[0]),!t.length)return SD();for(n=t[0],i=1;i=0?new Date(e+400,t,n)-tP:new Date(e,t,n).valueOf()}function rP(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-tP:Date.UTC(e,t,n)}function oP(e,t){return t.erasAbbrRegex(e)}function aP(){var e,t,n=[],i=[],r=[],o=[],a=this.eras();for(e=0,t=a.length;e(o=DI(e,i,r))&&(t=o),cP.call(this,e,t,n,i,r))}function cP(e,t,n,i,r){var o=NI(e,t,n,i,r),a=jI(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}ON("N",0,0,"eraAbbr"),ON("NN",0,0,"eraAbbr"),ON("NNN",0,0,"eraAbbr"),ON("NNNN",0,0,"eraName"),ON("NNNNN",0,0,"eraNarrow"),ON("y",["y",1],"yo","eraYear"),ON("y",["yy",2],0,"eraYear"),ON("y",["yyy",3],0,"eraYear"),ON("y",["yyyy",4],0,"eraYear"),hI("N",oP),hI("NN",oP),hI("NNN",oP),hI("NNNN",(function(e,t){return t.erasNameRegex(e)})),hI("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),yI(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?pN(n).era=r:pN(n).invalidEra=e})),hI("y",sI),hI("yy",sI),hI("yyy",sI),hI("yyyy",sI),hI("yo",(function(e,t){return t._eraYearOrdinalRegex||sI})),yI(["y","yy","yyy","yyyy"],0),yI(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,r):t[0]=parseInt(e,10)})),ON(0,["gg",2],0,(function(){return this.weekYear()%100})),ON(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sP("gggg","weekYear"),sP("ggggg","weekYear"),sP("GGGG","isoWeekYear"),sP("GGGGG","isoWeekYear"),PN("weekYear","gg"),PN("isoWeekYear","GG"),HN("weekYear",1),HN("isoWeekYear",1),hI("G",lI),hI("g",lI),hI("GG",tI,ZN),hI("gg",tI,ZN),hI("GGGG",oI,JN),hI("gggg",oI,JN),hI("GGGGG",aI,eI),hI("ggggg",aI,eI),vI(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=VN(e)})),vI(["gg","GG"],(function(e,t,n,i){t[i]=nN.parseTwoDigitYear(e)})),ON("Q",0,"Qo","quarter"),PN("quarter","Q"),HN("quarter",7),hI("Q",qN),yI("Q",(function(e,t){t[1]=3*(VN(e)-1)})),ON("D",["DD",2],"Do","date"),PN("date","D"),HN("date",9),hI("D",tI),hI("DD",tI,ZN),hI("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),yI(["D","DD"],2),yI("Do",(function(e,t){t[2]=VN(e.match(tI)[0])}));var dP=GN("Date",!0);ON("DDD",["DDDD",3],"DDDo","dayOfYear"),PN("dayOfYear","DDD"),HN("dayOfYear",4),hI("DDD",rI),hI("DDDD",XN),yI(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=VN(e)})),ON("m",["mm",2],0,"minute"),PN("minute","m"),HN("minute",14),hI("m",tI),hI("mm",tI,ZN),yI(["m","mm"],4);var uP=GN("Minutes",!1);ON("s",["ss",2],0,"second"),PN("second","s"),HN("second",15),hI("s",tI),hI("ss",tI,ZN),yI(["s","ss"],5);var hP,pP,mP=GN("Seconds",!1);for(ON("S",0,0,(function(){return~~(this.millisecond()/100)})),ON(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),ON(0,["SSS",3],0,"millisecond"),ON(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),ON(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),ON(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),ON(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),ON(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),ON(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),PN("millisecond","ms"),HN("millisecond",16),hI("S",rI,qN),hI("SS",rI,ZN),hI("SSS",rI,XN),hP="SSSS";hP.length<=9;hP+="S")hI(hP,sI);function fP(e,t){t[6]=VN(1e3*("0."+e))}for(hP="S";hP.length<=9;hP+="S")yI(hP,fP);pP=GN("Milliseconds",!1),ON("z",0,0,"zoneAbbr"),ON("zz",0,0,"zoneName");var gP=bN.prototype;function yP(e){return e}gP.add=VD,gP.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?wN(n=arguments[0])||cN(n)||YD(n)||lN(n)||function(e){var t=iN(e),n=!1;return t&&(n=0===e.filter((function(t){return!lN(t)&&YD(e)})).length),t&&n}(n)||function(e){var t,n=rN(e)&&!aN(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=r.length;for(t=0;tn.valueOf():n.valueOf()9999?NN(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):EN(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",NN(n,"Z")):NN(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gP.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=r+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(gP[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),gP.toJSON=function(){return this.isValid()?this.toISOString():null},gP.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gP.unix=function(){return Math.floor(this.valueOf()/1e3)},gP.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gP.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gP.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gP.isLocal=function(){return!!this.isValid()&&!this._isUTC},gP.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gP.isUtc=DD,gP.isUTC=DD,gP.zoneAbbr=function(){return this._isUTC?"UTC":""},gP.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gP.dates=_N("dates accessor is deprecated. Use date instead.",dP),gP.months=_N("months accessor is deprecated. Use month instead",MI),gP.years=_N("years accessor is deprecated. Use year instead",TI),gP.zone=_N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),gP.isDSTShifted=_N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!sN(this._isDSTShifted))return this._isDSTShifted;var e,t={};return vN(t,this),(t=_D(t))._a?(e=t._isUTC?hN(t._a):SD(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var vP=MN.prototype;function bP(e,t,n,i){var r=aD(),o=hN().set(i,t);return r[n](o,e)}function wP(e,t,n){if(lN(e)&&(t=e,e=void 0),e=e||"",null!=t)return bP(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=bP(e,i,n,"month");return r}function xP(e,t,n,i){"boolean"==typeof e?(lN(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,lN(t)&&(n=t,t=void 0),t=t||"");var r,o=aD(),a=e?o._week.dow:0,s=[];if(null!=n)return bP(t,(n+a)%7,i,"day");for(r=0;r<7;r++)s[r]=bP(t,(r+a)%7,i,"day");return s}vP.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return EN(i)?i.call(t,n):i},vP.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(AN).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},vP.invalidDate=function(){return this._invalidDate},vP.ordinal=function(e){return this._ordinal.replace("%d",e)},vP.preparse=yP,vP.postformat=yP,vP.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return EN(r)?r(e,t,n,i):r.replace(/%d/i,e)},vP.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return EN(n)?n(t):n.replace(/%s/i,t)},vP.set=function(e){var t,n;for(n in e)oN(e,n)&&(EN(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vP.eras=function(e,t){var n,i,r,o=this._eras||aD("en")._eras;for(n=0,i=o.length;n=0)return l[i]},vP.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?nN(e.since).year():nN(e.since).year()+(t-e.offset)*n},vP.erasAbbrRegex=function(e){return oN(this,"_erasAbbrRegex")||aP.call(this),e?this._erasAbbrRegex:this._erasRegex},vP.erasNameRegex=function(e){return oN(this,"_erasNameRegex")||aP.call(this),e?this._erasNameRegex:this._erasRegex},vP.erasNarrowRegex=function(e){return oN(this,"_erasNarrowRegex")||aP.call(this),e?this._erasNarrowRegex:this._erasRegex},vP.months=function(e,t){return e?iN(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||CI).test(t)?"format":"standalone"][e.month()]:iN(this._months)?this._months:this._months.standalone},vP.monthsShort=function(e,t){return e?iN(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[CI.test(t)?"format":"standalone"][e.month()]:iN(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vP.monthsParse=function(e,t,n){var i,r,o;if(this._monthsParseExact)return EI.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=hN([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},vP.monthsRegex=function(e){return this._monthsParseExact?(oN(this,"_monthsRegex")||RI.call(this),e?this._monthsStrictRegex:this._monthsRegex):(oN(this,"_monthsRegex")||(this._monthsRegex=kI),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vP.monthsShortRegex=function(e){return this._monthsParseExact?(oN(this,"_monthsRegex")||RI.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(oN(this,"_monthsShortRegex")||(this._monthsShortRegex=SI),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vP.week=function(e){return II(e,this._week.dow,this._week.doy).week},vP.firstDayOfYear=function(){return this._week.doy},vP.firstDayOfWeek=function(){return this._week.dow},vP.weekdays=function(e,t){var n=iN(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?PI(n,this._week.dow):e?n[e.day()]:n},vP.weekdaysMin=function(e){return!0===e?PI(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vP.weekdaysShort=function(e){return!0===e?PI(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vP.weekdaysParse=function(e,t,n){var i,r,o;if(this._weekdaysParseExact)return VI.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=hN([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},vP.weekdaysRegex=function(e){return this._weekdaysParseExact?(oN(this,"_weekdaysRegex")||GI.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(oN(this,"_weekdaysRegex")||(this._weekdaysRegex=HI),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vP.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(oN(this,"_weekdaysRegex")||GI.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(oN(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=WI),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vP.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(oN(this,"_weekdaysRegex")||GI.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(oN(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=UI),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vP.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vP.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},rD("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===VN(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),nN.lang=_N("moment.lang is deprecated. Use moment.locale instead.",rD),nN.langData=_N("moment.langData is deprecated. Use moment.localeData instead.",aD);var _P=Math.abs;function CP(e,t,n,i){var r=FD(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function SP(e){return e<0?Math.floor(e):Math.ceil(e)}function kP(e){return 4800*e/146097}function EP(e){return 146097*e/4800}function $P(e){return function(){return this.as(e)}}var MP=$P("ms"),RP=$P("s"),AP=$P("m"),TP=$P("h"),LP=$P("d"),jP=$P("w"),OP=$P("M"),NP=$P("Q"),IP=$P("y");function DP(e){return function(){return this.isValid()?this._data[e]:NaN}}var PP=DP("milliseconds"),zP=DP("seconds"),FP=DP("minutes"),BP=DP("hours"),HP=DP("days"),WP=DP("months"),UP=DP("years"),VP=Math.round,GP={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function YP(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}var KP=Math.abs;function QP(e){return(e>0)-(e<0)||+e}function qP(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,r,o,a,s,l=KP(this._milliseconds)/1e3,c=KP(this._days),d=KP(this._months),u=this.asSeconds();return u?(e=UN(l/60),t=UN(e/60),l%=60,e%=60,n=UN(d/12),d%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=u<0?"-":"",o=QP(this._months)!==QP(u)?"-":"",a=QP(this._days)!==QP(u)?"-":"",s=QP(this._milliseconds)!==QP(u)?"-":"",r+"P"+(n?o+n+"Y":"")+(d?o+d+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var ZP=RD.prototype;ZP.isValid=function(){return this._isValid},ZP.abs=function(){var e=this._data;return this._milliseconds=_P(this._milliseconds),this._days=_P(this._days),this._months=_P(this._months),e.milliseconds=_P(e.milliseconds),e.seconds=_P(e.seconds),e.minutes=_P(e.minutes),e.hours=_P(e.hours),e.months=_P(e.months),e.years=_P(e.years),this},ZP.add=function(e,t){return CP(this,e,t,1)},ZP.subtract=function(e,t){return CP(this,e,t,-1)},ZP.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=zN(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+kP(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(EP(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},ZP.asMilliseconds=MP,ZP.asSeconds=RP,ZP.asMinutes=AP,ZP.asHours=TP,ZP.asDays=LP,ZP.asWeeks=jP,ZP.asMonths=OP,ZP.asQuarters=NP,ZP.asYears=IP,ZP.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*VN(this._months/12):NaN},ZP._bubble=function(){var e,t,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*SP(EP(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=UN(o/1e3),l.seconds=e%60,t=UN(e/60),l.minutes=t%60,n=UN(t/60),l.hours=n%24,a+=UN(n/24),s+=r=UN(kP(a)),a-=SP(EP(r)),i=UN(s/12),s%=12,l.days=a,l.months=s,l.years=i,this},ZP.clone=function(){return FD(this)},ZP.get=function(e){return e=zN(e),this.isValid()?this[e+"s"]():NaN},ZP.milliseconds=PP,ZP.seconds=zP,ZP.minutes=FP,ZP.hours=BP,ZP.days=HP,ZP.weeks=function(){return UN(this.days()/7)},ZP.months=WP,ZP.years=UP,ZP.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,o=GP;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(o=Object.assign({},GP,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),i=function(e,t,n,i){var r=FD(e).abs(),o=VP(r.as("s")),a=VP(r.as("m")),s=VP(r.as("h")),l=VP(r.as("d")),c=VP(r.as("M")),d=VP(r.as("w")),u=VP(r.as("y")),h=o<=n.ss&&["s",o]||o0,h[4]=i,YP.apply(null,h)}(this,!r,o,n=this.localeData()),r&&(i=n.pastFuture(+this,i)),n.postformat(i)},ZP.toISOString=qP,ZP.toString=qP,ZP.toJSON=qP,ZP.locale=QD,ZP.localeData=ZD,ZP.toIsoString=_N("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qP),ZP.lang=qD,ON("X",0,0,"unix"),ON("x",0,0,"valueOf"),hI("x",lI),hI("X",/[+-]?\d+(\.\d{1,3})?/),yI("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),yI("x",(function(e,t,n){n._d=new Date(VN(e))})),nN.version="2.29.4",eN=SD,nN.fn=gP,nN.min=function(){return $D("isBefore",[].slice.call(arguments,0))},nN.max=function(){return $D("isAfter",[].slice.call(arguments,0))},nN.now=function(){return Date.now?Date.now():+new Date},nN.utc=hN,nN.unix=function(e){return SD(1e3*e)},nN.months=function(e,t){return wP(e,t,"months")},nN.isDate=cN,nN.locale=rD,nN.invalid=fN,nN.duration=FD,nN.isMoment=wN,nN.weekdays=function(e,t,n){return xP(e,t,n,"weekdays")},nN.parseZone=function(){return SD.apply(null,arguments).parseZone()},nN.localeData=aD,nN.isDuration=AD,nN.monthsShort=function(e,t){return wP(e,t,"monthsShort")},nN.weekdaysMin=function(e,t,n){return xP(e,t,n,"weekdaysMin")},nN.defineLocale=oD,nN.updateLocale=function(e,t){if(null!=t){var n,i,r=XI;null!=JI[e]&&null!=JI[e].parentLocale?JI[e].set($N(JI[e]._config,t)):(null!=(i=iD(e))&&(r=i._config),t=$N(r,t),null==i&&(t.abbr=e),(n=new MN(t)).parentLocale=JI[e],JI[e]=n),rD(e)}else null!=JI[e]&&(null!=JI[e].parentLocale?(JI[e]=JI[e].parentLocale,e===rD()&&rD(e)):null!=JI[e]&&delete JI[e]);return JI[e]},nN.locales=function(){return CN(JI)},nN.weekdaysShort=function(e,t,n){return xP(e,t,n,"weekdaysShort")},nN.normalizeUnits=zN,nN.relativeTimeRounding=function(e){return void 0===e?VP:"function"==typeof e&&(VP=e,!0)},nN.relativeTimeThreshold=function(e,t){return void 0!==GP[e]&&(void 0===t?GP[e]:(GP[e]=t,"s"===e&&(GP.ss=t-1),!0))},nN.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},nN.prototype=gP,nN.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const XP=[{revision_id:1,modified_by:"John Doe",modified_at:new Date(Date.now()-36e5)},{revision_id:2,modified_by:"Jane Doe",modified_at:new Date(Date.now()-72e5)},{revision_id:3,modified_by:"John Doe",modified_at:new Date(Date.now()-144e5)},{revision_id:4,modified_by:"Jane Doe",modified_at:new Date(Date.now()-216e5)},{revision_id:5,modified_by:"John Doe",modified_at:new Date(Date.now()-288e5)}],JP=()=>Vt.jsx(Vt.Fragment,{children:Vt.jsxs("section",{className:"yaymail-list-revisions",children:[Vt.jsx("div",{className:"yaymail-list-revisions__items",children:null==XP?void 0:XP.map((e=>{const{revision_id:t,modified_by:n,modified_at:i}=e;return Vt.jsx("div",{className:h("yaymail-list-revisions__items__item"),children:Vt.jsxs("div",{children:[Vt.jsxs("div",{children:[Vt.jsxs("span",{className:"yaymail-list-revisions__items__item__bold",children:[(r=i,function(e,t){let n=36e5,i=864e5,r=2592e6,o=31536e6,a=(new Date).getTime()-t.getTime();return 0==Math.round(a/1e3)?"Recently":a<6e4?Math.round(a/1e3)+" seconds ago":a{const e=Xx((e=>e.updateTemplateSettings)),t=Fx((e=>e.changeContentStatus)),{isTemplateExist:n}=lj(),i=Fx((e=>e.changeListBackgroundColor)),r=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.background_color)??window.yaymailData.colors.default_background_color})),o=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.content_background_color)??"#ffffff"})),a=Xx((e=>{var t;return(null==(t=e.templateData)?void 0:t.text_link_color)??window.yaymailData.colors.default_text_link_color})),s=tz((n=>{e("background_color",n.toHexString()),t(!0)}),[e]),l=tz((n=>{const r=n.toHexString();e("content_background_color",r),i(r),t(!0)}),[e]),c=tz((n=>{e("text_link_color",n.toHexString()),t(!0)}),[e]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:"yaymail-customizer-settings__email-settings",children:Vt.jsxs("div",{children:[Vt.jsx(iz,{title:__("Background color","yaymail"),onChange:s,value:r,disabled:!n}),Vt.jsx(iz,{title:__("Content background color","yaymail"),onChange:l,value:o,disabled:!n}),Vt.jsx(iz,{title:Vt.jsxs(Vt.Fragment,{children:[__("Text link color","yaymail"),Vt.jsx("p",{style:{marginBottom:2},className:"yaymail-general-setting-item__note",children:__("This will make a change to all elements in this email","yaymail")})]}),onChange:c,value:a,disabled:!n})]})}),Vt.jsx("div",{className:"yaymail-btn-save-wrapper",children:Vt.jsx(CL,{hasIcon:!1,text:__("Save template","yaymail"),btnClassName:"yaymail-btn--light",hasLoading:!0,disabled:!n,style:{minWidth:132}})})]})},iz=ez((function({onChange:e,title:t,value:n,disabled:i}){const r=tz(Kw(e,0),[e]);return Vt.jsx(kM,{title:t,value:n,onChange:r,disabled:i})}),((e,t)=>e.title===t.title&&e.onChange===t.onChange&&e.value===t.value));var rz={},oz={},az={exports:{}};!function(e){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n,i,r=function(e,t,n){if("string"==typeof t){var i=s(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],a=0,l=t.length;an.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;e>0;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n>>0,i=0|arguments[1],r=i<0?Math.max(n+i,0):Math.min(i,n),o=arguments[2],a=void 0===o?n:0|o,s=a<0?Math.max(n+a,0):Math.min(a,n);r0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"",a=i.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(o.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i,r=e("./useragent");t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var r=document.createTextNode(t);return n&&n.appendChild(r),r}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],a=0;a=1.5,r.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var l=document.createElement("div");t.HI_DPI&&void 0!==l.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),r.isEdge||void 0===l.style.animationName||(t.HAS_CSS_ANIMATION=!0),l=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){var i={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),n=n.slice();for(var a=0;a1&&(r=n[n.length-2]);var a=l[t+"Path"];return null==a?a=l.basePath:"/"==i&&(t=i=""),a&&"/"!=a.slice(-1)&&(a+="/"),a+t+i+r+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.setLoader=function(e){s=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(n,i){var o;if(Array.isArray(n))var a=n[0],l=n[1];else"string"==typeof n&&(l=n);var d=function(n){if(n&&!t.$loading[l])return i&&i(n);if(t.$loading[l]||(t.$loading[l]=[]),t.$loading[l].push(i),!(t.$loading[l].length>1)){var o=function(){!function(t,n){"ace/theme/textmate"===t||"./theme/textmate"===t?n(0,e("./theme/textmate")):s?s(t,n):console.error("loader is not configured")}(l,(function(e,n){n&&(t.$loaded[l]=n),t._emit("load.module",{name:l,module:n});var i=t.$loading[l];t.$loading[l]=null,i.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return o();r.loadScript(t.moduleUrl(l,a),o),c()}};if(t.dynamicModules[l])t.dynamicModules[l]().then((function(e){e.default?d(e.default):d(e)}));else{try{o=this.$require(l)}catch(u){}d(o||t.$loaded[l])}},t.$require=function(e){if("function"==typeof n.require)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};t.version="1.42.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){e("./lib/fixoldbrowsers");var i=e("./config");i.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||"undefined"!=typeof window&&window}();function o(t){if(r&&r.document){i.set("packaged",t||e.packaged||n.packaged||r.define&&(void 0).packaged);var o={},a="",s=document.currentScript||document._currentScript,l=s&&s.ownerDocument||document;s&&s.src&&(a=s.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var c,d=l.getElementsByTagName("script"),u=0;u ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var i={row:n+1,column:0};else this.end.rown)var r={row:n+1,column:0};else this.start.row1?++u>4&&(u=1):u=1,o.isIE){var a=Math.abs(e.clientX-s)>5||Math.abs(e.clientY-l)>5;c&&!a||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u&&(s=e.clientX,l=e.clientY)}if(e._clicks=u,i[r]("mousedown",e),u>4)u=0;else if(u>1)return i[r](h[u],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",p,a)}))},t.getModifierString=function(e){return r.KEY_MODS[h(e)]},t.addCommandKeyListener=function(e,n,i){var l=null;d(e,"keydown",(function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=function(e,t,n){var i=h(t);if(!n&&t.code&&(n=r.$codeToKeyCode[t.code]||n),!o.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(!(3&~i))return;a.altGr=0}if(18===n||17===n){var l=t.location;17===n&&1===l?1==a[n]&&(s=t.timeStamp):18===n&&3===i&&2===l&&t.timeStamp-s<50&&(a.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==t.location||(e(t,i,-n),!t.defaultPrevented)){if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}}(n,e,e.keyCode);return l=e.defaultPrevented,t}),i),d(e,"keypress",(function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),i),d(e,"keyup",(function(e){a[e.keyCode]=null}),i),a||(p(),d(window,"focus",p))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++,r=function(o){o.data==i&&(t.stopPropagation(o),u(n,"message",r),e())};d(n,"message",r),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){var i,r=e("../lib/event"),o=e("../config").nls,a=e("../lib/useragent"),s=e("../lib/dom"),l=e("../lib/lang"),c=e("../clipboard"),d=a.isChrome<18,u=a.isIE,h=a.isChrome>63,p=400,m=e("../lib/keys"),f=m.KEY_MODS,g=a.isIOS,y=g?/\s/:/\n/,v=a.isMobile;i=function(e,t){var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild),this.setHost=function(e){t=e};var i=!1,b=!1,w=!1,x=!1,_="";v||(n.style.fontSize="1px");var C=!1,S=!1,k="",E=0,$=0,M=0,R=Number.MAX_SAFE_INTEGER,A=Number.MIN_SAFE_INTEGER,T=0;try{var L=document.activeElement===n}catch(Z){}this.setNumberOfExtraLines=function(e){R=Number.MAX_SAFE_INTEGER,A=Number.MIN_SAFE_INTEGER,T=e<0?0:e},this.setAriaLabel=function(){var e="";if(t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", ")),t.session){var i=t.session.selection.cursor.row;e+=o("text-input.aria-label","Cursor at row $0",[i+1])}n.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),r.addListener(n,"blur",(function(e){S||(t.onBlur(e),L=!1)}),t),r.addListener(n,"focus",(function(e){if(!S){if(L=!0,a.isEdge)try{if(!document.hasFocus())return}catch(n){}t.onFocus(e),a.isEdge?setTimeout(O):O()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),_||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var i=0!=n.getBoundingClientRect().top}catch(Z){return}var r=[];if(i)for(var o=n.parentElement;o&&1==o.nodeType;)r.push(o),o.setAttribute("ace_nocontext","true"),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;n.focus({preventScroll:!0}),i&&r.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return L},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var r=i&&(e.docChanged||e.selectionChanged);w&&r&&(k=n.value="",V()),O()}})),t.on("changeSelection",this.setAriaLabel);var j=function(e,n){for(var i=n,r=1;r<=e-R&&r<2*T+1;r++)i+=t.session.getLine(e-r).length+1;return i},O=g?function(e){if(L&&(!i||e)&&!x){e||(e="");var r="\n ab"+e+"cde fg\n";r!=n.value&&(n.value=k=r);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&$==o||n.setSelectionRange(4,o),E=4,$=o}}:function(){if(!w&&!x&&(L||I)){w=!0;var e=0,i=0,r="";if(t.session){var o=t.selection,a=o.getRange(),s=o.cursor.row;s===A+1?A=(R=A+1)+2*T:s===R-1?R=(A=R-1)-2*T:(sA+1)&&(R=s>T?s-T:0,A=s>T?s+T:2*T);for(var l=[],c=R;c<=A;c++)l.push(t.session.getLine(c));if(r=l.join("\n"),e=j(a.start.row,a.start.column),i=j(a.end.row,a.end.column),a.start.rowA){var u=t.session.getLine(A+1);i=a.end.row>A+1?u.length:a.end.column,i+=r.length+1,r=r+"\n"+u}else v&&s>0&&(r="\n"+r,i+=1,e+=1);r.length>p&&(e0&&k[h]==e[h];)h++,s--;for(c=c.slice(h),h=1;l>0&&k.length-h>E-1&&k[k.length-h]==e[e.length-h];)h++,l--;d-=h-1,u-=h-1;var p=c.length-h+1;if(p<0&&(s=-p,p=0),c=c.slice(0,p),!(i||c||d||s||l||u))return"";x=!0;var m=!1;return a.isAndroid&&". "==c&&(c=" ",m=!0),c&&!s&&!l&&!d&&!u||C?t.onTextInput(c):t.onTextInput(c,{extendLeft:s,extendRight:l,restoreStart:d,restoreEnd:u}),x=!1,k=e,E=r,$=o,M=u,m?"\n":c},P=function(e){if(w)return U();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,r=D(i,!0);(i.length>500||y.test(r)||v&&E<1&&E==$)&&O()},z=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!d){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(o){if(!n)return z(o,t,!0)}}},F=function(e,o){var a=t.getCopyText();if(!a)return r.preventDefault(e);z(e,a)?(g&&(O(a),i=a,setTimeout((function(){i=!1}),10)),o?t.onCut():t.onCopy(),r.preventDefault(e)):(i=!0,n.value=a,n.select(),setTimeout((function(){i=!1,O(),o?t.onCut():t.onCopy()})))},B=function(e){F(e,!0)},H=function(e){F(e,!1)},W=function(e){var i=z(e);c.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),a.isIE&&setTimeout(O),r.preventDefault(e)):(n.value="",b=!0))};r.addCommandKeyListener(n,(function(e,n,i){if(!w)return t.onCommandKey(e,n,i)}),t),r.addListener(n,"select",(function(e){var r;w||(i?i=!1:0===(r=n).selectionStart&&r.selectionEnd>=k.length&&r.value===k&&k&&r.selectionEnd!==$?(t.selectAll(),O()):v&&n.selectionStart!=E&&O())}),t),r.addListener(n,"input",P,t),r.addListener(n,"cut",B,t),r.addListener(n,"copy",H,t),r.addListener(n,"paste",W,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||r.addListener(e,"keydown",(function(e){if((!a.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:H(e);break;case 86:W(e);break;case 88:B(e)}}),t);var U=function(){if(w&&t.onCompositionUpdate&&!t.$readOnly){if(C)return G();if(w.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;D(e),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+$-w.selectionStart+M)}}},V=function(e){t.onCompositionEnd&&!t.$readOnly&&(w=!1,t.onCompositionEnd(),t.off("mousedown",G),e&&P())};function G(){S=!0,n.blur(),n.focus(),S=!1}var Y,K=l.delayedCall(U,50).schedule.bind(null,null);function Q(){clearTimeout(Y),Y=setTimeout((function(){_&&(n.style.cssText=_,_=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}r.addListener(n,"compositionstart",(function(e){if(!w&&t.onCompositionStart&&!t.$readOnly&&(w={},!C)){e.data&&(w.useTextareaForIME=!1),setTimeout(U,0),t._signal("compositionStart"),t.on("mousedown",G);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,w.markerRange=i,w.selectionStart=E,t.onCompositionStart(w),w.useTextareaForIME?(k=n.value="",E=0,$=0):(n.msGetInputContext&&(w.context=n.msGetInputContext()),n.getInputContext&&(w.context=n.getInputContext()))}}),t),r.addListener(n,"compositionupdate",U,t),r.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length$&&"\n"==k[a]?s=m.end:r$&&k.slice(0,a).split("\n").length>2?s=m.down:a>$&&" "==k[a-1]?(s=m.right,l=f.option):(a>$||a==$&&$!=E&&r==a)&&(s=m.right),r!==a&&(l|=f.shift),s){if(!t.onCommandKey({},l,s)&&t.commands){s=m.keyCodeToString(s);var c=t.commands.findKeyCommand(l,s);c&&t.execCommand(c)}E=r,$=a,O("")}}};document.addEventListener("selectionchange",a),t.on("destroy",(function(){document.removeEventListener("selectionchange",a)}))}(0,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=i,t.$setUserAgentForTests=function(e,t){v=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/useragent"),r=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,o=e.getButton();return 0!==o?((r.getSelectionRange().isEmpty()||1==o)&&r.selection.moveToPosition(n),void(2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(r.start),s=this.$clickSelection.comparePoint(r.end);if(-1==a&&s<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==s&&a>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==a&&1==s)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,n,i,r=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,n=this.x,i=this.y,Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))),o=Date.now();(r>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,r=i-n.t,o=r?e.wheelX/r:n.vx,a=r?e.wheelY/r:n.vy;r<550&&(o=(o+n.vx)/2,a=(a+n.vy)/2);var s=Math.abs(o/a),l=!1;return s>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<550&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=o,n.vy=a,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}r.prototype.selectEnd=r.prototype.selectByLinesEnd,r.prototype.selectAllEnd=r.prototype.selectByLinesEnd,r.prototype.selectByWordsEnd=r.prototype.selectByLinesEnd,t.DefaultHandlers=r})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("./lib/dom");e("./lib/event");var s=e("./range").Range,l=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){a.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),u=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,i;this.popups.sort((function(e,t){return t.priority-e.priority}));var r=[];try{for(var a=o(this.popups),s=a.next();!s.done;s=a.next()){var l=s.value,c=!0;try{for(var d=(n=void 0,o(r)),u=d.next();!u.done;u=d.next()){var h=u.value;if(this.doPopupsOverlap(h,l)){c=!1;break}}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}c?r.push(l):l.hide()}}catch(m){e={error:m}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),i=t.getElement().getBoundingClientRect();return n.lefti.left&&n.topi.top},e}());t.popupManager=u,t.Tooltip=d;var h=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",l),n}return r(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);if(n.column==i.length){var r=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),o=t.session.documentToScreenPosition(n.row,n.column);if(o.column!=r.column||o.row!=r.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,i){if(!(i&&i!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var r=e.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(r.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=s.fromPoints(t.start,t.end);var o=r.textToScreenCoordinates(t.start.row,t.start.column),a=r.scroller.getBoundingClientRect();o.pageX=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=e("../lib/dom"),s=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,n,i=e.editor,r=i.renderer.$gutterLayer,o=new d(i,!0);function l(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!o.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),o.isOpen&&(o.hideTooltip(),i.off("mousewheel",l),i.off("changeSession",l),window.removeEventListener("keydown",l,!0)))}function c(e){o.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(i.isFocused()&&0==t.getButton()&&"foldWidgets"!=r.getRegion(t)){var n=t.getDocumentPosition().row,o=i.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return i.selectAll(),t.preventDefault();e.$clickSelection=i.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(s){var d=s.domEvent.target||s.domEvent.srcElement;if(a.hasCssClass(d,"ace_fold-widget")||a.hasCssClass(d,"ace_custom-widget"))return l();o.isOpen&&e.$tooltipFollowsMouse&&c(s),n=s,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed&&function(){var t=n.getDocumentPosition().row;if(t==i.session.getLength()){var a=i.renderer.pixelToScreenCoordinates(0,n.y).row,s=n.$pos;if(a>i.session.documentToScreenRow(s.row,s.column))return l()}if(o.showTooltip(t),o.isOpen)if(i.on("mousewheel",l),i.on("changeSession",l),window.addEventListener("keydown",l,!0),e.$tooltipFollowsMouse)c(n);else{var d=n.getGutterRow(),u=r.$lines.get(d);if(u){var h=u.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),p=o.getElement().style;p.left=h.right-5+"px",p.top=h.bottom-3+"px"}else c(n)}}()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(e){n=null,o.isOpen&&(t=setTimeout((function(){t=null,l(e)}),50))}),i)};var d=function(e){function t(t,n){void 0===n&&(n=!1);var i=e.call(this,t.container)||this;i.editor=t,i.visibleTooltipRow;var r=i.getElement();return r.setAttribute("role","tooltip"),r.style.pointerEvents="auto",n&&(i.onMouseOut=i.onMouseOut.bind(i),r.addEventListener("mouseout",i.onMouseOut)),i}return r(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();(e+=15)+r>n&&(e-=e+r-n),(t+=15)+o>i&&(t-=20+o),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,i,r=this.editor.renderer.$gutterLayer,o=r.$annotations[e];i=o?{displayText:Array.from(o.displayText),type:Array.from(o.type)}:{displayText:[],type:[]};var s=r.session.getFoldLine(e);if(s&&r.$showFoldedAnnotations){for(var l,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},u=e+1;u<=s.end.row;u++)if(r.$annotations[u])for(var h=0;h5?g=null:i-g>=200&&(t.renderer.scrollCursorIntoView(),g=null)})(h=t.renderer.screenToTextCoordinates(l,c),e),function(e,n){var i=Date.now(),r=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),s={x:{left:l-a.left,right:a.right-l},y:{top:c-a.top,bottom:a.bottom-c}},d=Math.min(s.x.left,s.x.right),u=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};d/o<=2&&(h.column+=s.x.left=200&&t.renderer.scrollCursorIntoView(h):f=i:f=null}(h,e)}function x(){u=t.selection.toOrientedRange(),a=t.session.addMarker(u,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),w(),d=setInterval(w,20),b=0,r.addListener(document,"mousemove",S)}function _(){clearInterval(d),t.session.removeMarker(a),a=null,t.selection.fromOrientedRange(u),t.isFocused()&&!m&&t.$resetCursorStyle(),u=null,h=null,b=0,f=null,g=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(e){if(this.cancelDrag||!v.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}u=t.getSelectionRange();var r=e.dataTransfer;r.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),r.setDragImage&&r.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),r.clearData(),r.setData("Text",t.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){if(v.draggable=!1,m=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;p||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,a||x(),b++,e.dataTransfer.dropEffect=p=E(e),r.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&k(e.dataTransfer))return l=e.clientX,c=e.clientY,a||(x(),b++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=E(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--b<=0&&a)return _(),p=null,r.preventDefault(e)},this.onDrop=function(e){if(h){var n=e.dataTransfer;if(m)switch(p){case"move":u=u.contains(h.row,h.column)?{start:h,end:h}:t.moveText(u,h);break;case"copy":u=t.moveText(u,h,!0)}else{var i=n.getData("Text");u={start:h,end:t.session.insert(h,i)},t.focus(),p=null}return _(),r.preventDefault(e)}},r.addListener(v,"dragstart",this.onDragStart.bind(e),t),r.addListener(v,"dragend",this.onDragEnd.bind(e),t),r.addListener(v,"dragenter",this.onDragEnter.bind(e),t),r.addListener(v,"dragover",this.onDragOver.bind(e),t),r.addListener(v,"dragleave",this.onDragLeave.bind(e),t),r.addListener(v,"drop",this.onDrop.bind(e),t);var C=null;function S(){null==C&&(C=setTimeout((function(){null!=C&&a&&_()}),20))}function k(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var r="none";return n&&t.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":t.indexOf(i)>=0&&(r="copy"),r}}function s(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=e.domEvent.target||e.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),t.getDragDelay()?(o.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(a.prototype),t.DragdropHandler=a})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,a,s,l,c,d,u,h,p,m="scroll",f=0,g=0,y=0,v=0;function b(){if(t.getOption("enableMobileMenu")){p||(s=window.navigator&&window.navigator.clipboard,l=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var n,i,r=e.target.getAttribute("action");if("more"==r||!l)return l=!l,n=t.getCopyText(),i=t.session.getUndoManager().hasUndo(),void p.replaceChild(o.buildDom(l?["span",!n&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],n&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],n&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],s&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],i&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild);"paste"==r?s.readText().then((function(e){t.execCommand(r,e)})):r&&("cut"!=r&&"copy"!=r||(s?s.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),p.firstChild.style.display="none",l=!1,"openCommandPalette"!=r&&t.focus()},p=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){m="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),d(e)},onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,r=t.renderer.scrollLeft,a=t.container.getBoundingClientRect();p.style.top=n.pageY-a.top-3+"px",n.pageX-a.left1)return clearTimeout(c),c=null,s=-1,void(m="zoom");h=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var b=r[0],w=b.clientX,_=b.clientY;Math.abs(n-w)+Math.abs(a-_)>o&&(s=-1),n=e.clientX=w,a=e.clientY=_,y=v=0;var C=new i(e,t);if(u=C.getDocumentPosition(),p-s<500&&1==r.length&&!f)g++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=g>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),m="wait"}();else{g=0;var S=t.selection.cursor,k=t.selection.isEmpty()?S:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(S,!0),$=t.renderer.$cursorLayer.getPixelPosition(k,!0),M=t.renderer.scroller.getBoundingClientRect(),R=t.renderer.layerConfig.offset,A=t.renderer.scrollLeft,T=function(e,t){return(e/=d)*e+(t=t/o-.75)*t};if(e.clientXj?"cursor":"anchor"),m=j<3.5?"anchor":L<3.5?"cursor":"scroll",c=setTimeout(x,450)}s=p}),t),r.addListener(e,"touchend",(function(e){h=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==m?(m="",f=0):c?(t.selection.moveToPosition(u),f=0,b()):"scroll"==m?(f+=60,d=setInterval((function(){f--<=0&&(clearInterval(d),d=null),Math.abs(y)<.01&&(y=0),Math.abs(v)<.01&&(v=0),f<20&&(y*=.9),f<20&&(v*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*y,10*v),e==t.session.getScrollTop()&&(f=0)}),10),w()):b(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var r=e.touches;if(!(r.length>1||"zoom"==m)){var o=r[0],s=n-o.clientX,d=a-o.clientY;if("wait"==m){if(!(s*s+d*d>4))return e.preventDefault();m="cursor"}n=o.clientX,a=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var u=e.timeStamp,h=u-l;if(l=u,"scroll"==m){var p=new i(e,t);p.speed=1,p.wheelX=s,p.wheelY=d,10*Math.abs(s)=e){for(o=u+1;o=e;)o++;for(s=u,l=o-1;s=t.length||2!=(l=n[r-1])&&3!=l||2!=(c=t[r+1])&&3!=c?4:(o&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(o)return 4;for(p=r+1,h=t.length;p=1425&&f<=2303||64286==f;if(l=t[p],g&&(1==l||7==l))return 1}return r<1||5==(l=t[r-1])?4:n[r-1];case 5:return o=!1,a=!0,i;case 6:return s=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case u:return 4}}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?0:h[t]:5==n?/[\u0591-\u05f4]/.test(e)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==n&&t<=8287?p[255&t]:254==n&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,d){if(e.length<2)return{};var h=e.split(""),p=new Array(h.length),y=new Array(h.length),v=[];i=d?1:0,function(e,t,n,d){var u=i?c:l,h=null,p=null,m=null,y=0,v=null,b=-1,w=null,x=null,_=[];if(!d)for(w=0,d=[];w0)if(16==v){for(w=b;w-1){for(w=b;w=0&&8==d[C];C--)t[C]=i}}(h,v,h.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===u)?v[b]=t.ON_R:b>0&&"ل"===h[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(h[b])&&(v[b-1]=v[b]=t.R_H,b++);for(h[h.length-1]===t.DOT&&(v[h.length-1]=t.B),"‫"===h[0]&&(v[0]=t.RLE),b=0;b=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var s=0;st&&o[r]%2==0&&(a+=this.charWidths[o[r]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},e.prototype.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],a=0,s=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,u=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var h,p=0;p=s&&hn+o/2;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(e0&&r[i-1]%2==0&&r[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==o&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=a})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,s=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},e.prototype.$setSelection=function(e,t,n,i){if(!this.$silent){var r=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===t?new a(i,0,n,this.session.getLine(n).length):new a(i,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(e,t,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return r.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){var o=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var o=r.stringReverse(i),a=this.$shortWordEndIndex(o);return this.moveCursorTo(t,n-a)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];e<0?e-=r.rowsAbove||0:e>0&&(e+=r.rowCount-(r.rowsAbove||0))}var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(r.charAt(t))&&r.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(i){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();s.prototype.setSelectionAnchor=s.prototype.setAnchor,s.prototype.getSelectionAnchor=s.prototype.getAnchor,s.prototype.setSelectionRange=s.prototype.setRange,i.implement(s.prototype,o),t.Selection=s})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){var i=e("./lib/report_error").reportError,r=2e3,o=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},a="g",s=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(u=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||s.push(c)),o[r]=l,r+=u,i.push(d),c.onMatch||(c.onMatch=null)}}i.length||(o[0]=0,i.push("$")),s.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,a)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",a)}}return e.prototype.$setMaxTokenCount=function(e){r=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;rd){var y=e.substring(d,g-f.length);h.type==p?h.value+=y:(h.type&&c.push(h),h={type:p,value:y})}for(var v=0;vr){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},e}();o.prototype.reportError=i,t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){var i,r=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){var i,r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}};(r=function(e){e=e||{},this.add("braces","insertion",(function(t,n,o,a,s){var c=o.getCursorPosition(),d=a.doc.getLine(c.row);if("{"==s){p(o);var u=o.getSelectionRange(),h=a.doc.getTextRange(u),f=a.getTokenAt(c.row,c.column);if(""!==h&&"{"!==h&&o.getWrapBehavioursEnabled())return m(u,h,"{","}");if(f&&/(?:string)\.quasi|\.xml/.test(f.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(f.type)}))||/(string)\.quasi/.test(f.type)&&"$"!==f.value[c.column-f.start-1])return;return r.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}}if(r.isSaneInsertion(o,a))return/[\]\}\)]/.test(d[c.column])||o.inMultiSelectMode||e.braces?(r.recordAutoInsert(o,a,"}"),{text:"{}",selection:[1,1]}):(r.recordMaybeInsert(o,a,"{"),{text:"{",selection:[1,1]})}else if("}"==s){if(p(o),"}"==d.substring(c.column,c.column+1)&&null!==a.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&r.isAutoInsertedClosing(c,d,s))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==s||"\r\n"==s){p(o);var g="";if(r.isMaybeInsertedClosing(c,d)&&(g=l.stringRepeat("}",i.maybeInsertedBrackets),r.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var y=a.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!y)return null;var v=this.$getIndent(a.getLine(y.row))}else{if(!g)return void r.clearMaybeInsertedClosing();v=this.$getIndent(d)}var b=v+a.getTabString();return{text:"\n"+b+"\n"+v+g,selection:[1,b.length,1,b.length]}}r.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(p(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,o){if("("==o){p(n);var a=n.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"(",")");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if(")"==c.substring(l.column,l.column+1)&&null!==i.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==o&&(p(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("brackets","insertion",(function(e,t,n,i,o){if("["==o){p(n);var a=n.getSelectionRange(),s=i.doc.getTextRange(a);if(""!==s&&n.getWrapBehavioursEnabled())return m(a,s,"[","]");if(r.isSaneInsertion(n,i))return r.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row);if("]"==c.substring(l.column,l.column+1)&&null!==i.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&r.isAutoInsertedClosing(l,c,o))return r.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,i,r){var o=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==o&&(p(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r})),this.add("string_dquotes","insertion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h;if(1==r.length&&o[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;p(n);var a=r,s=n.getSelectionRange(),l=i.doc.getTextRange(s);if(!(""===l||1==l.length&&o[l])&&n.getWrapBehavioursEnabled())return m(s,l,a,a);if(!l){var c=n.getCursorPosition(),d=i.doc.getLine(c.row),u=d.substring(c.column-1,c.column),f=d.substring(c.column,c.column+1),g=i.getTokenAt(c.row,c.column),y=i.getTokenAt(c.row,c.column+1);if("\\"==u&&g&&/escape/.test(g.type))return null;var v,b=g&&/string|escape/.test(g.type),w=!y||/string|escape/.test(y.type);if(f==a)(v=b!==w)&&/string\.end/.test(y.type)&&(v=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var _=x.test(u);x.lastIndex=0;var C=x.test(f),S=i.$mode.$pairQuotesAfter;if(!(S&&S[a]&&S[a].test(u))&&_||C)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var k=d[c.column-2];if(u==a&&(k==a||x.test(k)))return null;v=!0}return{text:v?a+a:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,r){var o=i.$mode.$quotes||h,a=i.doc.getTextRange(r);if(!r.isMultiLine()&&o.hasOwnProperty(a)&&(p(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==a))return r.end.column++,r})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,i,r){if("doc-start"===e&&("\n"===r||"\r\n"===r)&&n.selection.isEmpty()){var o=n.getCursorPosition();if(0===o.column)return;for(var a=i.doc.getLine(o.row),s=i.doc.getLine(o.row+1),l=i.getTokens(o.row),c=0,d=0;d=o.column){if(c===o.column){if(!/\.doc/.test(u.type))return;if(/\*\//.test(u.value)){var h=l[d+1];if(!h||!/\.doc/.test(h.type))return}}var p=o.column-(c-u.value.length),m=u.value.indexOf("*/"),f=u.value.indexOf("/**",m>-1?m+2:0);if(-1!==f&&p>f&&p=m&&p<=f||!/\.doc/.test(u.type))return;break}}var g=this.$getIndent(a);if(/\s*\*/.test(s))return/^\s*\*/.test(a)?{text:r+g+"* ",selection:[1,2+g.length,1,2+g.length]}:{text:r+g+" * ",selection:[1,3+g.length,1,3+g.length]};if(/\/\*\*/.test(a.substring(0,o.column)))return{text:r+g+" * "+r+" "+g+"*/",selection:[1,4+g.length,1,4+g.length]}}}))}).isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new s(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var r=new s(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",d)},r.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},r.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,o,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+o.substr(r.column),i.autoInsertedBrackets++},r.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),o=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,o)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=o.substr(0,r.column)+n,i.maybeInsertedLineEnd=o.substr(r.column),i.maybeInsertedBrackets++},r.isAutoInsertedClosing=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},r.isMaybeInsertedClosing=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},r.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},r.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},o.inherits(r,a),t.CstyleBehaviour=r})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],a=0;a2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,m=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),g=new RegExp("(?:"+c.escapeRegExp(m)+")\\s*$"),y=function(e,t){b(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},m),r.insertInLine({row:t,column:s},p))},v=function(e,t){var n;(n=e.match(g))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&r.removeInLine(t,n[1].length,n[0].length)},b=function(e,n){if(f.test(e))return!0;for(var i=t.getTokens(n),r=0;re.length&&(x=e.length)})),s==1/0&&(s=x,o=!1,a=!1),d&&s%l!=0&&(s=Math.floor(s/l)*l),w(a?v:y)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o=(f=new d(t,i.row,i.column)).getCurrentToken();t.selection;var a,s,l=t.selection.toOrientedRange();if(o&&/comment/.test(o.type)){for(var c,h;o&&/comment/.test(o.type);){if(-1!=(g=o.value.indexOf(r.start))){var p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g;c=new u(p,m,p,m+r.start.length);break}o=f.stepBackward()}var f;for(o=(f=new d(t,i.row,i.column)).getCurrentToken();o&&/comment/.test(o.type);){var g;if(-1!=(g=o.value.indexOf(r.end))){p=f.getCurrentTokenRow(),m=f.getCurrentTokenColumn()+g,h=new u(p,m,p,m+r.end.length);break}o=f.stepForward()}h&&t.remove(h),c&&(t.remove(c),a=c.start.row,s=-r.start.length)}else s=r.start.length,a=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==a&&(l.start.column+=s),l.end.row==a&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,o=r.$modes[i];o||(r.$modes[i]=o=new n),r.$modes[t]||(r.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var a=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=function(e){var t,n,i;i=(t=l)[n=a[e]],t[a[e]]=function(){return this.$delegator(n,arguments,i)}},l=this;for(t=0;tt[n].column&&n++,o.unshift(n,0),t.splice.apply(t,o),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var r=this.session.lineWidgets;e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var a=r;a<=o;a++){var s=i[a];if(s&&s.el)if(s.hidden)s.el.style.top=-100-(s.pixelHeight||0)+"px";else{s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var l=t.$cursorLayer.getPixelPosition({row:a,column:0},!0).top;s.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=l-n.offset+"px";var c=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(c-=t.scrollLeft),s.el.style.left=c+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+"px"),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+"px":s.el.style.right=""}}}},e}();t.LineWidgets=r})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":if(1===t.lines.length)e[i]=o.substring(0,r)+t.lines[0]+o.substring(r);else{var a=[i,1].concat(t.lines);e.splice.apply(e,a),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r)}break;case"remove":var s=t.end.column,l=t.end.row;i===l?e[i]=o.substring(0,r)+o.substring(s):e.splice(i,l-i+1,o.substring(0,r)+e[l].substring(s))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,n){var i="insert"==e.action,r=(i?1:-1)*(e.end.row-e.start.row),o=(i?1:-1)*(e.end.column-e.start.column),s=e.start,l=i?s:e.end;return a(t,s,n)?{row:t.row,column:t.column}:a(l,t,!n)?{row:t.row+r,column:t.column+(t.row==l.row?o:0)}:{row:s.row,column:s.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function a(e,t,n){var i=n?e.column<=t.column:e.column=n&&(e=n-1,t=void 0);var i=this.getLine(e);return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),o<=i&&n.fireUpdateEvent(o,i)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();i.implement(o.prototype,r),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./range").Range,o=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,o){if(this.regExp){for(var a=o.firstRow,s=o.lastRow,l={},c=n.$editor&&n.$editor.$search,d=c&&c.$isMultilineSearch(n.$editor.getLastSearchOptions()),u=a;u<=s;u++){var h=this.cache[u];if(null==h||n.getValue().length!=this.docLen){if(d){h=[];var p=c.$multiLineForward(n,this.regExp,u,s);if(p){var m=p.endRow<=s?p.endRow-1:s;m>u&&(u=m),h.push(new r(p.startRow,p.startCol,p.endRow,p.endCol))}h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES))}else(h=i.getMatchOffsets(n.getLine(u),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new r(u,e.offset,u,e.offset+e.length)}));this.cache[u]=h.length?h:""}if(0!==h.length)for(var f=h.length;f--;){var g=h[f].toScreenRange(n),y=g.toString();l[y]||(l[y]=!0,t.drawSingleLineMarker(e,g,this.clazz,o))}}this.docLen=n.getValue().length}},e}();o.prototype.MAX_RANGES=500,t.SearchHighlight=o})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){var i=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?s(e):s(this.$undoStack)+"\n---\n"+s(this.$redoStack)},e}();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var r=e("./range").Range,o=r.comparePoints;function a(e){return{row:e.row,column:e.column}}function s(e){if(e=e||this,Array.isArray(e))return e.map(s).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(o(t.start,e.start)>=0)h(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var i=0;i=0?h(e,t,-1):(o(e.start,t.start)<=0||h(e,r.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&i)o(t.start,e.end)>=0?h(t,e,-1):(o(t.start,e.start)<=0||h(t,r.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!i)if(o(t.start,e.end)>=0)h(t,e,-1);else{var a,s;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(a=e,e=m(e,t.start)),o(e.end,t.end)>0&&(s=m(e,t.end)),p(t.end,e.start,e.end,-1),s&&!a&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,a,s].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){p(e.start,t.start,t.end,n),p(e.end,t.start,t.end,n)}function p(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function m(e,t){var n=e.lines,i=e.end;e.end=a(t);var r=e.end.row-e.start.row,o=n.splice(r,n.length),s=r?t.column:t.column-e.start.column;return n.push(o[0].substring(0,s)),o[0]=o[0].substr(s),{start:a(t),end:i,lines:o,action:e.action}}function f(e,t){t=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var n=e.length;n--;){for(var i=e[n],r=0;rthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var i,r,o=0,a=this.folds,s=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(e,a.start);return 0===s?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],n=this.ranges,r=(n=n.sort((function(e,t){return i(e.start,t.start)})))[0],o=1;o=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i);a++);if("insert"==e.action){for(var l=r-i,c=-t.column+n.column;ai);a++)if(d.start.row==i&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=l)),d.end.row==i&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&ad.start.column&&d.end.column==o[a+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=l}}else for(l=i-r,c=t.column-n.column;ar);a++)d.end.rowt.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=l):d.end.row>r&&(d.end.row+=l),d.start.rowt.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=l):d.start.row>r&&(d.start.row+=l);if(0!=l&&a=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r=t){s=e?i-=t-s:i=0);break}a>=e&&(i-=s>=e?a-s:a-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,a=!1;e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,l=n.start.column,c=n.end.row,d=n.end.column,u=this.getFoldAt(s,l,1),h=this.getFoldAt(c,d,-1);if(u&&h==u)return u.addSubFold(n);u&&!u.range.isStart(s,l)&&this.removeFold(u),h&&!h.range.isEnd(c,d)&&this.removeFold(h);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var m=0;m0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(var o=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&i.comparePoints(r[0].end,n.end)>0;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,a="";return e.walk((function(e,t,n,s){if(!(tu)break}while(o&&l.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();if(c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=a.end.row,a.collapseChildren=n,this.addFold("...",a))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i=0;){var o=n[r];if(null==o&&(o=n[r]=this.getFoldWidget(r)),"start"==o){var a=this.getFoldWidgetRange(r);if(i||(i=a),a&&a.end.row>=e)break}r--}return{range:-1!==r&&a,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),r="end"===n?-1:1,o=this.getFoldAt(e,-1===r?0:i.length,r);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var a=this.getFoldWidgetRange(e,!0);if(a&&!a.isMultiLine()&&(o=this.getFoldAt(a.start.row,a.start.column,1))&&a.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var l=s.range.start.row+1,c=s.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=a?a.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):a&&(t.all&&(a.collapseChildren=1e4),this.addFold("...",a));return a}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange){t=n.start.row;var r=this.getFoldAt(t,this.getLine(t).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),a=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(a||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!a)return null;if(a[1]){if(!(s=this.$findClosingBracket(a[1],e)))return null;t=r.fromPoints(e,s),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(a[2],e)))return null;t=r.fromPoints(s,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),a=o&&o.match(i);if(a||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a=o&&o.match(i)),!a)return null;var s=new r(e.row,e.column-1,e.row,e.column),l=a[1]?this.$findClosingBracket(a[1],e):this.$findOpeningBracket(a[2],e);return l?[s,new r(l.row,l.column,l.row,l.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn()-2,c=s.value;;){for(;l>=0;){var d=c.charAt(l);if(d==r){if(0==(o-=1))return{row:a.getCurrentTokenRow(),column:l+a.getCurrentTokenColumn()}}else d==e&&(o+=1);l-=1}do{s=a.stepBackward()}while(s&&!n.test(s.type));if(null==s)break;l=(c=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,a=new i(this,t.row,t.column),s=a.getCurrentToken();if(s||(s=a.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=t.column-a.getCurrentTokenColumn();;){for(var c=s.value,d=c.length;l"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,o=t.value,a=0,s=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(n=t).type.indexOf("tag-close")&&!c){var d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(o===(i=t.value))if("<"===n.value)a++;else if(""!==t.value)return;var p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else o===i&&"/>"===t.value&&--a<0&&(p=h=u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new r(l.end.row,l.end.column,l.end.row,l.end.column+1))}while(t&&a>=0);if(s&&d&&u&&p&&l&&h)return{openTag:new r(s.start.row,s.start.column,d.end.row,d.end.column),closeTag:new r(u.start.row,u.start.column,p.end.row,p.end.column),openTagName:l,closeTagName:h}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,o=0,a=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),l=s+2,c=new r(a,s,a,l);e.stepForward();var d=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var u=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,a=e.getCurrentTokenRow(),l=(s=e.getCurrentTokenColumn())+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(++o>0){var h=new r(a,s,a,l),p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var m=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var f=0,g=n;g;){if(-1!==g.type.indexOf("tag-name")&&g.value===i){o--;break}if("<"===g.value)break;g=e.stepBackward(),f++}for(var y=0;yn&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(t>o)n=r+1;else{if(!(t=t);o++);return(n=i[o])?(n.index=o,n.start=r-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var r=this.tokenRe;else r=/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&n.charAt(o).match(r));o++}for(var a=t;ae&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],a=o?o.start.row:1/0,s=t.length,l=0;la){if((l=o.end.row+1)>=s)break;a=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),a&&o.start.row>=e.end.row&&(o.start.row+=a,o.end.row+=a)}if(o.end=this.insert(o.start,i),r.length){var s=e.start,l=o.start,c=(a=l.row-s.row,l.column-s.column);this.addFolds(r.map((function(e){return(e=e.clone()).start.row==s.row&&(e.start.column+=c),e.end.row==s.row&&(e.end.column+=c),e.start.row+=a,e.end.row+=a,e})))}return o},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new d(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var a=0;a0){var r;if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else e=this.$clipRowToDocument(e),i=(t=this.$clipRowToDocument(t))-e+1;var o=new d(e,0,t,Number.MAX_VALUE),a=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),s=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),a.length&&this.addFolds(a),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,r=e.end,o=i.row,a=r.row,s=a-o,l=null;if(this.$updating=!0,0!=s)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(o,s);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var d=0;if(f=this.getFoldLine(r.row)){f.addRemoveChars(r.row,r.column,i.column-r.column),f.shiftRow(-s);var u=this.getFoldLine(o);u&&u!==f&&(u.merge(f),f=u),d=c.indexOf(f)+1}for(;d=r.row&&f.shiftRow(-s);a=o}else{var h=Array(s);h.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,h),c=this.$foldData,d=0,f=this.getFoldLine(o)){var m=f.range.compareInside(i.row,i.column);0==m?(f=f.split(i.row,i.column))&&(f.shiftRow(s),f.addRemoveChars(a,0,r.column-i.column)):-1==m&&(f.addRemoveChars(o,0,r.column-i.column),f.shiftRow(s)),d=c.indexOf(f)+1}for(;d=o&&f.shiftRow(s)}}else s=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),s=-s),(f=this.getFoldLine(o))&&f.addRemoveChars(o,i.column,s);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,a):this.$updateRowLengthCache(o,a),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),a=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,r.length-1);l<=t;)(i=this.getFoldLine(l,i))?(n=[],i.walk(function(e,t,i,o){var a;if(null!=e){(a=this.$getDisplayTokens(e,n.length))[0]=b;for(var s=1;st-u;){var h=o+t-u;if(e[h-1]>=_&&e[h]>=_)d(h);else if(e[h]!=b&&e[h]!=w){for(var p=Math.max(h-(t-(t>>2)),o-1);h>p&&e[h]p&&e[h]p&&e[h]==x;)h--}else for(;h>p&&e[h]<_;)h--;h>p?d(++h):(e[h=o+t]==v&&h--,d(h-u))}else{for(;h!=o-1&&e[h]!=b;h--);if(h>o){d(h);continue}for(h=o+t;h39&&o<48||o>57&&o<64?i.push(x):o>=4352&&k(o)?i.push(y,v):i.push(y)}return i},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,r;for(null==t&&(t=1/0),n=n||0,r=0;r=4352&&k(i)?n+=2:n+=1,!(n>t));r++);return[n,r]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){s=c[d],o=this.$docRowCache[d];var h=e>c[u-1]}else h=!u;for(var p=this.getLength()-1,m=this.getNextFoldLine(o),f=m?m.start.row:1/0;s<=e&&!(s+(l=this.getRowLength(o))>e||o>=p);)s+=l,++o>f&&(o=m.end.row+1,f=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),h&&(this.$docRowCache.push(o),this.$screenRowCache.push(s));if(m&&m.start.row<=o)i=this.getFoldDisplayLine(m),o=m.start.row;else{if(s+l<=e||o>p)return{row:p,column:this.getLine(p).length};i=this.getLine(o),m=null}var g=0,y=Math.floor(e-s);if(this.$useWrapMode){var v=this.$wrapData[o];v&&(r=v[y],y>0&&v.length&&(g=v.indent,a=v[y-1]||v[v.length-1],i=i.substring(a)))}return void 0!==n&&this.$bidiHandler.isBidiRow(s+y,o,y)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(i,t-g)[1],this.$useWrapMode&&a>=r&&(a=r-1),m?m.idxToPosition(a):{row:o,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i,r=0,o=null;(i=this.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column);var a,s=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),d=l.length;if(d&&c>=0){s=l[c],r=this.$screenRowCache[c];var u=e>l[d-1]}else u=!d;for(var h=this.getNextFoldLine(s),p=h?h.start.row:1/0;s=p){if((a=h.end.row+1)>e)break;p=(h=this.getNextFoldLine(a,h))?h.start.row:1/0}else a=s+1;r+=this.getRowLength(s),s=a,u&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var m="";h&&s>=p?(m=this.getFoldDisplayLine(h,e,t),o=h.start.row):(m=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var g=this.$wrapData[o];if(g){for(var y=0;m.length>=g[y];)r++,y++;m=m.substring(g[y-1]||0,m.length),f=y>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(r+=this.lineWidgets[s].rowsAbove),{row:r,column:f+this.$getStringScreenWidth(m)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(s=0,(t=this.$foldData[s++])?t.start.row:1/0);ir&&(i=t.end.row+1,r=(t=this.$foldData[s++])?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sn);o++);return[i,o]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();g.$uid=0,g.prototype.$modes=a.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=k,i.implement(g.prototype,s);var y=1,v=2,b=3,w=4,x=9,_=10,C=11,S=12;function k(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),a.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range,a=function(){function e(){this.$options={}}return e.prototype.set=function(e){return r.mixin(this.$options,e),this},e.prototype.getOptions=function(){return i.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,r,a){return i=new o(e,n,r,a),!(n==a&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start)&&(i=null,1))})),i},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),a=[],s=t.re;if(t.$isMultiLine){var l,c=s.length,d=r.length-c;e:for(var u=s.offset||0;u<=d;u++){for(var h=0;hf||(a.push(l=new o(u,f,u+c-1,g)),c>2&&(u=u+c-2))}}else for(var y,v=0;vv&&(v=w),a.push(new o(y.startRow,y.startCol,y.endRow,y.endCol))}}else for(y=i.getMatchOffsets(r[v],s),h=0;hC&&a[h].end.row==S;)h--;for(a=a.slice(v,h+1),v=0,h=a.length;v=i){t+="$";break}var o=e.charCodeAt(n);if(36===o){t+="$$";continue}if(48===o||38===o){t+="$&";continue}if(49<=o&&o<=57){t+="$"+e[n];continue}}t+=e[n]}else{if(++n>=i){t+="\\";break}switch(e.charCodeAt(n)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=this.$isMultilineSearch(n);r&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var o=i.exec(e);if(!o||!r&&o[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(i,t),n.preserveCase){t=t.split("");for(var a=Math.min(e.length,e.length);a--;){var s=e[a];s&&s.toLowerCase()!=s?t[a]=t[a].toUpperCase():t[a]=t[a].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n));var r=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,r+="u"}catch(a){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=function(e,t){var n=i.supportsLookbehind();function r(e,i){return void 0===i&&(i=!0),(n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?i?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(e),a=o[0],s=o[o.length-1];return r(a)+e+r(s,!1)}(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,r);try{var o=new RegExp(n,r)}catch(a){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;ri);s++){var c=e.getLine(a++);r=null==r?c:r+"\n"+c}var d=t.exec(r);if(t.lastIndex=0,d){var u=r.slice(0,d.index).split("\n"),h=d[0].split("\n"),p=n+u.length-1,m=u[u.length-1].length;return{startRow:p,startCol:m,endRow:p+h.length-1,endCol:1==h.length?m+h[0].length:h[h.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,i,r){for(var o,a=l(e,i),c=e.getLine(i).length-n,d=i;d>=r;){for(var u=0;u=r;u++){var h=e.getLine(d--);o=null==o?h:h+"\n"+o}var p=s(o,t,c);if(p){var m=o.slice(0,p.index).split("\n"),f=p[0].split("\n"),g=d+m.length,y=m[m.length-1].length;return{startRow:g,startCol:y,endRow:g+f.length-1,endCol:1==f.length?y+f[0].length:f[f.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var r=this.$isMultilineSearch(t),o=this.$multiLineForward,a=this.$multiLineBackward,s=1==t.backwards,l=0!=t.skipCurrent,c=n.unicode,d=t.range,u=t.start;u||(u=d?d[s?"end":"start"]:e.selection.getRange()),u.start&&(u=u[l!=s?"end":"start"]);var h=d?d.start.row:0,p=d?d.end.row:e.getLength()-1;if(s)var m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n--;n>=h;n--)if(g(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=p,h=u.row;n>=h;n--)if(g(n,Number.MAX_VALUE,e))return}};else m=function(e){var n=u.row;if(!g(n,u.column,e)){for(n+=1;n<=p;n++)if(g(n,0,e))return;if(0!=t.wrap)for(n=h,p=u.row;n<=p;n++)if(g(n,0,e))return}};if(t.$isMultiLine)var f=n.length,g=function(t,i,r){var o=s?t-f+1:t;if(!(o<0||o+f>e.getLength())){var a=e.getLine(o),l=a.search(n[0]);if(!(!s&&li))return!!r(o,l,o+f-1,d)||void 0}}};else g=s?function(t,o,s){if(r){var l=a(e,n,o,t,h);if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else{var d,u=e.getLine(t),p=[],m=0;for(n.lastIndex=0;d=n.exec(u);){var f=d[0].length;if(m=d.index,!f){if(m>=u.length)break;n.lastIndex=m+=i.skipEmptyMatch(u,m,c)}if(d.index+f>o)break;p.push(d.index,f)}for(var g=p.length-1;g>=0;g-=2){var y=p[g-1];if(s(t,y,t,y+(f=p[g])))return!0}}}:function(t,a,s){if(n.lastIndex=a,r){var l=o(e,n,t,p);if(l){var d=l.endRow<=p?l.endRow-1:p;d>t&&(t=d)}if(!l)return!1;if(s(l.startRow,l.startCol,l.endRow,l.endCol))return!0}else for(var u,h,m=e.getLine(t);h=n.exec(m);){var f=h[0].length;if(s(t,u=h.index,t,u+f))return!0;if(!f&&(n.lastIndex=u+=i.skipEmptyMatch(m,u,c),u>=m.length))return!1}};return{forEach:m}},e}();function s(e,t,n){for(var i=null,r=0;r<=e.length;){t.lastIndex=r;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!i||a>i.index+i[0].length)&&(i=o),r=o.index+1}return i}function l(e,t){var n={row:t,column:0},i=e.doc.positionToIndex(n)+5e3;return e.doc.indexToPosition(i).row+1}t.Search=a})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("../lib/keys"),a=e("../lib/useragent"),s=o.KEY_MODS,l=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var o=i[r];if(o==e)delete i[r];else if(Array.isArray(o)){var a=o.indexOf(e);-1!=a&&(o.splice(a,1),1==o.length&&(i[r]=o[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var r=e.split(/\s+/);e=r.pop(),r.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var o=this.parseKeys(e),a=s[o.hashId]+o.key;this._addCommandToBinding(i+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var i,r=this.commandKeyBinding;if(t)if(!r[e]||this.$singleCommand)r[e]=t;else{Array.isArray(r[e])?-1!=(i=r[e].indexOf(t))&&r[e].splice(i,1):r[e]=[r[e]],"number"!=typeof n&&(n=c(t));var o=r[e];for(i=0;in);i++);o.splice(i,0,t)}else delete r[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,a=t.length;a--;){var s=o.KEY_MODS[t[a]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[a]+" in "+e),!1;r|=s}return{key:n,hashId:r}},e.prototype.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,i){if(!(i<0)){var r=s[t]+n,o=this.commandKeyBinding[r];return e.$keyChain&&(e.$keyChain+=" "+r,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.$singleCommand=!0,i}return r(t,e),t}(l);d.call=function(e,t,n){l.prototype.$init.call(e,t,n,!0)},l.call=function(e,t,n){l.prototype.$init.call(e,t,n,!1)},t.HashHandler=d,t.MultiHashHandler=l})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,l=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),i}return r(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var r={editor:t,command:e,args:n};return this.canExecute(e,t)?(r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue):(this._signal("commandUnavailable",r),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(a);o.implement(l.prototype,s),t.CommandManager=l})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function a(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),r=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),a=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var d=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),l+=d}r.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(a=e.session.doc.getLine(n.row).length>a?a+1:a,e.selection.moveCursorTo(n.row,a))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var a=0;a0||e+t=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),a=e("./lib/lang"),s=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,p=e("./search").Search,m=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,y=e("./commands/default_commands").commands,v=e("./config"),b=e("./token_iterator").TokenIterator,w=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,_=e("./clipboard"),C=e("./lib/keys"),S=e("./lib/event"),k=e("./tooltip").HoverTooltip,E=function(){function e(t,n,i){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var r=t.getContainerElement();this.container=r,this.renderer=t,this.commands=new g(s.isMac?"mac":"win",y),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new u(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new h("")),v.resetOptions(this),i&&this.setOptions(i),v._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),r=this.renderer.layerConfig;(i.start.row>=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var r=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;v.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),r=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(n,r);if(!o){var a=new b(t,n.row,n.column).getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var s=t.getMatchingTags(n);s&&(o=[s.openTagName.isEmpty()?s.openTag:s.openTagName,s.closeTagName.isEmpty()?s.closeTag:s.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var l="ace_bracket";Array.isArray(o)?1==o.length&&(l="ace_error_bracket"):o=[o],2==o.length&&(0==m.comparePoints(o[0].end,o[1].start)?o=[m.fromPoints(o[0].start,o[1].end)]:0==m.comparePoints(o[0].start,o[1].end)&&(o=[m.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,l,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new m(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,r=e.getLine(t.start.row),o=r.substring(n,i);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),s=r.substring(n-1,i+1);if(a.test(s))return a}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;rs.search(/\S|$/)){var l=s.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,d=n.getState(r.row),u=(s=n.getLine(r.row),i.checkOutdent(d,s,e));if(n.insert(r,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new m(r.row,c+o.selection[0],r.row,c+o.selection[1])):this.selection.setSelectionRange(new m(r.row+o.selection[0],o.selection[1],r.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var h=i.getNextLineIndent(d,s.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},h)}u&&i.autoOutdent(d,n,r.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",r="",o="",a=e.getTabString(),s=0;s0&&(i=e.getState(d-1),r=e.getLine(d-1),o=t.getNextLineIndent(i,r,a));var u=e.getLine(d),h=t.$getIndent(u);if(o!==h){if(h.length>0){var p=new m(d,0,d,h.length);e.remove(p)}o.length>0&&e.insert({row:d,column:0},o)}t.autoOutdent(i,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),r=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var o=n.getTextRange(t);if("\n"==o[o.length-1]){var a=n.getLine(t.end.row);/^\s+$/.test(a)&&(t.end.column=a.length)}}r&&(t=r)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,r=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var r=new m(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new m(t,n-1,t,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var o=this.getNumberAt(t,n);if(o){var a=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,s=o.start+o.value.length-a,l=parseFloat(o.value);l*=Math.pow(10,s),a!==o.end&&n=s&&o<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,s+i),c.selection.selectTo(e,l+i)),s=l}));for(var d,u=this.$toggleWordPairs,h=0;h=l&&a<=c&&h.match(/((?:https?|ftp):\/\/[\S]+)/)){s=h.replace(/[\s:.,'";}\]]+$/,"");break}l=c}}catch(p){n={error:p}}finally{try{u&&!u.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return s},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var r=n.start.row;t.duplicateLines(r,r)}else{var o=i?n.start:n.end,a=t.insert(o,t.getTextRange(n));n.start=o,n.end=a,e.setSelectionRange(n,i)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,i,r=this.selection;if(!r.inMultiSelectMode||this.inVirtualSelectionMode){var o=r.toOrientedRange();n=this.$getSelectedRows(o),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),o.moveBy(i,0),r.fromOrientedRange(o)}else{var a=r.rangeList.ranges;r.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,l=0,c=a.length,d=0;dp+1)break;p=m.last}for(d--,s=this.session.$moveLines(h,p,t?0:e),t&&-1==e&&(u=d+1);u<=d;)a[u].moveBy(s,0),u++;t||(s=0),l+=s}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var o=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(o)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new b(this.session,n.row,n.column),r=i.getCurrentToken(),o=0;r&&-1!==r.type.indexOf("tag-name")&&(r=i.stepBackward());var a=r||i.stepForward();if(a){var s,l,c=!1,d={},u=n.column-a.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(a.value.match(/[{}()\[\]]/g)){for(;u1?d[a.value]++:"=0;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(r),i},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,n),o):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var o=this.on("changeSelection",(function(){i=!0})),a=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),s=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,o=e.$cursorLayer.$pixelPos,a=e.layerConfig,s=o.top-a.offset;null!=(i=o.top>=0&&s+t.top<0||!(o.topwindow.innerHeight)&&null)&&(r.style.top=s+"px",r.style.left=o.left+"px",r.style.height=a.lineHeight+"px",r.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",s),this.renderer.off("beforeRender",a))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var i=this;v.loadModule("ace/ext/prompt",(function(r){r.prompt(i,e,t,n)}))},e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],r.implement(E.prototype,f),v.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var n=!1;if(e&&"keydown"==e.type){if(!(n=e&&e.key&&1==e.key.length&&!e.ctrlKey&&!e.metaKey))return}else e&&"exec"!==e.type&&(n=!0);if(n){t.hoverTooltip||(t.hoverTooltip=new k);var i=o.createElement("div");i.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),i)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var n=this.textInput.getElement();e?(S.addListener(n,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(n,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?$.attach(this):$.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},i=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new w(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",i.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var $={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=E})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,r=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-r*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;no&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}(a=this.$lines.get(++s))?a.row=l:(a=this.$lines.createCell(l,e,this.session,d),this.$lines.push(a)),this.$renderCell(a,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1);var o=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,a=this.$padding||this.$computePadding();(o+=a.left+a.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),a=o?o.start.row:1/0;r>a&&(r=o.end.row+1,a=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(r>n);){var s=this.$lines.createCell(r,e,this.session,d);this.$renderCell(s,e,o,r),i.push(s),r++}return i},e.prototype.$renderCell=function(e,t,n,r){var o=e.element,a=this.session,s=o.childNodes[0],c=o.childNodes[1],d=o.childNodes[2],u=o.childNodes[3],h=d.firstChild,p=a.$firstLineNumber,m=a.$breakpoints,f=a.$decorations,g=a.gutterRenderer||this.$renderer,y=this.$showFoldWidgets&&a.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,b=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",_=(g?g.getText(a,r):r+p).toString();if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),m[r]&&(w+=m[r]),f[r]&&(w+=f[r]),this.$annotations[r]&&r!==v&&(w+=this.$annotations[r].className),y){var C=y[r];null==C&&(C=y[r]=a.getFoldWidget(r))}if(C){var S="ace_fold-widget ace_"+C,k="start"==C&&r==v&&rn.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");e.appendChild(n);var r=i.createElement("span");e.appendChild(r);var o=i.createElement("span");return r.appendChild(o),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,r.implement(c.prototype,a),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){var i=e("../range").Range,r=e("../lib/dom"),o=function(){function e(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(e.firstRow,e.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var o=this.$getTop(r.start.row,e),a=this.$padding+r.start.column*e.characterWidth;i.renderer(t,r,a,o,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,r,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,r,i.clazz,e):r.isMultiLine()?"text"==i.type?this.drawTextMarker(t,r,i.clazz,e):this.drawMultiLineMarker(t,r,i.clazz,e):this.drawSingleLineMarker(t,r,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ih?4:0)|(c==l?8:0)),r,c==l?0:1,o)},e.prototype.drawMultiLineMarker=function(e,t,n,i,r){var o=this.$padding,a=i.lineHeight,s=this.$getTop(t.start.row,i),l=o+t.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+l+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,r)}else{s=this.$getTop(t.end.row,i);var d=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+d+"px;top:"+s+"px;left:"+o+"px;"+(r||""))}if(!((a=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){s=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:"+o+"px;top:"+s+"px;left:"+o+"px;"+(r||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);var a=i.lineHeight,s=(t.end.column+(r||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+a+"px;width:"+s+"px;top:"+l+"px;left:"+c+"px;"+(o||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var a=i.lineHeight,s=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+a+"px;width:"+(e.width+(r||0))+"px;top:"+s+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),a=i.lineHeight;t.start.row!=t.end.row&&(a+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(r||""))},e.prototype.drawScreenLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),a=i.lineHeight;this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(r||""))},e}();o.prototype.$padding=0,t.Marker=o})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var i=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return i.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),a=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nd&&(s=l.end.row+1,d=(l=this.session.getNextFoldLine(s,l))?l.start.row:1/0),!(s>r);){var u=o[a++];if(u){this.dom.removeChildren(u),this.$renderLine(u,s,s==d&&l),c&&(u.style.top=this.$lines.computeLineTop(s,e,this.session)+"px");var h=e.lineHeight*this.session.getRowLength(s)+"px";u.style.height!=h&&(c=!0,u.style.height=h)}s++}if(c)for(;a0;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,a=this.session.getNextFoldLine(o),s=a?a.start.row:1/0;o>s&&(o=a.end.row+1,s=(a=this.session.getNextFoldLine(o,a))?a.start.row:1/0),!(o>n);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==s&&a),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,i){for(var r,a=this,s=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),u=0;r=s.exec(i);){var h=r[1],p=r[2],m=r[3],f=r[4],g=r[5];if(a.showSpaces||!p){var y=u!=r.index?i.slice(u,r.index):"";if(u=r.index+r[0].length,y&&d.appendChild(this.dom.createTextNode(y,this.element)),h){var v=a.session.getScreenTabSize(t+r.index);d.appendChild(a.$tabStrings[v].cloneNode(!0)),t+=v-1}else p?a.showSpaces?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",w.textContent=o.stringRepeat(a.SPACE_CHAR,p.length),d.appendChild(w)):d.appendChild(this.dom.createTextNode(p,this.element)):m?((w=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",w.textContent=o.stringRepeat(a.SPACE_CHAR,m.length),d.appendChild(w)):f?(t+=1,(w=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",w.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=a.showSpaces?a.SPACE_CHAR:f,d.appendChild(w)):g&&(t+=1,(w=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",w.className="ace_cjk",w.textContent=g,d.appendChild(w))}}if(d.appendChild(this.dom.createTextNode(u?i.slice(u):i,this.element)),c(n.type))e.appendChild(d);else{var b="ace_"+n.type.replace(/\./g," ace_"),w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("inline-fold.closed.title","Unfold code"))),w.className=b,w.appendChild(d),e.appendChild(w)}return t+i.length},e.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;or[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o0))return;n=e.element.childNodes[0]}var i=n.childNodes;if(i){var r=i[t-1];r&&r.classList&&r.classList.contains("ace_indent-guide")&&r.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--)if(i=e[n],this.$highlightIndentGuideMarker.end&&i.row=a;)s=this.$renderToken(l,s,d,u.substring(0,a-i)),u=u.substring(a-i),i=a,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",n.indent),this.element)),s=0,a=n[++r]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,s=this.$renderToken(l,s,d,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,s,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}}},e.prototype.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=r?"":"",e.appendChild(o)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var r=e;if(i.length){var o=this.session.getRowSplitData(t);o&&o.length?(this.$renderWrappedLine(e,i,o),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i))}else this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r));if(this.showEOL&&r){n&&(t=n.end.row);var a=this.dom.createElement("span");a.className="ace_invisible ace_invisible_eol",a.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(a)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,i=[],r=n.getTokens(e);return t.walk((function(e,t,o,a,s){null!=e?i.push({type:"fold",value:e}):(s&&(r=n.getTokens(t)),r.length&&function(e,t,n){for(var r=0,o=0;o+e[r].value.lengthn-t&&(a=a.substring(0,n-t)),i.push({type:e[r].type,value:a}),o=t+a.length,r+=1);on?i.push({type:e[r].type,value:a.substring(0,n-o)}):i.push(e[r]),o+=a.length,r+=1}}(r,a,o))}),t.end.row,this.session.getLine(t.end.row).length),i},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,i.implement(d.prototype,s),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){var i=e("../lib/dom"),r=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||a.top<0)&&n>1)){var s=this.cursors[r++]||this.addCursor(),l=s.style;this.drawCursor?this.drawCursor(s,a,e,t[n],this.session):this.isCursorInView(a,e)?(i.setStyle(l,"display","block"),i.translate(s,a.left,a.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=a,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();r.prototype.$padding=0,r.prototype.drawCursor=null,t.Cursor=r})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("./lib/oop"),a=e("./lib/dom"),s=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(d.prototype,l);var u=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=a.scrollbarWidth(t.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return r(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var h=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return r(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=h,t.VScrollBar=u,t.HScrollBar=h})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e("./lib/oop"),a=e("./lib/dom"),s=e("./lib/event"),l=e("./lib/event_emitter").EventEmitter;a.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=a.createElement("div"),this.element.className="ace_sb"+t,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(c.prototype,l);var d=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=t,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,r=t.clientY,o=this.thumbTop;s.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(o+i-r);e!==n.scrollTop&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var u=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return r(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,r=t.clientX,o=this.thumbLeft;s.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(a)}));var a=setInterval((function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(o+i-r);e!==n.scrollLeft&&n._emit("scroll",{data:e})}}),20);return s.preventDefault(t)}var l=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(l)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);u.prototype.setInnerWidth=u.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=u,t.VScrollBar=d,t.HScrollBar=u})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){var i=e("./lib/event"),r=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),a=e("../lib/event"),s=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,u=200,h=function(){function e(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=a.onIdle((function t(){e.checkForSizeChanges(),a.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=r.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=o(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var s=a(this.els[0]),l=a(this.els[1]),c=a(this.els[2]),d=a(this.els[3]),h=n(i(d,l),i(d,c),i(r(l,c),r(d,s))),p=o(1+h[0],i(l,s)),m=o(1+h[1],i(c,s));if(t){var f=t,g=h[0]*f[0]/u+h[1]*f[1]/u+1,y=r(o(f[0],p),o(f[1],m));return r(o(1/g/u,y),s)}var v=i(e,s),b=n(i(p,o(h[0],v)),i(m,o(h[1],v)),v);return o(u,b)},e}();h.prototype.$characterSize={width:0,height:0},i.implement(h.prototype,l),t.FontMetrics=h})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.parentEl=e,this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setDimensions(),e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext("2d"),i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i){var r={info:1,warning:2,error:3};i.forEach((function(e){e.priority=r[e.type]||null})),i=i.sort((function(e,t){return e.priorityt.priority?1:0}));for(var o=0;othis.canvasHeight&&(u=this.canvasHeight-this.halfMinDecorationHeight),c=Math.round(u-this.halfMinDecorationHeight),d=Math.round(u+this.halfMinDecorationHeight)}n.fillStyle=t[i[o].type]||null,n.fillRect(0,l,this.canvasWidth,d-c)}}var h=this.renderer.session.selection.getCursor();h&&(s=this.compensateFoldRows(h.row),l=Math.round((h.row-s)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,l,this.canvasWidth,2))},e.prototype.compensateFoldRows=function(e){var t=this.renderer.session.$foldData,n=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n},e.prototype.compensateLineWidgets=function(e){var t=this.renderer.session.widgetManager;if(t){var n=0;return t.lineWidgets.forEach((function(t,i){e>i&&(n+=t.rowCount||0)})),n-1}return 0},e.prototype.setDimensions=function(e){e?(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.maxHeighte&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),!i&&this.$maxLines&&this.lineHeight>1&&(r.style.height&&"0px"!=r.style.height||(r.style.height="1px",i=r.clientHeight||r.scrollHeight)),n||(n=r.clientWidth||r.scrollWidth);var o=this.$updateCachedSize(e,t,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,a=this.$size,s={width:a.width,height:a.height,scrollerHeight:a.scrollerHeight,scrollerWidth:a.scrollerWidth};if(i&&(e||a.height!=i)&&(a.height=i,o|=this.CHANGE_SIZE,a.scrollerHeight=a.height,this.$horizScroll&&(a.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(a.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||a.width!=n)){o|=this.CHANGE_SIZE,a.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),a.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(a.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return a.$dirty=!n||!i,o&&this._signal("resize",s),o},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=r.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,o=n.top,a=n.left;o-=i.offset;var s=t&&t.useTextareaForIME||w.isMobile?this.lineHeight:1;if(o<0||o>i.height-s)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-s;if(t)if(t.useTextareaForIME){var d=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(a-=this.scrollLeft)>this.$size.scrollerWidth-l&&(a=this.$size.scrollerWidth-l),a+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",s+"px"),r.setStyle(e,"width",l+"px"),r.translate(this.textarea,Math.min(a,this.$size.scrollerWidth-l),Math.min(o,c))}}}else r.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var o=n.width+2*this.$padding+"px",a=n.minHeight+"px";r.setStyle(this.content.style,"width",o),r.setStyle(this.content.style,"height",a)}if(e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),a=this.$horizScroll!==o;a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,i-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+d.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>d.top),h=s!==u;h&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var p,m,f=this.scrollTop%this.lineHeight,g=Math.ceil(l/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),v=y+g,b=this.lineHeight;y=e.screenToDocumentRow(y,0);var w=e.getFoldLine(y);w&&(y=w.start.row),p=e.documentToScreenRow(y,0),m=e.getRowLength(y)*b,v=Math.min(e.screenToDocumentRow(v,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(v)*b+m,(f=this.scrollTop-p*b)<0&&p>0&&(p=Math.max(0,p+Math.floor(f/b)),f=this.scrollTop-p*b);var x=0;return(this.layerConfig.width!=r||a)&&(x=this.CHANGE_H_SCROLL),(a||h)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),h&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:y,firstRowScreen:p,lastRow:v,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:b?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),r=i.left,o=i.top,a=n&&n.top||0,s=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+a>o?(t&&l+a>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-s=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(o):Math.round(o);return{row:a,column:s,side:o-s>0?1:-1,offsetX:r}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var r=e+this.scrollLeft-n.left-this.$padding,o=r/this.characterWidth,a=this.$blockCursor?Math.floor(o):Math.round(o),s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(s,Math.max(a,0),r)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),o=i.row*this.lineHeight;return{pageX:n.left+r-this.scrollLeft,pageY:n.top+o-this.scrollTop}},e.prototype.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var o=this.$calculateWrappedTextChunks(e,i);this.addToken(o[0].text,"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}};var a=r.createElement("div");if(o.length>1){var s,l=this.hideTokensAfterPosition(i.row,i.column);o.slice(1).forEach((function(e){var t=r.createElement("div"),n=r.createElement("span");n.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),n.appendChild(r.createTextNode(e.text)),t.appendChild(n),a.appendChild(t),s=t})),l.forEach((function(e){var t=r.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(r.createTextNode(e.value)),s.appendChild(t)})),this.$ghostTextWidget={el:a,row:i.row,column:i.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(i,!0),d=this.container.getBoundingClientRect().height,u=o.length*this.lineHeight;if(u0){var c=0;l.push(r[a].length);for(var d=0;d1||Math.abs(e.$size.height-i)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();_.prototype.CHANGE_CURSOR=1,_.prototype.CHANGE_MARKER=2,_.prototype.CHANGE_GUTTER=4,_.prototype.CHANGE_SCROLL=8,_.prototype.CHANGE_LINES=16,_.prototype.CHANGE_TEXT=32,_.prototype.CHANGE_SIZE=64,_.prototype.CHANGE_MARKER_BACK=128,_.prototype.CHANGE_MARKER_FRONT=256,_.prototype.CHANGE_FULL=512,_.prototype.CHANGE_H_SCROLL=1024,_.prototype.$changes=0,_.prototype.$padding=null,_.prototype.$frozen=!1,_.prototype.STEPS=8,i.implement(_.prototype,y),a.defineOptions(_.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),t.VirtualRenderer=_})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,a=e("../config");function s(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+r.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(i){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,i,r,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),a.get("packaged")||!e.toUrl)r=r||a.moduleUrl(n,"worker");else{var l=this.$normalizePath;r=r||l(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=s(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var i=null,r=!1,s=Object.create(o),c=[],d=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(u):u())}});d.setEmitSync=function(e){r=e};var u=function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){d.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},a.loadModule(["worker",t],(function(e){for(i=new e[n](s);c.length;)u()})),d},t.WorkerClient=l,t.createWorker=s})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),a=function(){function e(e,t,n,i,r,o){var a=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){a.onCursorChange()}))},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var a=this.others.length-1;a>=0;a--){var s={row:(l=this.others[a]).row,column:l.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(a=this.others.length-1;a>=0;a--){var l;s={row:(l=this.others[a]).row,column:l.column+o},this.doc.remove(new i(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,a=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n1){var e=this.rangeList.ranges,t=e[e.length-1],n=r.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],o=e.column0;)v--;if(v>0)for(var b=0;i[b].isEmpty();)b++;for(var w=v;w>=b;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(o.prototype);var h=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",a),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;s.addListener(t,"keydown",(function(t){var r=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&r?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),s.addListener(t,"keyup",i,e),s.addListener(t,"blur",i,e)}function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var r=t.indexOf(i);-1!=r&&t.splice(r,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,a=1==n||n&&n.$byLines,s=this.session,l=this.selection,c=l.rangeList,d=(r?l:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var h=new o(s);this.inVirtualSelectionMode=!0;for(var p=d.length;p--;){if(a)for(;p>0&&d[p].start.row==d[p-1].end.row;)p--;h.fromOrientedRange(d[p]),h.index=p,this.selection=s.selection=h;var m=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===m||(i=m),h.toOrientedRange(d[p])}h.detach(),this.selection=s.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;ia&&(a=n.column),id?e.insert(i,l.stringRepeat(" ",o-d)):e.remove(new r(i.row,i.column,i.row,i.column-o+d)),t.start.column=t.end.column=a,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),u=d.start.row,h=d.end.row,p=u==h;if(p){var m,f=this.session.getLength();do{m=this.session.getLine(h)}while(/[=:]/.test(m)&&++h0);u<0&&(u=0),h>=f&&(h=f-1)}var g=this.session.removeFullLines(u,h);g=this.$reAlignText(g,p),this.session.insert({row:u,column:0},g.join("\n")+"\n"),p||(d.start.column=0,d.end.column=g[g.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,a=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,r=t[3].length,t):(n+i+r!=t[1].length+t[2].length+t[3].length&&(a=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),it[3].length&&(r=t[3].length),t):[e]})).map(t?c:o?a?function(e){return e[2]?s(n+i-e[2].length)+e[2]+s(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?s(n)+e[2]+s(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function s(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?s(n)+e[2]+s(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../../range").Range,r=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=e.getLine(t),a=o.search(r);if(-1!=a){for(var s=n||o.length,l=e.getLength(),c=t,d=t;++tc){var p=e.getLine(d).length;return new i(c,s,d,p)}}},this.openingBracketBlock=function(e,t,n,r,o){var a={row:n,column:r+1},s=e.$findClosingBracket(t,a,o);if(s){var l=e.foldWidgets[s.row];return null==l&&(l=e.getFoldWidget(s.row)),"start"==l&&s.row>a.row&&(s.row--,s.column=e.getLine(s.row).length),i.fromPoints(a,s)}},this.closingBracketBlock=function(e,t,n,r,o){var a={row:n,column:r},s=e.$findOpeningBracket(t,a);if(s)return s.column++,a.column--,i.fromPoints(s,a)}}).call(r.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){var i=e("../lib/dom"),r=e("../range").Range,o=e("../config").nls;t.showErrorMarker=function(e,t){var n=e.session,a=e.getCursorPosition(),s=a.row,l=n.widgetManager.getWidgetsAtRow(s).filter((function(e){return"errorMarker"==e.type}))[0];l?l.destroy():s-=t;var c,d=function(e,t,n){var i=e.getAnnotations().sort(r.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,a=n(t,e[o]);if(a>0)i=o+1;else{if(!(a<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},r.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var a=i[o];if(a&&n){if(a.row===t){do{a=i[o+=n]}while(a&&a.row===t);if(!a)return i.slice()}var s=[];t=a.row;do{s[n<0?"unshift":"push"](a),a=i[o+=n]}while(a&&a.row==t);return s.length&&s}}}(n,s,t);if(d){var u=d[0];a.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,a.row=u.row,c=e.renderer.$gutterLayer.$annotations[a.row]}else{if(l)return;c={displayText:[o("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(a.row),e.selection.moveToPosition(a);var h={row:a.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},p=h.el.appendChild(i.createElement("div")),m=h.el.appendChild(i.createElement("div"));m.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(a).left;m.style.left=f+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach((function(e,t){p.appendChild(i.createTextNode(e)),ts))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,u=!0,h=2&n?new be:void 0;for(o.set(e,t),o.set(t,e);++d-1},ye.prototype.set=function(e,t){var n=this.__data__,i=xe(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(re||ye),string:new ge}},ve.prototype.delete=function(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return $e(this,e).get(e)},ve.prototype.has=function(e){return $e(this,e).has(e)},ve.prototype.set=function(e,t){var n=$e(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},be.prototype.add=be.prototype.push=function(e){return this.__data__.set(e,n),this},be.prototype.has=function(e){return this.__data__.has(e)},we.prototype.clear=function(){this.__data__=new ye,this.size=0},we.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},we.prototype.get=function(e){return this.__data__.get(e)},we.prototype.has=function(e){return this.__data__.has(e)},we.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var i=n.__data__;if(!re||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(i)}return n.set(e,t),this.size=n.size,this};var Re=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=i}function Fe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Be(e){return null!=e&&"object"==typeof e}var He=T?function(e){return function(t){return e(t)}}(T):function(e){return Be(e)&&ze(e.length)&&!!_[_e(e)]};function We(e){return null!=(t=e)&&ze(t.length)&&!Pe(t)?function(e,t){var n=Ie(e),i=!n&&Ne(e),r=!n&&!i&&De(e),o=!n&&!i&&!r&&He(e),a=n||i||r||o,s=a?function(e,t){for(var n=-1,i=Array(e);++n0&&this.handleMarkers(x);var k=this.editor.$options;bz.editorOptions.forEach((function(t){k.hasOwnProperty(t)?e.editor.setOption(t,e.props[t]):e.props[t]&&console.warn("ReactAce: editor option ".concat(t," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))})),this.handleOptions(this.props),Array.isArray(b)&&b.forEach((function(t){"string"==typeof t.exec?e.editor.commands.bindKey(t.bindKey,t.exec):e.editor.commands.addCommand(t)})),y&&this.editor.setKeyboardHandler("ace/keyboard/"+y),n&&(this.refEditor.className+=" "+n),v&&v(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(e){for(var t=e,n=this.props,i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach((function(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new l(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some((function(t){return t.session===e}))&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,r=0;r-1},Jz.prototype.set=function(e,t){var n=this.__data__,i=tF(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},eF.prototype.clear=function(){this.__data__={hash:new Xz,map:new(Kz||Jz),string:new Xz}},eF.prototype.delete=function(e){return nF(this,e).delete(e)},eF.prototype.get=function(e){return nF(this,e).get(e)},eF.prototype.has=function(e){return nF(this,e).has(e)},eF.prototype.set=function(e,t){return nF(this,e).set(e,t),this};var rF=aF((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(cF(e))return Zz?Zz.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return Az.test(e)&&n.push(""),e.replace(Tz,(function(e,t,i,r){n.push(i?r.replace(Lz,"$1"):t||e)})),n}));function oF(e){if("string"==typeof e||cF(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function aF(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a),a};return n.cache=new(aF.Cache||eF),n}aF.Cache=eF;var sF=Array.isArray;function lF(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function cF(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Uz.call(e)}var dF=Ae&&Ae.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),uF=Ae&&Ae.__assign||function(){return uF=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&e.handleMarkers(x,t),i=0;ii.length?e:i,l=e.length>i.length?i:e,c=s.indexOf(l);if(-1!=c)return a=[new t.Diff(1,s.substring(0,c)),new t.Diff(0,l),new t.Diff(1,s.substring(c+l.length))],e.length>i.length&&(a[0][0]=a[2][0]=n),a;if(1==l.length)return[new t.Diff(n,e),new t.Diff(1,i)];var d=this.diff_halfMatch_(e,i);if(d){var u=d[0],h=d[1],p=d[2],m=d[3],f=d[4],g=this.diff_main(u,p,r,o),y=this.diff_main(h,m,r,o);return g.concat([new t.Diff(0,f)],y)}return r&&e.length>100&&i.length>100?this.diff_lineMode_(e,i,o):this.diff_bisect_(e,i,o)},t.prototype.diff_lineMode_=function(e,i,r){var o=this.diff_linesToChars_(e,i);e=o.chars1,i=o.chars2;var a=o.lineArray,s=this.diff_main(e,i,!1,r);this.diff_charsToLines_(s,a),this.diff_cleanupSemantic(s),s.push(new t.Diff(0,""));for(var l=0,c=0,d=0,u="",h="";l=1&&d>=1){s.splice(l-c-d,c+d),l=l-c-d;for(var p=this.diff_main(u,h,!1,r),m=p.length-1;m>=0;m--)s.splice(l,0,p[m]);l+=p.length}d=0,c=0,u="",h=""}l++}return s.pop(),s},t.prototype.diff_bisect_=function(e,i,r){for(var o=e.length,a=i.length,s=Math.ceil((o+a)/2),l=s,c=2*s,d=new Array(c),u=new Array(c),h=0;hr);b++){for(var w=-b+f;w<=b-g;w+=2){for(var x=l+w,_=($=w==-b||w!=b&&d[x-1]o)g+=2;else if(_>a)f+=2;else if(m&&(k=l+p-w)>=0&&k=(S=o-u[k]))return this.diff_bisectSplit_(e,i,$,_,r)}for(var C=-b+y;C<=b-v;C+=2){for(var S,k=l+C,E=(S=C==-b||C!=b&&u[k-1]o)v+=2;else if(E>a)y+=2;else if(!m){var $;if((x=l+p-C)>=0&&x=(S=o-S)))return this.diff_bisectSplit_(e,i,$,_,r)}}}return[new t.Diff(n,e),new t.Diff(1,i)]},t.prototype.diff_bisectSplit_=function(e,t,n,i,r){var o=e.substring(0,n),a=t.substring(0,i),s=e.substring(n),l=t.substring(i),c=this.diff_main(o,a,!1,r),d=this.diff_main(s,l,!1,r);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var n=[],i={};function r(e){for(var t="",r=0,a=-1,s=n.length;ai?e=e.substring(n-i):nt.length?e:t,i=e.length>t.length?t:e;if(n.length<4||2*i.length=e.length?[i,o,a,s,d]:null}var a,s,l,c,d,u=o(n,i,Math.ceil(n.length/4)),h=o(n,i,Math.ceil(n.length/2));return u||h?(a=h?u&&u[4].length>h[4].length?u:h:u,e.length>t.length?(s=a[0],l=a[1],c=a[2],d=a[3]):(c=a[0],d=a[1],s=a[2],l=a[3]),[s,l,c,d,a[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var i=!1,r=[],o=0,a=null,s=0,l=0,c=0,d=0,u=0;s0?r[o-1]:-1,l=0,c=0,d=0,u=0,a=null,i=!0)),s++;for(i&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),s=1;s=f?(m>=h.length/2||m>=p.length/2)&&(e.splice(s,0,new t.Diff(0,p.substring(0,m))),e[s-1][1]=h.substring(0,h.length-m),e[s+1][1]=p.substring(m),s++):(f>=h.length/2||f>=p.length/2)&&(e.splice(s,0,new t.Diff(0,h.substring(0,f))),e[s-1][0]=1,e[s-1][1]=p.substring(0,p.length-f),e[s+1][0]=n,e[s+1][1]=h.substring(f),s++),s++}s++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),o=i.match(t.nonAlphaNumericRegex_),a=r.match(t.nonAlphaNumericRegex_),s=o&&i.match(t.whitespaceRegex_),l=a&&r.match(t.whitespaceRegex_),c=s&&i.match(t.linebreakRegex_),d=l&&r.match(t.linebreakRegex_),u=c&&e.match(t.blanklineEndRegex_),h=d&&n.match(t.blanklineStartRegex_);return u||h?5:c||d?4:o&&!s&&l?3:s||l?2:o||a?1:0}for(var i=1;i=h&&(h=p,c=r,d=o,u=a)}e[i-1][1]!=c&&(c?e[i-1][1]=c:(e.splice(i-1,1),i--),e[i][1]=d,u?e[i+1][1]=u:(e.splice(i+1,1),i--))}i++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var i=!1,r=[],o=0,a=null,s=0,l=!1,c=!1,d=!1,u=!1;s0?r[o-1]:-1,d=u=!1),i=!0)),s++;i&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var i,r=0,o=0,a=0,s="",l="";r1?(0!==o&&0!==a&&(0!==(i=this.diff_commonPrefix(l,s))&&(r-o-a>0&&0==e[r-o-a-1][0]?e[r-o-a-1][1]+=l.substring(0,i):(e.splice(0,0,new t.Diff(0,l.substring(0,i))),r++),l=l.substring(i),s=s.substring(i)),0!==(i=this.diff_commonSuffix(l,s))&&(e[r][1]=l.substring(l.length-i)+e[r][1],l=l.substring(0,l.length-i),s=s.substring(0,s.length-i))),r-=o+a,e.splice(r,o+a),s.length&&(e.splice(r,0,new t.Diff(n,s)),r++),l.length&&(e.splice(r,0,new t.Diff(1,l)),r++),r++):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,a=0,o=0,s="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;rt));i++)a=r,s=o;return e.length!=i&&e[i][0]===n?s:s+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],i=/&/g,r=//g,a=/\n/g,s=0;s");switch(l){case 1:t[s]=''+c+"";break;case n:t[s]=''+c+"";break;case 0:t[s]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),r=this;function o(e,i){var o=e/t.length,a=Math.abs(n-i);return r.Match_Distance?o+a/r.Match_Distance:a?1:o}var a=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(a=Math.min(o(0,s),a),-1!=(s=e.lastIndexOf(t,n+t.length))&&(a=Math.min(o(0,s),a)));var l,c,d=1<=m;y--){var v=i[e.charAt(y-1)];if(g[y]=0===p?(g[y+1]<<1|1)&v:(g[y+1]<<1|1)&v|(u[y+1]|u[y])<<1|1|u[y+1],g[y]&d){var b=o(p,y-1);if(b<=a){if(a=b,!((s=y-1)>n))break;m=Math.max(1,2*n-s)}}}if(o(p+1,n)>a)break;u=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&"object"==typeof e&&void 0===i&&void 0===r)a=e,o=this.diff_text1(a);else if("string"==typeof e&&i&&"object"==typeof i&&void 0===r)o=e,a=i;else{if("string"!=typeof e||"string"!=typeof i||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");o=e,a=r}if(0===a.length)return[];for(var s=[],l=new t.patch_obj,c=0,d=0,u=0,h=o,p=o,m=0;m=2*this.Patch_Margin&&c&&(this.patch_addContext_(l,h),s.push(l),l=new t.patch_obj,c=0,h=p,d=u)}1!==f&&(d+=g.length),f!==n&&(u+=g.length)}return c&&(this.patch_addContext_(l,h),s.push(l)),s},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(s=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(u=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||s>=u)&&(s=-1):s=this.match_main(t,d,c),-1==s)o[a]=!1,r-=e[a].length2-e[a].length1;else if(o[a]=!0,r=s-c,d==(l=-1==u?t.substring(s,s+d.length):t.substring(s,u+this.Match_MaxBits)))t=t.substring(0,s)+this.diff_text2(e[a].diffs)+t.substring(s+d.length);else{var h=this.diff_main(d,l,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(h)/d.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(h);for(var p,m=0,f=0;fa[0][1].length){var s=n-a[0][1].length;a[0][1]=i.substring(a[0][1].length)+a[0][1],o.start1-=s,o.start2-=s,o.length1+=s,o.length2+=s}return 0==(a=(o=e[e.length-1]).diffs).length||0!=a[a.length-1][0]?(a.push(new t.Diff(0,i)),o.length1+=n,o.length2+=n):n>a[a.length-1][1].length&&(s=n-a[a.length-1][1].length,a[a.length-1][1]+=i.substring(0,s),o.length1+=s,o.length2+=s),i},t.prototype.patch_splitMax=function(e){for(var i=this.Match_MaxBits,r=0;r2*i?(c.length1+=h.length,a+=h.length,d=!1,c.diffs.push(new t.Diff(u,h)),o.diffs.shift()):(h=h.substring(0,i-c.length1-this.Patch_Margin),c.length1+=h.length,a+=h.length,0===u?(c.length2+=h.length,s+=h.length):d=!1,c.diffs.push(new t.Diff(u,h)),h==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(h.length))}l=(l=this.diff_text2(c.diffs)).substring(l.length-this.Patch_Margin);var p=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),d||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;nc)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=o)break;if(d.isMultiLine())t=d.end.row;else if(i==c)break}s=t}}return new r(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++na)return new r(a,i,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],(function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=o,this.$outdent=new a,this.$behaviour=new c,this.$completer=new l,this.foldingRules=new d};i.inherits(u,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;return r.length&&"comment"==r[r.length-1].type||t.match(/^.*\{\s*$/)&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(u.prototype),t.Mode=u})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/theme/dracula-css",["require","exports","module"],(function(e,t,n){n.exports='/*\n * Copyright © 2017 Zeno Rocha \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n.ace-dracula .ace_gutter {\n background: #282a36;\n color: rgb(144,145,148)\n}\n\n.ace-dracula .ace_print-margin {\n width: 1px;\n background: #44475a\n}\n\n.ace-dracula {\n background-color: #282a36;\n color: #f8f8f2\n}\n\n.ace-dracula .ace_cursor {\n color: #f8f8f0\n}\n\n.ace-dracula .ace_marker-layer .ace_selection {\n background: #44475a\n}\n\n.ace-dracula.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #282a36;\n border-radius: 2px\n}\n\n.ace-dracula .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-dracula .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #a29709\n}\n\n.ace-dracula .ace_marker-layer .ace_active-line {\n background: #44475a\n}\n\n.ace-dracula .ace_gutter-active-line {\n background-color: #44475a\n}\n\n.ace-dracula .ace_marker-layer .ace_selected-word {\n box-shadow: 0px 0px 0px 1px #a29709;\n border-radius: 3px;\n}\n\n.ace-dracula .ace_fold {\n background-color: #50fa7b;\n border-color: #f8f8f2\n}\n\n.ace-dracula .ace_keyword {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_language {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_numeric {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character.ace_escape {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_other {\n color: #bd93f9\n}\n\n.ace-dracula .ace_support.ace_function {\n color: #8be9fd\n}\n\n.ace-dracula .ace_support.ace_constant {\n color: #6be5fd\n}\n\n.ace-dracula .ace_support.ace_class {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_support.ace_type {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_storage {\n color: #ff79c6\n}\n\n.ace-dracula .ace_storage.ace_type {\n font-style: italic;\n color: #8be9fd\n}\n\n.ace-dracula .ace_invalid {\n color: #F8F8F0;\n background-color: #ff79c6\n}\n\n.ace-dracula .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #bd93f9\n}\n\n.ace-dracula .ace_string {\n color: #f1fa8c\n}\n\n.ace-dracula .ace_comment {\n color: #6272a4\n}\n\n.ace-dracula .ace_variable {\n color: #50fa7b\n}\n\n.ace-dracula .ace_variable.ace_parameter {\n font-style: italic;\n color: #ffb86c\n}\n\n.ace-dracula .ace_entity.ace_other.ace_attribute-name {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_function {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_tag {\n color: #ff79c6\n}\n.ace-dracula .ace_invisible {\n color: #626680;\n}\n\n.ace-dracula .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dracula .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==") right repeat-y;\n}\n'})),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-dracula",t.cssText=e("./dracula-css"),t.$selectionColorConflict=!0,e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/dracula"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){var i=e("./lib/dom"),r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,a=e("./lib/lang"),s=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,d=e("./tokenizer").Tokenizer,u=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return u.getText&&u.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}h.SELECTED_TEXT=h.SELECTION;var m=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=h}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var i={regex:"/("+n("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return("}"==i&&n.length||-1!="`$\\".indexOf(i))&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,i){var r=t(e.substr(1));return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+n("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return n[0].choices=i,[i[0]]},next:"start"},i,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},i,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,s=e.replace(r,(function(){var e=a.variables.__;a.variables.__=[].slice.call(arguments);for(var t=a.resolveVariables(o,n),i="E",r=0;r=0&&o.splice(a,1)}}e.content?r(e):Array.isArray(e)&&e.forEach(r)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(l){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var o=t[2],a=t[3];if("regex"==o){var s=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=s.exec(a)[1],i.trigger=s.exec(a)[1],i.endTrigger=s.exec(a)[1],i.endGuard=s.exec(a)[1]}else"snippet"==o?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):o&&(i[o]=a)}}return n},e.prototype.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var r=i[t];return r&&(n=r[e]),!!n}),this),n},e}();r.implement(m.prototype,o);var f=function(e,t,n){void 0===n&&(n={});var i=e.getCursorPosition(),r=e.session.getLine(i.row),o=e.session.getTabString(),a=r.match(/^\s*/)[0];i.column1?(v=t[t.length-1].length,y+=t.length-1):v+=e.length,b+=e}else e&&(e.start?e.end={row:y,column:v}:e.start={row:y,column:v})})),{text:b,tabstops:l,tokens:s}},g=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=this.tabstops.slice(),o=0;o2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();g.prototype.keyboardHandler=new c,g.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var y=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new m;var b=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(b.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],(function(e,t,n){var i=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,o=e("../range").Range,a=e("../lib/event"),s=e("../lib/lang"),l=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),u=function(e){return"suggest-aria-id:".concat(e)},h=d.isSafari?"menu":"listbox",p=d.isSafari?"menuitem":"option",m=d.isSafari?"aria-current":"aria-selected",f=function(e){var t=new i(e);t.$maxLines=4;var n=new r(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n};l.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=l.createElement("div"),n=f(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.renderer.$textLayer.element.setAttribute("role",h),n.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),n.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),n.renderer.textarea.setAttribute("aria-hidden","true"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i,r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity="0",n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",(function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),g.start.row=g.end.row=t.row,e.stop()}));var d=new o(-1,0,-1,1/0),g=new o(-1,0,-1,1/0);g.id=n.session.addMarker(g,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?d.id&&(n.session.removeMarker(d.id),d.id=null):d.id=n.session.addMarker(d,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",(function(e){if(i){if(i.x!=e.x||i.y!=e.y){(i=e).scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;d.start.row!=t&&(d.id||n.setRow(t),v(t))}}else i=e})),n.renderer.on("beforeRender",(function(){if(i&&-1!=d.start.row){i.$pos=null;var e=i.getDocumentPosition().row;d.id||n.setRow(e),v(e,!0)}})),n.renderer.on("afterRender",(function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,i=e.config.lastRow;t<=i;t++){var r=e.element.childNodes[t-e.config.firstRow];r.setAttribute("role",p),r.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),r.setAttribute("aria-setsize",n.data.length),r.setAttribute("aria-describedby","doc-tooltip"),r.setAttribute("aria-posinset",t+1);var o=n.getData(t);if(o){var a="".concat(o.caption||o.value).concat(o.meta?", ".concat(o.meta):"");r.setAttribute("aria-label",a)}r.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),n.renderer.on("afterRender",(function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow],r=document.activeElement;if(i!==n.selectedNode&&n.selectedNode&&(l.removeCssClass(n.selectedNode,"ace_selected"),n.selectedNode.removeAttribute(m),n.selectedNode.removeAttribute("id")),r.removeAttribute("aria-activedescendant"),n.selectedNode=i,i){var o=u(e);l.addCssClass(i,"ace_selected"),i.id=o,t.element.setAttribute("aria-activedescendant",o),r.setAttribute("aria-activedescendant",o),i.setAttribute(m,"true")}}));var y=function(){v(-1)},v=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return d.start.row},a.addListener(n.container,"mouseout",(function(){n.isMouseOver=!1,y()})),n.on("hide",y),n.on("changeSelection",y),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var b=n.session.bgTokenizer;return b.$tokenizeRow=function(e){var t=n.data[e],i=[];if(!t)return i;"string"==typeof t&&(t={value:t});var r=t.caption||t.value||t.name;function o(e,n){e&&i.push({type:(t.className||"")+(n||""),value:e})}for(var a=r.toLowerCase(),s=(n.filterText||"").toLowerCase(),l=0,c=0,d=0;d<=s.length;d++)if(d!=c&&(t.matchMask&1<=u?"bottom":"top"),"top"===r?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-u):"bottom"===r&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+u);var f=h.top>=0&&h.bottom<=l;if(!o&&!f)return!1;d.$maxPixelHeight=f?null:"top"===r?m:p,"top"===r?(a.style.top="",a.style.bottom=l+s-h.bottom+"px",n.isTopdown=!1):(a.style.top=h.top+"px",a.style.bottom="",n.isTopdown=!0),a.style.display="";var g=e.left;return g+a.offsetWidth>c&&(g=c-a.offsetWidth),a.style.left=g+"px",a.style.right="",n.isOpen||(n.isOpen=!0,this._signal("show"),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n},t.$singleLineEditor=f,t.getAriaId=u})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,n){var i=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var i="doc-tooltip ",r=0;r=0&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);!n||e&&!n.hideInlinePreview||this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,i=t.$cursorLayer.getPixelPosition(this.base,!0);i.left-=this.popup.getTextLeftOffset();var r=e.container.getBoundingClientRect();i.top+=r.top-t.layerConfig.offset,i.left+=r.left-e.renderer.scrollLeft,i.left+=t.gutterWidth;var o={top:i.top,left:i.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(o.top+=t.$ghostTextWidget.el.offsetHeight);var a=e.container.getBoundingClientRect().bottom-n,s=athis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var n=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,a=0;o=e[a];a++)if(o.skipFilter)o.$score=o.score,n.push(o);else{var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var l,c,d=-1,u=0,h=0;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(r);if(p>-1)h=p;else for(var m=0;m=0&&(g<0||f0&&(-1===d&&(h+=10),h+=c,u|=1<a||(d.range.start.row===l?s++:(l=d.range.start.row,s=0),s>200))){var u=d.range.clipRows(o,a);if(u.start.row!==u.end.row||u.start.column!==u.end.column){var h=u.toScreenRange(n);h.isEmpty()?(r=n.getNextFoldLine(u.end.row,r))&&r.end.row>u.end.row&&(o=r.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,h,d.className,i):h.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,h,d.className,i):t.drawTextMarker(e,h,d.className,i):t.drawSingleLineMarker(e,h,d.className+" ace_br15",i)}}}},e}();i.prototype.MAX_MARKERS=1e4,t.MarkerGroup=i})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,o,a){var s=function(e,t){var n=function(e,t){return e.getTextRange(i.fromPoints({row:0,column:0},t)).split(r).length-1}(e,t),o=e.getValue().split(r),a=Object.create(null),s=o[n];return o.forEach((function(e,t){if(e&&e!==s){var i=Math.abs(n-t),r=o.length-i;a[e]?a[e]=Math.max(r,a[e]):a[e]=r}})),a}(t,n);a(null,Object.keys(s).map((function(e){return{caption:e,value:e,score:s[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){var i=e("../snippets").snippetManager,r=e("../autocomplete").Autocomplete,o=e("../config"),a=e("../lib/lang"),s=e("../autocomplete/util"),l=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),d={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);var o=e.session.getState(n.row),a=t.$mode.getCompletions(o,t,n,i);r(null,a=a.map((function(e){return e.completerId=d.id,e})))},id:"keywordCompleter"},u={getCompletions:function(e,t,n,r,o){var a=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?a.push("html-tag"):a=i.getActiveScopes(e);var l=i.snippetMap,c=[];a.forEach((function(e){for(var t=l[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&c.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"⇥ ":"snippet",completerId:u.id})}}),this),o(null,c)},getDocTooltip:function(e){var t,n;e.snippet&&!e.docHTML&&(e.docHTML=["",a.escapeHTML(e.caption),"","
",a.escapeHTML((t=e.snippet,n={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,i,r){return n[t]=r||""})).replace(/\$(\d+?)/g,(function(e,t){return n[t]}))))].join(""))},id:"snippetCompleter"},h=[u,c,d];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=c,t.keyWordCompleter=d,t.snippetCompleter=u;var p,m={name:"expandSnippet",exec:function(e){return i.expandWithTab(e)},bindKey:"Tab"},f=function(e,t){g(t.session.$mode)},g=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(i.files||(i.files={}),y(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},y=function(e,t){t&&e&&!i.files[e]&&(i.files[e]={},o.loadModule(t,(function(t){t&&(i.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=i.parseSnippetFile(t.snippetText)),i.register(t.snippets||[],t.scope),t.includeScopes&&(i.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){g("ace/mode/"+e)}))))})))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!n){p=e;var i=e.editor.$liveAutocompletionDelay;i?b.delay(i):w(e)}},b=a.delayedCall((function(){w(p)}),0),w=function(e){var t=e.editor,n=s.getCompletionPrefix(t),i=e.args,o=s.triggerAutocomplete(t,i);if(n&&n.length>=t.$liveAutocompletionThreshold||o){var a=r.for(t);a.autoShown=!0,a.showPopup(t)}},x=e("../editor").Editor;e("../config").defineOptions(x.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(r.for(this),this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",v)):this.commands.off("afterExec",v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on("changeMode",f),f(0,this)):(this.commands.removeCommand(m),this.off("changeMode",f))},value:!1}}),t.MarkerGroup=l})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],(function(e,t,n){var i=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],r=e("../editor").Editor;function o(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&0===n.column&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function a(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function s(e,t){var n=t.session;if(n.$bidiHandler.currentRow=null,n.$bidiHandler.isRtlLine(e.start.row)&&"insert"===e.action&&e.lines.length>1)for(var i=e.start.row;i999))&&(l[0]||(t.lastIndex=d+=r.skipEmptyMatch(a,d,n),!(d>=a.length))););}this.searchCounter.textContent=c("search-box.search-counter","$0 of $1",[o,i>999?"999+":i])},e.prototype.findNext=function(){this.find(!0,!1)},e.prototype.findPrev=function(){this.find(!0,!0)},e.prototype.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},e.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},e.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},e.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},e.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},e.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=t,this.editor.$search.$options.regExp&&(e=r.escapeRegExp(e)),e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},e.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},e}(),u=new s;u.bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.editor.getReadOnly()||(e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus())},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout((function(){e.hide()}))},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),u.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]);var h=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]);d.prototype.$searchBarKb=u,d.prototype.$closeSearchBarKb=h,t.SearchBox=d,t.Search=function(e,t){(e.searchBox||new d(e)).show(e.session.getTextRange(),t)}})),ace.require(["ace/ext/searchbox"],(function(t){e&&(e.exports=t)}))}({exports:{}}),function(e){ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],(function(e,t,n){var i=e("../token_iterator").TokenIterator;function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){for(var n,o,a,s=new i(e,0,0),l=s.getCurrentToken(),c=e.getTabString(),d=t.singletonTags,u=t.blockTags,h=t.formatOptions||{},p=!1,m=!1,f=!1,g="",y="",v="",b=0,w=0,x=0,_=0,C=0,S=0,k=0,E=0,$=0,M=!1,R=!1,A=!1,T=!1,L={0:0},j=[],O=!1,N=function(){n&&n.value&&"string.regexp"!==n.type&&(n.value=n.value.replace(/^\s*/,""))},I=function(){for(var e=g.length-1;0!=e&&" "===g[e];)e-=1;g=g.slice(0,e+1)},D=function(){g=g.trimRight(),p=!1};null!==l;){if(E=s.getCurrentTokenRow(),s.$rowTokens,n=s.stepForward(),void 0!==l){if(y=l.value,C=0,A="style"===v||"ace/mode/css"===e.$modeId,r(l,"tag-open")?(R=!0,n&&(T=-1!==u.indexOf(n.value)),"0;$--)g+="\n";p=!0,r(l,"comment")||l.type.match(/^(comment|string)$/)||(y=y.trimLeft())}if(y){if("keyword"===l.type&&y.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(j[b]=y,N(),f=!0,y.match(/^(else|elseif)$/)&&g.match(/\}[\s]*$/)&&(D(),m=!0)):"paren.lparen"===l.type?(N(),"{"===y.substr(-1)&&(f=!0,M=!1,R||($=1)),"{"===y.substr(0,1)&&(m=!0,"["!==g.substr(-1)&&"["===g.trimRight().substr(-1)?(D(),m=!1):")"===g.trimRight().substr(-1)?D():I())):"paren.rparen"===l.type?(C=1,"}"===y.substr(0,1)&&("case"===j[b-1]&&C++,"{"===g.trimRight().substr(-1)?D():(m=!0,A&&($+=2))),"]"===y.substr(0,1)&&"}"!==g.substr(-1)&&"}"===g.trimRight().substr(-1)&&(m=!1,_++,D()),")"===y.substr(0,1)&&"("!==g.substr(-1)&&"("===g.trimRight().substr(-1)&&(m=!1,_++,D()),I()):"keyword.operator"!==l.type&&"keyword"!==l.type||!y.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===l.type&&";"===y?(D(),N(),f=!0,A&&$++):"punctuation.operator"===l.type&&y.match(/^(:|,)$/)?(D(),N(),y.match(/^(,)$/)&&k>0&&0===S&&h.lineBreaksAfterCommasInCurlyBlock?$++:(f=!0,p=!1)):"support.php_tag"!==l.type||"?>"!==y||p?r(l,"attribute-name")&&g.substr(-1).match(/^\s$/)?m=!0:r(l,"attribute-equals")?(I(),N()):r(l,"tag-close")?(I(),"/>"===y&&(m=!0)):"keyword"===l.type&&y.match(/^(case|default)$/)&&O&&(C=1):(D(),m=!0):(D(),N(),m=!0,f=!0),p&&(!l.type.match(/^(comment)$/)||y.substr(0,1).match(/^[/#]$/))&&(!l.type.match(/^(string)$/)||y.substr(0,1).match(/^['"@]$/))){if(_=x,b>w)for(_++,a=b;a>w;a--)L[a]=_;else b"===y)&&($=T&&n&&""===y&&b--),r(l,"tag-name")&&(v=y),o=E}}l=n}g=g.trim(),e.doc.setValue(g)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]})),ace.require(["ace/ext/beautify"],(function(t){e&&(e.exports=t)}))}({exports:{}});const jF=window.React.useCallback,OF=window.React.useMemo,NF=window.React.useState,IF=e=>{const t=OF((()=>!(!e.value||function(e){return"string"==typeof e}(e.value)&&e.checkedValue!==e.value)),[e.value,e.checkedValue,e.uncheckedValue]),n=jF((t=>{const n=t?!ix(e.checkedValue)||e.checkedValue:!!ix(e.uncheckedValue)&&e.uncheckedValue;e.updateDataCallback({[e.attribute]:n})}),[e.updateDataCallback]);return Vt.jsxs("div",{className:"yaymail-general-setting-item horizontal",children:[Vt.jsxs("div",{className:"yaymail-general-setting-item__title",children:[Vt.jsx("span",{children:e.label}),e.note&&Vt.jsx("span",{className:"yaymail-general-setting-item__note",children:e.note})]}),Vt.jsx(wm,{checkedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:ix(e.checkedValue)?e.checkedValue:"on"}),checked:t,onChange:n,unCheckedChildren:Vt.jsx("span",{className:"yaymail-setting-switch-label",children:ix(e.uncheckedValue)?e.uncheckedValue:"off"}),disabled:e.disabled})]})},DF=window.yaymailData.urls.home_url+"/wp-admin/admin.php?page=wc-settings&tab=email",PF=()=>{const e=JS(),t=sy(),n=new URLSearchParams(t.search).get("template"),i=Zb((e=>e.updateSettings)),{saveSettingsMutation:r}=UC({fetch:!1}),o=Zb((e=>e.settings)),a=OF((()=>"yaymail_global_header_footer"===n),[n]),s=Zb((e=>e.hasChanged)),l=Zb((e=>e.updateSettingsStatus)),[c,d]=NF(!1),u=e=>{i(e),l(!0)},[h,p]=qu.useNotification({maxCount:1}),m=(e,t)=>{h[e]({message:t,placement:"bottomRight",duration:3})},f=OF((()=>o&&o.container_width&&!isNaN(o.container_width)?null==o?void 0:o.container_width:605),[o]),g=jF((e=>{"number"==typeof e&&u({container_width:e})}),[u]),y=jF((e=>{u({payment_display_mode:e})}),[u]),v=jF((e=>{u({product_image_position:e})}),[u]),b=jF((e=>{"number"==typeof e&&u({product_image_height:e})}),[u]),w=jF((e=>{"number"==typeof e&&u({product_image_width:e})}),[u]),x=jF((e=>{ix(e)&&u({custom_css:e})}),[u]);return Vt.jsxs(Vt.Fragment,{children:[p,o&&Vt.jsxs("div",{className:"yaymail-general-setting",children:[Vt.jsx(IF,{attribute:"direction",checkedValue:"rtl",label:__("Direction","yaymail"),value:e,uncheckedValue:"ltr",updateDataCallback:u}),!a&&Vt.jsx(IF,{value:Boolean(o.global_header_footer_enabled??!1),attribute:"global_header_footer_enabled",updateDataCallback:u,label:__("Global header footer","yaymail")}),Vt.jsxs("div",{className:"yaymail-general-setting-item",children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Container width (px)","yaymail")}),Vt.jsx(hc,{className:"vertical-control",bordered:!1,min:480,max:900,defaultValue:605,value:f,onChange:g}),Vt.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Email width must be 480px (min) - 900px (max)","yaymail")})]}),Vt.jsxs("div",{className:"yaymail-general-setting-item",children:[Vt.jsxs("div",{className:"yaymail-general-setting-item__disabled",style:{opacity:.5},children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Display payment instruction and details","yaymail")}),Vt.jsx(st,{className:"vertical-control",defaultValue:"onlyForCustomer",value:o.payment_display_mode,onChange:y,popupClassName:"yaymail-sidebar-select-popup",disabled:!0,children:[{value:"yes",label:"Yes"},{value:"no",label:"No"},{value:"customer",label:"Only for customer"}].map((e=>Vt.jsx(st.Option,{value:e.value,label:e.label,children:Vt.jsxs("div",{className:"yaymail-sidebar-custom-select-option",children:[Vt.jsx("span",{children:e.label}),Vt.jsx(Tt,{className:"check"})]})},e.value)))})]}),Vt.jsx("p",{className:"yaymail-general-setting-item__note",children:__("This setting is no longer global. To show payment instructions, please use [yaymail_payment_instructions] in any text area","yaymail")})]}),Vt.jsx(IF,{value:Boolean(o.show_product_image),attribute:"show_product_image",updateDataCallback:u,label:__("Show product image","yaymail")}),Boolean(o.show_product_image)&&Vt.jsxs("div",{children:[Vt.jsxs("div",{className:"yaymail-general-setting-item",children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Product image position","yaymail")}),Vt.jsx(st,{className:"vertical-control",defaultValue:"onlyForCustomer",value:o.product_image_position,onChange:v,popupClassName:"yaymail-sidebar-select-popup",children:[{value:"top",label:"Top"},{value:"left",label:"Left"},{value:"bottom",label:"Bottom"}].map((e=>Vt.jsx(st.Option,{value:e.value,label:e.label,children:Vt.jsxs("div",{className:"yaymail-sidebar-custom-select-option",children:[Vt.jsx("span",{children:e.label}),Vt.jsx(Tt,{className:"check"})]})},e.value)))})]}),Vt.jsxs("div",{className:"yaymail-general-setting-item",children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Product image height (px)","yaymail")}),Vt.jsx(hc,{className:"vertical-control",bordered:!1,min:30,max:300,defaultValue:30,value:o.product_image_height,onChange:b}),Vt.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Image height must be 30px (min) - 300px (max)","yaymail")})]}),Vt.jsxs("div",{className:"yaymail-general-setting-item",children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",children:__("Image width (px)","yaymail")}),Vt.jsx(hc,{className:"vertical-control",bordered:!1,min:30,max:300,defaultValue:30,value:o.product_image_width,onChange:w}),Vt.jsx("p",{className:"yaymail-general-setting-item__note",children:__("Product image width must be 30px (min) - 300px (max)","yaymail")})]})]}),Vt.jsx(IF,{value:Boolean(o.show_product_sku),attribute:"show_product_sku",updateDataCallback:u,label:__("Show product SKU","yaymail")}),Vt.jsx(IF,{value:Boolean(o.show_product_description),attribute:"show_product_description",updateDataCallback:u,label:__("Show product short description","yaymail")}),Vt.jsx(IF,{value:Boolean(o.show_product_hyper_links),attribute:"show_product_hyper_links",updateDataCallback:u,label:__("Show product Hyperlinks","yaymail")}),Vt.jsx(IF,{value:Boolean(o.show_product_item_cost),attribute:"show_product_item_cost",updateDataCallback:u,label:__("Show product item cost","yaymail")}),Vt.jsx(IF,{value:Boolean(o.show_product_regular_price),attribute:"show_product_regular_price",updateDataCallback:u,label:__("Show product regular price","yaymail")}),Vt.jsx(IF,{value:Boolean(o.enable_custom_css),attribute:"enable_custom_css",updateDataCallback:u,label:__("Use custom CSS","yaymail")}),Boolean(o.enable_custom_css)&&Vt.jsx(LF,{mode:"css",theme:"dracula",onChange:x,name:"yaymail-custom-css",height:"270px",width:"268px",enableLiveAutocompletion:!0,enableBasicAutocompletion:!0,enableMobileMenu:!0,tabSize:2,editorProps:{$blockScrolling:!0},className:"yaymail-custom-css-editor",showGutter:!0,showPrintMargin:!0,highlightActiveLine:!0,value:o.custom_css,setOptions:{useWorker:!1}}),Vt.jsxs("div",{className:"yaymail-general-setting-item",style:{marginBottom:0},children:[Vt.jsx("div",{className:"yaymail-general-setting-item__title",style:{textTransform:"initial"},children:__("Change email subject and form name","yaymail")}),Vt.jsx("a",{target:"_blank",href:DF,style:{fontSize:12,fontWeight:500},rel:"noreferrer",className:"yaymail-link--light",children:__("Click here","yaymail")})]})]}),Vt.jsx("div",{className:"yaymail-btn-save-wrapper",children:Vt.jsx(Pe,{type:"primary",className:"yaymail-btn-save yaymail-btn--light",onClick:async()=>{d(!0),(await r.mutateAsync(o)).success?m("success",__("Save success","yaymail")):m("error",__("Save failed","yaymail")),d(!1)},disabled:!s,loading:c,icon:c?Vt.jsx(k,{}):void 0,style:{minWidth:165},children:__(c?"Saving...":"Save global settings","yaymail")})})]})},zF=[{key:"global",label:"Global",children:Vt.jsx(PF,{})},{key:"emailSettings",label:Vt.jsxs(Vt.Fragment,{children:["Email Settings",Vt.jsx("p",{style:{marginBottom:2},className:"yaymail-general-setting-item__note",children:__("This will affect the current email settings","yaymail")})]}),children:Vt.jsx(nz,{})}],FF=()=>Vt.jsx("div",{className:"yaymail-customizer-tab-content yaymail-customizer-tab-setting",children:Vt.jsx(GO,{accordion:!0,items:zF})}),BF=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M8.80244 4.75002V7.69329L11.3187 9.16053C11.4455 9.23451 11.5368 9.3544 11.5726 9.49383C11.6084 9.63325 11.5857 9.78078 11.5096 9.90397C11.4335 10.0272 11.3101 10.1159 11.1667 10.1507C11.0232 10.1855 10.8714 10.1635 10.7447 10.0895L7.9581 8.46449C7.87563 8.41633 7.80739 8.34824 7.76002 8.26685C7.71265 8.18545 7.68777 8.09352 7.6878 8.00001V4.75002C7.6878 4.60636 7.74652 4.46858 7.85104 4.367C7.95555 4.26542 8.09731 4.20835 8.24512 4.20835C8.39293 4.20835 8.53469 4.26542 8.6392 4.367C8.74372 4.46858 8.80244 4.60636 8.80244 4.75002ZM8.24512 1.50002C7.36595 1.49789 6.49507 1.66525 5.68289 1.99241C4.87071 2.31957 4.13336 2.80004 3.5135 3.40601C3.00704 3.90434 2.557 4.38371 2.11463 4.88543V3.66668C2.11463 3.52303 2.05592 3.38525 1.9514 3.28367C1.84688 3.18209 1.70513 3.12502 1.55732 3.12502C1.40951 3.12502 1.26775 3.18209 1.16323 3.28367C1.05872 3.38525 1 3.52303 1 3.66668V6.37501C1 6.51867 1.05872 6.65645 1.16323 6.75803C1.26775 6.85961 1.40951 6.91668 1.55732 6.91668H4.3439C4.49171 6.91668 4.63347 6.85961 4.73798 6.75803C4.8425 6.65645 4.90122 6.51867 4.90122 6.37501C4.90122 6.23135 4.8425 6.09358 4.73798 5.992C4.63347 5.89042 4.49171 5.83335 4.3439 5.83335H2.74162C3.23972 5.26324 3.73573 4.72632 4.30141 4.16976C5.07597 3.41694 6.06163 2.90267 7.1352 2.6912C8.20878 2.47972 9.32267 2.58043 10.3377 2.98072C11.3527 3.38102 12.2239 4.06316 12.8423 4.94191C13.4607 5.82065 13.799 6.85704 13.8148 7.92157C13.8307 8.9861 13.5234 10.0316 12.9314 10.9273C12.3394 11.8231 11.4889 12.5294 10.4862 12.9581C9.48351 13.3868 8.37308 13.5188 7.29366 13.3375C6.21424 13.1563 5.2137 12.67 4.41705 11.9393C4.36381 11.8904 4.30117 11.8521 4.23273 11.8268C4.16428 11.8014 4.09136 11.7894 4.01813 11.7914C3.9449 11.7934 3.8728 11.8094 3.80594 11.8385C3.73907 11.8676 3.67876 11.9092 3.62845 11.9609C3.57813 12.0127 3.53879 12.0736 3.51268 12.1401C3.48657 12.2066 3.4742 12.2775 3.47627 12.3487C3.47834 12.4198 3.49481 12.4899 3.52475 12.5549C3.55468 12.6199 3.59749 12.6785 3.65074 12.7274C4.44453 13.4554 5.4096 13.9836 6.46171 14.2658C7.51382 14.548 8.621 14.5756 9.68663 14.3463C10.7523 14.1169 11.7439 13.6376 12.5751 12.9501C13.4063 12.2626 14.0518 11.3879 14.4551 10.4022C14.8585 9.41648 15.0075 8.34983 14.8891 7.29529C14.7708 6.24076 14.3887 5.2304 13.7762 4.35239C13.1638 3.47438 12.3395 2.7554 11.3754 2.25821C10.4112 1.76101 9.33656 1.50071 8.24512 1.50002Z",fill:"currentColor"})),HF=window.React.useEffect,WF=window.React.useRef;function UF(){const e=Fx((e=>e.setSpecialEditorScreen)),t=Fx((e=>e.specialEditorScreen)),n=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),i=WF(null);return HF((()=>{var e;null==(e=i.current)||e.scrollTop(0)}),[t]),HF((()=>{n&&e(null)}),[n,e]),N$((()=>{e(null)}),!0,{boundaryElementSelectors:[".yaymail-customizer-template-section","[class^=yaymail-email-customizer__header]",".yaymail-customizer-main"]}),Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:"yaymail-customizer-sidebar-editor__header",children:Vt.jsxs("span",{className:"yaymail-btn-back",onClick:()=>{e(null)},children:[Vt.jsx(hh,{className:"yaymail-btn-back__icon"}),Vt.jsxs("span",{className:"yaymail-btn-back__label",children:["Edit ",null==t?void 0:t.title]})]})}),Vt.jsx(bO,{ref:i,children:Vt.jsxs("main",{className:"yaymail-customizer-sidebar-editor__main",children:["global_header"===(null==t?void 0:t.key)?Vt.jsx(qx,{}):null,"global_footer"===(null==t?void 0:t.key)?Vt.jsx(Yx,{}):null]})})]})}const VF=window.React.createContext,GF=window.React.useCallback,YF=window.React.useMemo,KF=window.React.useState,QF=VF(null),qF=[{key:"elements",label:Vt.jsx("span",{className:"yaymail-tab-name",children:__("Elements","yaymail")}),children:Vt.jsx(bO,{children:Vt.jsx(XO,{})})},{key:"patterns",label:Vt.jsx("span",{className:"yaymail-tab-name",children:__("Patterns","yaymail")}),children:Vt.jsx(bO,{children:Vt.jsx(JO,{})})},{key:"settings",label:Vt.jsx(G,{title:__("Settings","yaymail"),children:Vt.jsx(vp,{})}),children:Vt.jsx(bO,{children:Vt.jsx(FF,{})})}],ZF=[{key:"actions",label:Vt.jsx("span",{className:"yaymail-tab-name",children:__("Actions","yaymail")}),children:Vt.jsx(bO,{children:Vt.jsx(WO,{})})},{key:"revisions",label:Vt.jsx("span",{className:"yaymail-tab-name",children:__("Revisions","yaymail")}),children:Vt.jsx(bO,{children:Vt.jsx(JP,{})})},{key:"elements",label:Vt.jsx(G,{title:__("Elements"),children:Vt.jsx("svg",{style:{verticalAlign:"middle"},xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"currentColor",version:"1.1",id:"Capa_1",viewBox:"0 0 26.676 26.676",children:Vt.jsx("g",{children:Vt.jsx("path",{d:"M26.105,21.891c-0.229,0-0.439-0.131-0.529-0.346l0,0c-0.066-0.156-1.716-3.857-7.885-4.59 c-1.285-0.156-2.824-0.236-4.693-0.25v4.613c0,0.213-0.115,0.406-0.304,0.508c-0.188,0.098-0.413,0.084-0.588-0.033L0.254,13.815 C0.094,13.708,0,13.528,0,13.339c0-0.191,0.094-0.365,0.254-0.477l11.857-7.979c0.175-0.121,0.398-0.129,0.588-0.029 c0.19,0.102,0.303,0.295,0.303,0.502v4.293c2.578,0.336,13.674,2.33,13.674,11.674c0,0.271-0.191,0.508-0.459,0.562 C26.18,21.891,26.141,21.891,26.105,21.891z"})})})}),children:Vt.jsx(bO,{children:Vt.jsx(XO,{})})}],XF=(e,t)=>Vt.jsx("div",{className:"yaymail-custom-tab-header",children:Vt.jsx(t,{...e})}),JF=({onToggle:e})=>{const[t,n]=KF(!1),i=()=>{n(!0)},r=Fx((e=>{var t;return null==(t=e.chosenElement)?void 0:t.id})),o=Fx((e=>e.unchooseElement)),a=Fx((e=>e.specialEditorScreen)),[s,l]=KF(!0),[c,d]=KF(qF[0].key),u=YF((()=>s?qF:ZF),[s]),h=()=>{o(),d(ZF[0].key),l(!1)},[p,m]=KF([]),f=Wx(),g=GF((()=>{f("/")}),[f]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("section",{className:"yaymail-customizer-sidebar__header",children:[Vt.jsx("h5",{className:"yaymail-customizer-sidebar__title",children:__("WooCommerce Email Customizer","yaymail")}),Vt.jsx("div",{className:"yaymail-customizer-sidebar__button",children:Vt.jsx(Pe,{type:"primary",size:"small",onClick:i,icon:Vt.jsx(Ih,{}),children:__("Go Pro","yaymail")})}),Vt.jsx("div",{className:"yaymail-customizer-sidebar__toggler",onClick:e,children:Vt.jsx(wh,{className:"yaymail-customizer-sidebar__toggler__icon"})})]}),a||r?Vt.jsx("section",{className:"yaymail-customizer-sidebar__editor-wrapper",children:a?Vt.jsx(UF,{}):Vt.jsx(BO,{})}):Vt.jsx("section",{className:"yaymail-customizer-sidebar__body",children:Vt.jsx(QF.Provider,{value:{elementCollapseActiveKeys:p,setElementCollapseActiveKeys:m},children:Vt.jsx(Ka,{activeKey:c,animated:!1,centered:!0,className:"yaymail-customizer-sidebar__main-tabs "+(s?"yaymail-customizer-sidebar__main-tabs__element":"yaymail-customizer-sidebar__main-tabs__history"),items:u,onChange:e=>{s||"elements"!==e||(o(),l(!0)),d(e)},renderTabBar:XF,tabBarGutter:10,type:"card"})})}),Vt.jsxs("section",{className:"yaymail-customizer-sidebar__footer",children:[Vt.jsx("a",{onClick:g,children:Vt.jsxs("span",{className:"yaymail-customizer-sidebar__footer__btn-back",children:[Vt.jsx(hh,{className:"yaymail-customizer-sidebar__footer__icon-back"}),Vt.jsx("span",{children:__("Back to dashboard","yaymail")})]})}),s?Vt.jsx(G,{title:__("View History","yaymail"),children:Vt.jsx(Pe,{type:"primary",shape:"circle",onClick:h,size:"large",className:"yaymail-customizer-sidebar__footer__btn-history",children:Vt.jsx(BF,{style:{margin:"auto",display:"flex",alignItems:"center",width:"18px",height:"18px"}})})}):Vt.jsx(Pe,{type:"primary",shape:"circle",onClick:h,disabled:!0,size:"large",children:Vt.jsx(mp,{})})]}),Vt.jsx(xj,{}),Vt.jsx(OO,{}),Vt.jsx(yj,{isOpen:t,onOpen:i,onClose:()=>{n(!1)}})]})},eB=window.React.useCallback,tB=window.React.useContext,nB=window.React.useState,iB=e=>{const[t,n]=nB(!0),{isPageFetching:i}=tB(aS),r=Xx((e=>e.isPageLoading)),o=eB((()=>{n((e=>!e))}),[]);return Vt.jsx(Mt,{style:{maxHeight:"100vh"},spinning:i||r,children:Vt.jsxs("main",{className:h("yaymail-customizer-layout",e.classNames),children:[Vt.jsx("aside",{className:"yaymail-customizer-sidebar "+(t?"":"close"),children:Vt.jsx(JF,{onToggle:o})}),Vt.jsx("section",{className:"yaymail-customizer-main",children:e.children})]})})},rB=window.React.useEffect,oB=()=>{rB((()=>{const e=window.jQuery("html.wp-toolbar");return null==e||e.addClass("hidden-wp-admin-menu"),()=>{null==e||e.removeClass("hidden-wp-admin-menu")}}),[])},aB=window.React.useEffect,sB=()=>{const e=Fx((e=>e.changeContentStatus));aB((()=>{const t=Fx.subscribe((e=>e.list),((t,n)=>{dz(t,n)||e(!0)}));return()=>{t()}}),[])},lB=()=>(oB(),sB(),Vt.jsx(tS,{children:Vt.jsx(sS,{children:Vt.jsx("main",{className:"yaymail-email-customizer",children:Vt.jsx(iB,{children:Vt.jsx(uj,{})})})})}));function cB({title:e="Default Title",sectionId:t=null,className:n="",children:i}){return Vt.jsxs("section",{className:h("yaymail-dashboard__content",n),"data-section-id":t,children:[Vt.jsx("div",{style:{display:"flex"},children:Vt.jsx("h3",{children:e})}),i]})}const dB=(e,t)=>({filterDropdown:({setSelectedKeys:e,selectedKeys:n,confirm:i,clearFilters:r,close:o})=>Vt.jsx("div",{onKeyDown:e=>e.stopPropagation(),className:"yaymail-templates-filter-wrapper",children:Vt.jsx(at,{ref:t,placeholder:__("Search template name","yaymail"),value:n[0],onChange:t=>{e(t.target.value?[t.target.value]:[]),i({closeDropdown:!1})},allowClear:!0,onPressEnter:()=>i(),className:"yaymail-templates-filter-search"})}),filterIcon:()=>Vt.jsx(At,{style:{fontSize:15}}),onFilter:(t,n)=>{var i;return Boolean(null==(i=null==n?void 0:n[e])?void 0:i.toString().toLowerCase().includes(t.toLowerCase()))},render:e=>e}),uB=window.React.useCallback,hB=window.React.useMemo,pB=window.React.useRef,mB=window.React.useState,fB=({loading:e=!1})=>{const t=hB((()=>__(e?"Loading data":"No template found","yaymail")),[e]);return Vt.jsx(Rt,{description:t})},gB=()=>{const[e,t]=qu.useNotification({maxCount:1}),{isFetching:n,changeStatusesMutation:i,resetTemplatesMutation:r}=KC(!0),o=Xx((e=>e.templates)),a=cy(),s=(t,n)=>{e[t]({message:n,placement:"bottomRight",duration:3})},[l,c]=mB([]),d=uB((e=>async()=>{if(!(l.length<=0))if(1==(await i.mutateAsync({list_id:l,status:e})).success){const t=l.length>1;s("success",`${__("Template","yaymail")}${t?"s":""} ${__(t?"are":"is","yaymail")} ${__("active"===e?"enabled":"disabled","yaymail")}`)}else s("error","Change status failed")}),[l]),u=uB((async()=>{if(!(l.length<=0))if(1==(await r.mutateAsync(l)).success){const e=l.length>1;s("success",`${__("Template","yaymail")}${e?"s":""} ${__("reseted","yaymail")}`)}else s("error","Reset failed")}),[l]),h=uB((e=>{const t=e.id,n=new Set(l);n.has(t)?n.delete(t):n.add(t),c(Array.from(n))}),[l]),p={selectedRowKeys:l,onChange:e=>{c(e)},selections:[{key:"activate",text:__("Activate Templates","yaymail"),onSelect:d("active")},{key:"deactivate",text:__("Deactivate Templates","yaymail"),onSelect:d("inactive")},{key:"reset",text:__("Reset Templates","yaymail"),onSelect:u}],onCell:e=>({onClick:t=>{t.stopPropagation(),h(e)}})},m=hB((()=>n||i.isLoading||r.isLoading),[n,i.isLoading,r.isLoading]),f=uB((()=>{l.length!==o.length?c(o.map((e=>e.id))):c([])}),[l]),g=pB(null),y=[{key:"template_title",title:__("Template Name","yaymail"),dataIndex:"template_title",width:"25%",filterSearch:!0,onFilter:(e,t)=>t.name.startsWith(e),...dB("template_title",g)},{key:"status",title:__("Status","yaymail"),dataIndex:"status",width:"10%",render:(e,{status:t})=>Vt.jsx(Tr,{color:"active"===t?"#c8ffdc":"#e8e8e8",count:__("active"===t?"Active":"Inactive","yaymail"),style:{color:"rgba(0, 0, 0, 0.65)"}}),sorter:(e,t)=>e.status.length-t.status.length},{key:"recipient",title:__("Recipient(s)","yaymail"),dataIndex:"recipient",width:"10%"},{key:"source",title:__("Source","yaymail"),dataIndex:"source",responsive:["lg"]},{key:"last_updated",title:__("Last Updated","yaymail"),dataIndex:"last_updated",responsive:["md"],sorter:(e,t)=>new Date(e.last_updated).valueOf()-new Date(t.last_updated).valueOf()}];return Vt.jsxs(Vt.Fragment,{children:[t,Vt.jsx(Lt,{id:"yaymail-template-table",loading:m,bordered:!1,rowKey:"id",rowSelection:p,columns:y,dataSource:o??[],pagination:!1,style:{cursor:"pointer",fontSize:14},onHeaderRow:()=>({onClick:e=>{e.target.querySelector(".yaymail-checkbox-wrapper")&&f()}}),onRow:e=>({onClick:()=>{(e=>{a(`/customizer/?template=${e.name}`)})(e)}}),locale:{emptyText:Vt.jsx(fB,{loading:n})}})]})};function yB(){return Vt.jsx(gB,{})}const vB=()=>Vt.jsx(cB,{title:__("Email Templates","yaymail"),className:"yaymail-email-templates",children:Vt.jsx(yB,{})}),bB=window.React.useCallback,wB=window.React.useMemo,xB=window.React.useState;function _B(){const e=sy(),t=new URLSearchParams(e.search),n=Xx((e=>e.isPageLoading)),[i,r]=xB("second_move"!=window.yaymailData.ghf_tour||"test"===t.get("mode")),[o,a]=xB(0),s=wB((()=>[{title:__("Welcome to Global Header and Footer Guidance","yaymail"),description:__("Design once, apply everywhere! Save time by setting up a global header and footer for all your emails.","yaymail"),target:null,nextButtonProps:{children:__("Let's start","yaymail")}},{title:__("Open the Editor","yaymail"),description:__("Here, you can access the Global Header & Footer editor. You'll see two sections: one for the header and one for the footer.","yaymail"),target:()=>document.querySelector('.yaymail-template-yaymail_global_header_footer [data-yaymail-element-type="heading"]')??null,nextButtonProps:{children:__("View footer section","yaymail")}},{title:__("Footer section","yaymail"),description:__("Here, you can add your footer content.","yaymail"),target:()=>document.querySelector('.yaymail-template-yaymail_global_header_footer [data-yaymail-element-type="footer"]')??null,nextButtonProps:{children:__("Next","yaymail")}},{title:__("Design Your Header","yaymail"),description:__("Drag elements from the left panel into the ‘Header’ area. Add logos, menus, text, or social icons.","yaymail"),target:()=>document.querySelector(".yaymail-customizer-tab-elements")??null},{title:__("Design Your Footer","yaymail"),description:__("Now do the same for the Footer area. Include company info, phone number, shop links, or anything else you need.","yaymail"),target:null},{title:__("Save and Apply Globally","yaymail"),description:__("Click ‘Save’ to keep your designs as the ‘Global Header’ and ‘Global Footer’. You can then add them to any email template later.","yaymail"),target:null},{title:__("Turn on the Global Header and Footer","yaymail"),description:__("Enable to make your Global Header and Footer visible in all email templates.","yaymail"),target:()=>document.querySelector("#yaymail-global-header-footer-toggle")??null},{title:__("All set! Your Global Header & Footer are live.","yaymail"),description:__("They now inject automatically into every email template—no dragging required. Open any template to preview or start creating your next email.","yaymail"),target:null,nextButtonProps:{children:__("Got it!","yaymail")},cover:Vt.jsx("img",{alt:"tour-mockup",src:window.yaymailData.urls.asset_url+"tour-mockup.png"}),placement:"bottom"}]),[n,o]),l=wB((()=>{var e;return null===(null==(e=(s??[])[o])?void 0:e.target)}),[o,s]),c=bB((()=>{const e="second_move";window.yaymailData.ghf_tour=e,ew(e),r(!1)}),[ew,r]);return n?null:Vt.jsx(Qm,{steps:s,open:i,onClose:c,current:o,onChange:e=>{if(3===e)return Fx.getState().unchooseElement(),void setTimeout((()=>{a(e)}),100);a(e)},scrollIntoViewOptions:{behavior:"smooth",block:"center",inline:"center"},rootClassName:h([l?"yaymail-tour-mask--masking":"",o===(s??[]).length-1?"yaymail-tour--with-cover":""]),onFinish:c,indicatorsRender:(e,t)=>Vt.jsxs("span",{children:[e+1," / ",t]})})}const CB=window.React.useCallback,SB=window.React.useEffect,kB=()=>{oB(),sB();const e=Xx((e=>e.setGlobalHeaderFooter)),t=Fx((e=>e.setSpecialEditorScreen)),n=CB((t=>{const n=t.template_elements,i=n.findIndex((e=>"skeleton_divider"===e.type));if(i<0)return;const r=n.slice(0,i),o=n.slice(i+1);window.yaymailData.builder.global_headers_footers.global_header_elements=r,window.yaymailData.builder.global_headers_footers.global_footer_elements=o,e({globalHeaderElements:r,globalFooterElements:o})}),[]);return SB((()=>{t(null)}),[]),Vt.jsxs(sS,{hasTemplateSelector:!1,hasOrderSelector:!1,hasTemplateImporter:!1,hasActivationButton:!1,hasSendTestMailButton:!1,templateId:"yaymail_global_header_footer",onSaveSuccess:n,children:[Vt.jsx("main",{className:"yaymail-email-customizer",children:Vt.jsx(iB,{children:Vt.jsx(uj,{})})}),Vt.jsx(_B,{})]})},EB=window.React.useEffect,$B=window.React.useState,MB=[{title:__("General Features","yaymail"),id:"general-features",items:[{title:__("11 standard WooCommerce emails","yaymail"),upgrade:!1},{title:__("Full customizability","yaymail"),upgrade:!1},{title:__("Global styling options","yaymail"),upgrade:!1},{title:__("Live preview editor","yaymail"),upgrade:!1},{title:__("Send test emails","yaymail"),upgrade:!1},{title:__("Export/Import templates","yaymail"),upgrade:!1},{title:__("Shortcode for WooCommerce data","yaymail"),upgrade:!1},{title:__("Predesigned patterns","yaymail"),upgrade:!1},{title:__("Developer API","yaymail"),upgrade:!1},{title:__("Advanced blocks with dynamic data","yaymail"),upgrade:!0},{title:__("Full edit history","yaymail"),upgrade:!0},{title:__("Fast updates & bug fixes","yaymail"),upgrade:!0},{title:__("1-1 live chat VIP support","yaymail"),upgrade:!0}]},{title:Vt.jsxs("span",{style:{display:"flex",alignItems:"center",gap:5},children:[Vt.jsx("span",{children:__("Third-Party Plugins Supported","yaymail")}),Vt.jsx("a",{href:"https://docs.yaycommerce.com/yaymail/integrations",target:"_blank",rel:"noopener noreferrer",children:Vt.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsxs("g",{"clip-path":"url(#clip0_4418_9119)",children:[Vt.jsx("path",{d:"M3.27 12C2.48 11.05 2 9.83 2 8.5C2 5.48 4.47 3 7.5 3H12.5C15.52 3 18 5.48 18 8.5C18 11.52 15.53 14 12.5 14H10",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),Vt.jsx("path",{d:"M20.73 12C21.52 12.95 22 14.17 22 15.5C22 18.52 19.53 21 16.5 21H11.5C8.48 21 6 18.52 6 15.5C6 12.48 8.47 10 11.5 10H14",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),Vt.jsx("defs",{children:Vt.jsx("clipPath",{id:"clip0_4418_9119",children:Vt.jsx("rect",{width:"24",height:"24",fill:"none"})})})]})})]}),id:"third-party-integrations",items:[{title:__("Shipment & order tracking","yaymail"),upgrade:!0},{title:__("Custom order status","yaymail"),upgrade:!0},{title:__("Checkout field editor","yaymail"),upgrade:!0},{title:__("Payments & payment gateways","yaymail"),upgrade:!0},{title:__("Custom shipping plugins","yaymail"),upgrade:!0},{title:__("Multi-language & translation plugins","yaymail"),upgrade:!0}]},{title:__("Multi Language","yaymail"),id:"multi-language",items:[{title:__("WPML","yaymail"),upgrade:!0},{title:__("Polylang","yaymail"),upgrade:!0},{title:__("TranslatePress","yaymail"),upgrade:!0},{title:__("GTranslate","yaymail"),upgrade:!0},{title:__("Weglot","yaymail"),upgrade:!0},{title:__("Loco Translate","yaymail"),upgrade:!0}]}],RB=Vt.jsxs("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("circle",{cx:"11.5",cy:"11.5",r:"11",fill:"#FEF5DA"}),Vt.jsx("path",{d:"M6.5 12.5L9.22727 15.5L16.5 7.5",fill:"#FEF5DA"}),Vt.jsx("path",{d:"M6.5 12.5L9.22727 15.5L16.5 7.5",stroke:"#FEC900","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),AB=Vt.jsxs("svg",{width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("path",{opacity:"0.5",d:"M11.5 22.5C17.5751 22.5 22.5 17.5751 22.5 11.5C22.5 5.42487 17.5751 0.5 11.5 0.5C5.42487 0.5 0.5 5.42487 0.5 11.5C0.5 17.5751 5.42487 22.5 11.5 22.5Z",fill:"#E8EAF0"}),Vt.jsx("path",{d:"M15.5 7.49976L7.5 15.4998",stroke:"#AAACBA","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"}),Vt.jsx("path",{d:"M7.5 7.49976L15.5 15.4998",stroke:"#AAACBA","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})]});function TB(){const[e,t]=$B(0);return EB((()=>{if(!document.querySelector(".yaymail-header__navbar"))return;const e=window.jQuery(".yaymail-header__navbar").innerHeight()||0;t(e)}),[]),Vt.jsxs("div",{className:"yaymail-go-pro__comparison",children:[Vt.jsx("h2",{className:"yaymail-go-pro__comparison__title",children:__("Compare Plans & Features","yaymail")}),Vt.jsx("p",{className:"yaymail-go-pro__comparison__description",children:__("Explore our clear comparison table to see the features of each plan.","yaymail")}),Vt.jsxs("div",{className:"yaymail-go-pro__comparison__table-container",id:"comparison-table",children:[MB.map(((t,n)=>Vt.jsxs("div",{className:"yaymail-go-pro__comparison__table-group",style:n===MB.length-1?{marginBottom:0}:{},id:t.id,children:[Vt.jsxs("div",{className:"yaymail-go-pro__comparison__table-group-title yaymail-go-pro__comparison__table-item",style:{top:`calc( ${e}px + var(--yaymail-wp-adminBar-height-lg) + 20px )`},children:[Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name",children:t.title}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:__("YayMail Free","yaymail")}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:__("YayMail Pro","yaymail")}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]}),t.items.map(((e,t)=>Vt.jsxs("div",{className:"yaymail-go-pro__comparison__table-item",children:[Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name",children:e.title}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:e.upgrade?AB:RB}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:RB}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]},`item-${n}-${t}`)))]},n))),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-group",children:Vt.jsxs("div",{className:"yaymail-go-pro__comparison__table-item",children:[Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__name"}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-free",children:Vt.jsx(fj,{className:"yaymail-go-pro__comparison__table__current-plan-button",disabled:!0,children:__("Your current","yaymail")})}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__yaymail-pro",children:Vt.jsx(fj,{})}),Vt.jsx("div",{className:"yaymail-go-pro__comparison__table-item__placeholder"})]})})]})]})}const LB=window.yaymailData.urls.asset_url+"go-pro-background.png";function jB(){return Vt.jsxs("div",{className:"yaymail-go-pro-container",children:[Vt.jsxs("div",{className:"yaymail-go-pro__main",children:[Vt.jsxs("div",{className:"yaymail-go-pro__main__content",style:{background:`url("${LB}")`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:[Vt.jsx("h1",{className:"yaymail-go-pro__main__content__title",children:__("Upgrade to YayMail Pro","yaymail")}),Vt.jsx("p",{className:"yaymail-go-pro__main__content__description",children:__("Consider upgrading to YayMail Pro? It would be the best move you can make for your ecommerce store.","yaymail")}),Vt.jsx(fj,{})]}),Vt.jsx("div",{className:"yaymail-go-pro__main__sub-content",children:Vt.jsx(mj,{})})]}),Vt.jsx("div",{className:"yaymail-go-pro__comparison-wrapper",children:Vt.jsx(TB,{})})]})}const OB=window.React.useEffect,NB=()=>{const e=sy();return OB((()=>{var t;"#third-party-integrations"===e.hash&&window.jQuery("html, body").animate({scrollTop:(null==(t=window.jQuery("#third-party-integrations").offset())?void 0:t.top)??0})}),[e.hash]),Vt.jsx(cB,{title:"",className:"yaymail-go-pro",children:Vt.jsx(jB,{})})},IB=()=>{const e=cy();return Vt.jsxs("div",{className:"yaymail-page-not-found-layout",children:[Vt.jsx("div",{className:"yaymail-layout-header",children:Vt.jsx("span",{children:__("OOPS! PAGE NOT FOUND","yaymail")})}),Vt.jsx("div",{className:"yaymail-layout-main",children:Vt.jsx("span",{children:"404"})}),Vt.jsx("div",{className:"yaymail-layout-footer",children:Vt.jsx("span",{children:__("WE ARE SORRY, BUT THE PAGE YOU REQUESTED WAS NOT FOUND","yaymail")})}),Vt.jsx(Pe,{type:"primary",onClick:()=>{e("/email-templates")},style:{marginTop:"2rem"},children:__("Go to dashboard","yaymail")})]})},DB=window.React.useEffect,PB=window.React.useState;function zB(){const{isFetching:e}=KC(!0),[t,n]=PB(""),[i,r]=PB(""),[o,a]=PB("new_order"),[s,l]=PB("sample_order"),[c,d]=PB(!1),[u,h]=PB(!0),[p,m]=PB(!1),[f,g]=PB("desktop"),y=()=>{m(!0)};return DB((()=>{(async()=>{try{h(!0);const e=await Xb(o,s);e.success?(n(e.data.html),r(e.data.subject),d(e.data.is_disabled_send_mail)):(n(`
${__("No data to preview","yaymail")}
`),r("")),h(!1)}catch(e){h(!1),console.error(e)}})()}),[o,s]),Vt.jsx(Vt.Fragment,{children:Vt.jsx("div",{className:"yaymail-preview-email",children:Vt.jsxs("div",{className:"yaymail-preview-email__content",children:[Vt.jsx("h3",{className:"yaymail-preview-email__title",children:__("Preview Email","yaymail")}),Vt.jsx("div",{className:"yaymail-preview-email__preview yaymail-preview-template__modal",children:Vt.jsxs("div",{className:"yaymail-preview-email-container",children:[Vt.jsxs("div",{className:"yaymail-preview-email__preview__header",children:[Vt.jsxs("div",{className:"yaymail-preview-email__preview__selectors",children:[Vt.jsx(ML,{value:o,onChange:a,loading:e,disabled:e}),Vt.jsx(tS,{children:Vt.jsx(EL,{onChange:l,value:s,disabled:!1})})]}),Vt.jsxs("div",{className:"yaymail-preview-email__preview__actions",children:[Vt.jsx(rL,{onChange:e=>{e!==f&&(eL("mobile"===e),g(e))},currentDevice:f}),Vt.jsxs("div",{className:"yaymail-preview-email__preview__header__btn-send-test-email",children:[Vt.jsx(Pe,{onClick:y,type:"primary",disabled:c,children:__("Send test email","yaymail")}),Vt.jsx(PL,{isOpen:p,onOpen:y,onClose:()=>{m(!1)},template:o,orderId:s,usingWooFunc:!0})]})]})]}),Vt.jsxs("div",{className:"yaymail-preview-email__preview__content yaymail-template-content yaymail-preview-template-content",children:[Vt.jsxs("div",{className:"yaymail-preview-email__preview__content__subject",children:[u?Vt.jsx(To,{paragraph:{rows:1},title:!1,active:u}):Vt.jsx("h2",{style:{marginTop:0},children:i}),Vt.jsxs("div",{className:"yaymail-preview-email__preview__content__subject__email-address",children:[Vt.jsx("div",{className:"yaymail-preview-email__preview__content__subject__email-address__icon",children:Vt.jsx(tL,{})}),Vt.jsxs("p",{style:{margin:0,display:"flex",alignItems:"center",flexWrap:"wrap"},children:[Vt.jsx("span",{style:{fontWeight:"bold",marginRight:"3px"},children:window.yaymailData.site_title}),Vt.jsx("span",{children:`<${window.yaymailData.test_email_address}>`})]})]})]}),u||""===t?Vt.jsx("div",{style:{width:"100%",height:"100%",overflow:"auto",textAlign:"center"},className:"yaymail-preview-email__preview__content__body yaymail-preview-email__preview__content__body--loading",children:Vt.jsxs("div",{style:{maxWidth:"650px",margin:"auto"},className:"yaymail-skeleton-divider",children:[Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"30%"},style:{marginBottom:10}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"},className:"yaymail-skeleton-divider__image",style:{marginBottom:10}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"70%"}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}}),Vt.jsx(To,{title:!1,round:!0,paragraph:{rows:1,width:"100%"}})]})}):Vt.jsx("div",{style:{width:"100%",height:"100%",overflow:"auto",textAlign:"center"},className:"yaymail-preview-email__preview__content__body",dangerouslySetInnerHTML:{__html:t}})]})]})})]})})})}const FB=()=>Vt.jsx(cB,{title:"Preview Email",className:"yaymail-preview-email",children:Vt.jsx(zB,{})}),BB=()=>{const e=Vt.jsxs(Vt.Fragment,{children:["It looks like you haven’t migrated your email customizations to the new version yet. Until the migration is completed:",Vt.jsxs("ul",{children:[Vt.jsx("li",{children:"Your old email elements cannot be used in the customizer, and unmigrated elements might be lost permanently."}),Vt.jsx("li",{children:"Emails sent before the migration will use WooCommerce’s default template, not your previously customized version."}),Vt.jsx("li",{children:"No actions can be taken in the customizer until the migration process is started and completed."})]})]});return Vt.jsx(hn,{message:__("Migration Required to Continue","yaymail"),description:e,type:"warning",showIcon:!0,className:"yaymail-settings-critical-migration-needed-alert"})},HB=e=>{const{isOpen:t,onClose:n,onOk:i,headerText:r,okText:o}=e;return Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx("h4",{className:D$,children:r})}),className:"yaymail-global__modal yaymail-remove-element__modal",open:t,onCancel:n,centered:!0,width:"500px",footer:Vt.jsx(z$,{onOk:()=>{i(),n()},onCancel:()=>{n()},okText:o??__("Yes, sure!","yaymail")}),destroyOnClose:!0})},WB=qb()(Ub(Hb(Vb(((e,t)=>({isCriticalMigrationRequired:window.yaymailData.is_critical_migration_required,setIsCriticalMigrationRequired:t=>{e((e=>{e.isCriticalMigrationRequired=t}))}}))))),Gb),UB=window.React.useCallback,VB=window.React.useMemo,GB=window.React.useState,YB=({onloadData:e,isButtonDisabled:t})=>{const n=Af((e=>e.notify)),i=Fv(),r=WB((e=>e.setIsCriticalMigrationRequired)),o=UB((async()=>{try{l(!0);const e=await(async()=>await DC("/migrations/migrate"))();if(e.data.isError)return void(null==n||n("error",__("Migration failed! Please contact our support for help!","yaymail")));null==n||n("success",__("Migration succeeded!","yaymail")),r(e.data.is_critical_migration_required),i.invalidateQueries()}catch(e){console.error(e),null==n||n("error",__("Migration failed! Please contact our support for help!","yaymail"))}finally{l(!1)}}),[n,r]),a=UB((async e=>{try{l(!0);const t=await(async e=>await DC(`/migrations/reset/${e}`))(e);null==n||n("success",__("Reset succeeded!","yaymail")),r(t.data.is_critical_migration_required),i.invalidateQueries()}catch(t){console.error(t),null==n||n("error",__("Reset failed!","yaymail"))}finally{l(!1)}}),[]),[s,l]=GB(!1),[c,d]=GB(""),[u,h]=GB(!1),p=UB((()=>{h(!1)}),[]),[m,f]=GB((()=>{})),g=UB((()=>{d(__("Proceed to migrate YayMail's data to the latest version, are you sure?")),f((()=>o)),h(!0)}),[o]),[y,v]=GB(void 0),b=UB((()=>{y?(d(__("Proceed to reset YayMail's data, are you sure?")),f((()=>()=>a(y))),h(!0)):console.debug("YayMail: Please select backup name!")}),[a,y]),w=VB((()=>s||0===e.required_migrations.length||t),[s,e.required_migrations.length,t]);return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("h3",{className:"yaymail-settings__title",children:__("Migration","yaymail")}),Vt.jsx("p",{className:"yaymail-settings__description",children:__("Transfers data between different YayMail versions, ensuring compatibility whether you're upgrading to the latest release or reverting to a previous version")}),Vt.jsxs("div",{className:"yaymail-settings__content",children:[Vt.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Vt.jsxs("div",{className:"yaymail-settings-label",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Reset","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Reverting to an earlier version of YayMail's data.","yaymail")})]}),Vt.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Reset","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:0===e.backups.length?Vt.jsx("span",{className:"yaymail-setting-info",children:__("No backup available","yaymail")}):Vt.jsxs("div",{className:"yaymail-setting-backups-wrapper",children:[Vt.jsx(st,{className:"yaymail-setting-backups-selector",loading:s,placeholder:"Select backup",options:e.backups.map((e=>({value:e.name,label:`${__("Patched in","yaymail")} ${e.created_date}`}))),value:y,onChange:e=>v(e)}),Vt.jsx(Pe,{className:"yaymail-setting-btn-reset-backup",onClick:b,loading:s,disabled:s||t||!y,type:"primary",children:__("Reset","yaymail")})]})})]})]}),Vt.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Vt.jsxs("div",{className:"yaymail-settings-label",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Migrate","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Migrating version data to the updated one.","yaymail")})]}),Vt.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Migration","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:Vt.jsxs(Ct,{direction:"vertical",size:1,children:[Vt.jsx(G,{placement:"bottom",title:w?void 0:`${__("Migration is needed for: ","yaymail")} ${e.required_migrations.join(", ")}`,children:Vt.jsx(Pe,{onClick:g,type:"primary",disabled:w,loading:s,children:__("Migrate","yaymail")})}),0===e.required_migrations.length&&Vt.jsx("div",{className:"yaymail-setting-info",style:{marginTop:5},children:__("No migration needed","yaymail")})]})})]})]})]}),Vt.jsx(HB,{headerText:c,onOk:m,onClose:p,isOpen:u})]})};function KB(){return{...Qv({queryKey:["migrations"],queryFn:async()=>{const e=await(async()=>await IC("/migrations/get-onload-data"))();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0})}}const QB=()=>{const{isLoading:e,data:t,isFetching:n}=KB();return e?Vt.jsx("div",{className:"yaymail-migration__spin-wrapper",children:Vt.jsx(Mt,{size:"large"})}):t?Vt.jsx(YB,{onloadData:t,isButtonDisabled:n}):null};function qB(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ZB={exports:{}};!function(e){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&qB)return qB(a);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=qB,a=0;a>2,s=(3&t)<<4|n>>4,l=1>6:64,c=2>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(c++)))>>2,i=(3&s)<<6|(l=o.indexOf(e.charAt(c++))),h[d++]=t,64!==s&&(h[d++]=n),64!==l&&(h[d++]=i);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){var i=e("./external"),r=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,i,r){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=i,this.compressedContent=r}s.prototype={getContentWorker:function(){var e=new r(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new r(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var i=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var i=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==i.getTypeOf(e)?function(e,t,n){var i=r,o=0+n;e^=-1;for(var a=0;a>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,n){var i=r,o=0+n;e^=-1;for(var a=0;a>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var i;i="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:i}},{lie:37}],7:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,r=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=i?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function i(e,t){var n,i="";for(n=0;n>>=8;return i}function r(e,t,n,r,a,d){var u,h,p=e.file,m=e.compression,f=d!==s.utf8encode,g=o.transformTo("string",d(p.name)),y=o.transformTo("string",s.utf8encode(p.name)),v=p.comment,b=o.transformTo("string",d(v)),w=o.transformTo("string",s.utf8encode(v)),x=y.length!==p.name.length,_=w.length!==v.length,C="",S="",k="",E=p.dir,$=p.date,M={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(M.crc32=e.crc32,M.compressedSize=e.compressedSize,M.uncompressedSize=e.uncompressedSize);var R=0;t&&(R|=8),f||!x&&!_||(R|=2048);var A,T,L=0,j=0;E&&(L|=16),"UNIX"===a?(j=798,L|=(T=A=p.unixPermissions,A||(T=E?16893:33204),(65535&T)<<16)):(j=20,L|=function(e){return 63&(e||0)}(p.dosPermissions)),u=$.getUTCHours(),u<<=6,u|=$.getUTCMinutes(),u<<=5,u|=$.getUTCSeconds()/2,h=$.getUTCFullYear()-1980,h<<=4,h|=$.getUTCMonth()+1,h<<=5,h|=$.getUTCDate(),x&&(S=i(1,1)+i(l(g),4)+y,C+="up"+i(S.length,2)+S),_&&(k=i(1,1)+i(l(b),4)+w,C+="uc"+i(k.length,2)+k);var O="";return O+="\n\0",O+=i(R,2),O+=m.magic,O+=i(u,2),O+=i(h,2),O+=i(M.crc32,4),O+=i(M.compressedSize,4),O+=i(M.uncompressedSize,4),O+=i(g.length,2),O+=i(C.length,2),{fileRecord:c.LOCAL_FILE_HEADER+O+g+C,dirRecord:c.CENTRAL_FILE_HEADER+i(j,2)+O+i(b.length,2)+"\0\0\0\0"+i(L,4)+i(r,4)+g+C+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),c=e("../signature");function d(e,t,n,i){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(d,a),d.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-i-1))/n:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=r(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t,n=this.streamFiles&&!e.file.dir,o=r(e,n,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),n)this.push({data:(t=e,c.DATA_DESCRIPTOR+i(t.crc32,4)+i(t.compressedSize,4)+i(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return i.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=r},{"../utils":32}],19:[function(e,t,n){var i=e("./Uint8ArrayReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var i=e("./DataReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},r.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},r.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},r.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var i=e("./ArrayReader");function r(e){i.call(this,e)}e("../utils").inherits(r,i),r.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=r},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var i=e("../utils"),r=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=i.getTypeOf(e);return i.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new s(e):r.uint8array?new l(i.transformTo("uint8array",e)):new o(i.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){var i=e("./GenericWorker"),r=e("../utils");function o(e){i.call(this,"ConvertWorker to "+e),this.destType=e}r.inherits(o,i),o.prototype.processChunk=function(e){this.push({data:r.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var i=e("./GenericWorker"),r=e("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,i),o.prototype.processChunk=function(e){this.streamInfo.crc32=r(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var i=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}i.inherits(o,r),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}r.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var i=e("../utils"),r=e("./GenericWorker");function o(e){r.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=i.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}i.inherits(o,r),o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!r.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function i(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=i},{}],29:[function(e,t,n){var i=e("../utils"),r=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(u){}function d(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,i.checkSupport(a),this._worker=e.pipe(new r(a)),e.lock()}catch(s){this._worker=new o("error"),this._worker.error(s)}}d.prototype={accumulate:function(e){return function(e,t){return new l.Promise((function(n,r){var o=[],s=e._internalType,l=e._outputType,c=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],r(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(l,function(e,t){var n,i=0,r=null,o=0;for(n=0;n>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return r.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,o,a=e.length,l=new Array(2*a);for(t=n=0;t>10&1023,l[n++]=56320|1023&r)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),i.applyFromCharCode(l)}(e=i.transformTo(r.uint8array?"uint8array":"array",e))},i.inherits(c,a),c.prototype.processChunk=function(e){var t=i.transformTo(r.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(r.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),l=t;a!==t.length&&(r.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,i.inherits(d,a),d.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var i=e("./support"),r=e("./base64"),o=e("./nodejsUtils"),a=e("./external");function s(e){return e}function l(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===r.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===r.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===r.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===r.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,i,r=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e,o=e>>>16&65535,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var i,r=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),c=-2,d=258,u=262,h=113;function p(e,t){return e.msg=l[t],t}function m(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function y(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function b(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,c=e.window,h=e.w_mask,p=e.prev,m=e.strstart+d,f=c[o+a-1],g=c[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===g&&c[n+a-1]===f&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--r);return a<=e.lookahead?a:e.lookahead}function x(e){var t,n,i,o,l,c,d,h,p,m,f=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-u)){for(r.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=n=e.hash_size;i=e.head[--t],e.head[t]=f<=i?i-f:0,--n;);for(t=n=f;i=e.prev[--t],e.prev[t]=f<=i?i-f:0,--n;);o+=f}if(0===e.strm.avail_in)break;if(c=e.strm,d=e.window,h=e.strstart+e.lookahead,m=void 0,(p=o)<(m=c.avail_in)&&(m=p),n=0===m?0:(c.avail_in-=m,r.arraySet(d,c.input,c.next_in,m,h),1===c.state.wrap?c.adler=a(c.adler,d,m,h):2===c.state.wrap&&(c.adler=s(c.adler,d,m,h)),c.next_in+=m,c.total_in+=m,m),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3&&e.match_length<=e.prev_length){for(r=e.strstart+e.lookahead-3,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=r&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,y(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(y(e,!1),e.strm.avail_out),1)})),new S(4,4,8,4,_),new S(4,5,16,8,_),new S(4,6,32,32,_),new S(4,4,16,16,C),new S(8,16,32,32,C),new S(8,16,128,128,C),new S(8,32,128,256,C),new S(32,128,258,1024,C),new S(32,258,258,4096,C)],n.deflateInit=function(e,t){return M(e,t,8,15,8,0)},n.deflateInit2=M,n.deflateReset=$,n.deflateResetKeep=E,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},n.deflate=function(e,t){var n,r,a,l;if(!e||!e.state||5>8&255),v(r,r.gzhead.time>>16&255),v(r,r.gzhead.time>>24&255),v(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),v(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(v(r,255&r.gzhead.extra.length),v(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=s(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(v(r,0),v(r,0),v(r,0),v(r,0),v(r,0),v(r,9===r.level?2:2<=r.strategy||r.level<2?4:0),v(r,3),r.status=h);else{var u=8+(r.w_bits-8<<4)<<8;u|=(2<=r.strategy||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(u|=32),u+=31-u%31,r.status=h,b(r,u),0!==r.strstart&&(b(r,e.adler>>>16),b(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),g(e),a=r.pending,r.pending!==r.pending_buf_size));)v(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),g(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),g(e),a=r.pending,r.pending===r.pending_buf_size)){l=1;break}l=r.gzindexa&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),0===l&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&g(e),r.pending+2<=r.pending_buf_size&&(v(r,255&e.adler),v(r,e.adler>>8&255),e.adler=0,r.status=h)):r.status=h),0!==r.pending){if(g(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&m(t)<=m(n)&&4!==t)return p(e,-5);if(666===r.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var w=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,i,r,a,s=e.window;;){if(e.lookahead<=d){if(x(e),e.lookahead<=d&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(y(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(y(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(y(e,!1),0===e.strm.avail_out)?1:2}(r,t):i[r.level].func(r,t);if(3!==w&&4!==w||(r.status=666),1===w||3===w)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===w&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(f(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),g(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(v(r,255&e.adler),v(r,e.adler>>8&255),v(r,e.adler>>16&255),v(r,e.adler>>24&255),v(r,255&e.total_in),v(r,e.total_in>>8&255),v(r,e.total_in>>16&255),v(r,e.total_in>>24&255)):(b(r,e.adler>>>16),b(r,65535&e.adler)),g(e),0=n.w_size&&(0===s&&(f(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new r.Buf8(n.w_size),r.arraySet(h,t,p-n.w_size,n.w_size,0),t=h,p=n.w_size),l=e.avail_in,d=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,x(n);n.lookahead>=3;){for(i=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=w=b>>>24,m-=w,0==(w=b>>>16&255))E[o++]=65535&b;else{if(!(16&w)){if(!(64&w)){b=f[(65535&b)+(p&(1<>>=w,m-=w),m<15&&(p+=k[i++]<>>=w=b>>>24,m-=w,!(16&(w=b>>>16&255))){if(!(64&w)){b=g[(65535&b)+(p&(1<>>=w,m-=w,(w=o-a)<_){if(d<(w=_-w)&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(S=h,(C=0)===u){if(C+=c-w,w>3,p&=(1<<(m-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):l}function p(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(r<(o=a.wsize-a.wnext)&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,I,2,0),y=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(y-=4,T=8+(15&(g>>>=4)),0===n.wbits)n.wbits=T;else if(T>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(I[0]=255&g,I[1]=g>>>8&255,n.check=o(n.check,I,2,0)),y=g=0,n.mode=3;case 3:for(;y<32;){if(0===m)break e;m--,g+=d[h++]<>>8&255,I[2]=g>>>16&255,I[3]=g>>>24&255,n.check=o(n.check,I,4,0)),y=g=0,n.mode=4;case 4:for(;y<16;){if(0===m)break e;m--,g+=d[h++]<>8),512&n.flags&&(I[0]=255&g,I[1]=g>>>8&255,n.check=o(n.check,I,2,0)),y=g=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===m)break e;m--,g+=d[h++]<>>8&255,n.check=o(n.check,I,2,0)),y=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m<(_=n.length)&&(_=m),_&&(n.head&&(T=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,d,h,_,T)),512&n.flags&&(n.check=o(n.check,d,_,h)),m-=_,h+=_,n.length-=_),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===m)break e;for(_=0;T=d[h+_++],n.head&&T&&n.length<65536&&(n.head.name+=String.fromCharCode(T)),T&&_>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;y<32;){if(0===m)break e;m--,g+=d[h++]<>>=7&y,y-=7&y,n.mode=27;break}for(;y<3;){if(0===m)break e;m--,g+=d[h++]<>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6!==t)break;g>>>=2,y-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===m)break e;m--,g+=d[h++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,y=g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(_=n.length){if(m<_&&(_=m),f<_&&(_=f),0===_)break e;i.arraySet(u,d,h,_,p),m-=_,h+=_,f-=_,p+=_,n.length-=_;break}n.mode=12;break;case 17:for(;y<14;){if(0===m)break e;m--,g+=d[h++]<>>=5,y-=5,n.ndist=1+(31&g),g>>>=5,y-=5,n.ncode=4+(15&g),g>>>=4,y-=4,286>>=3,y-=3}for(;n.have<19;)n.lens[D[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},L=s(0,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,L){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,$=65535&N,!((k=N>>>24)<=y);){if(0===m)break e;m--,g+=d[h++]<>>=k,y-=k,n.lens[n.have++]=$;else{if(16===$){for(O=k+2;y>>=k,y-=k,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}T=n.lens[n.have-1],_=3+(3&g),g>>>=2,y-=2}else if(17===$){for(O=k+3;y>>=k)),g>>>=3,y-=3}else{for(O=k+7;y>>=k)),g>>>=7,y-=7}if(n.have+_>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;_--;)n.lens[n.have++]=T}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j={bits:n.lenbits},L=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,L){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},L=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,L){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=m&&258<=f){e.next_out=p,e.avail_out=f,e.next_in=h,e.avail_in=m,n.hold=g,n.bits=y,a(e,x),p=e.next_out,u=e.output,f=e.avail_out,h=e.next_in,d=e.input,m=e.avail_in,g=n.hold,y=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(N=n.lencode[g&(1<>>16&255,$=65535&N,!((k=N>>>24)<=y);){if(0===m)break e;m--,g+=d[h++]<>M)])>>>16&255,$=65535&N,!(M+(k=N>>>24)<=y);){if(0===m)break e;m--,g+=d[h++]<>>=M,y-=M,n.back+=M}if(g>>>=k,y-=k,n.back+=k,n.length=$,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(O=n.extra;y>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(N=n.distcode[g&(1<>>16&255,$=65535&N,!((k=N>>>24)<=y);){if(0===m)break e;m--,g+=d[h++]<>M)])>>>16&255,$=65535&N,!(M+(k=N>>>24)<=y);){if(0===m)break e;m--,g+=d[h++]<>>=M,y-=M,n.back+=M}if(g>>>=k,y-=k,n.back+=k,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=$,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(O=n.extra;y>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===f)break e;if(_=x-f,n.offset>_){if((_=n.offset-_)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}C=_>n.wnext?(_-=n.wnext,n.wsize-_):n.wnext-_,_>n.length&&(_=n.length),S=n.window}else S=u,C=p-n.offset,_=n.length;for(f<_&&(_=f),f-=_,n.length-=_;u[p++]=S[C++],--_;);0===n.length&&(n.mode=21);break;case 26:if(0===f)break e;u[p++]=n.length,f--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===m)break e;m--,g|=d[h++]<v?(w=D[P+u[S]],j[O+u[S]]):(w=96,0),p=1<>R)+(m-=p)]=b<<24|w<<16|x,0!==m;);for(p=1<>=1;if(0!==p?(L&=p-1,L+=p):L=0,S++,0==--N[C]){if(C===E)break;C=t[n+u[S]]}if($>>7)]}function k(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function R(e,t,n){var i,r,o=new Array(16),a=0;for(i=1;i<=l;i++)o[i]=a=a+n[i-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=M(o[s]++,s))}}function A(e){var t;for(t=0;t>1;1<=n;n--)j(e,o,n);for(r=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],j(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,j(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,c=t.dyn_tree,d=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,g=0;for(o=0;o<=l;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)f<(o=c[2*c[2*(i=e.heap[n])+1]+1]+1)&&(o=f,g++),c[2*i+1]=o,d>=7;i>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(a=e.static_len+3+7>>>3)<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!==t?z(e,t,n,i):4===e.strategy||a===r?(E(e,2+(i?1:0),3),O(e,p,m)):(E(e,4+(i?1:0),3),function(e,t,n,i){var r;for(E(e,t-257,5),E(e,n-1,5),E(e,i-4,4),r=0;r>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+o+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){var t;E(e,2,3),$(e,256,p),16===(t=e).bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e){if(!e.setImmediate){var t,n,i,r,o=1,a={},s=!1,l=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){process.nextTick((function(){u(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(r="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",h,!1):e.attachEvent("onmessage",h),function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(e){i.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(n=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){u(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):function(e){setTimeout(u,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),i=0;iVt.jsx(Vt.Fragment,{children:Vt.jsx("h4",{className:D$,children:__("Export templates","yaymail")})}),nH=({isOpen:e,onClose:t})=>{const n=Xx((e=>e.templates)),[i,r]=eH(["all"]),[o,a]=eH(!1);KC(!0);const s=JB((()=>(n??[]).map((e=>({...e,isTitleOversized:e.template_title.length>55})))),[n]);return Vt.jsx(Vt.Fragment,{children:Vt.jsx(Fu,{title:Vt.jsx(F$,{content:Vt.jsx(tH,{})}),className:"yaymail-global__modal yaymail-reset-template__modal",open:e,onCancel:t,centered:!0,width:"500px",footer:null,destroyOnClose:!0,children:Vt.jsxs("div",{className:"modal__content",children:[Vt.jsx("div",{style:{marginBottom:10},children:__("Choose templates you want to export.","yaymail")}),Vt.jsx("div",{style:{marginTop:10},children:Vt.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[Vt.jsxs(st,{mode:"multiple",style:{width:"100%",marginRight:"10px"},className:"yaymail-global__select",value:i,placeholder:__("Select templates","yaymail"),onChange:e=>{if(e.includes("all")&&e.length>1&&"all"!==e[0])return void r(["all"]);const t=e.filter((e=>"all"!==e));r(t)},popupMatchSelectWidth:!1,children:[Vt.jsx(st.Option,{value:"all",className:"option-template",children:Vt.jsx("span",{className:"option-template__text",children:__("All templates","yaymail")})},"all"),s.map((e=>Vt.jsxs(st.Option,{value:e.name,className:"option-template",children:[Vt.jsx(G,{placement:"right",title:e.isTitleOversized?e.template_title:"",overlayInnerStyle:{fontSize:"11px",width:"max-content"},children:Vt.jsx("span",{className:"option-template__text",children:e.template_title})}),Vt.jsx("span",{className:"option-template__template-status","data-status":e.status})]},e.name)))]}),Vt.jsx(Pe,{type:"primary",loading:o,onClick:async()=>{a(!0);const e=i.includes("all")?null==n?void 0:n.map((e=>e.name)):i,t=await async function(e){try{const t=await window.jQuery.ajax({type:"POST",url:window.yaymailData.admin_ajax.url,data:{action:"yaymail_export_templates",nonce:window.yaymailData.admin_ajax.nonce,templates:e}});if(!t.success)throw new Error("Call ajax failed");return t}catch(t){throw console.error(t),t}}(e);if(t.success){if(t.data.data.length>0){var r=new XB;t.data.data.forEach((e=>{var t=JSON.stringify(e.templates_data);r.file(e.file_name,t)})),r.generateAsync({type:"base64"}).then((function(e){let n=document.createElement("a");n.href="data:application/zip;base64,"+e,n.setAttribute("download",t.data.file_name),document.body.appendChild(n),n.click(),n.remove()}))}a(!1)}else a(!1)},disabled:0===i.length,children:__("Export","yaymail")},"ok")]})})]})})})},iH=window.React.useRef,rH=window.React.useState;function oH(){const e=Fv(),t=iH(null),[n,i]=qu.useNotification({maxCount:1}),[r,o]=rH(!1),[a,s]=rH(!1),[l,c]=rH(null),d=(e,t)=>{n[e]({message:t,placement:"bottomRight",duration:3})},u=()=>{s(!0)};return Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("h3",{className:"yaymail-settings__title",children:__("Import/Export","yaymail")}),Vt.jsx("p",{className:"yaymail-settings__description",children:__("Easily manage YayMail templates by importing from compatible formats or exporting for backup or sharing.","yaymail")}),Vt.jsxs("div",{className:"yaymail-settings__content",children:[Vt.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Vt.jsxs("div",{className:"yaymail-settings-label",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Export","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Allows you to securely download all created YayMail templates in a convenient file format")})]}),Vt.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Export","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:Vt.jsx(Pe,{onClick:u,type:"primary",children:__("Export Templates","yaymail")})})]})]}),Vt.jsxs("div",{className:"yaymail-settings-option-wrapper",children:[Vt.jsxs("span",{className:"yaymail-settings-label",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Import Templates","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:__("Empowers you to seamlessly upload single or multiple YayMail templates","yaymail")})]}),Vt.jsxs("div",{className:"yaymail-settings-label secondary_column",children:[Vt.jsx("div",{className:"yaymail-settings-label__primary",children:__("Import Templates","yaymail")}),Vt.jsx("div",{className:"yaymail-settings-label__secondary",children:Vt.jsx(Ct,{align:"start",size:"middle",children:Vt.jsxs(Ct,{direction:"vertical",children:[Vt.jsx("div",{children:Vt.jsxs(Oe,{layout:"inline",method:"post",encType:"multipart/form-data",onFinish:async()=>{var t,n;if(o(!0),null!==l){const i=await async function(e){try{const t=new FormData;return Array.from(e).forEach((e=>{t.append("file_"+e.name,e,e.name)})),t.append("action","yaymail_import_templates"),t.append("nonce",window.yaymailData.admin_ajax.nonce),await window.jQuery.ajax({url:window.yaymailData.admin_ajax.url,type:"POST",data:t,cache:!1,processData:!1,contentType:!1})}catch(t){throw console.error(t),t}}(l);i.success?(c(null),(null==(n=null==(t=i.data)?void 0:t.imported_data)?void 0:n.length)>0?(d("success",`${i.data.imported_data.length} templates imported`),i.data.imported_data.forEach((({template_name:t})=>{e.invalidateQueries({queryKey:["template",t]})}))):d("success","No template imported")):d("error",i.data.message),o(!1)}},style:{gap:16},children:[Vt.jsxs(Oe.Item,{style:{margin:0},children:[Vt.jsx("input",{id:"choose_file",ref:t,type:"file",multiple:!0,onChange:e=>{null!==e.currentTarget.files&&c(e.currentTarget.files)},accept:"application/json",style:{display:"none"}}),Vt.jsx(Pe,{onClick:()=>{var e;return null==(e=t.current)?void 0:e.click()},children:__("Choose File","yaymail")})]}),Vt.jsx(Oe.Item,{style:{margin:0},children:Vt.jsx("div",{className:"yaymail-settings-import-button-wrapper",children:Vt.jsx(Pe,{loading:r,htmlType:"submit",disabled:null===l,type:"primary",children:__("Import","yaymail")})})})]})}),Vt.jsx("span",{className:"yaymail-settings-import-file-name",children:null!==l?Array.from(l).map((e=>Vt.jsxs("span",{children:[Vt.jsxs("span",{children:[" ",e.name," "]}),Vt.jsx("br",{})]},e.name))):__("No file chosen.","yaymail")})]})})})]})]}),i,Vt.jsx(nH,{isOpen:a,onOpen:u,onClose:()=>{s(!1)}})]})]})}const aH=window.React.useCallback,sH=window.React.useMemo;function lH(){KB();const e=sy(),t=cy(),n=WB((e=>e.isCriticalMigrationRequired)),i=sH((()=>{var e,t;let i=(e=>[{key:"import-export",label:Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("span",{className:"anticon",style:{display:"inline-flex"},children:Vt.jsx(VT,{style:{width:"14px",height:"14px"}})}),Vt.jsx("span",{children:__("Import/Export Templates","yaymail")})]}),children:Vt.jsx(oH,{}),disabled:e},{key:"migration",label:Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(Sh,{}),Vt.jsx("span",{children:__("Migration","yaymail")})]}),children:Vt.jsx(QB,{})}])(n);return(null==(t=null==(e=window.yaymailData)?void 0:e.yaymailHooks)?void 0:t.applyFilters)&&(i=[...window.yaymailData.yaymailHooks.applyFilters("yaymail_setting_items",i)]),(i??[]).toSorted((function(e,t){return parseFloat(e.position??1)-parseFloat(t.position??1)}))}),[window.yaymailData.yaymailHooks,n]),r=aH((e=>{t(`#/${e}`)}),[t]),o=sH((()=>{var t;return(null==(t=e.hash.split("#/"))?void 0:t.pop())||"import-export"}),[e]);return Vt.jsx(ps,{className:"yaymail-settings-card",children:Vt.jsx(Ka,{defaultActiveKey:"import-export",activeKey:n?"migration":o,tabPosition:"left",style:{minHeight:"45vh"},items:i,className:"yaymail-settings-tabs",onChange:r})})}const cH=()=>{const e=WB((e=>e.isCriticalMigrationRequired));return Vt.jsxs(Vt.Fragment,{children:[e&&Vt.jsx(BB,{}),Vt.jsx(cB,{title:"Settings",className:"yaymail-settings",children:Vt.jsx(lH,{})})]})},dH=e=>GS.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"96px",height:"96px",...e},GS.createElement("path",{fill:"#fff",d:"M24 4.050000000000001A19.95 19.95 0 1 0 24 43.95A19.95 19.95 0 1 0 24 4.050000000000001Z"}),GS.createElement("path",{fill:"#01579b",d:"M8.001,24c0,6.336,3.68,11.806,9.018,14.4L9.385,17.488C8.498,19.479,8.001,21.676,8.001,24z M34.804,23.194c0-1.977-1.063-3.35-1.67-4.412c-0.813-1.329-1.576-2.437-1.576-3.752c0-1.465,1.471-2.84,3.041-2.84 c0.071,0,0.135,0.006,0.206,0.008C31.961,9.584,28.168,8,24.001,8c-5.389,0-10.153,2.666-13.052,6.749 c0.228,0.074,0.307,0.039,0.611,0.039c1.669,0,4.264-0.2,4.264-0.2c0.86-0.057,0.965,1.212,0.099,1.316c0,0-0.864,0.105-1.828,0.152 l5.931,17.778l3.5-10.501l-2.603-7.248c-0.861-0.046-1.679-0.152-1.679-0.152c-0.862-0.056-0.762-1.375,0.098-1.316 c0,0,2.648,0.2,4.217,0.2c1.675,0,4.264-0.2,4.264-0.2c0.861-0.057,0.965,1.212,0.104,1.316c0,0-0.87,0.105-1.832,0.152l5.891,17.61 l1.599-5.326C34.399,26.289,34.804,24.569,34.804,23.194z M24.281,25.396l-4.8,13.952c1.436,0.426,2.95,0.652,4.52,0.652 c1.861,0,3.649-0.324,5.316-0.907c-0.04-0.071-0.085-0.143-0.118-0.22L24.281,25.396z M38.043,16.318 c0.071,0.51,0.108,1.059,0.108,1.645c0,1.628-0.306,3.451-1.219,5.737l-4.885,14.135C36.805,35.063,40,29.902,40,24 C40,21.219,39.289,18.604,38.043,16.318z"}),GS.createElement("path",{fill:"#01579b",d:"M4,24c0,11.024,8.97,20,19.999,20C35.03,44,44,35.024,44,24S35.03,4,24,4S4,12.976,4,24z M5.995,24 c0-9.924,8.074-17.999,18.004-17.999S42.005,14.076,42.005,24S33.929,42.001,24,42.001C14.072,42.001,5.995,33.924,5.995,24z"})),uH=e=>GS.createElement("svg",{width:53,height:53,viewBox:"0 0 53 53",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},GS.createElement("rect",{width:53,height:53,fill:"#FFF9DB"}),GS.createElement("rect",{width:33,height:33,transform:"matrix(-1 0 0 1 43 10)",fill:"url(#pattern0)"}),GS.createElement("defs",null,GS.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},GS.createElement("use",{xlinkHref:"#image0_27_178",transform:"scale(0.002)"})),GS.createElement("image",{id:"image0_27_178",width:500,height:500,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAMAAAD8CC+4AAAAY1BMVEUAAAD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/yQD/////10D/zBD/5ID//PD/0CD/8sD/+OD/66D/3WD/9dD/4XD/7rD/55D/0zD/2lDEp+6zAAAAEHRSTlMAEPAgwEDgoIBg0DBwsJBQCloRUAAAC6xJREFUeNrs3Qlu4zAMQFFJlmx5q3n/0w48GAza1ImyRyL/u8KH64YMW2eST/94B93mlPMaJzkxxZhzmh108SmvkxRMa9548nXoxqGXq/XrwjPfNr8dBC8Kw8gT36huWeVu09I5NMaPUR40LTzvLUmDPMW6OTTBL708TZ953OvXDUGea+DtXrdukBeIyaFW/5OT3Yo9+etEfsjX5yg573bVDpOTXTOfgxwiu1Z78vfhc3sF9uRvFcj+aUs5Odl1GXv5iJAdrqIm+a4fHYpUJSf7R6RJPo7sb5WiVKFnJH+G2uRsYt5mrig52c9qb8hO9orUmJyR/HdmkpP9ZfyXVI3sfzW9V7nDwEjeWnI2MRaTk13RkJ3sJcaT7wIjeWvJ2cQ8aGsyOdmV7FXIfoTkjORJTvYbdasoQXYFexUOH3ckZxNDcrLrHbKTneQcPpKcTUy1h4gFZD9gfq/C4SPJGcmTnOxVHyIWkH3HXoXDR5KziWn1ELGA7AzZyU5yRvIkJ3tjh4gFZGevwuEjydnEkJzs1obsZCe5vcNHkpvbxLR7iFhAdvYqZCe51ZE8yc1l13OIWEB29ipmDx9Jbm4TQ3Jz2Rmym8tOchFjh48kF7G2ibFwiFhgLTt7lW9sHD6S/JT6kTzJf7CQnSH7L9qzk/wSlYePJC/Qt4mxfohYoDE7Q/YibdlJfgMdI3mSX01Ldp8F19OQnb3K510+fCS5Thc2MSTX62J2huxaHWUnuXqnh48kN+Glm5hE8kr9zM5exYg9O8nNiYnkBsXEIaJBMbFXMSh2/IFHg4aO4wV7QnaPmA3+sw0N+uTuxsa8WV/e3aXjMW/YNLs7jLzN27a4m/FLe/MG727imcApMHle5/aE2V1t5nWuRJhpbk9INDdopLk9Yaa5PeXqnq/BqVOq7vmsplDh8zrfl1ApugsWgUpf7qxZoNTGL3H2BO+O8Z1XxaI7tAkU+8POHd02CAQBED1wILkEJPqvNl+JZMsVMO+1MDIseycf443FVubW1odbEz2nyT1oG69clbm9fbzYLm5vjmc+0QP28WReBEw/9J7dGz1oGt17vse/x0XEZhnX8zn+2Lp3LI7XeqaLcT2np3vQ4uneM83uPacVbM9qMxP044Ct5/BK7zkdtvTsY4yLmMUt2J7Naqbn8Ke/PV+G954Pw3uP6EGrzXuQz/Qg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNEDxI9SPQg0YNED/pl506Q24ZhKAxfAY/gInGRfP9TdtyOp25qJ1phUOR3g8wfD0wJdI/eoB69QT16g3r0BvXoDerRG9SjN6hHb1CP3qAevUE9eoN69Ab16A3q0RvUozfoU9H9zYbfbPTUFL7/5Q5DCPbG9AEfis454UnKTK2IBc9KJHEfic7W4auxjexxwFdDJHHy0bPDC87S5ZmEV9JMouSjc8EfKv7lJfGEN1wkSeLROeG9YOi6osN7EwmSjs4J3xqv+k3eB3xrJDnC0TnhB85e8RsdW/wkkxjh6AV/NTTazYCfGZIiGz1jkXSt0e4LlhiYhIhGZ4eFyoVGe3ZYxpIQ0egWy11ltJuExTzJkIzODi+oObuegSd8peLcJhc946GV0R4d1nAkQzJ6wlqh6tHuA1a6kQjB6IwNpmpHO1u8oOQJjVj0G7ZwmapkBqw3kAjB6BbbDBWOdl+wCYkQjF6wVZipLtnhLRVP5cSiByxW94qFSUCPfrciet0rFjwBPfpDwC7DjWoQHXr0h7/RrzzafQB69CcFC1S9YsEWO80koYIjWzUrFuuP5tc/st2wWk0rFr5gt0QitD+GrWZ7MjvsN5EI3S9c7qoY7SZhtSZeuFDGRtpXLHjCIQaSoXeJ4onyFYvocAxLMtSuS/1L8YqFCTiIY5KhdDHyf0q3J/0IoLoPusYV6NcUvodhi4eKzmuk8LLDW9oe1rB1OI6bSYq6a03VZD82ORBJjPgFRodLZL8nr7e5qqvKtTyt8ZNDzc0V/SjBHsWQGDPiYM6QJD0/P7LXEJkEcEy4q/sQIh+deMQZ3DjTyebRYRcl27736OJ8wCmG7Ok0PifspGX57xFdmBlwjhSZTsCxYC89F7ce0cVlh5Okoz/vPhfspmnZ82PRiSecJk2GDmJswgFUXdR7ii7OF5zHlTzTTnMuDkdQttz7HF2eSTiTC9YwbWPsYcHVXcz8xd69YKcNA1EY3sJIHiQ/sPH+V1lVSVOdhkBpA753Rt8W/gPygBiOjV6vIDzZuGpM8oAUdVrCNcSjeeP46DJoeIW86nyvfYq7TjlcRz6aNwCi16P9ZU45T6qlf2NWLa3zKdxAP5o3IKLXO0duIOxUgYheF6G7gPE7TJDo9Rtq+0B26KBEr5cMjYP53S1OdOtHO9DOJKToIrvdo33CeGcv0KKLGD3aDx/NG3jRZTB4tAOM5g3A6CIXa0c7wmjegIxu7GjHGM0boNFFzmaOdpDRvAEbXYYtWAAzmjdwo4sk/qMdaDRvIEcXieRHO9Jo3sCOLjITH+1Yo3kDPboMGjihjeYN+Oj1igUhhDUZXyGIXm9PkgF+Zy8oorNdsUB9Zv+FJDrVFQusJXdXsETn+R4Gb53lJzzROW7WUCRnio6fnSQ5V3Ts7DTJ2aLjZidKzhcd8kn+tDElZ4xesmPN7eMZf0hrcUYvIsyHsxnvYswdtNFFkgK83Nne1yvi6MW+hkNloL8aeAB39H9Z88Wxvuyp2KMXl20MLzdukHff/o6B6HKvey/+BxvRi4su4SUW+uJiJnqR5vUUnmslPsd/sxS9+LzpD3If4eFsRS+GXXP4Znnb2T50u8Fg9Cqep/G7ttCd7bzC31iN/tNQyufwH5ZJo6kX+DvL0d+kqFsew0PGXHIbeEj/gv3o71KcVXPO4YYlZ9U52nhAv8FN9Eb6WBNZzbHwUPqDx+hdj+5Rj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+5Qj+7QD/boQAAAAABAkL/1IJdC0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9SPqQ9CHpQ9KHpA9JH5I+JH1I+pD0IelD0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9SPqQ9CHpQ9KHpA9JH5I+JH1I+pD0IelD0oekD0kfkj4kfUj6kPQh6UPSh6QPSR+SPiR9KPbtLadhGAqD8Dhpc23A+18tskglqIoQvNX/fFsYxT2+1OiBjB7I6IGMHsjogYweyOiBjB7I6IGMHsjogYye58KlKozRA104qsIsLFVhFtaqMFeuVWF2SlUYYKqKsoHje5oZHN/T3MBJLs0OePqeZQDwIDbLQXOrCrLSjFVBRsCdepaNT29VMW7g+p5m5LRVhTg4eb2aY+WuDFURJgBHuSwLgKNclsIXc1WAGfzU04zgpx5mBj/1MEOhcYBPsnByrx5jKtx5LJfine98QdO/g2dGF/iODSOPfDfVuxXABT7KwckJPsZUeM4/PvRrh8af9SArDzyD797MD3wv162D3xSrd2YrWD1Ma271LK251bO05lbP0ppbPcvx2Nz9evdmnvBsrmsrf3b19uWlTTv/ULxpfWEf7dxBDkIhDATQKS1aPpX7H1dXrlx9REv+vCtM6KQk8K5zjvirKIHTOg/7lkwxI9js2ykNk4SvIDbjgnnKnX0jd8ULY7+QD5HPxM5uT68MxXdJ4318akcTLNAH/5ZM6jYUy/Tg5p6OhWK16saCT6KYV/yK1HAzTvu/OezhUQWnPAH1CSVWR8Ww8gAAAABJRU5ErkJggg=="}))),hH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M8 0.25C9.39291 0.25 10.5131 0.248121 11.3916 0.366211C12.2917 0.487227 13.0495 0.746718 13.6514 1.34863L13.7607 1.46289C14.2856 2.04541 14.5203 2.76456 14.6338 3.6084C14.7519 4.4869 14.75 5.60709 14.75 7V9C14.75 10.3929 14.7519 11.5131 14.6338 12.3916C14.5203 13.2354 14.2856 13.9546 13.7607 14.5371L13.6514 14.6514C13.0495 15.2533 12.2917 15.5128 11.3916 15.6338C10.5131 15.7519 9.39291 15.75 8 15.75C6.60709 15.75 5.4869 15.7519 4.6084 15.6338C3.76456 15.5203 3.04541 15.2856 2.46289 14.7607L2.34863 14.6514C1.74672 14.0495 1.48723 13.2917 1.36621 12.3916C1.24812 11.5131 1.25 10.3929 1.25 9V7C1.25 5.60709 1.24812 4.4869 1.36621 3.6084C1.48723 2.70829 1.74672 1.95055 2.34863 1.34863L2.46289 1.23926C3.04541 0.714422 3.76456 0.479662 4.6084 0.366211C5.4869 0.248121 6.60709 0.25 8 0.25ZM8 1.75C6.56485 1.75 5.5639 1.75202 4.80859 1.85352C4.16663 1.93983 3.78836 2.08832 3.51855 2.30957L3.40918 2.40918C3.13242 2.68594 2.95217 3.07482 2.85352 3.80859C2.75202 4.5639 2.75 5.56485 2.75 7V9C2.75 10.4352 2.75202 11.4361 2.85352 12.1914C2.95217 12.9252 3.13242 13.3141 3.40918 13.5908L3.51855 13.6904C3.78836 13.9117 4.16663 14.0602 4.80859 14.1465C5.5639 14.248 6.56485 14.25 8 14.25C9.43515 14.25 10.4361 14.248 11.1914 14.1465C11.9252 14.0478 12.3141 13.8676 12.5908 13.5908L12.6904 13.4814C12.9117 13.2116 13.0602 12.8334 13.1465 12.1914C13.248 11.4361 13.25 10.4352 13.25 9V7C13.25 5.56485 13.248 4.5639 13.1465 3.80859C13.0602 3.16663 12.9117 2.78836 12.6904 2.51855L12.5908 2.40918C12.3141 2.13242 11.9252 1.95217 11.1914 1.85352C10.4361 1.75202 9.43515 1.75 8 1.75ZM7.54395 10.7539C7.92191 10.7925 8.2168 11.1118 8.2168 11.5C8.2168 11.8882 7.92191 12.2075 7.54395 12.2461L7.4668 12.25H5.4668C5.05258 12.25 4.7168 11.9142 4.7168 11.5C4.7168 11.0858 5.05258 10.75 5.4668 10.75H7.4668L7.54395 10.7539ZM10.1104 7.25391C10.4884 7.29246 10.7832 7.61179 10.7832 8C10.7832 8.38821 10.4884 8.70754 10.1104 8.74609L10.0332 8.75H5.46191C5.0477 8.75 4.71191 8.41421 4.71191 8C4.71192 7.58579 5.0477 7.25 5.46191 7.25H10.0332L10.1104 7.25391ZM10.5439 3.75391C10.9219 3.79253 11.2168 4.11183 11.2168 4.5C11.2168 4.88817 10.9219 5.20747 10.5439 5.24609L10.4668 5.25H5.4668C5.05258 5.25 4.7168 4.91421 4.7168 4.5C4.7168 4.08579 5.05258 3.75 5.4668 3.75H10.4668L10.5439 3.75391Z"})),pH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M9.47656 1.25391C9.85481 1.29226 10.1504 1.61164 10.1504 2C10.1504 2.38836 9.85481 2.70774 9.47656 2.74609L9.40039 2.75H4.5C3.56663 2.75 2.90321 2.98546 2.47559 3.38574C2.05697 3.77772 1.75002 4.43519 1.75 5.5293V10.4707C1.75002 11.5648 2.05697 12.2223 2.47559 12.6143C2.90321 13.0145 3.56663 13.25 4.5 13.25H11.5C12.4334 13.25 13.0968 13.0145 13.5244 12.6143C13.943 12.2223 14.25 11.5648 14.25 10.4707V6.94141C14.25 6.52719 14.5858 6.19141 15 6.19141C15.4142 6.19141 15.75 6.52719 15.75 6.94141V10.4707C15.75 11.8471 15.3562 12.9539 14.5498 13.709C13.7524 14.4556 12.6664 14.75 11.5 14.75H4.5C3.33356 14.75 2.24758 14.4556 1.4502 13.709C0.643842 12.9539 0.250021 11.8471 0.25 10.4707V5.5293C0.250021 4.15293 0.643842 3.04606 1.4502 2.29102C2.24758 1.5444 3.33356 1.25 4.5 1.25H9.40039L9.47656 1.25391ZM4.41602 5.37598C4.65967 5.07371 5.08968 5.01048 5.4082 5.21777L5.4707 5.2627L7.63672 7.00879H7.63574C8.07504 7.35928 8.85791 7.35864 9.29688 7.00781L10.1162 6.34961C10.4392 6.09037 10.9116 6.14198 11.1709 6.46484C11.43 6.78778 11.3785 7.26023 11.0557 7.51953L10.2354 8.17773L10.2344 8.17871C9.24718 8.96855 7.68434 8.96872 6.69727 8.17871L6.69531 8.17676L4.5293 6.43066L4.47168 6.37988C4.20136 6.11269 4.17245 5.67831 4.41602 5.37598ZM13.0947 0.900391C13.383 0.900609 13.6699 1.09415 13.7422 1.42285L13.7441 1.42188L13.8965 2.08984L13.9268 2.18652C14.0102 2.40174 14.1918 2.56204 14.415 2.61621L15.0811 2.77051L15.0928 2.77344L15.1045 2.77734L15.2168 2.81836C15.4616 2.93398 15.6005 3.17933 15.6006 3.4248C15.6006 3.70645 15.413 3.99789 15.0801 4.07227L15.0811 4.07422L14.415 4.22852C14.1608 4.29017 13.9592 4.48963 13.8965 4.75098L13.8975 4.75195L13.7441 5.42383L13.7412 5.43457L13.7383 5.44629C13.6542 5.75704 13.3768 5.9451 13.0898 5.94531C12.8016 5.94518 12.5148 5.75139 12.4424 5.42285L12.4414 5.42383L12.2881 4.75391V4.75488C12.2264 4.49199 12.0256 4.29066 11.7705 4.22852L11.1045 4.07422L11.0918 4.07129L11.0811 4.06836C10.7665 3.98191 10.585 3.70093 10.585 3.41992C10.585 3.1381 10.7721 2.84653 11.1055 2.77246L11.1045 2.77051L11.7705 2.61621C11.9935 2.56185 12.1755 2.40164 12.2588 2.18652L12.2881 2.08984L12.4414 1.42188L12.4434 1.41016L12.4473 1.39844L12.4873 1.28809C12.6006 1.0441 12.8437 0.90055 13.0947 0.900391ZM13.0928 3.11523C13.0027 3.22892 12.8996 3.33153 12.7861 3.42188C12.8995 3.51211 13.0027 3.61495 13.0928 3.72852C13.1826 3.61534 13.2845 3.51188 13.3975 3.42188C13.2845 3.33177 13.1826 3.22853 13.0928 3.11523Z"})),mH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M8 0.25C9.39291 0.25 10.5131 0.248121 11.3916 0.366211C12.2917 0.487227 13.0495 0.746718 13.6514 1.34863L13.7607 1.46289C14.2856 2.04541 14.5203 2.76456 14.6338 3.6084C14.7519 4.4869 14.75 5.60709 14.75 7V9C14.75 10.3929 14.7519 11.5131 14.6338 12.3916C14.5203 13.2354 14.2856 13.9546 13.7607 14.5371L13.6514 14.6514C13.0495 15.2533 12.2917 15.5128 11.3916 15.6338C10.5131 15.7519 9.39291 15.75 8 15.75C6.60709 15.75 5.4869 15.7519 4.6084 15.6338C3.76456 15.5203 3.04541 15.2856 2.46289 14.7607L2.34863 14.6514C1.74672 14.0495 1.48723 13.2917 1.36621 12.3916C1.24812 11.5131 1.25 10.3929 1.25 9V7C1.25 5.60709 1.24812 4.4869 1.36621 3.6084C1.48723 2.70829 1.74672 1.95055 2.34863 1.34863L2.46289 1.23926C3.04541 0.714422 3.76456 0.479662 4.6084 0.366211C5.4869 0.248121 6.60709 0.25 8 0.25ZM8 1.75C6.56485 1.75 5.5639 1.75202 4.80859 1.85352C4.16663 1.93983 3.78836 2.08832 3.51855 2.30957L3.40918 2.40918C3.13242 2.68594 2.95217 3.07482 2.85352 3.80859C2.75202 4.5639 2.75 5.56485 2.75 7V9C2.75 10.4352 2.75202 11.4361 2.85352 12.1914C2.95217 12.9252 3.13242 13.3141 3.40918 13.5908L3.51855 13.6904C3.78836 13.9117 4.16663 14.0602 4.80859 14.1465C5.5639 14.248 6.56485 14.25 8 14.25C9.43515 14.25 10.4361 14.248 11.1914 14.1465C11.9252 14.0478 12.3141 13.8676 12.5908 13.5908L12.6904 13.4814C12.9117 13.2116 13.0602 12.8334 13.1465 12.1914C13.248 11.4361 13.25 10.4352 13.25 9V7C13.25 5.56485 13.248 4.5639 13.1465 3.80859C13.0602 3.16663 12.9117 2.78836 12.6904 2.51855L12.5908 2.40918C12.3141 2.13242 11.9252 1.95217 11.1914 1.85352C10.4361 1.75202 9.43515 1.75 8 1.75ZM10.75 11C11.1642 11 11.5 11.3358 11.5 11.75C11.5 12.1642 11.1642 12.5 10.75 12.5H5.25C4.83579 12.5 4.5 12.1642 4.5 11.75C4.5 11.3358 4.83579 11 5.25 11H10.75ZM10.75 3.5C11.1642 3.5 11.5 3.83579 11.5 4.25C11.5 4.66421 11.1642 5 10.75 5H5.25C4.83579 5 4.5 4.66421 4.5 4.25C4.5 3.83579 4.83579 3.5 5.25 3.5H10.75Z"})),fH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_397_11631)"},GS.createElement("path",{d:"M11.7012 8.80029C13.3031 8.80059 14.6016 10.0997 14.6016 11.7017C14.6014 12.2583 14.4432 12.7783 14.1709 13.2202L15.002 14.0493L15.0889 14.1548C15.237 14.3787 15.2375 14.6727 15.0898 14.897L15.0039 15.0024C14.7741 15.2329 14.418 15.2623 14.1562 15.0903L14.0508 15.0044L13.2168 14.1733C12.7755 14.4445 12.2566 14.6019 11.7012 14.6021C10.0992 14.6021 8.80014 13.3035 8.7998 11.7017C8.7998 10.0995 10.099 8.80029 11.7012 8.80029ZM9.90625 0.825684L9.94434 0.82666L10.6533 0.847168C11.3301 0.869672 11.9132 0.903438 12.4072 0.993652L12.6641 1.04834C13.2516 1.18879 13.7571 1.43684 14.1924 1.89502L14.3652 2.09424C14.7425 2.56802 14.9361 3.10999 15.04 3.73779L15.0771 3.99854C15.1331 4.44579 15.1574 4.95589 15.1729 5.53174L15.1885 6.25439V6.25537L15.1895 6.29443L15.2002 7.65869C15.2 8.0426 14.9004 8.37135 14.5117 8.37158C14.1228 8.37158 13.8235 8.04274 13.8232 7.65869L13.8135 6.32471C13.7979 5.56136 13.782 4.97432 13.7422 4.49854L10.3535 6.51709C9.51068 7.01891 8.78367 7.34605 8 7.34619C7.31414 7.34619 6.67159 7.09568 5.95703 6.69678L5.64648 6.51709L2.25684 4.49854C2.23085 4.8079 2.21434 5.16419 2.20312 5.58545L2.18652 6.32471C2.17304 6.98764 2.17304 7.64714 2.18652 8.31006L2.20312 9.04932C2.22123 9.729 2.24841 10.24 2.31738 10.6567L2.35254 10.8433C2.44135 11.2553 2.57779 11.5183 2.79004 11.7417L2.88281 11.8315C3.10596 12.0303 3.38606 12.1573 3.83203 12.2388L4.04297 12.272C4.55587 12.3426 5.21282 12.3611 6.12793 12.3853L6.50977 12.3911C6.61753 12.3912 6.71363 12.3896 6.81738 12.3882L7.35156 12.3853L7.49316 12.4009C7.81032 12.4706 8.03831 12.7642 8.03711 13.1001C8.0354 13.46 7.77114 13.7701 7.41797 13.8062L7.3457 13.8101C7.15816 13.8092 7.00696 13.8093 6.86133 13.811L6.8623 13.812C6.63337 13.8149 6.41628 13.8176 6.09375 13.8091H6.09277L6.05566 13.8081C5.19189 13.7854 4.45794 13.7671 3.84668 13.6821L3.59277 13.6411C2.98142 13.5294 2.45427 13.3243 1.99902 12.9243L1.80762 12.7407C1.37554 12.2858 1.14215 11.7651 1.01074 11.1616L0.959961 10.8979C0.876049 10.3911 0.845668 9.79487 0.827148 9.104L0.811523 8.38037L0.810547 8.34033C0.796658 7.65737 0.796663 6.9774 0.810547 6.29443L0.811523 6.25439L0.827148 5.53174C0.845653 4.84078 0.876105 4.24469 0.959961 3.73779L1.01074 3.47314C1.1421 2.86974 1.37572 2.34985 1.80762 1.89502L1.99902 1.71143C2.45443 1.31102 2.9811 1.10537 3.59277 0.993652L3.84668 0.953613C4.458 0.868587 5.19181 0.849411 6.05566 0.82666L6.09375 0.825684L7.04785 0.807129C8.00054 0.794536 8.95004 0.800488 9.90625 0.825684ZM11.7012 10.1479C10.8432 10.1479 10.1475 10.8436 10.1475 11.7017C10.1478 12.5594 10.8434 13.2554 11.7012 13.2554C12.5587 13.2551 13.2546 12.5592 13.2549 11.7017C13.2549 10.8438 12.5589 10.1482 11.7012 10.1479ZM7.06543 2.23096L6.12793 2.24951C5.21277 2.27362 4.55588 2.29216 4.04297 2.36279L3.83203 2.39697C3.38595 2.47846 3.10599 2.6044 2.88281 2.80322L2.79004 2.89307C2.73389 2.95219 2.68278 3.01389 2.63672 3.08057L6.33301 5.28271L6.61816 5.44678C7.24907 5.79761 7.64662 5.92139 8 5.92139C8.40367 5.92125 8.86555 5.75989 9.66699 5.28271L13.3633 3.08057C13.3422 3.04999 13.32 3.02044 13.2969 2.9917L13.21 2.89307C13.0008 2.67293 12.7502 2.52895 12.3496 2.43408L12.168 2.39697C11.7616 2.32274 11.2613 2.29206 10.5957 2.27002L9.87207 2.24951C8.9333 2.22477 8.00072 2.21859 7.06543 2.23096Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_397_11631"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),gH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("path",{d:"M8.17285 0.00585938C9.03682 0.0620426 9.87886 0.540311 11.4639 1.44141L12.0361 1.7666C13.7267 2.72769 14.572 3.20847 15.0361 4C15.5002 4.79151 15.5 5.75271 15.5 7.6748V8.3252L15.4932 9.59863C15.4714 10.7171 15.3842 11.4063 15.0361 12L14.9443 12.1445C14.4629 12.8532 13.6212 13.3322 12.0361 14.2334L11.4639 14.5586L10.3398 15.1895C9.3456 15.7299 8.69606 16 8 16L7.82715 15.9941C7.19359 15.9529 6.57174 15.685 5.66016 15.1895L4.53613 14.5586L3.96387 14.2334C2.37877 13.3322 1.53708 12.8532 1.05566 12.1445L0.963867 12C0.61581 11.4063 0.52858 10.7171 0.506836 9.59863L0.5 8.3252V7.6748C0.5 5.87251 0.500251 4.91527 0.882812 4.15039L0.963867 4C1.31195 3.40633 1.8749 2.98792 2.84766 2.41016L3.96387 1.7666L4.53613 1.44141C6.22653 0.480392 7.07185 0 8 0L8.17285 0.00585938ZM8 1.5C7.81933 1.5 7.59145 1.54027 7.16504 1.73047C6.93674 1.83231 6.68217 1.96229 6.37598 2.12891L5.27734 2.74609L4.70508 3.07031C3.83457 3.56521 3.27602 3.8857 2.86914 4.17285C2.48859 4.44144 2.34349 4.61266 2.25781 4.75879C2.17292 4.90364 2.0962 5.10909 2.05078 5.5625C2.02636 5.80645 2.01337 6.08727 2.00684 6.43066L2 7.6748V8.3252C2 9.31587 2.00196 9.94982 2.05078 10.4375C2.0962 10.8909 2.17292 11.0964 2.25781 11.2412C2.34349 11.3873 2.48858 11.5586 2.86914 11.8271C3.27602 12.1143 3.83457 12.4348 4.70508 12.9297L5.27734 13.2539L6.37598 13.8711C6.68217 14.0377 6.93674 14.1677 7.16504 14.2695C7.59144 14.4597 7.81933 14.5 8 14.5C8.18067 14.5 8.40856 14.4597 8.83496 14.2695C9.29142 14.0659 9.85228 13.7487 10.7227 13.2539L11.2949 12.9297L12.3867 12.3008C12.6862 12.1231 12.9274 11.9707 13.1309 11.8271C13.5114 11.5586 13.6565 11.3873 13.7422 11.2412C13.8271 11.0964 13.9038 10.8909 13.9492 10.4375C13.998 9.94982 14 9.31587 14 8.3252V7.6748C14 6.68413 13.998 6.05018 13.9492 5.5625C13.9038 5.10909 13.8271 4.90364 13.7422 4.75879C13.6565 4.61266 13.5114 4.44144 13.1309 4.17285C12.9274 4.02926 12.6862 3.87691 12.3867 3.69922L11.2949 3.07031L10.7227 2.74609C9.85228 2.25127 9.29142 1.93408 8.83496 1.73047C8.40855 1.54027 8.18067 1.5 8 1.5ZM7.05566 5.95898C7.69464 5.66055 8.44084 5.68228 9.06445 6.02344L9.11523 6.05176L9.125 6.05762L9.1748 6.08691L9.29395 6.16406C9.87193 6.56821 10.2268 7.22584 10.2432 7.93652V8.06348C10.2268 8.77416 9.87193 9.43179 9.29395 9.83594L9.1748 9.91309C9.1594 9.92246 9.14332 9.93161 9.125 9.94238L9.11523 9.94922L9.11426 9.94824L9.06445 9.97656C8.44084 10.3177 7.69464 10.3394 7.05566 10.041L6.92871 9.97656L6.87891 9.94824L6.86816 9.94238L6.81836 9.91309C6.21103 9.54352 5.81971 8.90779 5.75879 8.20508L5.75098 8.06348C5.75057 8.04551 5.75017 8.02703 5.75 8.00586V7.99414L5.75098 7.93652L5.75879 7.79492C5.81971 7.09221 6.21103 6.45648 6.81836 6.08691L6.86816 6.05762L6.87891 6.05078V6.05176C6.89724 6.04136 6.91301 6.03203 6.92871 6.02344L7.05566 5.95898ZM8.34473 7.33887C8.1552 7.23518 7.93067 7.22213 7.73242 7.2998L7.64941 7.33887C7.64643 7.3405 7.64189 7.3417 7.62793 7.34961L7.62891 7.35059L7.59766 7.36816C7.41322 7.4805 7.28961 7.66843 7.25781 7.87891L7.25 7.9707V8.0293L7.25781 8.12109C7.28961 8.33157 7.41322 8.5195 7.59766 8.63184L7.61816 8.64355L7.64941 8.66113L7.73242 8.7002C7.93067 8.77787 8.1552 8.76482 8.34473 8.66113L8.375 8.64355C8.38881 8.63542 8.3926 8.6336 8.39551 8.63184L8.4707 8.5791C8.63722 8.44626 8.73819 8.24536 8.74316 8.0293V7.9707C8.73819 7.75464 8.63722 7.55374 8.4707 7.4209L8.39551 7.36816C8.3926 7.3664 8.38881 7.36458 8.375 7.35645L8.34473 7.33887Z"})),yH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_397_12417)"},GS.createElement("path",{d:"M8 0.25C12.2802 0.25 15.75 3.71979 15.75 8C15.75 12.2802 12.2802 15.75 8 15.75C3.71979 15.75 0.25 12.2802 0.25 8C0.25 3.71979 3.71979 0.25 8 0.25ZM4.13965 12.9131C5.20266 13.7495 6.54245 14.25 8 14.25C9.45579 14.25 10.794 13.7506 11.8564 12.916L10.0723 11.1318C9.48092 11.5215 8.77386 11.75 8.0127 11.75C7.24309 11.75 6.5279 11.5178 5.93262 11.1201L4.13965 12.9131ZM11.1328 5.91992C11.5305 6.5152 11.7627 7.23039 11.7627 8C11.7627 8.76728 11.5312 9.48002 11.1357 10.0742L12.917 11.8555C13.7511 10.7932 14.25 9.4553 14.25 8C14.25 6.54245 13.7495 5.20266 12.9131 4.13965L11.1328 5.91992ZM3.08301 4.14258C2.24837 5.205 1.75 6.54414 1.75 8C1.75 9.45355 2.24782 10.7899 3.08008 11.8516L4.87695 10.0547C4.48938 9.46439 4.2627 8.75893 4.2627 8C4.2627 7.23874 4.49012 6.53085 4.87988 5.93945L3.08301 4.14258ZM8.0127 5.75C6.77008 5.75 5.7627 6.75736 5.7627 8C5.7627 9.24265 6.77008 10.25 8.0127 10.25C9.25534 10.25 10.2627 9.24265 10.2627 8C10.2627 6.75736 9.25534 5.75001 8.0127 5.75ZM8 1.75C6.54463 1.75 5.20581 2.2479 4.14355 3.08203L5.9375 4.87598C6.53175 4.48044 7.24533 4.25 8.0127 4.25C8.77162 4.25 9.47709 4.47668 10.0674 4.86426L11.8516 3.08008C10.7899 2.24782 9.45355 1.75 8 1.75Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_397_12417"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),vH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_397_12392)"},GS.createElement("path",{d:"M7.12695 1.13135C7.65943 0.663442 8.47258 0.687797 8.96875 1.23291L8.96973 1.23193L11.2461 3.70264L12.874 1.93701L13.0234 1.78662C13.1791 1.64189 13.3522 1.51811 13.542 1.43604C13.8032 1.32315 14.1348 1.27646 14.4609 1.42334C14.7785 1.56648 14.9639 1.83589 15.0635 2.0874C15.1627 2.33822 15.2002 2.62358 15.2002 2.9126V10.9751L15.1953 11.1987C15.1518 12.3069 14.7851 13.285 14.1211 14.0054C13.4078 14.779 12.4019 15.2007 11.25 15.2007H4.74707C2.5171 15.1918 0.800281 13.2466 0.799805 10.9683V2.9126C0.799805 2.62358 0.837338 2.33822 0.936523 2.0874C1.03612 1.83589 1.22151 1.56648 1.53906 1.42334C1.86518 1.27646 2.19675 1.32315 2.45801 1.43604C2.71079 1.54536 2.93385 1.72865 3.12598 1.93701L4.75195 3.70166L7.02344 1.23291V1.23193L7.12695 1.13135ZM5.73145 4.70459L5.73242 4.70557C5.2367 5.25719 4.41741 5.28312 3.88281 4.81299L3.78027 4.7124L2.2002 2.99756V10.9683C2.20066 12.5813 3.39556 13.795 4.75293 13.8003H11.25C12.0478 13.8003 12.6676 13.5162 13.0918 13.0562C13.4669 12.6491 13.7277 12.0611 13.7871 11.3081L13.7998 10.9751V2.99756L12.2197 4.7124L12.2188 4.71143C11.7226 5.25658 10.9094 5.28093 10.377 4.81299L10.2734 4.7124L7.99609 2.2417L5.73145 4.70459ZM8 6.75049C9.24264 6.75049 10.25 7.75785 10.25 9.00049C10.2497 10.2429 9.24248 11.2505 8 11.2505C6.75752 11.2505 5.75026 10.2429 5.75 9.00049C5.75 7.75785 6.75736 6.75049 8 6.75049ZM8 8.25049C7.58579 8.25049 7.25 8.58627 7.25 9.00049C7.25026 9.41448 7.58595 9.75049 8 9.75049C8.41405 9.75049 8.74974 9.41448 8.75 9.00049C8.75 8.58627 8.41421 8.25049 8 8.25049Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_397_12392"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),bH=e=>GS.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},GS.createElement("g",{clipPath:"url(#clip0_442_12089)"},GS.createElement("path",{d:"M6.50293 0.5C8.14639 0.5 9.49582 1.77877 9.61035 3.39355H11.7246C12.1562 3.39371 12.5058 3.74408 12.5059 4.17578V6.28906C14.1211 6.4031 15.4003 7.7536 15.4004 9.39746L15.3965 9.55664C15.3168 11.1274 14.0684 12.3936 12.5059 12.5039V14.6182C12.5057 15.0499 12.1562 15.4003 11.7246 15.4004H1.28223C0.850486 15.4004 0.500132 15.0499 0.5 14.6182V11.4629C0.500178 11.0311 0.850514 10.6816 1.28223 10.6816H1.8418C2.5495 10.6816 3.12567 10.1051 3.12598 9.39746C3.12598 8.68956 2.54969 8.11328 1.8418 8.11328H1.28223C0.850475 8.11328 0.500132 7.76278 0.5 7.33105V4.17578C0.500105 3.74398 0.850469 3.39355 1.28223 3.39355H3.39551C3.50997 1.77884 4.85958 0.500141 6.50293 0.5ZM6.50293 2.06445C5.64744 2.0646 4.95117 2.76069 4.95117 3.61621V4.17578C4.95104 4.60756 4.60069 4.95801 4.16895 4.95801H2.06445V6.56055C3.53126 6.6746 4.69043 7.90186 4.69043 9.39746C4.69011 10.8928 3.53107 12.1194 2.06445 12.2334V13.8359H10.9424V11.7314C10.9424 11.2996 11.2928 10.9492 11.7246 10.9492H12.2842C13.0862 10.9492 13.7483 10.3371 13.8281 9.55566L13.8359 9.39746C13.8359 8.5418 13.1398 7.84473 12.2842 7.84473H11.7246C11.293 7.84473 10.9428 7.49499 10.9424 7.06348V4.95801H8.83691C8.40529 4.95787 8.0558 4.60748 8.05566 4.17578V3.61621C8.05566 2.7606 7.35854 2.06445 6.50293 2.06445Z",fill:"currentColor"})),GS.createElement("defs",null,GS.createElement("clipPath",{id:"clip0_442_12089"},GS.createElement("rect",{width:16,height:16,fill:"white"})))),wH=window.React.useCallback,xH=window.React.useEffect,_H=window.React.useMemo,CH=window.React.useState;(()=>{const e=window.yaymailData.i18n.locale_data.messages;e&&Rw(e,"yaymail")})();const SH=({children:e})=>Vt.jsx("span",{className:"yaymail-tabs-tab-btn__wrapper",style:{display:"flex",alignItems:"center"},children:e}),kH=({children:e})=>Vt.jsx("span",{className:"anticon",style:{marginRight:6},children:e}),EH=[{key:"email-templates",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(pH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Email Templates","yaymail")})]})},{key:"global-header-footer",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(mH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Global Header & Footer","yaymail")}),Vt.jsx(Tr,{count:__("New","yaymail"),color:"#FCB900",style:{marginInlineStart:5}})]})},{key:"settings",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(gH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Settings","yaymail")})]})},{key:"go-pro",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(vH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Go Pro","yaymail")})]})},{key:"addons",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(bH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Addons","yaymail")})]})},{key:"preview-email",label:Vt.jsxs(SH,{children:[Vt.jsx(kH,{children:Vt.jsx(fH,{})}),Vt.jsx("span",{className:"yaymail-tab-name",children:__("Preview Email","yaymail")})]})}],$H=()=>{var e,t;const n=sy(),i=cy(),r=function(){let{matches:e,loaderData:t}=xy(vy.UseMatches);return Xg.useMemo((()=>e.map((e=>{let{pathname:n,params:i}=e;return{id:e.route.id,pathname:n,params:i,data:t[e.route.id],handle:e.route.handle}}))),[e,t])}(),[o,a]=CH((null==(e=EH[0])?void 0:e.key)??""),[s,l]=CH(!1),c=Xx((e=>e.isReviewed)),d=Xx((e=>e.setIsReviewed)),u=WB((e=>e.isCriticalMigrationRequired));xH((()=>{const e=()=>{l(window.scrollY>0)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}),[]),xH((()=>{n.pathname&&("/go-pro"!==n.pathname?a(n.pathname.slice(1)):a("go-pro"))}),[n]);const h=_H((()=>r.filter((e=>{return!!e.handle&&"object"==typeof(t=e.handle)&&Object.prototype.hasOwnProperty.call(t,"crumbTitle");var t})).map((e=>{const t=e.handle.crumbTitle,n="/"===e.pathname?EH[0].key:e.pathname;return{title:Vt.jsx("span",{"data-path":n,className:"yaymail-breadcrumb-item",children:t}),onClick:e=>{var t,n;e.target instanceof HTMLElement&&(null==(t=e.target.dataset)?void 0:t.path)&&("/email-templates"===e.target.dataset.path?a(null==(n=EH[0])?void 0:n.key):a(e.target.dataset.path),i(e.target.dataset.path))}}}))),[r]),p=wH((e=>{let t=`${e}`;"global-header-footer"===e&&(t="customizer/?template=yaymail_global_header_footer"),n.pathname!==`/${e}`&&(a(e),i(t))}),[i,n]);return Vt.jsx(Vt.Fragment,{children:Vt.jsxs(Eu,{style:{background:"#f0f0f1"},children:[Vt.jsxs("div",{className:"yaymail-header__navbar "+(s?"yaymail-header__navbar--scrolled":""),children:[Vt.jsxs("div",{className:"yaymail-header__navbar--left",children:[Vt.jsx("span",{className:"yaymail-header__logo",children:Vt.jsx(uH,{})}),Vt.jsx(Ka,{activeKey:u?"settings":o,className:"yaymail-dashboard-tabs",defaultActiveKey:null==(t=EH[0])?void 0:t.key,onChange:p,items:EH})]}),Vt.jsxs("div",{className:"yaymail-header__navbar--right",children:[Vt.jsxs(By,{to:"https://docs.yaycommerce.com/yaymail",target:"_blank",className:"yaymail-navlink",children:[Vt.jsx(hH,{className:"yaymail-navlink--icon"}),Vt.jsx("span",{className:"yaymail-navlink--text",children:__("Documentation","yaymail")})]}),Vt.jsxs(By,{to:"https://yaycommerce.com/support/",target:"_blank",className:"yaymail-navlink",children:[Vt.jsx(yH,{className:"yaymail-navlink--icon"}),Vt.jsx("span",{className:"yaymail-navlink--text",children:__("Support","yaymail")})]})]})]}),Vt.jsx(yt,{style:{minHeight:"100vh",paddingTop:"50px"},children:Vt.jsx(My,{})}),Vt.jsx(gt,{className:"yaymail-footer",children:Vt.jsxs("div",{className:"yaymail-footer-wrap",children:[Vt.jsxs(Ct,{style:{height:"100%"},children:[Vt.jsx(By,{to:"#",children:Vt.jsx(_p,{component:dH})}),Vt.jsx(Zr,{separator:">",items:h})]}),c?Vt.jsx("span",{className:"yaymail-footer-review-text",children:__("Thank you for using YayMail.","yaymail")}):Vt.jsxs("span",{className:"yaymail-footer-review-text",children:[__("We need your support to keep updating and improving the plugin. Please, ","yaymail"),Vt.jsx(By,{target:"_blank",to:"https://wordpress.org/support/plugin/yaymail/reviews/",onClick:async()=>{try{d(!0),await Jb()}catch(e){console.error(e)}},children:__("help us by leaving a good review","yaymail")})," ",__(" :) Thanks!","yaymail")]})]})})]})})};async function MH(e){return await DC("/addons/activate",{addon:e})}async function RH(e){return await DC("/addons/deactivate",{addon:e})}const AH=window.React.createContext,TH=window.React.useEffect,LH=window.React.useMemo,jH=window.React.useState,OH=AH({filteredAddons:[],listingAddons:[],searchText:"",category:"all",status:"all",isFetching:!1,setSearchText:e=>{},setCategory:e=>{},setStatus:e=>{},currentPage:1,totalPages:0,totalItems:0,setCurrentPage:e=>{}});function NH({children:e}){const[t,n]=jH(""),[i,r]=jH("all"),[o,a]=jH("all"),[s,l]=jH(1),{isFetching:c,data:d}={...Qv({queryKey:["addons"],queryFn:async()=>{const e=await async function(){return await IC("/addons",{params:void 0})}();if(e.data&&e.data.isError)throw new Error(e.data.message??"Unknown error");return e.data},retry:!1,refetchOnWindowFocus:!1,keepPreviousData:!0})},u=LH((()=>d??[]),[d]),h=LH((()=>(u??[]).filter((e=>e.plugin_name.toLowerCase().includes(t.toLowerCase().trim())&&("all"===i||((null==e?void 0:e.categories)??[]).includes(i))&&("all"===o||e.installation_status.is_active===("active"===o))))),[u,t,i,o]),p=LH((()=>h.slice(18*(s-1),18*s)),[h,s]),m=LH((()=>Math.ceil(h.length/18)),[h]),f=LH((()=>h.length),[h]),g=LH((()=>({filteredAddons:h,searchText:t,category:i,status:o,setSearchText:n,setCategory:r,setStatus:a,isFetching:c,currentPage:s,totalPages:m,totalItems:f,setCurrentPage:l,listingAddons:p})),[h,t,i,o,c,s,m,f,p]);return TH((()=>{l(1)}),[h]),Vt.jsx(OH.Provider,{value:g,children:e})}const IH=window.React.useContext,DH=window.React.useEffect,PH=window.React.useRef,zH=window.React.useState;function FH(){const{setSearchText:e,isFetching:t}=IH(OH),[n,i]=zH("");DH((()=>{const t=setTimeout((()=>{e(n)}),200);return()=>clearTimeout(t)}),[n,e]);const r=PH(null);return DH((()=>{var e;r.current&&(null==(e=r.current.input)||e.focus())}),[t]),Vt.jsx("div",{className:"yaymail-addons-search",children:Vt.jsx(at,{placeholder:"Search addons",allowClear:!0,value:n,onChange:e=>i(e.target.value),disabled:t,ref:r,suffix:Vt.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Vt.jsx("path",{d:"M13.6922 13.8L17 17M15.9333 8.46667C15.9333 12.5904 12.5904 15.9333 8.46667 15.9333C4.34294 15.9333 1 12.5904 1 8.46667C1 4.34294 4.34294 1 8.46667 1C12.5904 1 15.9333 4.34294 15.9333 8.46667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})})})}const BH=window.React.useContext,HH=window.React.useEffect,WH=[{label:__("All addons","yaymail"),value:"all"},{label:__("Marketing","yaymail"),value:"marketing"},{label:__("Payments","yaymail"),value:"payments"},{label:__("Membership","yaymail"),value:"membership"},{label:__("Multivendor","yaymail"),value:"multivendor"},{label:__("Subscription","yaymail"),value:"subscription"},{label:__("Order status","yaymail"),value:"order-status"},{label:__("Booking","yaymail"),value:"booking"},{label:__("Wholesale","yaymail"),value:"wholesale"},{label:__("Shipment","yaymail"),value:"shipment"},{label:__("Others","yaymail"),value:"others"}],UH=[{label:__("All","yaymail"),value:"all"},{label:__("Active","yaymail"),value:"active"},{label:__("Inactive","yaymail"),value:"inactive"}];function VH(){const{category:e,status:t,setCategory:n,setStatus:i,isFetching:r}=BH(OH);return HH((()=>{let e;document.querySelectorAll(".yaymail-addons-filters__categories").forEach((t=>{t.addEventListener("pointerdown",(n=>{e=setTimeout((()=>{t.setPointerCapture(n.pointerId),t.classList.add("dragging")}),150)})),t.addEventListener("pointerup",(n=>{t.releasePointerCapture(n.pointerId),t.classList.remove("dragging"),clearTimeout(e)})),t.addEventListener("pointermove",(n=>{if(t.classList.contains("dragging"))return t.hasPointerCapture(n.pointerId)&&(t.scrollLeft-=n.movementX);clearTimeout(e)}))}))}),[]),HH((()=>{const e=document.querySelector(".yaymail-addons-filters__categories");e.addEventListener("wheel",(t=>{t.preventDefault(),e.scrollLeft+=t.deltaY}),{passive:!1})}),[e]),Vt.jsxs("div",{className:"yaymail-addons-filters",children:[Vt.jsx("div",{className:"yaymail-addons-filters__categories",children:WH.map((t=>Vt.jsx("div",{className:"yaymail-addons-filters__categories-item "+(t.value===e?"active":""),onClick:e=>{r||(e.preventDefault(),e.stopPropagation,n(t.value))},children:t.label},t.value)))}),Vt.jsx("div",{className:"yaymail-addons-filters__statuses",children:UH.map((e=>Vt.jsx("div",{className:"yaymail-addons-filters__statuses-item "+(e.value===t?"active":""),onClick:t=>{r||(t.preventDefault(),t.stopPropagation,i(e.value))},children:e.label},e.value)))})]})}const GH=window.React.useContext;function YH(){const{listingAddons:e}=GH(OH);return Vt.jsx("div",{className:"yaymail-addons-table-grid",children:e.map((e=>Vt.jsx(KH,{addon:e},e.plugin_name)))})}const KH=({addon:e})=>{const{activateAddonMutation:t,deactivateAddonMutation:n}=function(){const e=Fv();return{activateAddonMutation:Yv({mutationFn:MH,onSuccess:(t,n)=>{var i;(null==(i=t.data)?void 0:i.success)&&e.setQueryData(["addons"],(e=>e.map((e=>(e.plugin_slug===n&&(e.installation_status.is_active=!0),e)))))}}),deactivateAddonMutation:Yv({mutationFn:RH,onSuccess:(t,n)=>{var i;(null==(i=t.data)?void 0:i.success)&&e.setQueryData(["addons"],(e=>e.map((e=>(e.plugin_slug===n&&(e.installation_status.is_active=!1),e)))))}})}}(),i=window.yaymailData.yaymailHooks.applyFilters("yaymail_addon_settings_info","",e);return Vt.jsxs("div",{className:"yaymail-addons-table-grid__item",children:[Vt.jsxs("div",{className:"yaymail-addons-table-grid__item-info",children:[Vt.jsx("img",{src:e.image??"https://images.wpbrandy.com/uploads/addon-placeholder.png",alt:e.plugin_name,className:"yaymail-addons-table-grid__item-image"}),Vt.jsx("h3",{className:"yaymail-addons-table-grid__item-info-title",children:e.plugin_name}),Vt.jsx("p",{className:"yaymail-addons-table-grid__item-info-description",dangerouslySetInnerHTML:{__html:e.description}})]}),Vt.jsxs("div",{className:"yaymail-addons-table-grid__item-actions",children:[Vt.jsxs("div",{className:"yaymail-addons-table-grid__item-actions-head",children:[Vt.jsx(Pe,{size:"small",className:"yaymail-addons-table-grid__item-view-details",href:e.link_upgrade??"",target:"_blank",children:__("View Details","yaymail")}),e.installation_status.is_active&&i&&Vt.jsx(Pe,{className:"yaymail-addons-table-grid__item-view-settings",href:i.url,icon:Vt.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Vt.jsx("path",{d:"M7.61565 17.9888C6.21935 17.5731 4.97648 16.8013 3.99234 15.7787C4.35948 15.3436 4.58073 14.7814 4.58073 14.1675C4.58073 12.7868 3.46144 11.6675 2.08073 11.6675C1.99721 11.6675 1.91464 11.6716 1.83323 11.6796C1.72231 11.1373 1.66406 10.5759 1.66406 10.0008C1.66406 9.12974 1.79772 8.28987 2.04564 7.50057C2.05732 7.50074 2.06901 7.50083 2.08073 7.50083C3.46144 7.50083 4.58073 6.38153 4.58073 5.00083C4.58073 4.60445 4.48848 4.22962 4.32431 3.89665C5.28802 3.00056 6.46427 2.32995 7.7691 1.96875C8.18256 2.77919 9.02519 3.33416 9.9974 3.33416C10.9696 3.33416 11.8122 2.77919 12.2257 1.96875C13.5305 2.32995 14.7068 3.00056 15.6705 3.89665C15.5063 4.22962 15.4141 4.60445 15.4141 5.00083C15.4141 6.38153 16.5334 7.50083 17.9141 7.50083C17.9258 7.50083 17.9375 7.50074 17.9491 7.50057C18.1971 8.28987 18.3307 9.12974 18.3307 10.0008C18.3307 10.5759 18.2725 11.1373 18.1616 11.6796C18.0801 11.6716 17.9976 11.6675 17.9141 11.6675C16.5334 11.6675 15.4141 12.7868 15.4141 14.1675C15.4141 14.7814 15.6353 15.3436 16.0024 15.7787C15.0183 16.8013 13.7754 17.5731 12.3791 17.9888C12.0569 16.9807 11.1124 16.2508 9.9974 16.2508C8.8824 16.2508 7.9379 16.9807 7.61565 17.9888Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"}),Vt.jsx("path",{d:"M10.0026 12.9173C11.6134 12.9173 12.9193 11.6115 12.9193 10.0007C12.9193 8.38982 11.6134 7.08398 10.0026 7.08398C8.39177 7.08398 7.08594 8.38982 7.08594 10.0007C7.08594 11.6115 8.39177 12.9173 10.0026 12.9173Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})]})})]}),Vt.jsx("div",{className:"yaymail-addons-table-grid__item-actions-tail",children:e.installation_status.is_installed?Vt.jsx(wm,{checked:e.installation_status.is_active,loading:t.isLoading||n.isLoading,onChange:()=>e.installation_status.is_active?n.mutate(e.plugin_slug):t.mutate(e.plugin_slug)}):Vt.jsx("span",{className:"yaymail-addons-not-installed-badge",children:__("Not installed","yaymail")})})]})]},e.plugin_slug??"")},QH=window.React.useContext,qH=()=>Vt.jsx("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Vt.jsx("path",{d:"M6 11L1 6L6 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),ZH=()=>Vt.jsx("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Vt.jsx("path",{d:"M1 11L6 6L1 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})});function XH(){const{currentPage:e,totalPages:t,setCurrentPage:n}=QH(OH);return Vt.jsxs("div",{className:"yaymail-addons-table-navigation",children:[Vt.jsx("div",{className:"yaymail-addons-table-navigation__item "+(1===e?"disabled":""),onClick:()=>{e>1&&n(e-1)},children:Vt.jsx(qH,{})}),Array.from({length:t}).map(((t,i)=>Vt.jsx("div",{className:"yaymail-addons-table-navigation__item "+(e===i+1?"active":""),onClick:()=>n(i+1),children:Vt.jsx("span",{children:i+1})},i))),Vt.jsx("div",{className:"yaymail-addons-table-navigation__item "+(e===t?"disabled":""),onClick:()=>{e0?Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(YH,{}),Vt.jsx(XH,{})]}):Vt.jsx(Rt,{description:__("No addons found","yaymail")})]})}function tW(){return Vt.jsx(NH,{children:Vt.jsxs("div",{className:"yaymail-addons-container",children:[Vt.jsxs("div",{className:"yaymail-addons-header",children:[Vt.jsx("h2",{className:"yaymail-addons-header__title",children:__("Explore 70+ WooCommerce Email Customizer Addons","yaymail")}),Vt.jsx("p",{className:"yaymail-addons-header__description",children:__("Connect extensions to create custom WooCommerce emails with YayMail!","yaymail")}),Vt.jsx(FH,{})]}),Vt.jsx(eW,{})]})})}const nW=()=>Vt.jsx(cB,{title:"",className:"yaymail-addons",children:Vt.jsx(tW,{})}),iW=()=>{const e=sy();return"yaymail_global_header_footer"===new URLSearchParams(e.search).get("template")?Vt.jsx(kB,{}):Vt.jsx(lB,{})},rW=Iy([{path:"/",element:Vt.jsx($H,{}),handle:{crumbTitle:"YayMail"},children:[{path:"",element:Vt.jsx($y,{to:"email-templates"})},{path:"email-templates",element:Vt.jsx(vB,{}),handle:{crumbTitle:__("Email Templates","yaymail")}},{path:"settings",element:Vt.jsx(cH,{}),handle:{crumbTitle:__("Settings","yaymail")}},{path:"go-pro",element:Vt.jsx(NB,{}),handle:{crumbTitle:__("Go Pro","yaymail")}},{path:"addons",element:Vt.jsx(nW,{}),handle:{crumbTitle:__("Addons","yaymail")}},{path:"preview-email",element:Vt.jsx(FB,{}),handle:{crumbTitle:__("Preview Email","yaymail")}},{path:"*",element:Vt.jsx(IB,{})}]},{path:"customizer",element:Vt.jsx(iW,{}),handle:{crumbTitle:__("Email Customizer","yaymail")}},{path:"*",element:Vt.jsx(IB,{})}]),oW=Iy([{path:"/",element:Vt.jsx($H,{}),handle:{crumbTitle:"YayMail"},children:[{path:"",element:Vt.jsx($y,{to:"/settings#/migration"})},{path:"settings",element:Vt.jsx(cH,{}),handle:{crumbTitle:__("Settings","yaymail")}},{path:"*",element:Vt.jsx($y,{to:"/settings#/migration"})}]},{path:"*",element:Vt.jsx($y,{to:"/settings#/migration"})}]),aW=()=>{const e=WB((e=>e.isCriticalMigrationRequired));return Vt.jsx(ky,{router:e?oW:rW})},sW=window.React.useEffect;function lW(){return sW((()=>{window.yaymailData.shared={...window.yaymailData.shared,util_functions:{getDimensionValue:Jw,setValueByPath:tx,replacePlaceholders:nx,__:__},stores:{useAddonStore:cA,useTemplateContentStore:Fx,useCustomizerSettingsStore:Zb},core_components:{ElementWrapper:Q$,propertyBuilders:JR},hooks:{useShortcode:lA},antd:{Button:Pe,Input:at,Menu:$t,Modal:Fu,Tooltip:G,Switch:wm,Skeleton:To,message:Nu},antd_icons:{DeleteOutlined:Fh},provider:{AntdConfigProvider:ef},react_query:{useQuery:Qv,useMutation:Yv}},window.yaymailData.yaymailHooks=window.wp.hooks.createHooks(),document.dispatchEvent(new CustomEvent("yaymail-loaded"));const e=e=>{e.preventDefault()};return document.addEventListener("dragover",e),()=>{document.removeEventListener("dragover",e)}}),[]),Vt.jsxs(Vt.Fragment,{children:[Vt.jsx(Tf,{}),Vt.jsx(aW,{}),Vt.jsx("div",{id:"yaymail-portal-root"}),Vt.jsx("div",{id:"yaymail-dom-placeholder"})]})}var cW={exports:{}};cW.exports={ReactQueryDevtools:function(){return null},ReactQueryDevtoolsPanel:function(){return null}};var dW=cW.exports;const uW=new $v({defaultOptions:{queries:{staleTime:18e5}}}),hW=e=>Vt.jsxs(Bv,{client:uW,children:[e.children,e.enableDevtools&&Vt.jsx(dW.ReactQueryDevtools,{initialIsOpen:!1})]});function pW(e,t=""){return Object.keys(e).reduce(((n,i)=>{const r=e[i],o=t?`${t}-${i}`:i;if("object"==typeof r&&null!==r){const e=pW(r,o);Object.assign(n,e)}else n[o]=r;return n}),{})}document.addEventListener("DOMContentLoaded",(()=>{Object.entries(pW(Xm,"--yaymail")).forEach((([e,t])=>{document.documentElement.style.setProperty(e,t)}))})),window.ReactDOM.createRoot(document.getElementById("yaymail-main-pages")).render(Vt.jsx(ef,{children:Vt.jsx(hW,{enableDevtools:!0,children:Vt.jsx(lW,{})})}))}},function(){return Ot||(0,jt[t(jt)[0]])((Ot={exports:{}}).exports,Ot),Ot.exports});export default Nt();