pixel-react 1.15.48 → 1.15.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -24,14 +24,14 @@ object-assign
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */function sg(){return ag||(ag=1,e=cg,"production"!==process.env.NODE_ENV&&function(){var t,n,r,i,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,c=function(){if(null!==a)try{var t=e.unstable_now();a(!0,t),a=null}catch(e){throw setTimeout(c,0),e}},s=Date.now();e.unstable_now=function(){return Date.now()-s},t=function(e){null!==a?setTimeout(t,0,e):(a=e,setTimeout(c,0))},n=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},i=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var d=window.performance,u=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.requestAnimationFrame,m=window.cancelAnimationFrame;"function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)e.unstable_now=function(){return d.now()};else{var C=u.now();e.unstable_now=function(){return u.now()-C}}var g=!1,v=null,y=-1,w=5,b=0;i=function(){return e.unstable_now()>=b},o=function(){},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=e>0?Math.floor(1e3/e):5};var E=new MessageChannel,M=E.port2;E.port1.onmessage=function(){if(null!==v){var t=e.unstable_now();b=t+w;try{v(!0,t)?M.postMessage(null):(g=!1,v=null)}catch(e){throw M.postMessage(null),e}}else g=!1},t=function(e){v=e,g||(g=!0,M.postMessage(null))},n=function(t,n){y=f(function(){t(e.unstable_now())},n)},r=function(){h(y),y=-1}}function A(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;;){var i=r-1>>>1,o=e[i];if(!(void 0!==o&&L(o,t)>0))return;e[i]=t,e[r]=o,r=i}}(e,t,n)}function x(e){var t=e[0];return void 0===t?null:t}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],l=o+1,c=e[l];if(void 0!==a&&L(a,t)<0)void 0!==c&&L(c,a)<0?(e[r]=c,e[l]=t,r=l):(e[r]=a,e[o]=t,r=o);else{if(!(void 0!==c&&L(c,t)<0))return;e[r]=c,e[l]=t,r=l}}}(e,n,0)),t}return null}function L(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var H=0,_=0,S="function"==typeof SharedArrayBuffer?new SharedArrayBuffer(4*Int32Array.BYTES_PER_ELEMENT):"function"==typeof ArrayBuffer?new ArrayBuffer(4*Int32Array.BYTES_PER_ELEMENT):null,V=null!==S?new Int32Array(S):[];V[0]=0,V[3]=0,V[1]=0;var O=0,z=null,N=null,I=0;function T(e){if(null!==N){var t=I;if((I+=e.length)+1>O){if((O*=2)>524288)return console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),void D();var n=new Int32Array(4*O);n.set(N),z=n.buffer,N=n}N.set(e,t)}}function D(){var e=z;return O=0,z=null,N=null,I=0,e}function j(e,t){V[3]++,null!==N&&T([1,1e3*t,e.id,e.priorityLevel])}function Z(e,t){V[0]=0,V[1]=0,V[3]--,null!==N&&T([2,1e3*t,e.id])}function R(e,t){H++,V[0]=e.priorityLevel,V[1]=e.id,V[2]=H,null!==N&&T([5,1e3*t,e.id,H])}function B(e,t){V[0]=0,V[1]=0,V[2]=0,null!==N&&T([6,1e3*t,e.id,H])}var P=[],F=[],U=1,q=null,W=3,Q=!1,G=!1,K=!1;function Y(e){for(var t=x(F);null!==t;){if(null===t.callback)k(F);else{if(!(t.startTime<=e))return;k(F),t.sortIndex=t.expirationTime,A(P,t),j(t,e),t.isQueued=!0}t=x(F)}}function X(e){if(K=!1,Y(e),!G)if(null!==x(P))G=!0,t(J);else{var r=x(F);null!==r&&n(X,r.startTime-e)}}function J(t,o){var a;a=o,null!==N&&T([8,1e3*a,_]),G=!1,K&&(K=!1,r()),Q=!0;var l=W;try{try{return function(t,r){var o=r;for(Y(o),q=x(P);null!==q&&(!(q.expirationTime>o)||t&&!i());){var a=q.callback;if(null!==a){q.callback=null,W=q.priorityLevel;var l=q.expirationTime<=o;R(q,o);var c=a(l);o=e.unstable_now(),"function"==typeof c?(q.callback=c,B(q,o)):(Z(q,o),q.isQueued=!1,q===x(P)&&k(P)),Y(o)}else k(P);q=x(P)}if(null!==q)return!0;var s=x(F);return null!==s&&n(X,s.startTime-o),!1}(t,o)}catch(t){if(null!==q){var c=e.unstable_now();!function(e,t){V[0]=0,V[1]=0,V[3]--,null!==N&&T([3,1e3*t,e.id])}(q,c),q.isQueued=!1}throw t}}finally{q=null,W=l,Q=!1,function(e){_++,null!==N&&T([7,1e3*e,_])}(e.unstable_now())}}function $(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var ee=o,te={startLoggingProfilingEvents:function(){O=131072,z=new ArrayBuffer(4*O),N=new Int32Array(z),I=0},stopLoggingProfilingEvents:D,sharedProfilingBuffer:S};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=te,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.isQueued&&(function(e,t){V[3]--,null!==N&&T([4,1e3*t,e.id])}(t,e.unstable_now()),t.isQueued=!1),t.callback=null},e.unstable_continueExecution=function(){G||Q||(G=!0,t(J))},e.unstable_getCurrentPriorityLevel=function(){return W},e.unstable_getFirstCallbackNode=function(){return x(P)},e.unstable_next=function(e){var t;switch(W){case 1:case 2:case 3:t=3;break;default:t=W}var n=W;W=t;try{return e()}finally{W=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=ee,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=W;W=e;try{return t()}finally{W=n}},e.unstable_scheduleCallback=function(i,o,a){var l,c,s=e.unstable_now();if("object"==typeof a&&null!==a){var d=a.delay;l="number"==typeof d&&d>0?s+d:s,c="number"==typeof a.timeout?a.timeout:$(i)}else c=$(i),l=s;var u=l+c,f={id:U++,callback:o,priorityLevel:i,startTime:l,expirationTime:u,sortIndex:-1,isQueued:!1};return l>s?(f.sortIndex=l,A(F,f),null===x(P)&&f===x(F)&&(K?r():K=!0,n(X,l-s))):(f.sortIndex=u,A(P,f),j(f,s),f.isQueued=!0,G||Q||(G=!0,t(J))),f},e.unstable_shouldYield=function(){var t=e.unstable_now();Y(t);var n=x(P);return n!==q&&null!==q&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<q.expirationTime||i()},e.unstable_wrapCallback=function(e){var t=W;return function(){var n=W;W=t;try{return e.apply(this,arguments)}finally{W=n}}}}()),cg;var e}var dg=(lg||(lg=1,"production"===process.env.NODE_ENV?ig.exports=(rg||(rg=1,function(e){var t,n,r,i,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,c=function(){if(null!==a)try{var t=e.unstable_now();a(!0,t),a=null}catch(e){throw setTimeout(c,0),e}},s=Date.now();e.unstable_now=function(){return Date.now()-s},t=function(e){null!==a?setTimeout(t,0,e):(a=e,setTimeout(c,0))},n=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},i=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var d=window.performance,u=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)e.unstable_now=function(){return d.now()};else{var m=u.now();e.unstable_now=function(){return u.now()-m}}var C=!1,g=null,v=-1,y=5,w=0;i=function(){return e.unstable_now()>=w},o=function(){},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):y=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,E=b.port2;b.port1.onmessage=function(){if(null!==g){var t=e.unstable_now();w=t+y;try{g(!0,t)?E.postMessage(null):(C=!1,g=null)}catch(e){throw E.postMessage(null),e}}else C=!1},t=function(e){g=e,C||(C=!0,E.postMessage(null))},n=function(t,n){v=f(function(){t(e.unstable_now())},n)},r=function(){h(v),v=-1}}function M(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],l=o+1,c=e[l];if(void 0!==a&&0>k(a,n))void 0!==c&&0>k(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>k(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var L=[],H=[],_=1,S=null,V=3,O=!1,z=!1,N=!1;function I(e){for(var t=A(H);null!==t;){if(null===t.callback)x(H);else{if(!(t.startTime<=e))break;x(H),t.sortIndex=t.expirationTime,M(L,t)}t=A(H)}}function T(e){if(N=!1,I(e),!z)if(null!==A(L))z=!0,t(D);else{var r=A(H);null!==r&&n(T,r.startTime-e)}}function D(t,o){z=!1,N&&(N=!1,r()),O=!0;var a=V;try{for(I(o),S=A(L);null!==S&&(!(S.expirationTime>o)||t&&!i());){var l=S.callback;if(null!==l){S.callback=null,V=S.priorityLevel;var c=l(S.expirationTime<=o);o=e.unstable_now(),"function"==typeof c?S.callback=c:S===A(L)&&x(L),I(o)}else x(L);S=A(L)}if(null!==S)var s=!0;else{var d=A(H);null!==d&&n(T,d.startTime-o),s=!1}return s}finally{S=null,V=a,O=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Z=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){z||O||(z=!0,t(D))},e.unstable_getCurrentPriorityLevel=function(){return V},e.unstable_getFirstCallbackNode=function(){return A(L)},e.unstable_next=function(e){switch(V){case 1:case 2:case 3:var t=3;break;default:t=V}var n=V;V=t;try{return e()}finally{V=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Z,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=V;V=e;try{return t()}finally{V=n}},e.unstable_scheduleCallback=function(i,o,a){var l=e.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?l+c:l,a="number"==typeof a.timeout?a.timeout:j(i)}else a=j(i),c=l;return i={id:_++,callback:o,priorityLevel:i,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>l?(i.sortIndex=c,M(H,i),null===A(L)&&i===A(H)&&(N?r():N=!0,n(T,c-l))):(i.sortIndex=a,M(L,i),z||O||(z=!0,t(D))),i},e.unstable_shouldYield=function(){var t=e.unstable_now();I(t);var n=A(L);return n!==S&&null!==S&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<S.expirationTime||i()},e.unstable_wrapCallback=function(e){var t=V;return function(){var n=V;V=t;try{return e.apply(this,arguments)}finally{V=n}}}}(og)),og):ig.exports=sg()),ig.exports);const ug=Symbol(),fg=Symbol(),hg="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,pg=dg.unstable_runWithPriority?e=>{try{dg.unstable_runWithPriority(dg.unstable_NormalPriority,e)}catch(t){if("Not implemented."!==t.message)throw t;e()}}:e=>e();function mg(e,t){const n=d(e)[ug];if("object"==typeof process&&"production"!==process.env.NODE_ENV&&!n)throw new Error("useContextSelector requires special context");const{v:{current:r},n:{current:i},l:o}=n,a=t(r),[l,c]=v((e,n)=>{if(!n)return[r,a];if("p"in n)throw n.p;if(n.n===i)return Object.is(e[1],a)?e:[r,a];try{if("v"in n){if(Object.is(e[0],n.v))return e;const r=t(n.v);return Object.is(e[1],r)?e:[n.v,r]}}catch(e){}return[...e]},[r,a]);return Object.is(l[1],a)||c(),hg(()=>(o.add(c),()=>{o.delete(c)}),[o]),l[1]}const Cg=function(e){const t=c({[ug]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[fg]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=a(e),i=a(0),[o,l]=s(null);o&&(o(e),l(null));const c=a();if(!c.current){const e=new Set,t=(t,n)=>{i.current+=1;const r={n:i.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{l(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()};c.current={[ug]:{v:r,n:i,l:e,u:t}}}return hg(()=>{r.current=e,i.current+=1,pg(()=>{c.current[ug].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),m(n,{value:c.current},t)}),delete t.Consumer,t}([tg,()=>{}]),gg=({children:t,useTableRef:n,totalWidth:r})=>{const i=a(null);return l(()=>{n&&i.current&&n(i)},[n]),e("table",{className:"ff-spreadsheet-table",ref:i,style:{minWidth:`${60+r}px`,tableLayout:"fixed"},children:t})},vg=t=>e("tr",{...t}),yg=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function wg(){return mg(Cg,([,e])=>e)}function bg(e){return mg(Cg,([t])=>e(t))}const Eg=({selected:t,onSelect:n})=>{const i=r.useCallback(()=>{n()},[n]);return e("th",{className:"ff-spreadsheet-corner-header",onClick:i,tabIndex:0,children:e("div",{className:z("corner-header",{"ff-spreadsheet-header--selected":t}),children:e(P,{variant:t?"dark":"light",color:t?"var(--hover-color)":"var(--text-color)",name:"excel_corner_menu"})})})},Mg=t=>function(n){const i=wg(),o=r.useCallback(()=>i({type:mp}),[i]),a=bg(e=>e.selected instanceof Ym);return e(t,{...n,selected:a,onSelect:o})},Ag=t=>function(n){const i=wg(),o=r.useCallback((e,t)=>i(function(e,t){return{type:pp,payload:{column:e,extend:t}}}(e,t)),[i]),a=bg(e=>e.selected.hasEntireColumn(n.column)),l=bg(e=>e.selectedColumn??void 0),c=bg(e=>e.active?zm(e.active,e.model.data):void 0);return e(t,{...n,cell:c,selected:a,selectedColumn:l,onSelect:o,scrollToColumn:n.scrollToColumn})},xg=Ag(({column:t,label:i,selected:o,onSelect:a,setContextMenu:l,deleteColumn:c,addColumnLeft:s,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:p,minimumColumnWidth:m,maxColLimit:C,disableDeleteOption:g,contextMenu:v,onAddColumn:y,onDeleteColumn:w,setVisibleRange:b,scrollToColumn:E})=>{const M=wg(),A=bg(e=>e.model.data),x=bg(e=>e.active),k=m,L=bg(e=>e.columnDimensions[t]?.width||k),H=bg(e=>e.model.data),{columnCount:_}=xC(H),S=r.useRef(A),V=r.useCallback(()=>{if(x){S.current?.[x.row]?.[x.column]!==bC&&S.current?.[0]?.length===A?.[0]?.length||(S.current=A);const e=S.current?.[x.row]?.[x.column]?.value,t=A?.[x.row]?.[x.column]?.value;return e===t}return!1},[x,A,S,bC]),O=e=>{b(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return p&&E(p),n})},N=h(()=>{const e=f?.contextDisable?.["Delete Column"]&&V();return[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{O("increment"),s(k),y?.(p??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:_>=C},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{O("increment"),d(k),y?.(p??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:_>=C},...g?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{O("decrement"),c(),w?.(p??t)},disableTooltip:"",visible:!!e,disable:!1}]]},[p,f,s,d,c,k,_,C,g,y,w,t,V]),I=r.useCallback((e,n)=>{const r=n?t-1:t,i=Math.max(r,0);a(i,e.shiftKey);const o=e.clientX,l=L,c=e=>{const t=Math.max(k,l+(e.clientX-o));M(nm(i,t))},s=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),M(_m())};document.addEventListener("mousemove",c),document.addEventListener("mouseup",s),M(Hm())},[t,L]),T=r.useCallback(e=>M(Mm(e)),[M]),D=r.useCallback(e=>{a(t,e.shiftKey)},[a,t]),j=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"column",options:N})},[t,p,u,N]);return r.useEffect(()=>{void 0!==p&&"column"===v?.contextType&&l(e=>({open:e.open,contextType:"column",options:N}))},[t,p,u,N,"column"===v?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{minWidth:`${L}px`},onClick:D,onContextMenu:j,tabIndex:0,children:[e(F,{fontWeight:"medium",children:i??kg(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>I(e,!1),onDoubleClick:()=>M(nm(t,k)),onClick:()=>T({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>I(e,!0),onDoubleClick:()=>M(nm(t,k)),onClick:()=>T({row:-1,column:t})})]},t)});function kg(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const Lg=({row:t,label:i,selected:o,onSelect:a,setContextMenu:l,addRowTop:c,addRowBottom:s,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:p,disableDeleteOption:m,contextMenu:C,setVisibleRange:g,scrollToRow:v})=>{const y=wg(),w=bg(e=>e.rowDimensions[t]?.height||32),b=bg(e=>e.model.data),{rowCount:E}=xC(b),M=e=>{g(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return f&&v(f),n})},A=r.useMemo(()=>[{label:"Add Row Top",value:"Add Row Top",iconName:"plus_icon",action:()=>{M("increment"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Top"]??!1,disable:E>=p},{label:"Add Row Bottom",value:"Add Row Bottom",iconName:"plus_icon",action:()=>{M("increment"),s()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:E>=p},...m?[]:[{label:"Delete Row",value:"Delete Row",iconName:"delete",action:()=>{M("decrement"),d()},disableTooltip:"",visible:h?.contextDisable?.["Delete Row"]??!1,disable:!1}]],[f,t]),x=r.useCallback((e,n)=>{const r=n?t:t-1,i=Math.max(r,0);a(i,e.shiftKey);const o=e.clientY,l=w,c=e=>{const t=Math.max(32,l+(e.clientY-o));y(tm(i,t))},s=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),y(_m())};document.addEventListener("mousemove",c),document.addEventListener("mouseup",s),y(_m())},[w,t]),k=r.useCallback(e=>y(Mm(e)),[y]),L=r.useCallback(e=>{a(t,e.shiftKey)},[t]),H=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"row",options:A})},[t,u,A,f]);return r.useEffect(()=>{void 0!==f&&"row"===C?.contextType&&l(e=>({open:e.open,contextType:"row",options:A}))},[t,u,A,f,"row"===C?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{height:`${w}px`,minWidth:"60px"},onClick:L,onContextMenu:H,tabIndex:0,children:[e(F,{fontWeight:"medium",children:void 0!==i?i:t+1}),e("div",{className:"drag-row-selector drag-row-down",onMouseDown:e=>x(e,!0),onDoubleClick:()=>y(tm(t,32)),onClick:()=>k({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>x(e,!1),onDoubleClick:()=>y(tm(t,32)),onClick:()=>k({row:t,column:-1})})]})},Hg=t=>function(n){const i=wg(),o=bg(e=>e.selected.hasEntireRow(n.row)),a=bg(e=>e.active?zm(e.active,e.model.data):void 0),l=bg(e=>e.selectedRow??void 0),c=r.useCallback((e,t)=>i(function(e,t){return{type:hp,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:o,cell:a,selectedRow:l,onSelect:c,scrollToRow:n.scrollToRow})},_g=({row:t,column:n,DataViewer:i,active:o,dragging:a,mode:l,data:c,evaluatedData:s,select:d,activate:u,setCellDimensions:f,setCellData:h,editable:p})=>{const m=r.useRef(null),C=r.useMemo(()=>({row:t,column:n}),[t,n]),g=r.useCallback(e=>{e.preventDefault(),p&&"view"===l&&(f(C,aC(e.currentTarget)),e.shiftKey?d(C):u(C))},[l,f,C,d,u]),v=r.useCallback(e=>{a&&(f(C,aC(e.currentTarget)),d(C))},[f,d,a,C]);return r.useEffect(()=>{const e=m.current;if(!e)return;const t=()=>{f(C,aC(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[f,C]),c&&c.DataViewer&&(i=c.DataViewer),e("td",{ref:m,style:{...c?.style,..."dropDown"===c?.inputType?.type&&{fontSize:"12px"}},className:z("ff-spreadsheet-cell",c?.className,{"ff-spreadsheet-active-cell":o||a}),onMouseEnter:v,onMouseDown:g,tabIndex:0,children:e(i,{row:t,column:n,cell:c,active:o,evaluatedCell:s,setCellData:h,inputValue:()=>null})})},Sg=t=>function(n){const{row:i,column:o}=n,a=wg(),l=r.useMemo(()=>({row:i,column:o}),[i,o]),c=r.useCallback(e=>a(Am(l,e)),[a,l]),s=r.useCallback(e=>a(function(e){return{type:gp,payload:{point:e}}}(e)),[a]),d=r.useCallback(e=>a(Mm(e)),[a]),u=r.useCallback((e,t)=>a(xm(e,t)),[a]),f=bg(e=>oC(e.active,l)),h=bg(e=>f?e.mode:"view"),p=bg(e=>zm(l,e.model.data)),m=bg(e=>zm(l,e.model.evaluatedData)),C=bg(e=>e.dragging),g=bg(e=>e.copied?.has(l)||!1);return e(t,{...n,active:f,copied:g,dragging:C,mode:h,evaluatedData:m,data:p,select:s,activate:d,setCellDimensions:u,setCellData:c})},Vg=({cell:r,evaluatedCell:i,active:o})=>{const a=function(e,t){const n=t?.value??e?.value;if(n&&"object"==typeof n)return n.toString();return n}(r,i);return e("span","boolean"==typeof a?{className:"ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean",children:Og(a)}:{className:z("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":vC(a)}),children:o||"dropDown"!==r?.inputType?.type?o||"file"!==r?.inputType?.type?!o&&a:e(t,{children:G(r?.value)?n("div",{className:"ff-spreadsheet-data-viewer--without-fileType",children:[e(P,{name:"attachment_icon"})," Attachment"]}):(n=>{if(G(n))return e(t,{});return JSON.parse(n).map(t=>e("div",{className:"ff-spreadsheet-data-viewer--fileType",children:e(an,{width:r?.style?.width??100,title:t?.name?.split("*")?.[0]??""})},t.name))})(a)}):n("div",{className:"ff-spreadsheet-data-viewer--dropdownType",children:[a,e(P,{name:"arrow_down",height:8,className:"dropdownType-icon"})]})})};function Og(e){return e?"TRUE":"FALSE"}const zg=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:o={}},c)=>{const s=a(null);i.useImperativeHandle(c,()=>s.current),l(()=>{s.current&&t!==s.current.innerText&&(s.current.innerText=t)},[t]);const d=()=>{if(s.current){const e=s.current.innerText;n?.(e)}};return e("div",{style:o,children:e("div",{ref:s,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),document.execCommand("insertLineBreak"),void d();s.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:d,onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),n=window.getSelection();if(!n||!n.rangeCount)return;const r=n.getRangeAt(0);r.deleteContents();const i=document.createTextNode(t);r.insertNode(i),r.setStartAfter(i),r.collapse(!0),n.removeAllRanges(),n.addRange(r),d()},spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{outline:"none",transition:"border 0.2s",whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"inherit",fontSize:"inherit",lineHeight:"normal",minHeight:"32px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),Ng=({onChange:t,cell:n})=>{const i=r.useRef(null),o=r.useCallback(e=>{t({...n,value:e,style:n?.style,inputType:n?.inputType??{type:"text"}})},[t,n]);r.useEffect(()=>{i.current&&function(e){if(e)if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.selectionStart=e.selectionEnd=e.value.length;else if(e.isContentEditable){const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)}}(i.current)},[]);return e("div",{className:"ff-spreadsheet-data-editor",children:e(zg,{ref:i,initialValue:n?.value??"",onChange:o,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},Ig=t=>{const i=r.useRef(null),o=r.useRef(null),a=wg(),l=r.useCallback((e,t)=>a(Am(e,t)),[a]),c=r.useCallback(e=>a(Mm(e)),[a]),s=r.useCallback(()=>a({type:Ap}),[a]),d=r.useCallback(e=>a({type:Yp,payload:{autofill:e}}),[a]),u=r.useCallback(e=>a(function(e){return{type:Vp,payload:{changes:e}}}(e)),[a]),f=r.useCallback(()=>{a({type:xp})},[a]),h=bg(e=>e.rowDimensions),p=bg(e=>e.active),m=bg(e=>e.mode),C=bg(e=>e.active?zm(e.active,e.model.data):void 0),g=bg(e=>e.selected),v=bg(e=>g&&pC(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),y=bg(e=>{let t=p?fC(p,e.rowDimensions,e.columnDimensions):void 0;return t={top:t?.top?t?.top:0,height:t?.height?t?.height:0,left:t?.left?t?.left:0,width:t?.width?t?.width:0},t}),w=r.useMemo(()=>!p||!y||p.row<t.visibleRowRange.start||p.row>=t.visibleRowRange.end||p.column<t.visibleColRange.start||p.column>=t.visibleColRange.end,[p,y,t.visibleRowRange,t.visibleColRange]),b=r.useRef(void 0),E=r.useRef(null),M=r.useRef(void 0),A=r.useCallback(e=>{p&&l(p,e)},[l,p]),[x,k]=r.useState({value:"",name:""}),[L,H]=r.useState(!1),[_,S]=r.useState(),[V,O]=r.useState([]);r.useEffect(()=>{C&&p&&t.getActiveCell({value:C.value,active:p});const n=i.current;if(!w&&n){if(n.focus({preventScroll:!0}),"file"===C?.inputType?.type&&C?.value)try{const e=JSON.parse(C.value).map(e=>new File([new Blob],e.name.split("*")[0]??"default"));O(e)}catch(e){console.error("Error parsing cell value for files:",e),O([])}else O([]);if("dropDown"===C?.inputType?.type){k({value:C?.value,name:C?.value}),H(e=>!e);const t=C?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value}));S(t)}}},[i,w,p]),r.useEffect(()=>{const e=E.current,t=M.current;if(E.current=p,M.current=C,!e||!t)return;const n=p?.row!==e.row||p?.column!==e.column;if(n||"edit"!==m){const e=b.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||C===t||u([{prevCell:t,nextCell:C||null}]),b.current=C}});const N=C&&C.DataEditor||t.DataEditor,I=C&&C.readOnly,T=r.useCallback(e=>{p&&(e.preventDefault(),d(!0))},[c,d,p]),D=r.useCallback(e=>{e.preventDefault(),t.setContextMenu({open:t.contextOption?.open??!1,contextType:t.contextOption?.contextType??null,options:t.contextOption?.options||[]})},[t]),j=v?.height!==y?.height||v?.width!==y?.width,Z=r.useCallback(e=>{p&&j&&(xm(p,aC(e.currentTarget)),c(p))},[p,j]),R=t.isAtRight?t.maxWidth-(y?.left-t.scrollPos.left)+100:t.maxWidth,B=t.isAtBottom?t.maxHeight-(y?.top-t.scrollPos.top)+64:t.maxHeight;return n("div",{ref:i,className:z("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${m}`,{"ff-spreadsheet-active-cell--hidden":w,"ff-spreadsheet-active-cell--dragging":j&&"text"!==C?.inputType?.type}),onMouseDown:Z,style:{...y,backgroundColor:C?.style?.backgroundColor,...["file","dropDown"].includes(C?.inputType?.type||"")?{display:"flex",alignItems:C?.style?.alignContent,justifyContent:C?.style?.textAlign}:{},..."edit"===m&&p?{padding:"2px 4px 0px 4px",minWidth:Math.min(y?.width,t.maxWidth),minHeight:Math.min(y?.height,t.maxHeight),height:"auto",width:"max-content",maxWidth:`${R}px`,maxHeight:`${B}px`,overflow:"auto"}:{}},onContextMenu:D,onClick:"view"!==m||I?void 0:s,tabIndex:0,children:[e("div",{className:"active-cell-main",children:"dropDown"===C?.inputType?.type?e(ir,{...C?.inputType?.inputProps,dropDownRef:o,showOptions:{open:!("edit"!==m||!p),toggle:L},selectedOption:x,optionsList:_||[],height:26,showLabel:!1,showBorder:!1,optionZIndex:5e3,onChange:e=>{k({value:e.value,name:e.label}),A({...C,value:e.value,style:C?.style,inputType:C?.inputType})}}):"file"===C?.inputType?.type?e(rp,{...C?.inputType?.inputProps,label:"",onFileListClick:e=>{const n=e.target.closest(".ff-attachment-files"),r=e.target.closest(".ff-icon-container, .ff-icon-click, .ff-icon-danger");if(n&&!r&&C?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(C.value),r=n.parentElement?.querySelectorAll(".ff-attachment-files")||[],i=Array.from(r).indexOf(n);if(-1===i||!e[i])return void console.error("File index not found or invalid");const o=e[i];t.attachmentAction.viewAttachment(o.id,o.name?.split("*")[0]??"default")}catch(e){console.error("Error parsing cell value:",e)}else console.warn("Missing file element, icon click, cell value, or viewAttachment action")},selectedFiles:V,onFilesChange:async(e,n,r)=>{try{if("ADD"===r&&"file"===C?.inputType?.type){let n=[];try{C?.value&&(n=JSON.parse(C.value))}catch(e){console.error("Error parsing cell.value:",e)}let r=0;const i=e.filter((e,t,i)=>{const o=e.name.split("*")[0],a=i.findIndex(e=>e.name.split("*")[0]===o)!==t,l=n.some(e=>e.name.split("*")[0]===o);return!a&&!l||(r++,!1)});if(n.length+i.length>5)return void Zc.info("Cannot upload more than 5 files.");if(t.attachmentAction?.addAttachment&&i.length>0)try{let e=0,r=0,o=0;const l=V?.length+i?.length,c=l>0?25*l:1,s=[...n],d=i?.map(async e=>{try{if(e.name.includes("*"))return{file:e,status:"existing",data:{name:e.name}};const n=await(t?.attachmentAction?.addAttachment(e));if(!n||"string"==typeof n&&0===n.trim().length)return{file:e,status:"failed",reason:"no response"};if("string"==typeof n)try{const t=JSON.parse(n);return 507===t.responseCode?{file:e,status:"memory_full",reason:"no memory"}:400===t.responseCode?{file:e,status:"failed",reason:"invalid file"}:t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,t),{file:e,status:"failed",reason:"invalid response"})}catch(t){return console.error(`Parse error for ${e.name}:`,t),{file:e,status:"failed",reason:"parse error"}}if("object"==typeof n&&null!==n){const t=n;return t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,n),{file:e,status:"failed",reason:"invalid response"})}return console.error(`Unknown response for ${e.name}:`,n),{file:e,status:"failed",reason:"unknown"}}catch(t){return console.error(`Upload failed for ${e.name}:`,t),{file:e,status:"failed",reason:"upload error"}}});if((await Promise.allSettled(d)).forEach(t=>{if("fulfilled"===t.status&&t.value){const{status:n,data:i}=t.value;"success"===n&&i?.id&&i?.name?(s.push(i),e++):"existing"===n&&i?.name?s.push(i):"memory_full"===n?o++:r++}else r++}),e>0||s.length>n.length){const e=s.length>0?JSON.stringify(s):"";A({...C,value:e,style:C?.style,inputType:C?.inputType}),a(tm(p?.row||0,Math.max(c,h?.[p.row]?.height||c))),O(s.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}o>0&&Zc.info("No memory available to add the file"),e>0&&Zc.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&Zc.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),Zc.error("Operation failed")}}else if("DELETE"===r&&"file"===C?.inputType?.type)try{let e=[...C&&JSON.parse(C.value)],r=0;for(const i of n||[]){const n=e.findIndex(e=>e.name.split("*")[0]===i.name.split("*")[0]),o=e[n]?.id;if(-1!==n&&o&&t.attachmentAction?.deleteAttachment)try{const a=await t.attachmentAction.deleteAttachment(o);"SUCCESS"===a||"object"==typeof a&&null!==a&&("status"in a&&"SUCCESS"===a.status||"responseCode"in a&&200===a.responseCode)?(e.splice(n,1),r++):console.error(`Delete failed for ${i.name}: Invalid response`,a)}catch(e){console.error(`Delete error for ${i.name}:`,e),Zc.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:o,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),Zc.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";A({...C,value:t,style:C?.style,inputType:C?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),Zc.success(`${r} file${r>1?"s":""} deleted successfully`)}else if(n?.length){const t=e?.filter(e=>e.id&&e.name);if(t.length<e.length){const e=t.length>0?JSON.stringify(t):"";A({...C,value:e,style:C?.style,inputType:C?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),Zc.error("Failed to delete file(s). Invalid file data detected.")}else Zc.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),Zc.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),Zc.error("Operation failed")}},disabled:!1,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:!0,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:!0,isInfoIconRequired:!1,truncateMaxLimit:(y?.width??0)-60}):"edit"===m&&p?e(N,{row:p.row,column:p.column,cell:C,onChange:A,exitEditMode:f}):e(zg,{initialValue:C?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...C?.style,textDecoration:"underline"===C?.style?.textDecoration?"underline":"none",backgroundColor:j?"#1e161f00":C?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(C?.inputType?.type??"")&&("edit"===m||p&&e("div",{onMouseDown:T,className:"select_dot"}))]})},Tg=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const o=bg(e=>e.active),a=bg(e=>e.autoFill),l=bg(e=>o?fC(o,e.rowDimensions,e.columnDimensions):void 0),{width:c,height:s,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,p=c,m=s;return a.open&&c&&s&&l&&(c-h>s-f?(p=c,m=l.height):(m=s,p=l.width)),e("div",{className:z("ff-spreadsheet-floating-rect",{[`ff-spreadsheet-floating-rect--${i}`]:i,"ff-spreadsheet-floating-rect--dragging":n,"ff-spreadsheet-floating-rect--hidden":r}),style:{width:(p??0)+1,height:(m??0)+1,top:d,left:u}})},Dg=({scrollPos:t={top:0,left:0}})=>{const n=bg(e=>e.selected),i=bg(e=>e.dragging),o=bg(e=>e.selected.size(e.model.data)<2),a=bg(e=>n&&pC(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(a)return{...a,top:a.top,left:a.left,height:a.height-1,width:a.width-1}},[a,t]);return e(Tg,{variant:"selected",dimensions:l,dragging:i,hidden:o||!a})},jg=({scrollPos:t={top:0,left:0}})=>{const n=bg(e=>e.copied),i=null===n,o=bg(e=>n&&hC(e.rowDimensions,e.columnDimensions,n)),a=r.useMemo(()=>{if(o)return{...o,top:o.top,left:o.left,height:o.height-1,width:o.width-1}},[o,t]);return e(Tg,{variant:"copied",dimensions:a,hidden:i||!o,dragging:!1})},Zg=({getColorValue:t,disabled:n,initialColor:r})=>{const i=a(null),[o,l]=s(r);return e("div",{className:z("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:o},onClick:()=>{i.current&&!n&&i.current.click()},children:e("input",{type:"color",disabled:n,className:z("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:i,onChange:e=>{l(e.target.value),t(e.target.value.replace("#",""))}})})},Rg=e=>{switch(e.toUpperCase()){case"LEFT":default:return"left";case"RIGHT":return"right";case"CENTER":return"center";case"JUSTIFY":return"justify";case"BOTTOM":return"end";case"TOP":return"start"}},Bg=e=>{switch(e){case"left":return"LEFT";case"right":return"RIGHT";case"center":return"CENTER";case"justify":return"JUSTIFY";case"end":default:return"BOTTOM";case"start":return"TOP"}},Pg=e=>MC.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function Fg(e){const{border:t}=e;let n="",r="",i="",o="";return"THIN"!==t.top&&(n="MEDIUM"===t.top?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.right&&(r="MEDIUM"===t.right?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.bottom&&(i="MEDIUM"===t.bottom?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.left&&(o="MEDIUM"===t.left?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),{fontSize:yC(Pg(String(e.size))),fontFamily:(a=e.name,EC.some(e=>e.label===a)?a:"Poppins"),color:`#${e.color}`,backgroundColor:`#${e.backgroundColor}`,fontWeight:e.bold?"bold":"normal",fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":"normal",borderTop:n,borderRight:r,borderBottom:i,borderLeft:o,textAlign:Rg(e.alignment.horizontal),alignContent:Rg(e.alignment.vertical)};var a}const Ug=e=>{if(!e||"none"===e)return"THIN";if(e.includes("solid")||e.includes("dashed")||e.includes("dotted")){if(e.includes("2px")||e.includes("medium"))return"MEDIUM";if(e.includes("3px")||e.includes("medium"))return"THICK"}return"THIN"},qg=e=>({name:e.fontFamily||"Arial",size:wC(e.fontSize?.toString()||"12"),bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,underline:"underline"===e.textDecoration,color:e.color?.replace("#","")||"000000",backgroundColor:e.backgroundColor?.replace("#","")||"FFFFFF",borderColor:"F2F2F2",border:{top:Ug(e.borderTop?e.borderTop.toString():void 0),right:Ug(e.borderRight?e.borderRight.toString():void 0),bottom:Ug(e.borderBottom?e.borderBottom.toString():void 0),left:Ug(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:Bg(e.textAlign),vertical:Bg(e.alignContent),wrapText:!1}}),Wg=({toolbar:t="show",editable:r,onBold:i,onItalic:o,setUnderlineType:c,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:p,setBorderType:m,setFormatePainter:C})=>{const g=bg(e=>e.selected instanceof Ym),[v,y]=s("disable"===t||!r),w=bg(e=>e.active?zm(e.active,e.model.data):null),b=bg(e=>e.model.data),E=bg(e=>e.formattedStyle.open),M={...bC.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[A,x]=s(w?.style||M),k=a(null);l(()=>{w?.style&&JSON.stringify(w.style)!==JSON.stringify(A)&&x(w?.style||M),g?y(!1):w&&"boolean"==typeof w.readOnly&&y(w.readOnly||"disable"===t||!r||"dropDown"===w?.inputType?.type)},[w]);const L=qg(A),[H,_]=s("border-none"),[S,V]=s({label:"",value:""}),[O,z]=s({label:"",value:""}),[N,I]=s({color:M.color,backgroundColor:M.backgroundColor,borderColor:M.borderColor}),T=[{value:"border-all-sides",label:"All Border",icon:"all_borders"},{value:"border-bottom",label:"Border Bottom",icon:"border_bottom"},{value:"border-left",label:"Border Left",icon:"border_left"},{value:"border-right",label:"Border Right",icon:"border_right"},{value:"border-top",label:"Border Top",icon:"border_top"},{value:"border-none",label:"No Border",icon:"no_border"}],D=MC.map(e=>({label:e,value:e}));l(()=>{let e=setTimeout(()=>{d(b,N.color)},0);return()=>{clearTimeout(e)}},[N.color]),l(()=>{let e=setTimeout(()=>{p(b,N.backgroundColor)},0);return()=>{clearTimeout(e)}},[N.backgroundColor]);return l(()=>{const e=A.fontFamily,t=`${wC(A.fontSize)}`;V({label:e??"Times New Roman",value:e??"Times New Roman"}),z({label:t??"11",value:t??"11"})},[A]),n("div",{className:"ff-excel-toolbar",children:[n("div",{className:"ff-excel-toolbar-font ",children:[e("div",{className:"ff-excel-toolbar-font-family",children:e(ir,{disabled:v,height:24,tooltip:!0,showToolTip:!0,showLabel:!1,optionZIndex:2e3,onChange:e=>{V({label:e.label,value:e.label}),f(b,e.value)},required:!1,optionsList:EC,selectedOption:S})}),e("div",{className:"ff-excel-toolbar-font-size",children:e(ir,{disabled:v,height:24,showLabel:!1,optionZIndex:2e3,required:!1,onChange:e=>{z({label:e.label,value:e.value}),u(b,e.value)},optionsList:D,selectedOption:O})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon",children:[e(K,{placement:"top",title:"Text Left",children:e(P,{disabled:v,variant:"left"===A.textAlign?"dark":"light",hoverEffect:"left"!==A.textAlign,onClick:()=>h(b,"left"),name:"text_align_left"})}),e(K,{placement:"top",title:"Text Center",children:e(P,{disabled:v,variant:"center"===A.textAlign?"dark":"light",hoverEffect:"center"!==A.textAlign,onClick:()=>h(b,"center"),name:"text_align_center"})}),e(K,{placement:"top",title:"Text Right",children:e(P,{disabled:v,variant:"right"===A.textAlign?"dark":"light",hoverEffect:"right"!==A.textAlign,onClick:()=>h(b,"right"),name:"text_align_right"})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-text",children:[e(K,{placement:"top",title:"Bold",children:e(P,{disabled:v,variant:L.bold?"dark":"light",hoverEffect:!L.bold,onClick:()=>i(b),name:"bold"})}),e(K,{placement:"top",title:"Italic",children:e(P,{disabled:v,variant:L.italic?"dark":"light",hoverEffect:!L.italic,onClick:()=>o(b),name:"italic"})}),e(K,{placement:"top",title:"Underline",children:e("div",{className:"ff-excel-toolbar-icon-underline",children:e(P,{disabled:v,variant:"underline"===A.textDecoration?"dark":"light",hoverEffect:"underline"!==A.textDecoration,onClick:()=>c(b),name:"underline"})})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon",children:[e(K,{placement:"top",title:"Format Painter",children:e(P,{disabled:v,variant:E?"dark":"light",hoverEffect:!E,onClick:()=>{C(b)},name:"formate_painter"})}),e(K,{placement:"top",title:"Text Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(P,{disabled:v,hoverEffect:!0,width:12,height:12,onClick:()=>{d(b,N.color)},name:"text_color"}),e(Zg,{disabled:v,getColorValue:e=>{I(t=>({...t,color:e}))},initialColor:N.color})]})}),e(K,{placement:"top",title:"Background Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(P,{disabled:v,hoverEffect:!0,width:12,height:12,onClick:()=>p(b,N.backgroundColor),name:"fill_color"}),e(Zg,{disabled:v,getColorValue:e=>{I(t=>({...t,backgroundColor:e}))},initialColor:N.backgroundColor})]})})]}),e("div",{className:"ff-excel-toolbar-divider"}),e("div",{className:"ff-excel-toolbar-menu",children:n("div",{className:"ff-excel-toolbar-menu-option",children:[e(K,{placement:"top",title:"Border Type",children:e(P,{hoverEffect:!0,disabled:v,onClick:()=>m(b,H,"var(--input-hover-border-color)"),name:(()=>{const e=T.find(e=>e.value===H);return e?e.icon:""})()})}),e("span",{ref:k,children:e(dr,{disabled:v,iconName:"arrow_down",targetRef:k,iconSize:12,zIndex:2e3,options:T,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;m(b,t,"var(--input-hover-border-color)"),_(t)}})})]})})]})},Qg=(e,t)=>{let n,r=null;const i=function(...i){const o=this;null===r||Date.now()-r>=t?(e.apply(o,i),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(o,i),r=Date.now()},t-(Date.now()-r)))};return i.cancel=()=>{n&&clearTimeout(n),n=null,r=null},i},Gg=r.forwardRef(function(t,i){const{className:o,columnLabels:a=[],rowLabels:l=[],toolbar:c,editable:s,onKeyDown:d,Table:u=gg,Row:f=vg,sheetHeight:h,HeaderRow:p=yg,DataEditor:m=Ng,DataViewer:C=Vg,onSelect:g=()=>{},onActivate:v=()=>{},onEvaluatedDataChange:y=()=>{},contextOption:w,attachmentAction:b,workRef:E,minimumColumnWidth:M,setContextMenu:A,maxRowLimit:x,maxColLimit:k,disableDeleteOption:L,contextMenu:H,getActiveCell:_,onAddColumn:S,onDeleteColumn:V}=t,O=t.minimumColumnWidth||100,N=r.useRef(!1),I=bg(e=>e.model.data),[T,D]=r.useState(!1),[j,Z]=r.useState(0),[R,B]=r.useState(0),[P,F]=r.useState({top:0,left:0}),[U,q]=r.useState(!1),[W,Q]=r.useState(!1),G=r.useMemo(()=>{const e=t.createFormulaParser||LC,n=new OC(e,t.data);return D(e=>!e),{...tg,model:n,selected:t.selected||tg.selected}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(ng,G),[Y,X]=K,J=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=Rm(e);return{rows:t?Math.max(i,t.length):i,columns:n?Math.max(r,n.length):r}}(Y.model.data,l,a),[Y.model.data,l,a]),[$,ee]=r.useState({start:0,end:Math.min(20,J.rows)}),[te,ne]=r.useState({start:0,end:Math.min(15,J.columns)}),re=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.rowDimensions[n]?.height||32;return t},[Y.rowDimensions,32]),ie=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.columnDimensions[n]?.width||O;return t},[Y.columnDimensions,O]),oe=re(J.rows),ae=ie(J.columns),le=re($.start),ce=oe-re($.end),se=ie(te.start),de=ae-ie(te.end),ue=Y.mode,fe=r.useRef(null),he=e=>r.useCallback((...t)=>X(e(...t)),[e]),pe=he(em),me=he(Vm),Ce=he(Sm),ge=he(Om),ve=he(km),ye=he(Lm),we=he(ym),be=he(Hm),Ee=he(_m),Me=he(wm),Ae=he(bm),xe=he(Em),ke=he(rm),Le=he(im),He=he(am),_e=he(sm),Se=he(lm),Ve=he(cm),Oe=he(om),ze=he(dm),Ne=he(um),Ie=he(fm),Te=he($p),De=he(hm),je=he(pm),Ze=he(mm),Re=he(Cm),Be=he(gm),Pe=he(vm);r.useImperativeHandle(i,()=>({removeSelect:ge}));const Fe=r.useRef(Y.active);r.useEffect(()=>{if(Y.active!==Fe.current)if(Y.active)v(Y.active);else{const e=E.current;e&&gC(e)&&document.activeElement&&document.activeElement.blur()}Fe.current=Y.active},[v,Y.active]);const Ue=r.useRef(Y.model.evaluatedData);r.useEffect(()=>{Y?.model?.evaluatedData!==Ue?.current&&y(Y?.model?.evaluatedData),Ue.current=Y.model.evaluatedData},[Y?.model?.evaluatedData,y]);const qe=r.useRef(Y.selected);r.useEffect(()=>{Y.selected.equals(qe.current)||t.selected&&Y.selected.equals(t.selected)||g(Y.selected),qe.current=Y.selected},[Y.selected,g,t.selected]);const We=r.useRef(t.selected);r.useEffect(()=>{t.selected&&We.current&&!t.selected.equals(We.current)&&xe(t.selected),We.current=t.selected},[t.selected,xe]);let Qe=r.useRef(t.data);r.useEffect(()=>{pe(s),t.data!==Qe.current&&Me(t.data),Qe.current=t.data},[t.data,Me,s]);const Ge=r.useRef(t.createFormulaParser);r.useEffect(()=>{t.createFormulaParser!==Ge.current&&t.createFormulaParser&&Ae(t.createFormulaParser),Ge.current=t.createFormulaParser},[t.createFormulaParser,Ae]);const Ke=r.useCallback(e=>{const{model:t,selected:n}=Y,{data:r}=t,i=n.toRange(r);if(i){!function(e,t){e.clipboardData?.setData(rC,t)}(e,mC(function(e,t,n){const r=[],i=t.column-e.column;for(let o=e.row;o<=t.row;o++){const a=o-e.row;r[a]=r[a]||Array(i);for(let i=e.column;i<=t.column;i++)r[a][i-e.column]=zm({row:o,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Ye=r.useCallback(e=>{CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),me())},[ue,Ke,me]),Xe=r.useCallback(e=>{CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),Ce())},[ue,Ke,Ce]),Je=r.useCallback(e=>{if(CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),e.clipboardData)){const t=function(e){return window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?e.clipboardData.getData(rC):""}(e);ve(t)}},[ue,ve]),$e=r.useCallback(e=>{e.persist();const t=e.ctrlKey||e.metaKey,n=e.key.toLowerCase();t&&"b"===n?(e.preventDefault(),ke(I)):t&&"i"===n?(e.preventDefault(),Le(I)):t&&"u"===n&&(e.preventDefault(),He(I)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==JC(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),ye(e))},[Y,d,ye]),et=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Te(Y.active)},[Y]),tt=r.useCallback(()=>{Ee(),window.getSelection()?.removeAllRanges(),document.removeEventListener("mouseup",tt)},[Ee]),nt=r.useCallback(e=>{Y.dragging||1!==e.buttons||(be(),document.addEventListener("mouseup",tt))},[Y,be,tt]),rt=r.useMemo(()=>Sg(t.Cell||_g),[t.Cell,T,s]),it=r.useMemo(()=>Mg(t.CornerIndicator||Eg),[t.CornerIndicator,T]),ot=r.useMemo(()=>Hg(t.RowIndicator||Lg),[t.RowIndicator,T]),at=r.useMemo(()=>Ag(t.ColumnIndicator||xg),[t.ColumnIndicator,T]);r.useEffect(()=>(document.addEventListener("cut",Ye),document.addEventListener("copy",Xe),document.addEventListener("paste",Je),()=>{document.removeEventListener("cut",Ye),document.removeEventListener("copy",Xe),document.removeEventListener("paste",Je)}),[Ye,Xe,Je]);const lt=e=>{const t=new ResizeObserver(e=>{const t=e[0];if(t&&fe.current){const e=t.target;if(e){const{clientWidth:t,clientHeight:n}=e;B(Math.min(fe.current.clientHeight,n)),Z(Math.min(fe.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},ct=r.useCallback(e=>{const t=e.target,{scrollTop:n,clientHeight:r,scrollLeft:i,clientWidth:o}=t;F({top:n,left:i});let a=0;for(;a<J.rows&&re(a)<n;)a++;let l=a;for(;l<J.rows&&re(l)<n+r;)l++;a=Math.max(0,a-10),l=Math.min(J.rows,l+10),ee({start:a,end:l});const c=l===J.rows;q(c);let s=0;for(;s<J.columns&&ie(s)<i;)s++;let d=s;for(;d<J.columns&&ie(d)<i+o;)d++;s=Math.max(0,s-10),d=Math.min(J.columns,d+10),ne({start:s,end:d});const u=d===J.columns;Q(u),H.open&&A({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},[J.rows,J.columns,re,ie]),st=r.useMemo(()=>Qg(ct,16),[ct]),dt=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.rowDimensions?.[n]?.height||32;requestAnimationFrame(()=>{fe.current&&e>=J.rows-1&&fe?.current?.scrollTo({top:t+32,behavior:"smooth"})})})},ut=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.columnDimensions?.[n]?.width||O;requestAnimationFrame(()=>{fe.current&&e>=J.columns-1&&fe.current.scrollTo({left:t+60,behavior:"smooth"})})})};r.useEffect(()=>{N.current||(ee({start:0,end:Math.min(20,J.rows)}),ne({start:0,end:Math.min(15,J.columns)}))},[J.rows,J.columns,N.current]);const ft=iC($.end,$.start),ht=iC(te.end,te.start),pt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${se}px`}},"left-spacer")," ",ht.map(t=>e("col",{style:{width:`${Y.columnDimensions[t]?.width||O}px`}},t)),e("col",{style:{width:`${de}px`}},"right-spacer")," "]}),mt=r.useMemo(()=>n(u,{useTableRef:lt,totalWidth:ae,children:[pt,n("tbody",{children:[n(p,{children:[e(it,{}),e("div",{className:"spacer left"}),ht.map(n=>e(at,{column:n,minimumColumnWidth:M,setContextMenu:t.setContextMenu,label:n in a?a[n]:void 0,deleteColumn:Pe,addColumnLeft:Ze,addColumnRight:Re,columnContextEnable:t.columnContextEnable,maxColLimit:k,disableDeleteOption:L,contextMenu:H,onAddColumn:S,onDeleteColumn:V,setVisibleRange:ne,scrollToColumn:ut},n)),e("div",{className:"spacer right"})]}),e("tr",{style:{height:`${le}px`}}),ft.map(r=>n(f,{row:r,children:[e(ot,{label:r in l?l?.[r]:void 0,row:r,addRowTop:De,addRowBottom:je,deleteRow:Be,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:x,disableDeleteOption:L,contextMenu:H,setVisibleRange:ee,scrollToRow:dt},r),e("div",{className:"spacer left"}),ht.map(t=>e(rt,{row:r,column:t,DataViewer:C,editable:s},t)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${ce}px`}})]})]}),[u,J.rows,J.columns,f,p,it,a,at,l,ot,rt,C,$,te,le,ce,se,de,Y.rowDimensions,Y.columnDimensions]),Ct=r.useMemo(()=>e(Ig,{attachmentAction:b,contextOption:w,getActiveCell:_,setContextMenu:t.setContextMenu,DataEditor:m,visibleRowRange:$,visibleColRange:te,maxHeight:R-64,maxWidth:j-M,totalHeight:oe,totalWidth:ae,isAtBottom:U,isAtRight:W,scrollPos:P}),[m,$,te,Y.active,R,j,oe,ae,U,W]),gt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${j}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(c||""),"ff-excel-header-hider":"hide"===c})}),e("div",{style:{height:`${R}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(c||""),"ff-excel-header-hider":"hide"===c})}),"hide"!==c&&e("div",{className:"ff-excel-toolbar-container",children:e(Wg,{editable:s,toolbar:c,onBold:ke,onItalic:Le,setUnderlineType:He,setColor:ze,setBorderType:Oe,setFontSize:Se,setFontFamily:Ve,setTextAlign:_e,setBackgroundColor:Ne,setFormatePainter:Ie})}),n("div",{ref:fe,style:{height:h},className:z("ff-excel-spreadsheet",o),onKeyPress:we,onKeyDown:$e,onClick:et,onMouseMove:nt,onScroll:e=>st(e),children:[mt,Ct,e(Dg,{scrollPos:P}),e(jg,{scrollPos:P})]})]}),[o,we,$e,nt,mt,Ct,j]);return e(Cg.Provider,{value:K,children:gt})}),Kg=({contextMenu:t,position:r,editable:i})=>{if(!t.open)return null;return i&&e("div",{onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},className:"ff-excel-menu",style:{left:r.x,top:r.y,position:"absolute",zIndex:9999999999},children:t.options.map(t=>{if(!t.visible){const i=t.disable;return e(K,{title:i?t.disableTooltip:"",children:n("div",{className:"ff-excel-menu-options "+(i?"disabled":""),onClick:()=>{i||t.action()},children:[t.iconName&&e(P,{name:t.iconName,height:16,width:16,color:(r=t.label,r.includes("Delete")?"var(--label-edit-error-text)":"var(--brand-color)"),disabled:i}),e(F,{as:"label",children:t.label})]})},t.label)}var r;return null})})},Yg=(e,t)=>{let n,r=null,i=null;const o=function(...o){r&&clearTimeout(r),i=o,n=this,r=setTimeout(()=>{i&&(e.apply(n,i),i=null,n=null),r=null},t)};return o.cancel=()=>{r&&clearTimeout(r),r=null,i=null,n=null},o.flush=()=>{r&&(clearTimeout(r),i&&(e.apply(n,i),i=null,n=null),r=null)},o},Xg=({excelData:r,contextOption:o,toolbar:c="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:p=!0,contextHeightPositioning:m=0,contextWidthPositioning:C=0,onSave:g=()=>Promise.resolve(),onSaveInfoChange:v,attachmentAction:y={addAttachment:()=>Promise.resolve(""),deleteAttachment:()=>Promise.resolve(""),viewAttachment:()=>Promise.resolve()},onSaveDelay:w=3e3,scroller:b=!1,columnContextEnable:E=!0,rowContextEnable:M=!0,sheetBarContextEnable:A=!0,minimumColumnWidth:x=100,disableDeleteOption:k=!1,maxRowLimit:L=1/0,maxColLimit:H=1/0,maxSheetLimit:_=1/0,getActiveCell:S=()=>{}})=>{const[V,O]=s([]),[N,I]=s(""),[T,D]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[j,Z]=s({name:"defaultSheet",index:0}),[R,B]=s({defaultSheet:[[bC]]}),[U,q]=s([[bC]]),[W,Q]=s((g.length,{})),[Y,X]=s({x:0,y:0}),J=a(""),$=a(null),ee=a(null),te=a(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);O(t),G(t.length)||(J.current=t[0]||"",Z({name:t[0]||"",index:0}));const n={},r={};e.forEach(e=>{const t=e.sheetName,i=e.data,o=Math.max(u,i.length),a=Math.max(f,Math.max(...i.map(e=>e.length)));let l=Array.from({length:o},()=>Array(a).fill({value:"",style:bC.style,readOnly:!1,inputType:void 0}));i.forEach((e,t)=>{e.forEach((e,n)=>{var r;t<o&&n<a&&(l[t]||(l[t]=[]),l[t][n]={value:(r=e.value,null==r?null:r),style:G(e?.style)?bC.style:Fg(e?.style),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const c=new Set([...e?.rows?.readOnly?e.rows.readOnly.map(e=>`r${e}`):[],...e?.columns?.readOnly?e.columns.readOnly.map(e=>`c${e}`):[],...e?.cells?.readOnly?e.cells.readOnly.map(([e,t])=>`${e},${t}`):[]]);if(l.forEach((t,n)=>{t.forEach((t,r)=>{l[n]||(l[n]=[]);const i=c.has(`r${n+1}`)||c.has(`c${r+1}`)||c.has(`${n+1},${r+1}`),o=((t,n,r)=>r?.inputType?r.inputType:e?.rows?.inputType?.[t+1]||e?.columns?.inputType?.[n+1]||e?.cells?.inputType?.[`${t+1},${n+1}`]||{type:"text"})(n,r,t||bC);l[n][r]={...t,value:t?.value??"",readOnly:t?.readOnly?t.readOnly:i,inputType:o,contextDisable:t?.contextDisable}})}),n[t]=l,g.length>1){const e=i[0]||[];r[t]=Array.from({length:a},(t,n)=>({newData:"",oldData:e[n]?.value||""}))}}),B(n),g.length>1&&Q(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&q(n[i])}},[r]),l(()=>{v&&v(N),"File saved"===N&&setTimeout(()=>{I("")},2e3)},[N]),l(()=>{I("Saving..."),ne(ie())},[R,J.current]);const ne=i.useCallback(Yg(e=>{if(g.length>1){const t={...W};V.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Q(t);const n=V.map(e=>({sheetName:e,headers:t[e]||[]}));g(e,n)}else g(e);I("File saved")},w),[g,W,V]),re=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),ne(ie()))},[g]);i.useEffect(()=>(document.addEventListener("keydown",re),()=>{document.removeEventListener("keydown",re)}),[re]);const ie=()=>V.map(e=>{const t=R[e]?.map(e=>{const t=e.reduce((e,t,n)=>""!==String(t?.value??"").trim()?n:e,-1),n=e.map((e,n)=>e&&e.style&&n<=t?{value:e.value,style:qg(e.style),readOnly:e.readOnly,inputType:e.inputType,contextDisable:e.contextDisable}:null).filter(e=>null!==e);return n.length>0?n:[]})||[],n=t.filter((e,n)=>{const r=t.slice(n+1).some(e=>e.length>0);return e.length>0||r});return{sheetName:e,data:G(n.length)?[[]]:n}}),[oe,ae]=s(null),le=()=>V.length>=_,ce=()=>{if(le())return;const e=((e,t)=>{const n=t.map(e=>e.toLowerCase());let r=`${e}1`,i=2;for(;n.includes(r.toLowerCase());)r=`${e}${i}`,i++;return r})("Sheet",V),t=Array.from({length:u},()=>Array.from({length:f},()=>bC));O(t=>[...t,e]),Z({index:V?.length,name:e}),B({...R,[e]:t}),q(t),g.length>1&&Q(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),J.current=e},se=(e=[[bC]])=>{q(e)},de=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void ae(null);const i=(r.textContent||"").trim();if(!i)return Zc.warning("Sheet name cannot be empty."),r.textContent=j.name,void ae(null);if(i.length>50)return Zc.warning("The sheet name cannot be greater than 50 characters"),r.textContent=j.name,void ae(null);if(V.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return Zc.warning("Sheet name already exists"),r.textContent=j.name,void ae(null);let o=V;se(R?.[n]),o.splice(t,1,i);const a=function(e,t,n){if(!(t in e))throw new Error(`Key "${t}" not found in object`);const{[t]:r,...i}=e;return{...i,[n]:r??[]}}(R,n,i);J.current=i,Z(e=>({...e,name:i})),B(a),g.length>1&&Q(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),ae(null)};const ue=(e,t)=>{e!==j.name&&t!==j.index&&(Z({index:t,name:e}),O(n=>{const r=[...n];return r[t]=e,r}),se(R[e]),J.current=e)},fe=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&T.open&&(D({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[T.open]);i.useEffect(()=>(document.addEventListener("contextmenu",fe),document.addEventListener("click",e=>fe(e,!0)),()=>{document.removeEventListener("contextmenu",fe),document.removeEventListener("click",e=>fe(e,!0))}),[fe]);const he=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ce(),disableTooltip:"Sheet limit reached",visible:!1,disable:le()},...k?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(V.length>1){let n=V.slice();n.splice(t,1);const r={...R};delete r[e];const i=Math.min(t,n.length-1);O(n),B(r),g.length>1&&Q(t=>{const n={...t};return delete n[e],n});const o=n[i]?n[i]:"";Z({index:i,name:o}),se(r?.[o]),J.current=o}else Zc.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];D(e=>({...e,open:!0,contextType:"sheet",options:r}))};return l(()=>{te.current?.removeSelect()},[j.name]),e(t,{children:V.length>0&&n("div",{ref:$,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=ee.current?.parentElement?.getBoundingClientRect(),n=window.scrollX,r=window.scrollY;let i=e.clientX-(t?.left||0)+n,o=e.clientY-(t?.top||0)+r;const a=300,l=window.innerWidth,c=window.innerHeight,s=l-e.clientX,d=e.clientX,u=c-e.clientY,f=e.clientY;s<a&&d>=a?i=e.clientX-(t?.left||0)+n-150:i+=2,u<200&&f>=200?o=e.clientY-(t?.top||0)+r-20:o+=2,e.target.classList.contains("ff-excel-tab-list")?X({x:i,y:o-(k?32:65)}):(i+a>l&&(i=l-a-2),i<0&&(i=2),X({x:i+C,y:o+m}))},onClick:e=>{e.stopPropagation(),T.open&&D({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},children:[e("div",{ref:ee,className:"ff-excel-sheet",children:e(Gg,{ref:te,editable:p,attachmentAction:y,toolbar:c,sheetHeight:h,setContextMenu:D,contextOption:o,data:U,columnContextEnable:E,rowContextEnable:M,minimumColumnWidth:x,onEvaluatedDataChange:e=>{B(t=>({...t,[J.current]:e}))},workRef:$,scroller:b,maxRowLimit:L,maxColLimit:H,disableDeleteOption:k,contextMenu:T,getActiveCell:S,onAddColumn:(e,t)=>{g.length>1&&Q(n=>{const r=j.name,i=[...n[r]||[]],o=t?e:e+1;return i.splice(o,0,{newData:"",oldData:""}),{...n,[r]:i}})},onDeleteColumn:e=>{g.length>1&&Q(t=>{const n=j.name,r=[...t[n]||[]];return r.splice(e,1),{...t,[n]:r}})}},j.name)}),"hide"!==d&&n("div",{className:"ff-excel-sheet-bar",children:["show"===d&&e("div",{className:"ff-excel-add-sheet-set",children:e(K,{title:le()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(P,{disabled:!p||le(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ce,name:"plus_icon",height:20,width:20})})}),e("div",{className:"ff-excel-tab-container",children:V.map((t,n)=>e(F,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{ue(t,n),A&&he(e,t,n)},className:z("ff-excel-tab-list",{active:t===j.name}),onClick:()=>{ue(t,n)},suppressContentEditableWarning:oe===n,onDoubleClick:e=>{"show"===d&&(ae(n),null===oe&&setTimeout(()=>(e=>{const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)})(e.target),0))},contentEditable:p&&oe===n,onBlur:e=>{de(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),de(e,n,t))},children:t})},t))})]}),T.open&&e(Kg,{contextMenu:T,position:Y,editable:p}),e(jc,{})]})})},Jg=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:i=!1})=>{const o=i?"filter":"module";return e("div",{className:z("ff-module-chip",{"ff-filter-chip":i,[`ff-${o}-chip--active`]:n,[`ff-${o}-chip--hover`]:!n}),onClick:r,children:e(F,{lineHeight:"18px",className:"module-typography",children:t})})},$g=({x:e,y:t,radius:n,startAngle:r,endAngle:i})=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),c=t+n*Math.sin(i),s=i-r>Math.PI?1:0;return i-r>=2*Math.PI?`\n M ${e+n} ${t}\n A ${n} ${n} 0 1 1 ${e-n} ${t} \n A ${n} ${n} 0 1 1 ${e+n} ${t}\n `:`M ${o} ${a} A ${n} ${n} 0 ${s} 1 ${l} ${c}`},ev=({radius:t=15,lineWidth:r=5,label:i,percentageValue:o,icon:l,fontSize:c=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:p})=>{const[m,C]=s({x:0,y:0}),[g,v]=s(!1),y=a(null);let w=-Math.PI/2;const b=2*(t+r),{backgroundArcPath:E,foregroundArcPath:M}=((e,t,n)=>{const r=t,i=r+Math.max(0,Math.min(e,100))/100*2*Math.PI;return{backgroundArcPath:$g({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:$g({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(o,w,t),A=()=>{v(!0)},x=()=>{C({x:0,y:0}),v(!1)},k=e=>{if(y.current){const t=y.current.getBoundingClientRect();C({x:e.clientX-t.left,y:e.clientY-t.top})}};return n("div",{ref:y,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${c}px`},onClick:p,children:[e("svg",{width:b,height:b,viewBox:`0 0 ${b} ${b}`,role:"img",children:n("g",{transform:`translate(${t+r}, ${t+r})`,children:[e("path",{d:E,fill:"none",stroke:f,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),e("path",{d:M,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),h&&e("path",{d:M,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),l?e("foreignObject",{x:"-10",y:"-10",width:"20",height:"20",children:e(P,{className:"ff-radial-chart-icon-padding",name:l,height:20,width:20})}):e("text",{x:"0",y:"0",fill:d||u,textAnchor:"middle",dominantBaseline:"central",children:`${Math.round(o)}%`})]})}),g&&n("div",{className:"ff-icon-radial-chart-tooltip",style:{position:"absolute",left:`${m.x+15}px`,top:m.y-5+"px"},children:[e(F,{children:`${i} : `}),n(F,{children:[o,"%"]})]})]})},tv=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:o,onDownloadClick:a,height:l="75px",width:c="79px",fileName:s,thumbnailMediaSrc:d,isDelete:u})=>e("div",{className:"ff-attach-media-container",style:{height:l,width:c},children:n("div",{className:"ff-media-wrapper",style:{height:l,width:c},children:[e("img",{src:d||t,alt:"Attached"}),n("div",{className:"ff-hover-icons",children:[n("div",{className:"ff-top-icons",children:[e("div",{className:"ff-icon-container",children:e(K,{title:"Download File",placement:"bottom",children:e(P,{name:"download_file_icon",height:10,width:10,onClick:a,color:"var(--icons-default-color)"})})}),u&&e("div",{className:"ff-icon-container",children:e(K,{title:"Delete",placement:"bottom",children:e(P,{name:"delete",height:10,width:10,color:"var(--ff-delete-button-attachment)",onClick:()=>{o&&o(r)}})})})]}),e("div",{className:"ff-expand-icon-container",children:e(K,{title:"Maximize",placement:"bottom",children:e(P,{name:"expand_icon",height:16,width:16,onClick:i})})})]}),e(F,{color:"var(--text-area-default-color)",fontWeight:"medium",className:"ff-media-text",children:s})]})}),nv=({icon:r,status:i,count:o,text:a,style:c={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=s(!1),p=["total defects","defect density","open defects","closed defects","quality score"],m=p.includes(i.toLowerCase()),C=p.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:c,onClick:()=>(e=>{p.includes(e.toLowerCase())||(h(!0),u(e))})(i),children:[n("div",{className:"ff-status-bar",children:[e("div",{children:e(P,{name:r,height:20,width:20,hoverEffect:!1})}),!p.includes(i.toLowerCase())&&e(F,{fontWeight:"semi-bold",fontSize:"10px",textAlign:"center",lineHeight:"15px",className:"ff-status-text",as:"div",children:i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()})]}),e("div",{className:"ff-content "+(C?"red-background":""),children:n(t,m?{children:[e(F,{fontWeight:"semi-bold",fontSize:"10px",className:"ff-text",lineHeight:"15px",color:"var(--ff-chip-text-color)",children:a}),e(F,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"36px",children:"defect density"===i.toLowerCase()?n(t,{children:[o.toString().padStart(2,"0"),e(F,{fontSize:"15px",fontWeight:"semi-bold",children:"/ Modules"})]}):"quality score"===i.toLowerCase()?`${parseFloat(o.toString()).toFixed(2)}%`:o.toString().padStart(2,"0")})]}:{children:[e(F,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"24px",color:f?"var(--base-bg-color)":"",children:o.toString().padStart(2,"0")}),e(F,{className:"ff-text",lineHeight:"18px",color:f?"var(--base-bg-color)":"var(--ff-chip-text-color)",children:a})]})})]})},rv=({option:t})=>{const r=a(null),[i,o]=s(!1);l(()=>{const e=r.current;if(!e)return;const t=()=>{o(e.scrollWidth>e.clientWidth)},n=requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",t)}},[t]);const c={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},d=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;return n("div",{style:{width:"-webkit-fill-available"},className:"ff-variable-option ff-variable-data",children:[e(K,{title:i?d(t):"",style:{width:"calc(100% - 32px)"},children:e("span",{ref:r,className:"ff-truncated_text",children:d(t)})}),e(P,{name:(e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"LOCAL"===e.type&&"STEPGROUP"===e?.parentVariableType?"step_group_variable":"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":c[e.type||""]||""})(t),height:16,width:16,hoverEffect:!0})]})};function iv(e){return()=>e}function ov(e){e()}function av(e,t){return n=>e(t(n))}function lv(e,t){return()=>e(t)}function cv(e){return void 0!==e}function sv(){}function dv(e,t){return t(e),e}function uv(e,t){return t(e)}function fv(...e){return e}function hv(e,t){return e(1,t)}function pv(e,t){e(0,t)}function mv(e){e(2)}function Cv(e){return e(4)}function gv(e,t){return hv(e,function(e,t){return n=>e(t,n)}(t,0))}function vv(e,t){const n=e(1,e=>{n(),t(e)});return n}function yv(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function wv(e,t){return e===t}function bv(e=wv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ev(e){return t=>n=>{e(n)&&t(n)}}function Mv(e){return t=>av(t,e)}function Av(e){return t=>()=>{t(e)}}function xv(e,...t){const n=function(...e){return t=>e.reduceRight(uv,t)}(...t);return(t,r)=>{switch(t){case 2:return void mv(e);case 1:return hv(e,n(r))}}}function kv(e,t){return n=>r=>{n(t=e(t,r))}}function Lv(e){return t=>n=>{e>0?e--:t(n)}}function Hv(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function _v(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{const a=Math.pow(2,o);hv(e,e=>{const l=n;n|=a,t[o]=e,l!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{const a=()=>{e([o].concat(t))};n===i?a():r=a}}function Sv(e){let t=e;const n=Ov();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function Vv(e,t){return dv(Sv(t),t=>gv(e,t))}function Ov(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach(e=>{e(n)});case 2:return void e.splice(0,e.length);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function zv(e){return dv(Ov(),t=>gv(e,t))}function Nv(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Iv(),singleton:n}}const Iv=()=>Symbol();function Tv(...e){const t=Ov(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{const a=Math.pow(2,o);hv(e,e=>{n[o]=e,r|=a,r===i&&pv(t,n)})}),function(e,o){switch(e){case 2:return void mv(t);case 1:return r===i&&o(n),hv(t,o)}}}function Dv(e,t=wv){return xv(e,bv(t))}function jv(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(ov)}}(...e.map(e=>hv(e,n)))}}}var Zv=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zv||{});const Rv={0:"debug",3:"error",1:"log",2:"warn"},Bv=Nv(()=>{const e=Sv(3);return{log:Sv((t,n,r=1)=>{var i;r>=(null!=(i=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:Cv(e))&&console[Rv[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Pv(e,t,n){return Fv(e,t,n).callbackRef}function Fv(e,t,n){const r=i.useRef(null);let o=e=>{};const a=i.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return o=e=>{e&&t?(null==a||a.observe(e),r.current=e):(r.current&&(null==a||a.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function Uv(e,t,n,r,o,a,l,c,s){const d=i.useCallback(n=>{const i=function(e,t,n,r){const i=e.length;if(0===i)return null;const o=[];for(let a=0;a<i;a++){const i=e.item(a);if(void 0===i.dataset.index)continue;const l=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),s=t(i,n);if(0===s&&r("Zero-sized element, this should not happen",{child:i},Zv.ERROR),s===c)continue;const d=o[o.length-1];0===o.length||d.size!==s||d.endIndex!==l-1?o.push({endIndex:l,size:s,startIndex:l}):o[o.length-1].endIndex++}return o}(n.children,t,c?"offsetWidth":"offsetHeight",o);let s=n.parentElement;for(;!s.dataset.virtuosoScroller;)s=s.parentElement;const d="window"===s.lastElementChild.dataset.viewportType;let u;d&&(u=s.ownerDocument.defaultView);const f=l?c?l.scrollLeft:l.scrollTop:d?c?u.scrollX||u.document.documentElement.scrollLeft:u.scrollY||u.document.documentElement.scrollTop:c?s.scrollLeft:s.scrollTop,h=l?c?l.scrollWidth:l.scrollHeight:d?c?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:c?s.scrollWidth:s.scrollHeight,p=l?c?l.offsetWidth:l.offsetHeight:d?c?u.innerWidth:u.innerHeight:c?s.offsetWidth:s.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(f,0),viewportHeight:p}),null==a||a(c?qv("column-gap",getComputedStyle(n).columnGap,o):qv("row-gap",getComputedStyle(n).rowGap,o)),null!==i&&e(i)},[e,t,o,a,l,r,c]);return Fv(d,n,s)}function qv(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zv.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}function Wv(e,t,n){const r=i.useRef(null),o=i.useCallback(n=>{if(null==n||!n.offsetParent)return;const i=n.getBoundingClientRect(),o=i.width;let a,c;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),a=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),a=i.top+e.scrollY}r.current={offsetTop:a,visibleHeight:c,visibleWidth:o},e(r.current)},[e,t]),{callbackRef:a,ref:l}=Fv(o,!0,n),c=i.useCallback(()=>{o(l.current)},[o,l]);return i.useEffect(()=>{var e;if(t){t.addEventListener("scroll",c);const e=new ResizeObserver(()=>{requestAnimationFrame(c)});return e.observe(t),()=>{t.removeEventListener("scroll",c),e.unobserve(t)}}{const t=null==(e=l.current)?void 0:e.ownerDocument.defaultView;return null==t||t.addEventListener("scroll",c),null==t||t.addEventListener("resize",c),()=>{null==t||t.removeEventListener("scroll",c),null==t||t.removeEventListener("resize",c)}}},[c,t,l]),a}const Qv=Nv(()=>{const e=Ov(),t=Ov(),n=Sv(0),r=Ov(),i=Sv(0),o=Ov(),a=Ov(),l=Sv(0),c=Sv(0),s=Sv(0),d=Sv(0),u=Ov(),f=Ov(),h=Sv(!1),p=Sv(!1),m=Sv(!1);return gv(xv(e,Mv(({scrollTop:e})=>e)),t),gv(xv(e,Mv(({scrollHeight:e})=>e)),a),gv(t,i),{deviation:n,fixedFooterHeight:s,fixedHeaderHeight:c,footerHeight:d,headerHeight:l,horizontalDirection:p,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),Gv={lvl:0};function Kv(e,t){const n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let a=1;a<n;a++){const{index:n,value:l}=t(e[a]);o.push({end:n-1,start:r,value:i}),r=n,i=l}return o.push({end:1/0,start:r,value:i}),o}function Yv(e){return e===Gv}function Xv(e,t){if(!Yv(e))return t===e.k?e.v:t<e.k?Xv(e.l,t):Xv(e.r,t)}function Jv(e,t,n="k"){if(Yv(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Jv(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Jv(e.l,t,n)}function $v(e,t,n){return Yv(e)?dy(t,n,1):t===e.k?ay(e,{k:t,v:n}):t<e.k?uy(ay(e,{l:$v(e.l,t,n)})):uy(ay(e,{r:$v(e.r,t,n)}))}function ey(){return Gv}function ty(e,t,n){if(Yv(e))return[];return function(e){return Kv(e,({k:e,v:t})=>({index:e,value:t}))}(iy(e,Jv(e,t)[0],n))}function ny(e,t){if(Yv(e))return Gv;const{k:n,l:r,r:i}=e;if(t===n){if(Yv(r))return i;if(Yv(i))return r;{const[t,n]=sy(r);return oy(ay(e,{k:t,l:ly(r),v:n}))}}return oy(ay(e,t<n?{l:ny(r,t)}:{r:ny(i,t)}))}function ry(e){return Yv(e)?[]:[...ry(e.l),{k:e.k,v:e.v},...ry(e.r)]}function iy(e,t,n){if(Yv(e))return[];const{k:r,l:i,r:o,v:a}=e;let l=[];return r>t&&(l=l.concat(iy(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:a}),r<=n&&(l=l.concat(iy(o,t,n))),l}function oy(e){const{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cy(t))return fy(ay(e,{lvl:n-1}));if(!Yv(t)&&!Yv(t.r))return ay(t.r,{l:ay(t,{r:t.r.l}),lvl:n,r:ay(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(cy(e))return hy(ay(e,{lvl:n-1}));if(Yv(r)||Yv(r.l))throw new Error("Unexpected empty nodes");{const t=r.l,i=cy(t)?r.lvl-1:r.lvl;return ay(t,{l:ay(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:hy(ay(r,{l:t.r,lvl:i}))})}}function ay(e,t){return dy(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function ly(e){return Yv(e.r)?e.l:oy(ay(e,{r:ly(e.r)}))}function cy(e){return Yv(e)||e.lvl>e.r.lvl}function sy(e){return Yv(e.r)?[e.k,e.v]:sy(e.r)}function dy(e,t,n,r=Gv,i=Gv){return{k:e,l:r,lvl:n,r:i,v:t}}function uy(e){return hy(fy(e))}function fy(e){const{l:t}=e;return Yv(t)||t.lvl!==e.lvl?e:ay(t,{r:ay(e,{l:t.r})})}function hy(e){const{lvl:t,r:n}=e;return Yv(n)||Yv(n.r)||n.lvl!==t||n.r.lvl!==t?e:ay(n,{l:ay(e,{r:n.l}),lvl:t+1})}function py(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function my(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const Cy=Nv(()=>({recalcInProgress:Sv(!1)}),[],{singleton:!0});function gy(e,t,n){return e[vy(e,t,n)]}function vy(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function yy(e,t){return Math.round(e.getBoundingClientRect()[t])}function wy(e){return!Yv(e.groupOffsetTree)}function by({index:e},t){return t===e?0:t<e?-1:1}function Ey({offset:e},t){return t===e?0:t<e?-1:1}function My(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:o}=gy(t,e,by),a=e-r,l=o*a+(a-1)*n+i;return l>0?l+n:l}function Ay(e,t){if(!wy(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function xy(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let r=Ay("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function ky(e,t,n,r=0){return r>0&&(t=Math.max(t,gy(e,r,by).offset)),Kv(function(e,t,n,r){const i=vy(e,t,r),o=vy(e,n,r,i);return e.slice(i,o+1)}(e,t,n,Ey),Sy)}function Ly(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Zv.DEBUG);const o=e.sizeTree;let a=o,l=0;if(n.length>0&&Yv(o)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>$v($v(t,n,e),n+1,r),a)}else[a,l]=function(e,t){let n=Yv(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),Yv(e)){e=$v(e,0,i);continue}const a=ty(e,o-1,t+1);if(a.some(Vy(r)))continue;let l=!1,c=!1;for(const{end:n,start:r,value:o}of a)l?(t>=r||i===o)&&(e=ny(e,r)):(c=o!==i,l=!0),n>t&&t>=r&&o!==i&&(e=$v(e,t+1,o));c&&(e=$v(e,o,i))}return[e,n]}(a,t);if(a===o)return e;const{lastIndex:c,lastOffset:s,lastSize:d,offsetTree:u}=_y(e.offsetTree,l,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>$v(e,t,My(t,u,i)),ey()),lastIndex:c,lastOffset:s,lastSize:d,offsetTree:u,sizeTree:a}}function Hy(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function _y(e,t,n,r){let i=e,o=0,a=0,l=0,c=0;if(0!==t){c=vy(i,t-1,by),l=i[c].offset;const e=Jv(n,t-1);o=e[0],a=e[1],i.length&&i[c].size===Jv(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:e,value:c}of ty(n,t,1/0)){const t=e-o,n=t*a+l+t*r;i.push({index:e,offset:n,size:c}),o=e,l=n,a=c}return{lastIndex:o,lastOffset:l,lastSize:a,offsetTree:i}}function Sy(e){return{index:e.index,value:e}}function Vy(e){const{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Oy={offsetHeight:"height",offsetWidth:"width"},zy=Nv(([{log:e},{recalcInProgress:t}])=>{const n=Ov(),r=Ov(),i=Vv(r,0),o=Ov(),a=Ov(),l=Sv(0),c=Sv([]),s=Sv(void 0),d=Sv(void 0),u=Sv((e,t)=>yy(e,Oy[t])),f=Sv(void 0),h=Sv(0),p={groupIndices:[],groupOffsetTree:ey(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ey()},m=Vv(xv(n,_v(c,e,h),kv(Ly,p),bv()),p),C=Vv(xv(c,bv(),kv((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Mv(({prev:e})=>e)),[]);gv(xv(c,Ev(e=>e.length>0),_v(m,h),Mv(([e,t,n])=>{const r=e.reduce((e,r,i)=>$v(e,r,My(r,t.offsetTree,n)||i),ey());return{...t,groupIndices:e,groupOffsetTree:r}})),m),gv(xv(r,_v(m),Ev(([e,{lastIndex:t}])=>e<t),Mv(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),gv(s,d);const g=Vv(xv(s,Mv(e=>void 0===e)),!0);gv(xv(d,Ev(e=>void 0!==e&&Yv(Cv(m).sizeTree)),Mv(e=>[{endIndex:0,size:e,startIndex:0}])),n);const v=zv(xv(n,_v(m),kv(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:p}),Mv(e=>e.changed)));hv(xv(l,kv((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Mv(e=>e.diff)),e=>{const{groupIndices:n}=Cv(m);if(e>0)pv(t,!0),pv(o,e+Hy(e,n));else if(e<0){const t=Cv(C);t.length>0&&(e-=Hy(-e,t)),pv(a,e)}}),hv(xv(l,_v(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Zv.ERROR)});const y=zv(o);gv(xv(o,_v(m),Mv(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=Xv(t.sizeTree,0);let o=0,a=0;for(;o<e;){const e=t.groupIndices[a],l=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+l-1,size:i,startIndex:e+1}),a++,o+=l+1}const l=ry(t.sizeTree);return o!==e&&l.shift(),l.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return ry(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);const w=zv(xv(a,_v(m,h),Mv(([e,{offsetTree:t},n])=>My(-e,t,n))));return gv(xv(a,_v(m,h),Mv(([e,t,n])=>{if(t.groupIndices.length>0){if(Yv(t.sizeTree))return t;let r=ey();const i=Cv(C);let o=0,a=0,l=0;for(;o<-e;){l=i[a];const e=i[a+1]-l-1;a++,o+=e+1}if(r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>$v(t,Math.max(0,n+e),r),r),o!==-e){r=$v(r,0,Xv(t.sizeTree,l));r=$v(r,1,Jv(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}{const r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>$v(t,Math.max(0,n+e),r),ey());return{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}})),m),{beforeUnshiftWith:y,data:f,defaultItemSize:d,firstItemIndex:l,fixedItemSize:s,gap:h,groupIndices:c,itemSize:u,listRefresh:v,shiftWith:a,shiftWithOffset:w,sizeRanges:n,sizes:m,statefulTotalCount:i,totalCount:r,trackItemSizes:g,unshiftWith:o}},fv(Bv,Cy),{singleton:!0});function Ny(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const Iy=Nv(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const o=Ov(),a=Ov(),l=zv(xv(o,Mv(Ny)));return gv(xv(l,Mv(e=>e.totalCount)),n),gv(xv(l,Mv(e=>e.groupIndices)),e),gv(xv(Tv(i,t,r),Ev(([e,t])=>wy(t)),Mv(([e,t,n])=>Jv(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),bv(),Mv(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},fv(zy,Qv)),Ty=Nv(([{log:e}])=>{const t=Sv(!1),n=zv(xv(t,Ev(e=>e),bv()));return hv(t,t=>{t&&Cv(e)("props updated",{},Zv.DEBUG)}),{didMount:n,propsReady:t}},fv(Bv),{singleton:!0}),Dy=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function jy(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Dy)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Zy=Nv(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:l,scrollingInProgress:c,scrollTo:s,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=Ov(),p=Ov(),m=Sv(0);let C=null,g=null,v=null;function y(){C&&(C(),C=null),v&&(v(),v=null),g&&(clearTimeout(g),g=null),pv(c,!1)}return gv(xv(h,_v(n,u,r,m,l,a,f),_v(e,o,i),Mv(([[e,n,r,i,o,a,l,s],u,f,m])=>{const w=jy(e),{align:b,behavior:E,offset:M}=w,A=i-1,x=xy(w,n,A);let k=My(x,n.offsetTree,u)+a;"end"===b?(k+=f+Jv(n.sizeTree,x)[1]-r+m,x===A&&(k+=l)):"center"===b?k+=(f+Jv(n.sizeTree,x)[1]-r+m)/2:k-=o,M&&(k+=M);const L=t=>{y(),t?(s("retrying to scroll to",{location:e},Zv.DEBUG),pv(h,e)):(pv(p,!0),s("list did not change, scroll successful",{},Zv.DEBUG))};if(y(),"smooth"===E){let e=!1;v=hv(t,t=>{e=e||t}),C=vv(d,()=>{L(e)})}else C=vv(xv(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),L);return g=setTimeout(()=>{y()},1200),pv(c,!0),s("scrolling from index to",{behavior:E,index:x,top:k},Zv.DEBUG),{behavior:E,top:k}})),s),{scrollTargetReached:p,scrollToIndex:h,topListHeight:m}},fv(zy,Qv,Bv),{singleton:!0});function Ry(e,t){0==e?t():requestAnimationFrame(()=>{Ry(e-1,t)})}function By(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const Py=Nv(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const l=Sv(!0),c=Sv(0),s=Sv(!0);return gv(xv(a,_v(c),Ev(([e,t])=>!!t),Av(!1)),l),gv(xv(a,_v(c),Ev(([e,t])=>!!t),Av(!1)),s),hv(xv(Tv(t,a),_v(l,n,e,s),Ev(([[,e],t,{sizeTree:n},r,i])=>e&&(!Yv(n)||cv(r))&&!t&&!i),_v(c)),([,e])=>{vv(i,()=>{pv(s,!0)}),Ry(4,()=>{vv(r,()=>{pv(l,!0)}),pv(o,e)})}),{initialItemFinalLocationReached:s,initialTopMostItemIndex:c,scrolledToInitialItem:l}},fv(zy,Qv,Zy,Ty),{singleton:!0});function Fy(e,t){return Math.abs(e-t)<1.01}const Uy="up",qy="down",Wy={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Qy=Nv(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{const a=Sv(!1),l=Sv(!0),c=Ov(),s=Ov(),d=Sv(4),u=Sv(0),f=Vv(xv(jv(xv(Dv(i),Lv(1),Av(!0)),xv(Dv(i),Lv(1),Av(!1),yv(100))),bv()),!1),h=Vv(xv(jv(xv(n,Av(!0)),xv(n,Av(!1),yv(200))),bv()),!1);gv(xv(Tv(Dv(i),Dv(u)),Mv(([e,t])=>e<=t),bv()),l),gv(xv(l,Hv(50)),s);const p=zv(xv(Tv(r,Dv(o),Dv(t),Dv(e),Dv(d)),kv((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{const l={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:l}}let c;return c=l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:c,state:l}},Wy),bv((e,t)=>e&&e.atBottom===t.atBottom))),m=Vv(xv(r,kv((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(Fy(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{const i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ev(e=>e.changed),Mv(e=>e.jump)),0);gv(xv(p,Mv(e=>e.atBottom)),a),gv(xv(a,Hv(50)),c);const C=Sv(qy);gv(xv(r,Mv(({scrollTop:e})=>e),bv(),kv((e,t)=>Cv(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Uy:qy,prevScrollTop:t},{direction:qy,prevScrollTop:0}),Mv(e=>e.direction)),C),gv(xv(r,Hv(50),Av("none")),C);const g=Sv(0);return gv(xv(f,Ev(e=>!e),Av(0)),g),gv(xv(i,Hv(100),_v(f),Ev(([e,t])=>!!t),kv(([e,t],[n])=>[t,n],[0,0]),Mv(([e,t])=>t-e)),g),{atBottomState:p,atBottomStateChange:c,atBottomThreshold:d,atTopStateChange:s,atTopThreshold:u,isAtBottom:a,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:C,scrollVelocity:g}},fv(Qv)),Gy="top",Ky="bottom",Yy="none";function Xy(e,t,n){return"number"==typeof e?n===Uy&&t===Gy||n===qy&&t===Ky?e:0:n===Uy?t===Gy?e.main:e.reverse:t===Ky?e.main:e.reverse}function Jy(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}const $y=Nv(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const o=Ov(),a=Sv(0),l=Sv(0),c=Sv(0),s=Vv(xv(Tv(Dv(r),Dv(i),Dv(n),Dv(o,my),Dv(c),Dv(a),Dv(t),Dv(e),Dv(l)),Mv(([e,t,n,[r,i],o,a,l,c,s])=>{const d=e-c,u=a+l,f=Math.max(n-d,0);let h=Yy;const p=Jy(s,Gy),m=Jy(s,Ky);return r-=c,i+=n+l,(r+=n+l)>e+u-p&&(h=Uy),(i-=c)<e-f+t+m&&(h=qy),h!==Yy?[Math.max(d-n-Xy(o,Gy,h)-p,0),d-f-l+t+Xy(o,Ky,h)+m]:null}),Ev(e=>null!=e),bv(my)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:c,topListHeight:a,visibleRange:s}},fv(Qv),{singleton:!0});const ew={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tw(e,t,n,r,i,o){const{lastIndex:a,lastOffset:l,lastSize:c}=i;let s=0,d=0;if(e.length>0){s=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-a,f=s,h=l+u*c+(u-1)*r-d;return{bottom:d,firstItemIndex:o,items:rw(e,i,o),offsetBottom:h,offsetTop:s,top:f,topItems:rw(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function nw(e,t,n,r,i,o){let a=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-a>=e)break;a++}const l=e+a,c=By(t,l);return tw(Array.from({length:l}).map((e,t)=>({data:o[t+c],index:t+c,offset:0,size:0})),[],l,i,n,r)}function rw(e,t,n){if(0===e.length)return[];if(!wy(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));const r=e[0].index,i=e[e.length-1].index,o=[],a=ty(t.groupOffsetTree,r,i);let l,c=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=a.shift(),c=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:c,type:"group"}:{groupIndex:c,index:r.index-(c+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}const iw=Nv(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:l,visibleRange:c},{initialTopMostItemIndex:s,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:p}])=>{const m=Sv([]),C=Sv(0),g=Ov();gv(o.topItemsIndexes,m);const v=Vv(xv(Tv(h,p,Dv(c,my),Dv(i),Dv(r),Dv(s),d,Dv(m),Dv(t),Dv(n),e),Ev(([e,t,,n,,,,,,,r])=>{const i=r&&r.length!==n;return e&&!t&&!i}),Mv(([,,[e,t],n,r,i,o,a,l,c,s])=>{const d=r,{offsetTree:u,sizeTree:f}=d,h=Cv(C);if(0===n)return{...ew,totalCount:n};if(0===e&&0===t)return 0===h?{...ew,totalCount:n}:nw(h,i,r,l,c,s||[]);if(Yv(f))return h>0?null:tw(function(e,t,n){if(wy(t)){const r=Ay(e,t);return[{index:Jv(t.groupOffsetTree,r)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:r,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(By(i,n),d,s),[],n,c,d,l);const p=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of ty(f,e,t)){const i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)p.push({data:null==s?void 0:s[e],index:e,offset:n,size:i}),n+=i}}if(!o)return tw([],p,n,c,d,l);const m=a.length>0?a[a.length-1]+1:0,g=ky(u,e,t,m);if(0===g.length)return null;const v=n-1,y=dv([],n=>{for(const r of g){const i=r.value;let o=i.offset,a=r.start;const l=i.size;if(i.offset<e){a+=Math.floor((e-i.offset+c)/(l+c));const t=a-r.start;o+=t*l+t*c}a<m&&(o+=(m-a)*l,a=m);const d=Math.min(r.end,v);for(let e=a;e<=d&&!(o>=t);e++)n.push({data:null==s?void 0:s[e],index:e,offset:o,size:l}),o+=l+c}});return tw(y,p,n,c,d,l)}),Ev(e=>null!==e),bv()),ew);gv(xv(e,Ev(cv),Mv(e=>null==e?void 0:e.length)),i),gv(xv(v,Mv(e=>e.topListHeight)),u),gv(u,l),gv(xv(v,Mv(e=>[e.top,e.bottom])),a),gv(xv(v,Mv(e=>e.items)),g);const y=zv(xv(v,Ev(({items:e})=>e.length>0),_v(i,e),Ev(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Mv(([,e,t])=>[e-1,t]),bv(my),Mv(([e])=>e))),w=zv(xv(v,Hv(200),Ev(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Mv(({items:e})=>e[0].index),bv())),b=zv(xv(v,Ev(({items:e})=>e.length>0),Mv(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),bv(py)));return{endReached:y,initialItemCount:C,itemsRendered:g,listState:v,rangeChanged:b,startReached:w,topItemsIndexes:m,...f}},fv(zy,Iy,$y,Py,Zy,Qy,Ty,Cy),{singleton:!0}),ow=Nv(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const o=Ov(),a=Vv(xv(Tv(n,e,r,t,i),Mv(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return gv(Dv(a),o),{totalListHeight:a,totalListHeightChanged:o}},fv(Qv,iw),{singleton:!0}),aw=Nv(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Sv(!1);return{alignToBottom:n,paddingTopAddition:Vv(xv(Tv(n,e,t),Ev(([e])=>e),Mv(([,e,t])=>Math.max(0,e-t)),Hv(0),bv()),0)}},fv(Qv,ow),{singleton:!0}),lw=Nv(()=>({context:Sv(null)})),cw=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:null!=n?n:"start",behavior:r}:e>o?{...i,align:null!=n?n:"end",behavior:r}:null,sw=Nv(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:l,viewportHeight:c},{scrollToIndex:s}])=>{const d=Ov();return gv(xv(d,_v(t,c,n,o,i,r,l),_v(e),Mv(([[e,t,n,r,i,o,l,c],s])=>{const{align:d,behavior:u,calculateViewLocation:f=cw,done:h,...p}=e,m=xy(e,t,r-1),C=My(m,t.offsetTree,s)+i+o,g=f({itemBottom:C+Jv(t.sizeTree,m)[1],itemTop:C,locationParams:{align:d,behavior:u,...p},viewportBottom:c+n-l,viewportTop:c+o});return g?h&&vv(xv(a,Ev(e=>!e),Lv(Cv(a)?1:2)),h):h&&h(),g}),Ev(e=>null!==e)),s),{scrollIntoView:d}},fv(zy,Qv,Zy,iw,Bv),{singleton:!0});function dw(e){return!!e&&("smooth"===e?"smooth":"auto")}const uw=Nv(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:l},{didMount:c,propsReady:s},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const p=Sv(!1),m=Ov();let C=null;function g(e){pv(a,{align:"end",behavior:e,index:"LAST"})}function v(e){const t=vv(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!C&&(Cv(d)("scrolling to bottom due to increased size",{},Zv.DEBUG),g("auto"))});setTimeout(t,100)}hv(xv(Tv(xv(Dv(t),Lv(1)),c),_v(Dv(p),o,l,u),Mv(([[e,t],n,r,i,o])=>{let a=t&&i,l="auto";return a&&(l=((e,t)=>"function"==typeof e?dw(e(t)):t&&dw(e))(n,r||o),a=a&&!!l),{followOutputBehavior:l,shouldFollow:a,totalCount:e}}),Ev(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{C&&(C(),C=null),Cv(n)?requestAnimationFrame(()=>{Cv(d)("following output to ",{totalCount:r},Zv.DEBUG),g(t)}):C=vv(e,()=>{Cv(d)("following output to ",{totalCount:r},Zv.DEBUG),g(t),C=null})}),hv(xv(Tv(Dv(p),t,s),Ev(([e,,t])=>e&&t),kv(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Ev(({refreshed:e})=>e),_v(p,t)),([,e])=>{Cv(l)&&v(!1!==e)}),hv(m,()=>{v(!1!==Cv(p))}),hv(Tv(Dv(p),i),([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&g("auto")});const y=Sv(null),w=Ov();return gv(jv(xv(Dv(r),Mv(e=>{var t;return null!=(t=null==e?void 0:e.length)?t:0})),xv(Dv(t))),w),hv(xv(Tv(xv(w,Lv(1)),c),_v(Dv(y),l,u,f),Mv(([[e,t],n,r,i,o])=>t&&r&&(null==n?void 0:n({context:o,totalCount:e,scrollingInProgress:i}))),Ev(e=>!!e),Hv(0)),t=>{C&&(C(),C=null),Cv(n)?requestAnimationFrame(()=>{Cv(d)("scrolling into view",{}),pv(h,t)}):C=vv(e,()=>{Cv(d)("scrolling into view",{}),pv(h,t),C=null})}),{autoscrollToBottom:m,followOutput:p,scrollIntoViewOnChange:y}},fv(zy,Qy,Zy,Py,Ty,Bv,Qv,lw,sw)),fw=Nv(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:l}])=>(gv(xv(l,_v(o),Ev(([,e])=>0!==e),_v(i,r,t,n,e),Mv(([[,e],t,n,r,i,o=[]])=>nw(e,t,n,r,i,o))),a),{}),fv(zy,Py,iw,Ty),{singleton:!0}),hw=Nv(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Sv(0);return hv(xv(e,_v(r),Ev(([,e])=>0!==e),Mv(([,e])=>({top:e}))),e=>{vv(xv(n,Lv(1),Ev(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{pv(t,e)})})}),{initialScrollTop:r}},fv(Ty,Qv,iw),{singleton:!0}),pw=Nv(([{scrollVelocity:e}])=>{const t=Sv(!1),n=Ov(),r=Sv(!1);return gv(xv(e,_v(r,t,n),Ev(([e,t])=>!!t),Mv(([e,t,n,r])=>{const{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),bv()),t),hv(xv(Tv(t,e,n),_v(r)),([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},fv(Qy),{singleton:!0}),mw=Nv(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ov(),r=Ov(),i=Ov(),o=Sv(!1),a=Sv(void 0);return gv(xv(Tv(n,r),Mv(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),gv(xv(t,_v(r),Mv(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},fv(Qv)),Cw=Nv(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:l,windowViewportRect:c}])=>{const s=Ov(),d=Sv(void 0),u=Sv(null),f=Sv(null);return gv(l,u),gv(c,f),hv(xv(s,_v(t,r,a,u,f,n)),([e,t,n,r,i,o,a])=>{const l=function(e){return ry(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:i?i.k-1:1/0,size:t,startIndex:e}})}(t.sizeTree);r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:l,scrollTop:n-=a})}),gv(xv(d,Ev(cv),Mv(gw)),i),gv(xv(o,_v(d),Ev(([,e])=>void 0!==e),bv(),Mv(([,e])=>e.ranges)),e),{getState:s,restoreStateFrom:d}},fv(zy,Qv,Py,Ty,mw));function gw(e){return{align:"start",index:0,offset:e.scrollTop}}const vw=Nv(([{topItemsIndexes:e}])=>{const t=Sv(0);return gv(xv(t,Ev(e=>e>=0),Mv(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},fv(iw));function yw(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const ww=yw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),bw=Nv(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:l},{listState:c},{beforeUnshiftWith:s,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:p}])=>{const m=zv(xv(c,_v(a),kv(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},l])=>{const c=r+o;let s=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(s=c-n,0!==s&&(s+=l))),[s,i,a,c]},[0,[],0,0]),Ev(([e])=>0!==e),_v(r,l,n,i,h,p),Ev(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===Uy),Mv(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Zv.DEBUG),e))));function C(n){n>0?(pv(t,{behavior:"auto",top:-n}),pv(e,0)):(pv(e,0),pv(t,{behavior:"auto",top:-n}))}return hv(xv(m,_v(e,o)),([t,n,r])=>{r&&ww()?pv(e,n-t):C(-t)}),hv(xv(Tv(Vv(o,!1),e,p),Ev(([e,t,n])=>!e&&!n&&0!==t),Mv(([e,t])=>t),Hv(1)),C),gv(xv(u,Mv(e=>({top:-e}))),t),hv(xv(s,_v(f,d),Mv(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function o(e){return e*(n+i)}if(0===t.length)return o(e);{let n=0;const i=Xv(r,0);let a=0,l=0;for(;a<e;){a++,n+=i;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;a+r>e&&(n-=i,r=e-a+1),a+=r,n+=o(r),l++}return n}})),n=>{pv(e,n),requestAnimationFrame(()=>{pv(t,{top:n}),requestAnimationFrame(()=>{pv(e,0),pv(p,!1)})})}),{deviation:e}},fv(Qv,Qy,iw,zy,Bv,Cy)),Ew=Nv(([e,t,n,r,i,o,a,l,c,s,d])=>({...e,...t,...n,...r,...i,...o,...a,...l,...c,...s,...d}),fv($y,fw,Ty,pw,ow,hw,aw,mw,sw,Bv,lw)),Mw=Nv(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:i,groupIndices:o,itemSize:a,sizeRanges:l,sizes:c,statefulTotalCount:s,totalCount:d,trackItemSizes:u},{initialItemFinalLocationReached:f,initialTopMostItemIndex:h,scrolledToInitialItem:p},m,C,g,{listState:v,topItemsIndexes:y,...w},{scrollToIndex:b},E,{topItemCount:M},{groupCounts:A},x])=>(gv(w.rangeChanged,x.scrollSeekRangeChanged),gv(xv(x.windowViewportRect,Mv(e=>e.visibleHeight)),m.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:i,groupCounts:A,initialItemFinalLocationReached:f,initialTopMostItemIndex:h,scrolledToInitialItem:p,sizeRanges:l,topItemCount:M,topItemsIndexes:y,totalCount:d,...g,groupIndices:o,itemSize:a,listState:v,scrollToIndex:b,statefulTotalCount:s,trackItemSizes:u,...w,...x,...m,sizes:c,...C}),fv(zy,Py,Qv,Cw,uw,iw,Zy,bw,vw,Iy,Ew));function Aw(e,t){const n={},r={};let i=0;const o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(const e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}const xw=typeof document<"u"?i.useLayoutEffect:i.useEffect;function kw(t,n,r){const o=Object.keys(n.required||{}),a=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),c=Object.keys(n.events||{}),s=i.createContext({});function d(e,t){e.propsReady&&pv(e.propsReady,!1);for(const r of o){pv(e[n.required[r]],t[r])}for(const r of a)if(r in t){pv(e[n.optional[r]],t[r])}e.propsReady&&pv(e.propsReady,!0)}function u(e){return c.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>null==t?void 0:t();return function(i,o){switch(i){case 1:return o?n===o?void 0:(r(),n=o,t=hv(e,o),t):(r(),sv);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef((f,h)=>{const{children:p,...m}=f,[C]=i.useState(()=>dv(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:o})=>{if(o&&t.has(i))return t.get(i);const a=e(r.map(e=>n(e)));return o&&t.set(i,a),a};return n(e)}(t),e=>{d(e,m)})),[g]=i.useState(lv(u,C));xw(()=>{for(const e of c)e in m&&hv(g[e],m[e]);return()=>{Object.values(g).map(mv)}},[m,g,C]),xw(()=>{d(C,m)}),i.useImperativeHandle(h,iv(function(e){return l.reduce((t,r)=>(t[r]=t=>{pv(e[n.methods[r]],t)},t),{})}(C)));const v=r;return e(s.Provider,{value:C,children:r?e(v,{...Aw([...o,...a,...c],m),children:p}):p})});return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(s)[e];xw(()=>hv(n,t),[t,n])},useEmitterValue:i.version.startsWith("18")?e=>{const t=i.useContext(s)[e],n=i.useCallback(e=>hv(t,e),[t]);return i.useSyncExternalStore(n,()=>Cv(t),()=>Cv(t))}:e=>{const t=i.useContext(s)[e],[n,r]=i.useState(lv(Cv,t));return xw(()=>hv(t,e=>{e!==n&&r(iv(e))}),[t,n]),n},usePublisher:e=>{const t=i.useContext(s);return i.useCallback(n=>{pv(t[e],n)},[t,e])}}}const Lw=i.createContext(void 0),Hw=i.createContext(void 0),_w=typeof document<"u"?i.useLayoutEffect:i.useEffect;function Sw(e){return"self"in e}function Vw(e,t,n,r=sv,o,a){const l=i.useRef(null),c=i.useRef(null),s=i.useRef(null),d=i.useCallback(n=>{let r,i,o;const l=n.target;if(function(e){return"body"in e}(l)||Sw(l)){const e=Sw(l)?l:l.defaultView;o=a?e.scrollX:e.scrollY,r=a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a?e.innerWidth:e.innerHeight}else o=a?l.scrollLeft:l.scrollTop,r=a?l.scrollWidth:l.scrollHeight,i=a?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync?d():M.flushSync(d),null!==c.current&&(o===c.current||o<=0||o===r-i)&&(c.current=null,t(!0),s.current&&(clearTimeout(s.current),s.current=null))},[e,t,a]);return i.useEffect(()=>{const e=o||l.current;return r(o||l.current),d({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",d,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",d)}},[l,d,n,r,o]),{scrollByCallback:function(e){a&&(e={behavior:e.behavior,left:e.top}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(a?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let o,d,u;Sw(r)?(d=Math.max(yy(r.document.documentElement,a?"width":"height"),a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),o=a?r.innerWidth:r.innerHeight,u=a?window.scrollX:window.scrollY):(d=r[a?"scrollWidth":"scrollHeight"],o=yy(r,a?"width":"height"),u=r[a?"scrollLeft":"scrollTop"]);const f=d-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),Fy(o,d)||n.top===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:o}),void(i&&t(!0));i?(c.current=n.top,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,c.current=null,t(!0)},1e3)):c.current=null,a&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}}}const Ow="-webkit-sticky",zw="sticky",Nw=yw(()=>{if(typeof document>"u")return zw;const e=document.createElement("div");return e.style.position=Ow,e.style.position===Ow?Ow:zw});function Iw(e){return e}const Tw=Nv(()=>{const e=Sv(e=>`Item ${e}`),t=Sv(e=>`Group ${e}`),n=Sv({}),r=Sv(Iw),i=Sv("div"),o=Sv(sv),a=(e,t=null)=>Vv(xv(n,Mv(t=>t[e]),bv()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),Dw=Nv(([e,t])=>({...e,...t}),fv(Mw,Tw)),jw=({height:t})=>e("div",{style:{height:t}}),Zw={overflowAnchor:"none",position:Nw(),zIndex:1},Rw={overflowAnchor:"none"},Bw={...Rw,display:"inline-block",height:"100%"},Pw=i.memo(function({showTopList:t=!1}){const n=ob("listState"),r=ab("sizeRanges"),o=ob("useWindowScroll"),a=ob("customScrollParent"),l=ab("windowScrollContainerState"),c=ab("scrollContainerState"),s=a||o?l:c,d=ob("itemContent"),u=ob("context"),f=ob("groupContent"),h=ob("trackItemSizes"),p=ob("itemSize"),C=ob("log"),g=ab("gap"),v=ob("horizontalDirection"),{callbackRef:y}=Uv(r,p,h,t?sv:s,C,g,a,v,ob("skipAnimationFrameInResizeObserver")),[w,b]=i.useState(0);ib("deviation",e=>{w!==e&&b(e)});const E=ob("EmptyPlaceholder"),M=ob("ScrollSeekPlaceholder")||jw,A=ob("ListComponent"),x=ob("ItemComponent"),k=ob("GroupComponent"),L=ob("computeItemKey"),H=ob("isSeeking"),_=ob("groupIndices").length>0,S=ob("alignToBottom"),V=ob("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==w?w:S?"auto":0,paddingLeft:n.offsetTop,paddingRight:n.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==w?w:S?"auto":0,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...V?{}:{visibility:"hidden"}};return!t&&0===n.totalCount&&E?e(E,{...Qw(E,u)}):e(A,{...Qw(A,u),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:O,children:(t?n.topItems:n.items).map(e=>{const t=e.originalIndex,r=L(t+n.firstItemIndex,e.data,u);return H?m(M,{...Qw(M,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?m(k,{...Qw(k,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Zw},f(e.index,u)):m(x,{...Qw(x,u),...Gw(x,e.data),"data-index":t,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:v?Bw:Rw},_?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})})}),Fw={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Uw={outline:"none",overflowX:"auto",position:"relative"},qw=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Ww={position:Nw(),top:0,width:"100%",zIndex:1};function Qw(e,t){if("string"!=typeof e)return{context:t}}function Gw(e,t){return{item:"string"==typeof e?void 0:t}}const Kw=i.memo(function(){const t=ob("HeaderComponent"),n=ab("headerHeight"),r=ob("HeaderFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,ob("skipAnimationFrameInResizeObserver")),a=ob("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),Yw=i.memo(function(){const t=ob("FooterComponent"),n=ab("footerHeight"),r=ob("HeaderFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,ob("skipAnimationFrameInResizeObserver")),a=ob("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null});function Xw({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:o,context:a,...l}){const c=r("scrollContainerState"),s=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:m}=Vw(c,d,s,u,void 0,f);return t("scrollTo",m),t("scrollBy",h),e(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...f?Uw:Fw,...o},tabIndex:0,...l,...Qw(s,a),children:i})})}function Jw({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:o,style:a,context:l,...c}){const s=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),p=n("customScrollParent"),m=i.useRef(null),C=n("scrollerRef"),{scrollByCallback:g,scrollerRef:v,scrollToCallback:y}=Vw(s,u,d,C,p);return _w(()=>{var e;return v.current=p||(null==(e=m.current)?void 0:e.ownerDocument.defaultView),()=>{v.current=null}},[v,p]),t("windowScrollTo",y),t("scrollBy",g),e(d,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...0!==f?{height:f+h}:{}},...c,...Qw(d,l),children:o})})}const $w=({children:t})=>{const n=i.useContext(Lw),r=ab("viewportHeight"),o=ab("fixedItemHeight"),a=ob("alignToBottom"),l=ob("horizontalDirection"),c=Pv(i.useMemo(()=>av(r,e=>yy(e,l?"width":"height")),[r,l]),!0,ob("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),o(n.itemHeight))},[n,r,o]),e("div",{"data-viewport-type":"element",ref:c,style:qw(a),children:t})},eb=({children:t})=>{const n=i.useContext(Lw),r=ab("windowViewportRect"),o=ab("fixedItemHeight"),a=ob("customScrollParent"),l=Wv(r,a,ob("skipAnimationFrameInResizeObserver")),c=ob("alignToBottom");return i.useEffect(()=>{n&&(o(n.itemHeight),r({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))},[n,r,o]),e("div",{"data-viewport-type":"window",ref:l,style:qw(c),children:t})},tb=({children:t})=>{const n=ob("TopItemListComponent")||"div",r=ob("headerHeight"),i={...Ww,marginTop:`${r}px`},o=ob("context");return e(n,{style:i,...Qw(n,o),children:t})},nb=i.memo(function(t){const r=ob("useWindowScroll"),i=ob("topItemsIndexes").length>0,o=ob("customScrollParent"),a=ob("context");return n(o||r?cb:lb,{...t,context:a,children:[i&&e(tb,{children:e(Pw,{showTopList:!0})}),n(o||r?eb:$w,{children:[e(Kw,{}),e(Pw,{}),e(Yw,{})]})]})}),{Component:rb,useEmitter:ib,useEmitterValue:ob,usePublisher:ab}=kw(Dw,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},nb),lb=Xw({useEmitter:ib,useEmitterValue:ob,usePublisher:ab}),cb=Jw({useEmitter:ib,useEmitterValue:ob,usePublisher:ab}),sb=rb,db=Nv(()=>{const e=Sv(e=>n("td",{children:["Item $",e]})),t=Sv(null),r=Sv(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=Sv(null),o=Sv(null),a=Sv({}),l=Sv(Iw),c=Sv(sv),s=(e,t=null)=>Vv(xv(a,Mv(t=>t[e]),bv()),t);return{components:a,computeItemKey:l,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:o,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:s("Scroller","div"),scrollerRef:c,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr"),GroupComponent:s("Group","tr")}});fv(Mw,db),Nw();const ub={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},fb={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:hb,floor:pb,max:mb,min:Cb,round:gb}=Math;function vb(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function yb(e,t){return e&&e.width===t.width&&e.height===t.height}function wb(e,t){return e&&e.column===t.column&&e.row===t.row}const bb=Nv(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:l,scrollTo:c,scrollTop:s,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:p,propsReady:m},{customScrollParent:C,useWindowScroll:g,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w},b])=>{const E=Sv(0),M=Sv(0),A=Sv(ub),x=Sv({height:0,width:0}),k=Sv({height:0,width:0}),L=Ov(),H=Ov(),_=Sv(0),S=Sv(null),V=Sv({column:0,row:0}),O=Ov(),z=Ov(),N=Sv(!1),I=Sv(0),T=Sv(!0),D=Sv(!1),j=Sv(!1);hv(xv(p,_v(I),Ev(([e,t])=>!!t)),()=>{pv(T,!1)}),hv(xv(Tv(p,T,k,x,I,D),Ev(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{pv(D,!0),Ry(1,()=>{pv(L,e)}),vv(xv(s),()=>{pv(t,[0,0]),pv(T,!0)})}),gv(xv(z,Ev(e=>null!=e&&e.scrollTop>0),Av(0)),M),hv(xv(p,_v(z),Ev(([,e])=>null!=e)),([,e])=>{e&&(pv(x,e.viewport),pv(k,e.item),pv(V,e.gap),e.scrollTop>0&&(pv(N,!0),vv(xv(s,Lv(1)),e=>{pv(N,!1)}),pv(c,{top:e.scrollTop})))}),gv(xv(x,Mv(({height:e})=>e)),u),gv(xv(Tv(Dv(x,yb),Dv(k,yb),Dv(V,(e,t)=>e&&e.column===t.column&&e.row===t.row),Dv(s)),Mv(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),gv(xv(Tv(Dv(E),r,Dv(V,wb),Dv(k,yb),Dv(x,yb),Dv(S),Dv(M),Dv(N),Dv(T),Dv(I)),Ev(([,,,,,,,e])=>!e),Mv(([e,[t,n],r,i,o,a,l,,c,s])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:p}=o;if(0===l&&(0===e||0===p))return ub;if(0===h){const t=By(s,e);return function(e){return{...fb,items:e}}(vb(t,t+Math.max(l-1,0),a))}const m=Eb(p,h,d);let C,g;c?0===t&&0===n&&l>0?(C=0,g=l-1):(C=m*pb((t+u)/(f+u)),g=m*hb((n+u)/(f+u))-1,g=Cb(e-1,mb(g,m-1)),C=Cb(g,mb(0,C))):(C=0,g=-1);const v=vb(C,g,a),{bottom:y,top:w}=Mb(o,r,i,v),b=hb(e/m);return{bottom:y,itemHeight:f,items:v,itemWidth:h,offsetBottom:b*f+(b-1)*u-y,offsetTop:w,top:w}})),A),gv(xv(S,Ev(e=>null!==e),Mv(e=>e.length)),E),gv(xv(Tv(x,k,A,V),Ev(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Mv(([e,t,{items:n},r])=>{const{bottom:i,top:o}=Mb(e,r,t,n);return[o,i]}),bv(my)),t);const Z=Sv(!1);gv(xv(s,_v(Z),Mv(([e,t])=>t||0!==e)),Z);const R=zv(xv(Tv(A,E),Ev(([{items:e}])=>e.length>0),_v(Z),Ev(([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),Mv(([[,e]])=>e-1),bv())),B=zv(xv(Dv(A),Ev(({items:e})=>e.length>0&&0===e[0].index),Av(0),bv())),P=zv(xv(Dv(A),_v(N),Ev(([{items:e},t])=>e.length>0&&!t),Mv(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),bv(py),Hv(0)));gv(P,h.scrollSeekRangeChanged),gv(xv(L,_v(x,k,E,V),Mv(([e,t,n,r,i])=>{const o=jy(e),{align:a,behavior:l,offset:c}=o;let s=o.index;"LAST"===s&&(s=r-1),s=mb(0,s,Cb(r-1,s));let d=Ab(t,i,n,s);return"end"===a?d=gb(d-t.height+n.height):"center"===a&&(d=gb(d-t.height/2+n.height/2)),c&&(d+=c),{behavior:l,top:d}})),c);const F=Vv(xv(A,Mv(e=>e.offsetBottom+e.bottom)),0);return gv(xv(w,Mv(e=>({height:e.visibleHeight,width:e.visibleWidth}))),x),{customScrollParent:C,data:S,deviation:_,footerHeight:i,gap:V,headerHeight:o,increaseViewportBy:e,initialItemCount:M,itemDimensions:k,overscan:n,restoreStateFrom:z,scrollBy:a,scrollContainerState:l,scrollHeight:H,scrollTo:c,scrollToIndex:L,scrollTop:s,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:g,viewportDimensions:x,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w,...h,gridState:A,horizontalDirection:j,initialTopMostItemIndex:I,totalListHeight:F,...f,endReached:R,propsReady:m,rangeChanged:P,startReached:B,stateChanged:O,stateRestoreInProgress:N,...b}},fv($y,Qv,Qy,pw,Ty,mw,Bv));function Eb(e,t,n){return mb(1,pb((e+n)/(pb(t)+n)))}function Mb(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const o=Ab(e,t,n,r[0].index);return{bottom:Ab(e,t,n,r[r.length-1].index)+i,top:o}}function Ab(e,t,n,r){const i=Eb(e.width,n.width,t.column),o=pb(r/i),a=o*n.height+mb(0,o-1)*t.row;return a>0?a+t.row:a}const xb=Nv(()=>{const e=Sv(e=>`Item ${e}`),t=Sv({}),n=Sv(null),r=Sv("virtuoso-grid-item"),i=Sv("virtuoso-grid-list"),o=Sv(Iw),a=Sv("div"),l=Sv(sv),c=(e,n=null)=>Vv(xv(t,Mv(t=>t[e]),bv()),n),s=Sv(!1),d=Sv(!1);return gv(Dv(d),s),{components:t,computeItemKey:o,context:n,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:c("Item","div"),itemContent:e,listClassName:i,ListComponent:c("List","div"),readyStateChanged:s,reportReadyState:d,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),kb=Nv(([e,t])=>({...e,...t}),fv(bb,xb)),Lb=i.memo(function(){const t=Nb("gridState"),n=Nb("listClassName"),r=Nb("itemClassName"),o=Nb("itemContent"),a=Nb("computeItemKey"),l=Nb("isSeeking"),c=Ib("scrollHeight"),s=Nb("ItemComponent"),d=Nb("ListComponent"),u=Nb("ScrollSeekPlaceholder"),f=Nb("context"),h=Ib("itemDimensions"),p=Ib("gap"),C=Nb("log"),g=Nb("stateRestoreInProgress"),v=Ib("reportReadyState"),y=Pv(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;c(t);const n=e.firstChild;if(n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}p({column:jb("column-gap",getComputedStyle(e).columnGap,C),row:jb("row-gap",getComputedStyle(e).rowGap,C)})},[c,h,p,C]),!0,!1);return _w(()=>{t.itemHeight>0&&t.itemWidth>0&&v(!0)},[t]),g?null:e(d,{className:n,ref:y,...Qw(d,f),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(n=>{const i=a(n.index,n.data,f);return l?e(u,{...Qw(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):m(s,{...Qw(s,f),className:r,"data-index":n.index,key:i},o(n.index,n.data,f))})})}),Hb=i.memo(function(){const t=Nb("HeaderComponent"),n=Ib("headerHeight"),r=Nb("headerFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,!1),a=Nb("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),_b=i.memo(function(){const t=Nb("FooterComponent"),n=Ib("footerHeight"),r=Nb("headerFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,!1),a=Nb("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),Sb=({children:t})=>{const n=i.useContext(Hw),r=Ib("itemDimensions"),o=Ib("viewportDimensions"),a=Pv(i.useMemo(()=>e=>{o(e.getBoundingClientRect())},[o]),!0,!1);return i.useEffect(()=>{n&&(o({height:n.viewportHeight,width:n.viewportWidth}),r({height:n.itemHeight,width:n.itemWidth}))},[n,o,r]),e("div",{ref:a,style:qw(!1),children:t})},Vb=({children:t})=>{const n=i.useContext(Hw),r=Ib("windowViewportRect"),o=Ib("itemDimensions"),a=Nb("customScrollParent"),l=Wv(r,a,!1);return i.useEffect(()=>{n&&(o({height:n.itemHeight,width:n.itemWidth}),r({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:n.viewportWidth}))},[n,r,o]),e("div",{ref:l,style:qw(!1),children:t})},Ob=i.memo(function({...t}){const r=Nb("useWindowScroll"),i=Nb("customScrollParent"),o=i||r?Db:Tb,a=i||r?Vb:Sb,l=Nb("context");return e(o,{...t,...Qw(o,l),children:n(a,{children:[e(Hb,{}),e(Lb,{}),e(_b,{})]})})}),{useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib}=kw(kb,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Ob),Tb=Xw({useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib}),Db=Jw({useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib});function jb(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zv.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}const Zb=({optionsList:r=[],onSelectVariable:i,dropdownPosition:o,position:a="relative",width:l,height:c="160px",zIndex:s=9999})=>{const d={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},u=e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"STEPGROUP"!==e?.parentVariableType||"LOCAL"!==e.type&&"STEPGROUP"!==e?.type?"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":d[e.type||""]||"":"step_group_variable"},f=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;function h(e){if(e.endsWith("px")){const t=parseInt(e.slice(0,-2),10);return isNaN(t)?212:t-66}return 212}return e("div",{className:z("ff-variable-dropdown",a),style:o?{top:o.top+30,left:o.left-30,width:l,height:c,zIndex:s}:{width:l,height:c,zIndex:s},children:G(r)?e("div",{className:"ff-variable-option ff-variable-option-no-data",children:e(F,{as:"span",fontSize:12,children:"No Option"})}):e(sb,{totalCount:r.length,itemContent:o=>{const a=r[o];return a?e("div",{className:"ff-variable-data",onMouseDown:()=>i(a),children:l.endsWith("px")?n(t,{children:[e(K,{title:oe(f(a),h(l),"pixel")?f(a):"",style:{width:`${h(l)}px`},children:e(F,{as:"span",fontSize:12,className:"ff-truncated_text",children:f(a)})}),e(P,{name:u(a),height:24,width:24,hoverEffect:!0})]}):e(rv,{option:a})},`${a.id}-${o}`):null},style:{height:c,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},Rb=({data:r=[],width:i,height:o,lineChartWidth:a,yAxisLabel:c,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:p,textSize:m,fontWeight:C,numberSize:g,chartName:v,shouldCenterSinglePoint:y,xAxisLabelGap:w=16,isLeftOverflow:b=!1})=>{const E=40,M=i-80,A=o-80,[x,k]=s(!1),[L,H]=s({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{k(!1),H(e=>({...e,tooltip:{...e.tooltip,visible:!1}}))};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[]);if(!(r&&r.length>0&&r?.some(e=>Array.isArray(e?.data)&&e?.data?.length>0))){const t=[];for(let e=6;e>=0;e--){const n=new Date;n.setDate(n.getDate()-e);const r=n?.toLocaleDateString("en-US",{day:"numeric",month:"short"});t.push(r)}const r=1024,a=6,l=7;return n("div",{className:"ff-line-chart-text",style:{width:i+20+w,gap:w},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:o},children:e(F,{className:"ff-line-chart-yAxisLabel",fontSize:m,fontWeight:"semi-bold",children:c})}),e("div",{className:"ff-line-chart-svg",children:e("svg",{height:o,width:i,className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:A,x2:M,y2:A,stroke:f,strokeWidth:1}),e("text",{x:M/2.1,y:A+E/1.2,textAnchor:"middle",fill:p,className:"ff-line-chart-x-axis-label",style:{fontSize:m,fontWeight:C},children:d}),t.map((t,n)=>e("text",{x:n*(M/(l-1)),y:A+15,textAnchor:0===n?"start":n===l-1?"end":"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:t},t)),Array.from({length:a}).map((t,n)=>{const i=n*r/(a-1),o=i/1024;return e("text",{x:-10,y:A-i*A/r,textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:o?.toFixed(1)},`y-${n}`)})]})})})]})}function _(e){if(!isNaN(e))return parseFloat(e);const t=at,n=e.match(t);if(!n)throw new Error("Invalid input format. Use '<value> <unit>' format (e.g., '10.9580078125 KB') or just a number.");const r=parseFloat(n[1]);switch(n[2]?n[2].toUpperCase():null){case"GB":return parseFloat((1024*r).toFixed(2));case"MB":return parseFloat(r.toFixed(2));case"KB":return parseFloat((r/1024).toFixed(2));default:throw new Error("Invalid unit. Supported units are GB, MB, and KB.")}}const S=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),V="date",O=S?"totalMemory":"value",z=e=>{const t=r?.[0]?.data?.length;if(1===t)return y?M/2:M;const n=r[0].data.findIndex(t=>t[V]===e);return-1===n?0:n/(t-1)*M},N=Math.max(...r?.flatMap(e=>e?.data?.map(e=>_(e[O]))),5),I=e=>{if("memory"===v){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>_(e[O]))));return A-e*A/(t>1024?t:1024)}return A-e*A/(0===N?1024:N)},T=e=>{if(1===e?.length){const t=e?.[0],n=z(t[V]),r=I(_(t[O]));return`M 0 ${I(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[V]),o=I(_(n[O]));if(0===r)return`M ${i} ${o}`;const a=e[r-1],l=a?z(a[V]):0;return`${t} C ${l+(i-l)/2} ${a?I(_(a[O])):0}, ${i-(i-l)/2} ${o}, ${i} ${o}`},"")},D=r[0].data;return n("div",{className:"ff-line-chart-text",style:{width:i+20+w,gap:w},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:o},children:e(F,{className:"ff-line-chart-yAxisLabel",fontSize:m,fontWeight:"semi-bold",children:c})}),n("div",{className:"ff-line-chart-svg",children:[e("svg",{height:o,width:i,onMouseMove:e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left-E;if(e.clientY-t.top-E>A)return k(!1),void H({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});let i={hoverValues:{},dotPositions:{}},o=null;r.forEach((e,t)=>{const r=e.data.reduce((e,t)=>{const r=Math.abs(n-z(t[V]));return r<e.distance?{point:t,distance:r}:e},{point:null,distance:1/0}).point;r&&(o=r[V],i.hoverValues[t]=((e,t=2)=>{let n="";if("string"==typeof e){const t=e.match(rt),r=e.match(it);t&&(e=parseFloat(t[0])),r&&(n=r[0])}const r=Math.pow(10,t);return`${Math.ceil(e*r)/r} ${n}`.trim()})(r[O]),i.dotPositions[t]={x:z(r[V]),y:I(_(r[O]))})}),k(!0),H({cursorX:n,hoverValues:i.hoverValues,dotPositions:i.dotPositions,currentXValue:o,tooltip:o?{visible:!0,left:e.clientX+10,top:e.clientY-20}:{visible:!1,left:0,top:0}})},onMouseLeave:()=>H({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null}),className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:0,x2:0,y2:A,strokeWidth:2}),e("line",{x1:0,y1:A,x2:M,y2:A,stroke:f,strokeWidth:1}),e("text",{x:M/2.1,y:A+E/1.2,textAnchor:"middle",fill:p,className:"ff-line-chart-x-axis-label",style:{fontSize:m,fontWeight:C},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:T(r.data),fill:"none",stroke:r.color,strokeWidth:a,opacity:(o=r.data,o.every(e=>0===_(e[O]))?.5:1)}),L.dotPositions[i]&&n(t,{children:[e("line",{x1:L.dotPositions[i].x,y1:0,x2:L.dotPositions[i].x,y2:A,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:L.dotPositions[i].x,cy:L.dotPositions[i].y,r:5,fill:"white",stroke:r.color,strokeWidth:a,style:{transition:"cx 0.1s, cy 0.1s"}}),e("line",{x1:0,y1:L.dotPositions[i].y,x2:M,y2:L.dotPositions[i].y,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"})]})]},i):null;var o}),(()=>{if(1===D.length){const t=D?.[0];return e("text",{x:y?M/2:M,y:A+15,textAnchor:y?"middle":"end",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=t[V]?String(t[V]):""},String(t[V]))}if(D.length<7)return D.map(t=>e("text",{x:z(t[V]),y:A+15,textAnchor:"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=t[V]?String(t[V]):""},String(t[V])));{const t=(i-80-7*9.2)/6;return Array.from({length:7}).map((n,r)=>{const i=Math.floor(r*(D?.length-1)/6),o=D[i];return e("text",{x:r*t,y:A+15,fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=o?.[V]?String(o?.[V]):""},String(o?.[V]))})}})(),(()=>{if("memory"===v){const t=Math.max(N,1024);return Array.from({length:6}).map((n,r)=>{const i=r*t/5,o=i/1024;return e("text",{x:-10,y:I(i),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:o.toFixed(1)},`y-${r}`)})}return Array.from({length:6}).map((t,n)=>{const r=n*N/5;return e("text",{x:-10,y:I(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:r.toFixed(0)},`y-${n}`)})})()]})}),x&&L.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",style:{left:b&&L.tooltip.left/2>i/1.75?L.tooltip.left-180:L.tooltip.left,top:L.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:L.currentXValue}),Object.entries(L.hoverValues).map(([t,i])=>!1!==r[Number(t)]?.show&&n("div",{className:"ff-line-chart-inner-tooltip",children:["default"!==r[Number(t)]?.name&&e("div",{className:"ff-line-chart-status-dot",style:{backgroundColor:r[Number(t)]?.color}}),r[Number(t)]?.name,": ",i]},t))]})]})]})},Bb=({onClose:t,top:r="100px",left:i="0px",className:o,description:a="Download and Install the fireflink client to run the script",onClick:c=()=>{},optionZIndex:s=10000001})=>{l(()=>{const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]);return n("div",{className:`ff-download-client-wrapper ${o}`,style:{top:r,left:i,zIndex:s},children:[n("div",{className:"ff-download-client-header-wrapper",children:[e("div",{className:"ff-download-client-hollow-triangle"}),e(F,{fontWeight:"semi-bold",lineHeight:"32px",className:"ff-download-client-header-text",children:"Download client"}),e(P,{name:"close",color:"var(--brand-color)",className:"ff-download-client-close-icon",height:12,width:12})]}),n("div",{className:"ff-download-client-content-text",children:[e(F,{as:"div",color:"var(--download-client-content-text-color)",fontWeight:"semi-bold",textAlign:"center",lineHeight:"26px",children:a}),e(F,{as:"div",className:"ff-download-client-description-text",textAlign:"center",fontWeight:"medium",lineHeight:"26px",children:"Choose OS to Download"}),e("div",{className:"ff-download-client-os-wrapper",children:["windows","mac_icon","linux"].map(t=>e("div",{className:"ff-os-version-wrapper",onClick:()=>{c("mac_icon"===t?"mac":t)},children:e(P,{name:t,height:36,width:36})},t))})]})]})},Pb=({legendName:t,height:r,width:i,children:o})=>e("div",{className:"ff_fieldSet_container",children:n("fieldset",{className:"ff_fieldSet",style:{height:r,width:i},children:[e("legend",{className:"ff_legend_container",children:e(F,{color:"var(--license_header_text_color)",fontSize:8,lineHeight:"12px",children:t})}),e("div",{className:"ff_children_container",children:o})]})}),Fb=({onSelectVariable:t,dropdownPosition:n,filteredOptions:r=[],position:i="relative",width:o="100%",zIndex:a,truncateTextValue:l=34})=>e("div",{className:z(`ff-variable-dropdown-container ${i}`),style:n?{top:n.top+30,left:n.left-30,width:o,zIndex:a}:{width:o,zIndex:a},children:G(r)?e("div",{className:"ff-variable-option no-data",children:e(F,{as:"div",children:"No Option",fontSize:14})}):r?.map(n=>e("div",{className:"ff-variable-option",onMouseDown:()=>t(n),children:e(K,{title:oe(n?.name,l,"pixel")?n?.name:"",children:e(F,{children:ie(n?.name,l,"pixel")})})},n?.id))}),Ub=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],placeholder:c="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:p="",dropdownWidth:m="100%",dropdownHeight:C="160px",isHash:g=!1,isOnlyHash:v=!1,dataFiles:y=[],showAddVariableIcon:w=!0,helperText:E="",error:M,autoComplete:A="off",required:x=!1,zIndex:k=9999,truncateTextValue:L=34,formProps:H={},getSelectedVariable:_=()=>{},symbol:S="$",type:V="text",clearIcon:O=!0,inputTitle:N="",onBlur:I,helperTextWidth:T,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...j},Z)=>{const[R,B]=s(!1),[U,q]=s(!1),[W,Q]=s(!1),[Y,X]=s(null),[J,$]=s(0),[ee,te]=s(!1),[ne,re]=s([]),ie=a(null),oe=a(null),[ae,le]=s("auto"),ce=D?.isShowIcon;l(()=>{const e=oe.current?.querySelector(".ff-input-container");if(!e)return;const t=new ResizeObserver(e=>{for(let t of e){const e=`${t.contentRect.width}px`;le(e)}});return t.observe(e),()=>{t.disconnect()}},[]),b(Z,()=>ie.current),l(()=>{null!==Y&&ie.current&&(ie.current.setSelectionRange(Y,Y),ie.current.focus())},[Y]),l(()=>{g&&B(p.startsWith("#"));const e=y?.find(e=>e.name===p),t=o?.find(e=>e?.name===p);if(p.startsWith("#")&&g){const e=p.slice(1).toLowerCase(),t=y.filter(t=>t.name.toLowerCase().includes(e));re(t),B(!0)}const n=null!==e&&p.startsWith("#"),r=null!==t&&p.startsWith("$"),i=p.length>(t?.name.length||0),a=p.length>0&&!r||p.startsWith("#");v?te(!1):r||n||p.includes("$")||p.includes("#")?(te(!1),a&&te(!0)):i&&!p.includes("$")&&te(!0)},[p]);const se=()=>{ie.current&&$(ie.current.selectionStart||0)},de=se,ue=se;l(()=>{ie.current&&$(ie.current.selectionStart||0)},[p]);const fe=e=>{if(ie.current){const{selectionStart:t,selectionEnd:n}=ie.current,r=`${e.name}`;let o;if(o=g&&"#"===p[0]?e.name+p.slice(n||1):e.name,d){d({target:{value:o}},e),_(e.name)}ie.current.value=o,i?.(e),X((t||0)+r.length),B(!1),q(!0)}};const he=function(e,t,n){let r=!1,i="";const o="}"===p[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf(S,t-1),l=e.indexOf(S,t);if(-1!==a&&(v&&"$"===e[a]?r=!1:t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),U&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>e.name.toLowerCase().includes(i.toLowerCase()))||(n=[])}return{showDropdown:r,searchString:i}}(p,J,o),pe=()=>o?.filter(e=>e?.name?.toLowerCase()?.includes(he?.searchString?.toLowerCase()));return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",ref:oe,children:[n(K,{title:N,style:{width:"100%"},children:[e(en,{...j,name:"add_variable",ref:ie,type:V,className:z("ff-variable-input-container",{"ff-variable-input-container--show-icon":ce}),value:p,onChange:d,onPaste:()=>{te(!0)},variant:"primary",label:t,placeholder:c,onClick:de,onKeyUp:ue,onFocus:()=>Q(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||Q(!1)})(e),I?.(e)},autoComplete:A,helperText:E,error:M,required:x,helperTextWidth:T,...H}),!G(p)&&ee&&w&&e("div",{className:"ff-create-variable-container",onClick:f,children:e(F,{fontWeight:"regular",fontSize:"10px",color:"var(--brand-color)",children:"Create Variable"})})]}),!G(p)&&!v&&e("div",{className:z("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":ce}),children:O&&e(K,{title:"Cancel",style:{zIndex:99999},children:e(P,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),ce&&e("div",{className:"ff-info-icon-container",children:e(K,{title:ce&&!D?.isIconDisable?D?.iconToolTipTitle:"",children:e(P,{name:D?.iconName||"",hoverEffect:!1,height:16,width:16,color:D?.iconColor||"var(--text-area-default-color)",onClick:e=>{D?.onIconClick&&D?.onIconClick(e)},disabled:D?.isIconDisable,cursorType:"pointer"})})})]}),he?.showDropdown&&W&&e(Zb,{position:"absolute",zIndex:k,truncateTextValue:L,width:ae,height:G(pe())?"auto":C,optionsList:pe(),onSelectVariable:fe}),R&&g&&W&&e(Fb,{position:"relative",zIndex:k,truncateTextValue:L,width:ae,filteredOptions:ne,onSelectVariable:fe})]})}),qb=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:o,onValueChange:a,variableName:c,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:p,handleSubmit:m,mode:C="create",disabled:g,dataFiles:v=[],truncateTextValue:y=34,isEnterKeySubmit:w=!1})=>{const[b,E]=s(!1),[M,A]=s(""),[x,k]=s(),[L,H]=s(!1),[_,S]=s(!1),[V,O]=s({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===C&&O({name:c,value:d,isChecked:h})},[]);const z=e=>e&&0!==e.length?" "===e[0]||" "===e[e.length-1]?"Space is not allowed at starting and at the end":Ee.test(e)?e.length<3?"Name should contain at least 3 characters":e.length>25?"Name can contain at most 25 characters":"":"Name should be alphanumeric":"Variable Name is required";function N(e){const t=!!e,n=Ee.test(e),r=Vt.test(e),i=e.length>=3&&e.length<=25;return t&&n&&r&&i}l(()=>{const e=z(c);E(!!e),A(e)},[c]),l(()=>{if("edit"!==C)return;const{name:e,value:t,isChecked:n}=V;S(c!==e||d!==t||h!==n)},[C,c,d,h,V]);const I=()=>{!L&&N(c)&&(H(!0),m())};l(()=>{if(!w)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!N(c)||L||"edit"===C&&!_||I()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[w,c,d,h,L,C,_,f]);return e(X,{zIndex:1350,onClose:i,isOpen:t,title:"create"===C?"Create Variable":"Edit Variable",width:"284px",height:"280px",top:"30%",right:8,isFooterRequired:!0,overlay:!0,footerContent:e(()=>n("div",{className:"ff-create-slider-footer",children:[e(U,{onClick:i,label:"Cancel",variant:"tertiary"}),e(U,{variant:"primary",label:"create"===C?"Create":"Update",type:"submit",onClick:I,disabled:!N(c)||L||"edit"===C&&!_})]}),{}),children:n("div",{className:"ff-create-variable-slider",children:[e("div",{className:"ff-create-variable-slider-input",children:e(en,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:c||"",onChange:e=>{H(!1),o(e.target.value)},error:b,helperText:M,onBlur:e=>{const t=e.target.value,n=z(t);E(!!n),A(n)}})}),e(ir,{label:"Variable Type",required:!0,onChange:e=>{u(e),H(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===C}),e(Ub,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:y,dataFiles:v,dropdownWidth:"100%",setHashInputValue:k,hashInputValue:x||{},value:d||"",type:h?"password":"text",onChange:(e,t)=>{const n=e.target.value;a(n,t)},showAddVariableIcon:!1}),n("div",{className:"ff-hide-value-content",children:[e(te,{onChange:e=>p(e.target.checked),name:"hideValue",label:"Hide Value",checked:h,disabled:g}),e(K,{title:"Once the value is hidden, it cannot be undone",children:e(P,{name:"info",width:12,height:12})})]})]})})},Wb=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:o="row",noDataContent:a,height:l="100%",withFixedHeader:c=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,p]=s(-1),m=(e,t)=>{let n=e[t.accessor];return t.cell?t.cell({value:n,row:e,column:t.accessor}):t.accessor||n&&"object"!=typeof n?n:"--"},C=t=>{const n=t.map((t,n)=>e("table",{className:"ff-accordion-table",cellSpacing:0,children:e("tbody",{className:"ff-table-body",children:e("tr",{className:"ff-table-row",children:r.map((n,r)=>e("td",{className:"ff-table-cell",style:{width:n.width},children:"column"===o&&0===r?"":e(F,{children:m(t,n)})},n.accessor+r))},t.id||n)})},`accordion-table-${n}`));return n};return n("div",{style:{height:l},className:z("ff-accordion-table-container",{"ff-accordion-fixed-header-table":c}),children:[e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":c}),children:e("thead",{children:e("tr",{className:"ff-table-row",children:r.map(t=>e("th",{style:{width:t.width},className:z("ff-table-header",d&&`ff-accordion-table--${d}-bg`),children:e("div",{children:e(F,{fontWeight:"semi-bold",fontSize:12,children:t.header})})},`header-${t.header}`))})})}),"row"===o&&i.map((n,r)=>e($,{highlightText:t,headerTitle:n.title,color:"var(--text-color)",accordionContent:C(n.data),disable:n.disable,disableInfoMessage:n.disableInfoMessage,accordionStateIconName:"arrows_down_icon",AccordionStateIconWidth:u,AccordionStateIconHeight:f},`accordion-row-${r}`)),"column"===o&&i.map((i,o)=>n("div",{className:"column-table-accordion",children:[e("div",{className:"ff-display-flex",children:e(K,{title:i.disable?i?.disableInfoMessage:"string"==typeof i.title&&oe(i.title,r[0]?.width,"pixel")?i.title:"",placement:"bottom-start",children:n("div",{className:`accordion-header ${i.disable&&"accordion-header--disabled"}`,children:[e("div",{className:"header-title",children:e("span",{children:e(F,{children:e(J,{text:ie(i.title,r[0]?.width,"pixel"),highlight:t})})})}),e("div",{className:"accordion-arrow",onClick:()=>{!i.disable&&(e=>{p(e===h?-1:e)})(o)},children:e(P,{name:h===o?"arrows_down_icon":"arrows_right_icon",color:"var(--table-with-accordion-icon-color)",width:u,height:f,hoverEffect:!1})})]})})}),h===o&&e("div",{children:C(i.data)})]},`column-accordion-${o}`)),i.length<=0&&e("div",{className:"no-data-content",style:{height:`calc(${l} - 50px)`},children:a})]})},Qb=({progressPercentage:t,totalMemory:r,usedMemory:i,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:l=10,label:c,labelFontSize:s=12,labelTextColor:d="var(--ff-card-status-text-color)",showPercentage:u=!1,percentageFontSize:f=10,percentageTextColor:h="var(--tooltip-text-color)",progressBarWidth:p="200px"})=>{const m=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),i=n[2];return"gb"===i?1024*r:"kb"===i?r/1024:r};let C=0,g=c;if(void 0!==r&&void 0!==i){const e=m(i),t=m(r);t>0?(C=e/t*100,g=c||i):(C=0,g="0MB")}else C=t||0;const v=Math.max(0,Math.min(C,100));return n("div",{className:"ff-progress-bar-container "+(g?"ff-has-label":""),style:{width:p},children:[e("div",{className:"ff-progress-bar-track",style:{backgroundColor:a,height:`${l}px`},children:e("div",{className:"ff-progress-bar",style:{width:`${v}%`,backgroundColor:o,height:`${l}px`},children:u&&e(F,{className:"ff-progress-bar-percentage",fontSize:f,color:h,children:`${Math.round(v)}%`})})}),g&&e("div",{className:"ff-progress-bar-label",children:e(F,{fontSize:s,color:d,children:e(K,{title:oe(g,10,"count")?g:"",children:ie(g,10,"count")})})})]})},Gb=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:o=!1,type:l="button",className:c="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:p="auto",buttonHeight:m="auto",selectedFile:C={},handleCloseIcon:g,isMandatory:v=!1})=>{const y=a(null),[w,b]=s(0);u(()=>{y.current&&b(y.current.getBoundingClientRect().width-10)},[p]);const E=C?.name||i,M=w?ie(E,w,"pixel"):E,A=!!w&&oe(E,w,"pixel");return e("div",{ref:y,style:{width:p},children:e(K,{title:A?E:"",children:e(U,{variant:t,label:M,type:l,onClick:r,buttonWidth:p,buttonHeight:m,isChooseFile:h,size:n,disabled:o,className:c,iconName:f,style:d,iconPosition:"right",selectedFile:C,handleCloseIcon:g,isMandatory:v})})})},Kb=({selected:t="text",handleClick:r,tabList:i})=>{const o=i?.includes("Automation"),a=i?.includes("Manual");return n("div",{className:"ff-script-switch-container",children:[e(K,{title:o?"Automation":"Add Automation",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Automation"===t?"active":""),onClick:()=>r(o?"Automation":"Add Automation"),children:e(P,{name:o?"automation_testcase":"add_testcase",color:"Automation"===t?"var(--primary-button-text-color)":"var(--description-text)"})})}),e(K,{title:a?"Manual":"Add Manual",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Manual"===t?"active":""),onClick:()=>r(a?"Manual":"Add Manual"),children:e(P,{name:a?"manual_testcase":"add_testcase",color:"Manual"===t?"var(--primary-button-text-color)":"var(--description-text)"})})})]})},Yb=({selected:t,handleClick:n,tabList:r})=>e("div",{className:"ff-switch-container",children:r.map(r=>e(K,{title:t===r.name?null:r.tooltip,zIndex:1e3,children:e("div",{className:"ff-switch-button "+(t===r.name?"active":""),onClick:()=>n(r.name),children:e(P,{name:r.icon,color:t===r.name?"var(--primary-button-text-color)":"var(--description-text)"})})},r.name))}),Xb=({onModalClose:t,MediaSrc:r,fileName:o,onDeleteClick:a,mediaType:c,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:p,isMediaIcon:m=!1,previewOnly:C=!1,iconName:g="video_preview",isDisabled:v=!1})=>{const[y,w]=s(!1),b=i.useRef(null),E=()=>{w(!0),h&&h(d)},M=()=>{t?.(),w(!1)},A=()=>{p&&p(d)};return l(()=>{C&&w(!0)},[C]),n("div",{children:[!C&&(m?e(P,{name:g,hoverEffect:!0,onClick:E,disabled:v}):e(tv,{mediaSrc:r,mediaType:c,onDownloadClick:A,onDeleteClick:()=>a?.(r),onExpandClick:E,fileName:o,fileId:d,thumbnailMediaSrc:u,isDelete:f})),y&&e(Vf,{isOpen:y,onClose:M,isFooterDisplayed:!1,isHeaderDisplayed:!1,customWidth:"1130px",customHeight:"570px",zIndex:1e4,children:n("div",{className:"media-wrapper",children:[n("div",{className:"ff-expand-icons",children:[e(K,{title:"Download File",children:e(P,{name:"download_file_icon",onClick:A,color:"var(--icons-default-color)",className:"header-icons"})}),e(K,{title:"Expand",children:e(P,{name:"expand",onClick:E,color:"var(--icons-default-color)",className:"header-icons"})}),e(K,{title:"close",children:e(P,{name:"close",onClick:M,color:"var(--icons-default-color)",className:"header-icons"})})]}),"image"===c&&e("img",{src:r,alt:"fileName",height:"auto",width:"auto"}),"video"===c&&e("video",{src:r,controls:!0,controlsList:"nodownload",className:"ff-video-preview",ref:b,onCanPlay:()=>{if(b.current){const e=b.current.play();void 0!==e&&e.catch(e=>{console.error("Autoplay failed:",e)})}}})]})})]})},Jb=({children:t,orientation:r="",navBarIcons:o=[],mobileHeight:a=448,mobileWidth:l=220,UtilityBar:c,tooltip:s={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?a:l,p=f?l:a,m=c&&"top"===u,C=c&&"bottom"===u,g=c&&"left"===u;return n("div",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",g?"ff-side-nav-left":"",m?"navbar-top":"",C?"navbar-bottom":""].filter(Boolean).join(" "),children:[m&&e("div",{className:"ff-nav-bar top-nav-bar",children:o.map(({title:t,name:n,className:r,...i},a)=>{const l=s?.[n]??a;return e(K,{title:s?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${a===o.length-1?"last-icon":""} ${m?"navbar-top":""}`,children:e(P,{name:n,...i})})},l)})}),e("div",{className:"ff-mobileskin-container",style:{height:h+16,width:p+16},children:e("div",{className:"ff-mobile-container",style:{width:p,height:h,background:d||"transparent"},children:e("div",{className:"ff-mobile-image-container",children:i.isValidElement(t)?t:e("img",{src:t,alt:"Mobile content",style:{width:f?"100%":2.1*l+"px",height:f?"100%":.5*a+"px"}})})})}),c&&C&&e("div",{className:"ff-nav-bar",children:o?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-nav-bar-icon ${t?.className||""} ${n===o.length-1?"last-icon":""}`,children:e(K,{title:r,children:e(P,{...i})})},n)})}),c&&g&&e("div",{className:"ff-side-nav-bar",children:o?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-sidebar ${t?.className||""} ${n===o.length-1?"last-icon":""}`,children:e(K,{title:r,placement:"bottom",children:e(P,{...i})})},n)})})]})},$b=o(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:o=16,placeholder:l="Enter text",iconName:c="right_arrow_filled_icon",iconPosition:s="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:p="send",submitPrompt:m,onPromptChange:C,onBlur:g,onFocus:v,disableInput:y,isAdditionalIcon:w=!1,additionalIconName:b,additionIconToolTip:E,onAdditionalIconClick:M},A)=>{const x=a(null);se([{key:"Enter",action:()=>k()}],x);const k=e=>{f&&m?.(f.trim())};return n("div",{className:z("ff-prompt-container",{"icon-left":"left"===s,"icon-right":"left"!==s}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:x,children:[e(K,{placement:"top",title:p,children:e(P,{name:c,className:"ff-prompt-icon",height:i,width:o,onClick:m,color:h,disabled:G(f)})}),e("input",{ref:A,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:C,onFocus:v,onBlur:g,value:f,readOnly:y}),w&&b&&e(K,{placement:"top",title:E,children:e(P,{name:b,className:"ff-prompt-icon additional-icon",height:i,width:o,onClick:M})})]})}),eE=({content:t,isVisible:n,maxWidth:r=300,onClick:i,isClickable:o=!0,arrowPosition:a="left"})=>e("div",{onClick:i,style:{width:`${r}px`,"--triangle-position":r-4+"px"},className:z("ff-chat-msg-box",{visible:n,hidden:!n,pointer:o,default:!o,"chat-arrow-left":"left"===a,"chat-arrow-right":"left"!==a}),children:e("div",{className:z("content",`arrow-${a}`),children:e(F,{children:t})})}),tE=({iconName:r,iconPosition:{top:i,left:o,bottom:a,right:l},hoverIconPosition:{top:c,left:d,bottom:u,right:f},modalPosition:{top:h,left:p,bottom:m,right:C},modalWidth:g,modalHeight:v,headerContent:y="Header Content",footerContent:w="Footer Content",iconWidth:b,iconHeight:E,modalHeading:M="Ask Fia",children:x,onClearChat:k})=>{const[L,H]=s(!1),[_,S]=s(!1);return n(t,{children:[n("div",{style:{top:void 0!==i?`${i}px`:void 0,left:void 0!==o?`${o}px`:void 0,bottom:void 0!==a?`${a}px`:void 0,right:void 0!==l?`${l}px`:void 0},className:"ff-dynamic-icon-container",children:[e(P,{className:"ff-dynamic-icon",name:r,onClick:()=>{S(e=>!e),setTimeout(()=>H(e=>!e),10)},height:E,width:b}),e("div",{style:{top:void 0!==c?`${c}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-chat-icon-hover",children:e(P,{name:"ask_fia_icon",height:32,width:82})})]}),_&&A(e("div",{className:z("ff-dynamic-modal",{open:L}),style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==p?`${p}px`:void 0,bottom:void 0!==m?`${m}px`:void 0,right:void 0!==C?`${C}px`:void 0,position:"fixed",height:v,width:g},children:n("div",{className:"ff-dynamic-modal-content",children:[y&&e("div",{className:"ff-dynamic-modal-header",children:n("div",{className:"header-container",children:[n("div",{className:"header-left",children:[e(P,{height:16,width:16,name:"fia_icon"}),e(F,{fontWeight:"medium",children:M})]}),n("div",{className:"header-right",children:[e("span",{className:"action",children:e(K,{title:"Clear chat",placement:"bottom",children:e(P,{height:16,width:16,name:"delete",color:"var(--tooltip-text-color)",onClick:k})})}),e("span",{className:"action",children:e(K,{title:"Close",placement:"bottom",children:e(P,{height:16,width:16,name:"close",color:"var(--tooltip-text-color)",onClick:()=>(H(!1),void setTimeout(()=>S(!1),300))})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:x}),w&&e("div",{className:"ff-dynamic-modal-footer",children:w})]})}),document.body)]})},nE=o(({iconName:r,hoverTitle:i,iconPosition:{top:o,left:c,bottom:d,right:u},hoverIconPosition:{top:f,left:h,bottom:p,right:m},modalPosition:{top:C,left:g,bottom:v,right:y},modalWidth:w,modalHeight:E,headerContent:M="Header Content",footerContent:x="Footer Content",iconWidth:k,iconHeight:L,children:H,onVisibilityChange:_},S)=>{const[V,O]=s(!1),[N,I]=s(!1),T=a(null),D=()=>{T.current&&clearTimeout(T.current),O(!1),T.current=setTimeout(()=>{I(!1),_?.(!1)},300)};return b(S,()=>({closeModal:D})),l(()=>()=>{T.current&&clearTimeout(T.current)},[]),n(t,{children:[n("div",{style:{top:void 0!==o?`${o}px`:void 0,left:void 0!==c?`${c}px`:void 0,bottom:void 0!==d?`${d}px`:void 0,right:void 0!==u?`${u}px`:void 0},className:"ff-ai-dynamic-icon-container",children:[e(P,{className:"ff-ai-dynamic-icon",name:r,onClick:()=>{T.current&&clearTimeout(T.current),I(e=>!e),_?.(!N),T.current=setTimeout(()=>O(e=>!e),10)},height:L,width:k}),e("div",{style:{top:void 0!==f?`${f}px`:void 0,left:void 0!==h?`${h}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0},className:"ff-ai-chat-icon-hover",children:e("div",{className:"ai-hover-leaf",children:e(F,{fontWeight:"bold",fontSize:14,color:"var(--chatbot-leaf-text)",children:i})})})]}),N&&A(e("div",{className:z("ff-ai-dynamic-modal",{open:V}),style:{top:void 0!==C?`${C}px`:void 0,left:void 0!==g?`${g}px`:void 0,bottom:void 0!==v?`${v}px`:void 0,right:void 0!==y?`${y}px`:void 0,position:"fixed",height:E,width:w},children:n("div",{className:"ff-ai-dynamic-modal-content",children:[M&&e("div",{className:"ff-ai-dynamic-modal-header",children:M}),e("div",{className:"ff-ai-dynamic-modal-body",children:H}),x&&e("div",{className:"ff-ai-dynamic-modal-footer",children:x})]})}),document.body)]})}),rE=({variant:t,title:r,tabTitle:i,comment:o,profileShortName:a})=>n("div",{className:"ff-history-card",children:[e("div",{className:z("header",`header--${t}`),children:e(F,{fontWeight:"semi-bold",children:i})}),n("div",{className:"body",children:[e("div",{className:"title",children:n("div",{className:"profile",children:[e(F,{className:z("avatar",`avatar--${t}`),children:a}),e(F,{children:r})]})}),n("div",{className:"comment-container",children:[e(F,{fontWeight:"semi-bold",className:"heading",children:"Comments:"}),e(F,{color:"var(--details-page-value-color)",className:"comment",children:o})]})]})]}),iE=({onChange:t,disabled:r,checked:i=!1,id:o="toggle",path:a})=>n("div",{className:"ff--ai-switch-container",children:[e("input",{className:"ff--ai-switch-checkbox",id:`ff-toggle-${o}`,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:i}),e("label",{className:z("ff--ai-switch-label",{"ff--ai-switch-label--disabled":r}),htmlFor:`ff-toggle-${o}`,children:e("span",{className:"ff--ai-switch-content",children:n("span",{className:"ff--ai-switch-content",children:[e(F,{className:z("ff--ai-switch-typography",{left:i,right:!i}),as:"div",fontWeight:"bold",fontSize:18,color:i?"var(--base-bg-color)":"var(--ff-ai-toggle-text-color)",children:"AI"}),e("img",{className:"ff--ai-switch-image",src:a,alt:"AI image"})]})})})]}),oE=o(({name:t,height:n=30,width:r=30,path:i="",onClick:o,color:c="var(--brand-color)",hoverEffect:s=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:p,y:m,tabIndex:C=-1,...g},v)=>{if(!B[t])return null;const y=a(null);l(()=>{y.current&&(void 0!==p&&y.current.setAttribute("x",String(p)),void 0!==m&&y.current.setAttribute("y",String(m)))},[p,m]);const w={ref:v,onClick:u?void 0:o,style:{height:`${n}px`,width:`${r}px`,cursor:u?"not-allowed":"pointer",opacity:u?.3:1},tabIndex:C,...g};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:""})})}),aE=({id:r=0,serialNumber:i,activeId:o,setActiveId:c,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:p,onPreviousClick:m,disabled:C,isEditAccess:g,versionsLength:v,count:y,hiddenActions:w=[]})=>{const[b,E]=s(!1),[M,A]=s(!1),x=a(null),k=Array.isArray(w)?w:w?[w]:[],L=(e,t)=>{e.stopPropagation(),t()};l(()=>{x.current&&(()=>{if(x.current){const e=getComputedStyle(x.current),t=1.2*parseFloat(e.fontSize)*6;x.current.scrollHeight>t&&A(!0)}})()},[]);const H=e=>{e.stopPropagation(),E(!b)};return n("div",{className:`ff-prompt-container-Block ${o===r?"active":"inactive"} `,onClick:()=>{c(r),h()},children:[e(F,{fontSize:8,className:"ff-prompt-number-bg-color",as:"span",children:`Test cases ${i}`}),n(t,{children:[n("div",{className:"ff-prompt-content "+(b?"expanded":""),ref:x,children:[d,b&&n(t,{children:[e("span",{role:"button","aria-label":"toggleExpand",onClick:H,className:"read-less-btn",children:e(F,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read Less"})})," "]})]}),M&&!b&&e("div",{role:"button","aria-label":"toggleExpand",onClick:H,className:"read-more-btn",children:e(F,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read More"})})]}),n("div",{className:"ff-prompt-icons",children:[e("div",{className:"ff-prompt-icons-leftside",children:[{action:"delete",title:"Delete",color:"var(--ff-delete-button-attachment)"},{action:"edit",title:"Edit",color:"var(--label-edit-text-label-color)"},{action:"regenerate",title:"Regenerate",color:"var(--label-edit-text-label-color)"}].filter(e=>!k.includes(e.action)).map((t,n)=>{const r=g&&"delete"===t?.action||"regenerate"===t?.action&&(v??0)>=3||C;return e(K,{title:t.title,placement:"bottom",children:e(P,{disabled:r,name:t.action,color:t.color,hoverEffect:!0,onClick:e=>((e,t)=>{e.stopPropagation(),u(t)})(e,t.action)})},`${t?.title}-${n}`)})}),n("div",{className:"ff-prompt-icons-rightside",children:[e(P,{disabled:1===y,className:"ff-prompt-icons-style",name:"arrow_left_accordian",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>L(e,m)}),f,e(P,{disabled:y===v,className:"ff-prompt-icons-style",name:"arrow_right_icon",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>L(e,p)})]})]})]})},lE=o(({type:t="text",variant:r="primary",name:i="",label:o,disabled:a=!1,disableLinkIcon:l=!1,required:c=!1,placeholder:s="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:p="",onChange:m,onBlur:C,onFocus:g,autoComplete:v="off",autoFocus:y=!1,minValue:w=-1/0,maxValue:b=1/0,transparentBackground:E=!1,size:M="small",isLabelRequired:A=!0,onClick:x,onKeyUp:k,isViewMode:L=!1,...H},_)=>{const S=!G(d);return n("fieldset",{className:z("ff-link-input-fieldset",{"ff-link-input-fieldset--disabled":a}),children:[n("div",{className:z("ff-link-input-container",{"ff-link-input-container--float":S,"ff-link-input-container--disabled":!!a}),children:[A&&n("label",{className:z(`ff-link-input-label-container ff-link-input-label-container--${M}`,{"ff-link-input-label-container--danger":!!u}),htmlFor:i,children:[c&&e("span",{className:"required-asterisk",children:"*"}),e("span",{className:z(`ff-link-input-label ff-link-input-label--${r}`,{"ff-link-input-label--no-hover":!!d,"ff-link-input-label--disabled":!!a,"ff-link-input-label--danger":!!u}),children:o})]}),e("input",{ref:_,name:i,value:d,type:t,spellCheck:!1,id:i,className:z(`ff-link-input ff-link-input-${r} default-input ff-link-input--${M}`,{"ff-link-input--transparentBackground":!!E,"ff-link-input--no-hover":!!d,"ff-link-input--disabled":!!a,"ff-link-input--danger":!!u,"ff-link-input--no-border":!!h,"ff-link-input--placeholder":!A},`${p}`),placeholder:s,disabled:L||a,onChange:m,onFocus:g,onBlur:C,autoComplete:v,autoFocus:y,min:w,max:b,onClick:x,onKeyUp:k,...H}),e("div",{className:"input-link-icon",children:l||u||!S?e(P,{name:"link",disabled:!0}):e(K,{title:"Click here to navigate",children:e("span",{children:e(P,{name:"link",disabled:!1,onClick:()=>{d&&!u&&window.open(d,"_blank")}})})})})]}),f&&u&&e("span",{className:z("ff-link-input-message",{"ff-link-input-message--danger":!!u}),children:f})]})}),cE=({labelsList:r=[]})=>{const i=e("div",{className:"ff-chip-tooltip",children:r.filter((e,t)=>t>0).map((t,n)=>e(F,{as:"div",className:"ff-chip-tooltip-label",children:t},`label-${n}-${t}`))});return e(t,{children:!G(r)&&n("div",{className:"ff-chip-with-count-container",children:[e(K,{title:r[0],children:e(F,{as:"div",children:ie(r[0]||"",10),className:"ff-chip-label",fontWeight:"medium"})}),r.length>1&&e(K,{title:e(F,{as:"div",children:i}),children:e(F,{as:"div",children:"+"+(r.length-1),className:"ff-chip-count",fontWeight:"medium"})})]})})};class sE extends E{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const dE=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:o="To Add Group",disableButton:a=!1,stepCount:l=1,iconWidth:c=120,iconHeight:s=120,addContentLabel:d="step"})=>n("div",{className:"add-content-button "+(a?"disabled":""),children:[!G(t)&&e("div",{className:"icon-container",children:e(P,{name:t,width:c,height:s})}),n("div",{className:"typography-label-button",children:[n(F,{fontSize:"12px",fontWeight:"regular",lineHeight:"18px",children:[d+l," :"]}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:"Click"}),e(Sf,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:a}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:o})]})]}),uE=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:o,noBorder:a=!1,noPadding:l=!1,titleSize:c="12px"})=>{const[d,u]=s(0);return n("div",{className:"ff-tabs-slider-container",children:[n("div",{className:z(`ff-tab-row--${t} ff-tab-row-section`,{"ff-tab-row--no-border":a,"ff-tab-row--no-padding":l,"ff-tab-row--position":r.length>4}),children:[r.length>4&&e(P,{className:"ff-tab-icon ff-tab-icon--previous",name:""+(d?"arrow_left_accordian":""),onClick:()=>{d>0&&u(e=>e-1)},hoverEffect:!0}),e("div",{className:"ff-tab-row-carousel",children:e("div",{className:"carousel_inner",style:{transform:`translateX(-${100*d}%)`},children:r.map(r=>n("button",{onClick:()=>!r.disabled&&o(r.id),disabled:r.disabled,className:z(`ff-tab-button--${t}`,{disabled:r.disabled,active:i===r.id}),style:{flex:"0 0 25%"},children:[n("div",{className:"label-count-section",children:[e(K,{title:r.label.length>9?r.label:"",children:e(F,{children:r.label.length>9?r.label.slice(0,9)+"...":r.label,fontSize:c,lineHeight:"18px",fontWeight:i===r.id?"semi-bold":"regular",color:i===r.id?"var(--tabs-label-active-color)":"var(--tabs-label-default-color)",className:z("ff-tab-label",{"ff-tab-label--active":i===r.id})})}),"default"===t&&r.count&&e("span",{className:z("tab-count",{"tab-count--active":i===r.id}),children:r.count})]}),e("div",{className:z("ff-tab-bar",{"ff-tab-bar--active":i===r.id})}),e("span",{className:"ff-defaultStatus "+("success"===r.status?"ff-successStatus":"error"===r.status?"ff-dangerStatus":"")})]},r.id))})}),r.length>4&&e(P,{className:"ff-tab-icon ff-tab-icon--next",name:""+(d<Math.ceil(r.length/4)-1?"arrow_right_icon":""),onClick:()=>{d<Math.ceil(r.length/4)-1&&u(e=>e+1)},hoverEffect:!0})]}),e("div",{className:"ff-tab-content",children:r.find(e=>e.id===i)?.component})]})},fE=o(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:o=!1,variant:a="default",backgroundColor:l=!1,border:c=!1},s)=>{const d={default:"var(--ff-avatar-background-color)",success:"var(--status-success-text-color)",danger:"var(--ff-delete-button-attachment)"};return e("button",{disabled:o,onClick:i,className:`\n ff-status-indicator\n ff-status-indicator--${a}\n ${l?`ff-status-indicator--with-bg ff-status-indicator--${a}-bg`:""}\n ${c?`ff-status-indicator--with-border ff-status-indicator--${a}-border`:""}\n `,ref:s,children:n("div",{className:"ff-status-indicator__content",children:[e(P,{name:"danger"===a?"close":r,color:d[a]||d.default,className:`ff-status-indicator__icon ff-status-indicator__icon--${a}`}),e(F,{as:"div",fontSize:12,className:`ff-status-indicator__label ff-status-indicator__label--${a}`,fontWeight:"medium",lineHeight:"20px",children:t})]})})}),hE=({rootLabel:t,childrenLabels:r,align:i="center",direction:o="horizontal"})=>{const a=r.length;return n("div","vertical"===o?{className:"ff-os-tree-vertical",style:{"--child-count":a},children:[n("div",{className:`ff-os-tree-vertical__row ff-os-tree-vertical__row--${i}`,children:[e("div",{className:"ff-os-tree-vertical__root-label",children:t}),e("div",{className:"ff-os-tree-vertical__horizontal-line"})]}),n("div",{className:"ff-os-tree-vertical__vertical-line-wrapper",children:[e("div",{className:"ff-os-tree-vertical__vertical-line"}),r.map((t,r)=>n("div",{className:"ff-os-tree-vertical__child",children:[e("div",{className:"ff-os-tree-vertical__child-connector"}),e("div",{className:"ff-os-tree-vertical__child-label",children:t})]},r))]})]}:{className:`ff-os-tree ff-os-tree--${i}`,style:{"--child-count":a},children:[n("div",{className:"ff-os-tree__root-wrapper",children:[e("div",{className:"ff-os-tree__root-label",children:t}),e("div",{className:"ff-os-tree__vertical-root"})]}),e("div",{className:"ff-os-tree__horizontal-connector",children:r.map((t,n)=>e("div",{className:"ff-os-tree__vertical-child"},n))}),e("div",{className:"ff-os-tree__children",children:r.map((t,n)=>e("div",{className:"ff-os-tree__child-container",children:e("div",{className:"ff-os-tree__child-label",children:t})},n))})]})},pE=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:o=30})=>{const[c,d]=s(Array(6).fill("")),[u,f]=s(o),[h,p]=s(!0),m=a(Array(6).fill(null));l(()=>{h||m.current[0]?.focus()},[h]),l(()=>{let e;return u>0&&(e=window.setInterval(()=>f(e=>e-1),1e3)),0===u&&p(!1),()=>clearInterval(e)},[u]);const C=e=>{e.preventDefault();const t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6),n=Array(6).fill("");t.split("").forEach((e,t)=>{n[t]=e}),d(n);const r=Math.min(t.length,5);m.current[r]?.focus()};return e(Vf,{isOpen:!0,onClose:t,isFooterDisplayed:!1,isHeaderDisplayed:!1,zIndex:999999,customWidth:"340px",children:n("div",{className:"ff-otp-popup",children:[n("div",{className:"ff-otp-header",children:[e(F,{fontSize:24,lineHeight:"36px",fontWeight:"semi-bold",children:"OTP Verification"}),e(P,{name:"close",height:16,width:16,onClick:t,className:"ff-close-icon"})]}),e("div",{className:"ff-otp-boxes",children:c.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===c.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...c];r[t]=n,d(r),t<5&&m.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...c];n[t]="",d(n),t>0&&m.current[t-1]?.focus()}})(e,n),onPaste:C,ref:e=>m.current[n]=e,readOnly:!0},n))}),e(U,{variant:"primary",label:"Submit",onClick:()=>i(c.join("")),disabled:c.includes(""),className:"ff-submit-btn"}),n("div",{className:"ff-resend "+(h?"disabled":""),onClick:h?void 0:()=>{f(o),p(!0),d(Array(6).fill("")),r()},children:["Re-send OTP",u>0?` (${u}s)`:""]})]})})},mE=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:o,mediaType:c,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:m=!0,showDownload:C=!0,showExpand:g=!0,width:v="800px",height:y="432px",showControls:w=!0,customStyle:b,overlay:E=!0,children:M,showControlDownload:A=!1,showControlExpand:x=!1})=>{const k=a(null),L=a(null),[H,_]=s(0),[S,V]=s(0),[O]=s(!1),[z,N]=s(!1),[I,T]=s(0);l(()=>{"video"===c&&k.current&&!M&&(i?k.current.play():k.current.pause())},[i,c,M]);const D=p(()=>{if(k.current&&!z){const e=k.current.currentTime/k.current.duration*100;T(e||0),_(k.current.currentTime)}},[z]),j=p(()=>{k.current&&V(k.current.duration)},[]),Z=p(()=>{_(0),T(0),o?.()},[o]),R=p(e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`,[]),B=p(e=>{if(k.current){const t=e/100*k.current.duration;k.current.currentTime=t,T(e),_(t)}},[]),U=p(e=>{if(z||!L.current)return;const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B,z]),q=p(e=>{if(!L.current)return;N(!0);const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B]),W=p(e=>{if(!z||!L.current||!k.current)return;const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[z,B]),Q=p(()=>{N(!1)},[]);return l(()=>{if(z)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",Q),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",Q)}},[z,W,Q]),t?e(Mc,{isOpen:t,onClose:r,isMaximized:!1,showHeader:m,overlay:E,downloadHandler:()=>{},customStyle:b,header:n("div",{className:"ff-header-content",children:[e(P,{width:23,height:23,name:"automatic_locator"}),e(F,{children:e("span",{className:"ff-header-title",children:u})})]}),icons:e(K,{title:"Close",children:e(P,{name:"close",onClick:r})}),width:v,height:y,zIndex:999,children:n("div",{className:"ff-video-wrapper",children:[M||("video"===c?e("video",{ref:k,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:j,onEnded:Z}):e("img",{src:d,alt:"Preview",className:"ff-media-image"})),n("div",{className:"ff-top-right-icons",children:[C&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f})}),g&&e(K,{title:O?"Minimize":"Maximize",children:e(P,{name:O?"collapse_icon":"expand_icon",color:"white",onClick:h})})]}),"video"===c&&w&&!M&&n("div",{className:"ff-media-controls",children:[e("button",{onClick:o,className:"ff-play-pause-btn",children:e(P,i?{width:35,height:35,name:"pause_button",color:"white"}:{width:35,height:35,name:"play_button",color:"white"})}),n("div",{className:"ff-progress-bar",children:[e("span",{className:"ff-current-time",children:R(H)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:I,onChange:e=>B(parseFloat(e.target.value)),onClick:U,onMouseDown:q,ref:L}),e("span",{className:"ff-total-time",children:R(S)})]}),n("div",{className:"ff-control-icons",children:[A&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f,cursorType:"pointer"})}),x&&e(K,{title:O?"Minimize":"Maximize",children:e(P,{name:O?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer"})})]})]})]})}):null},CE=({header:r,secondaryHeader:i,primaryCount:o,secondaryCount:a,primaryItems:l,secondaryItems:c,width:s,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:p,actions:m,tabsData:C,notchPosition:g="top-left"})=>{const v=i&&"secondary"===d?c:l,y=a&&parseInt(a)>0,w=o&&parseInt(o)>0,b=i&&(w||y),{tooltip:E="Download",iconName:M="download_file",disabled:A=!1,onClick:x}=m?.download||{},{tooltip:k="Delete",iconName:L="delete_icon",disabled:H=!1,onClick:_}=m?.delete||{},S=()=>n("div",{className:"ff-dropdown-header-icons",children:[m?.download&&e(K,{title:E,children:e(P,{name:M||"",className:"ff-dropdown-icon ff-download-icon",onClick:x,width:18,height:20,disabled:A,hoverEffect:!0})}),m?.delete&&e(K,{title:k,children:e(P,{name:L||"",className:"ff-dropdown-icon ff-delete-icon",onClick:_,width:25,height:25,disabled:H,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:s?{minWidth:s}:{},children:[e("div",{className:"ff-dropdown-notch "+("bottom-center"===g?"bottom-center":"top-left")}),e("div",{className:"ff-dropdown-header",children:e("div",{className:"ff-dropdown-header-content",children:i&&C&&u?n(t,{children:[e(Ic,{tabsData:C,activeTabId:u,onTabClick:e=>{p&&p(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),b&&S()]}):i&&b?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),S()]}):i?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),a&&e("span",{className:"ff-dropdown-count",children:a})]})]}):e(F,{fontSize:16,fontWeight:"semi-bold",children:r})})}),e("ul",{className:"ff-dropdown-list",children:v?.map((t,n)=>e("li",{className:"ff-dropdown-item",children:t},n))})]})},gE=(e,t)=>"string"==typeof e?ie(e,t):i.isValidElement(e)?i.cloneElement(e,{},gE(e.props.children,t)):Array.isArray(e)?e.map(e=>gE(e,t)):e,vE=i.memo(({columnsData:t,rootNode:r,selected:i,onCheckBoxChange:o,selectedNode:c,tableHeaderBgColor:d,hideOnDisable:u,transparentHeader:f,scriptLengthTruncate:h=25})=>{const p=a(null),[m,C]=s(!1),[g,v]=s(!1);return l(()=>{C(!0)},[]),n("thead",{className:"ff-table-tree-head",onMouseEnter:e=>{e.stopPropagation(),v(!0)},onMouseLeave:e=>{e.stopPropagation(),v(!1)},children:[e("tr",{className:"ff-table-tree-row no-hover",children:t.map(({name:t,width:n})=>e("th",{className:"ff-table-tree-th",style:{width:n,backgroundColor:f?"transparent":d,pointerEvents:f?"none":"auto"},children:t},t))}),r&&e("tr",{className:"ff-table-tree-row show "+(c&&c===r?.node?.key?"hover":""),ref:p,children:t.map((t,a)=>e("td",{className:"ff-table-tree-td",children:n("span",{className:"tree-table-default-content",children:[0===a&&"checkbox"===r.select&&!(u&&r.node.isDisabled)&&e(te,{checked:"partially"!==r?.node?.selectedStatus&&("completely"===r?.node?.selectedStatus||!1),partial:"partially"===r.node.selectedStatus,onChange:e=>o(e,r.node),disabled:r.node.isDisabled}),0===a&&"radio"===r.select&&!(u&&r.node.isDisabled)&&e(Sa,{name:r.node.key,checked:i.includes(r.node.key),value:r.node.key,onChange:e=>o(e,r.node),disabled:r.node.isDisabled}),n("span",{className:"tree-table-td-content-text",children:["name"===t.accessor?e("span",{children:r.node[t.accessor]}):e("span",{children:gE(pr(r.node,t),h)}),r.cell&&0===a&&e("span",{className:"table-tree-root-cell",children:r.cell(r.node)})]}),g&&r.actions&&0===a&&m&&p.current&&e("div",{className:"table-tree-row-action",children:r.actions(r.node,p)})]})},a))})]})}),yE=e=>{const t=new Map,n=e.map(e=>{const n={...e};if(e.parentId){const r=t.get(e.parentId)??[];r.push(n),t.set(e.parentId,r)}return n});return t.forEach(e=>{const t=e.at(-1);t&&(t.lastChild=!0);const n=e.at(-2);n&&(n.lastChild=!1)}),n},wE=(e,t)=>{const n=e.hierarchy||0;if(0===n)return[];const r=[],i=t.findIndex(t=>t.key===e.key);if(-1===i)return new Array(n).fill(!1);const o=bE(e,t);for(let e=0;e<n;e++)if(0===e){const e=t.slice(i+1).filter(e=>1===(e.hierarchy||0));r.push(e.length>0)}else{const n=o.find(t=>(t.hierarchy||0)===e);if(!n){r.push(!1);continue}const a=t.filter(e=>e.parentId===n.key);let l=!1;for(const e of a){if(t.findIndex(t=>t.key===e.key)>i){l=!0;break}}r.push(l)}return r},bE=(e,t)=>{const n=[];let r=e;for(;r&&(n.unshift(r),r.parentId);){const e=t.find(e=>e.key===r.parentId);if(!e)break;r=e}return n},EE=(e,t,n)=>{const{sourceId:r,action:i,value:o="",error:a="",label:l,type:c,options:s,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t;if(!r||!i)return e;const p=s?.map(e=>({label:e,value:e})),m=d?{label:d,value:d}:void 0,C=new Map(e.map(e=>[e.key,e]));n&&C.set(n.key,n);const g=C.get(r);if(!g)return e;let v;h&&(v=C.get(h));const y=[...e],w=e.findIndex(e=>e.key===r);let b=null,E=0;switch(i){case"addAbove":b=g.parentId,E=g.hierarchy;break;case"addBelow":b=v?.parentId??g.parentId,E=v?.hierarchy??g.hierarchy;break;case"addInside":b=v?.key??g.key,E=(v?.hierarchy??g.hierarchy)+1}const M={hierarchy:E,parentId:b,sourceId:g.key,isNewNode:!0,key:"new-node",value:o,error:a,label:l,type:c,options:p,selectedOption:m,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":y.splice(w,0,M);break;case"addBelow":case"addInside":y.splice(w+1,0,M)}const A=yE(y);return A.map(e=>({...e,parentSiblings:wE(e,A)}))},ME=(t,n=[],r,i,o)=>{let a=n,l=void 0!==i?!i:r;return G(n)&&(isNaN(t)||(a=Array(t).fill(!0))),e("div",{className:"tree-table-space-container",children:a?.map((n,r)=>e("span",{className:`tree-table-space-block tree-table-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${o?"folder":""}`},r))})},AE=i.memo(({treeRowRef:r,col:i,node:o,selected:a,select:l,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,columnTextColor:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>n("td",{className:"ff-table-tree-td "+(i.isTree&&o.container?"folder":""),style:{color:`${p||"var(--ff-primary-text-color)"}`},children:[i.isTree&&ME(o.hierarchy,o.parentSiblings,o.lastChild,o.nextSibling,o.container),n("div",{className:"tree-title-container",children:[i.isTree&&e("span",{className:`tree-table-space-block last-block last-block tree-table-space-block-${o.hierarchy} ${o?.expanded?"tree-row-expanded":"tree-row-collapsed"} ${o.container&&o.expandable?"":"no-folder"}`,children:o.container&&o.expandable&&n("span",{onClick:()=>s(o),children:[" ",e(h?_c:N,{})]})}),n("span",{className:"tree-table-td-content "+(i.isTree&&o.container?"folder":""),children:[!o?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===l&&!(m&&o.unselectable)&&e("span",{className:"tree-table-td-content-select",children:"none"===o.selectedStatus?e(K,{title:o?.currentEnvId&&o?.envId&&o?.currentEnvId!==o?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(te,{checked:"completely"===o.selectedStatus,partial:"partially"===o.selectedStatus,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable,isDefaultHover:"none"===o.selectedStatus&&!!o.machine})}):e(te,{checked:"completely"===o.selectedStatus,partial:"partially"===o.selectedStatus,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable})}),i.isTree&&"radio"===l&&!(m&&o.unselectable)&&e("span",{className:"tree-table-td-content-select",children:e(Sa,{name:o.key,checked:a.includes(o.key),value:o.key,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable})})]}),o.isNewNode&&i.isTree?e(Hc,{onCancel:u,onConfirm:d,value:o.value,label:o?.label,optionsList:o.options,selectedOption:o.selectedOption,withDropdown:"inputWithDropdown"===o.type,handleCustomError:f,inputFieldWidth:g,selectFieldWidth:v,confirmIconTooltip:o.confirmIconTooltip,cancelIconTooltip:o.cancelIconTooltip,isOnBlurTrue:!0,isDisable:{confirm:y}}):e("span",{className:"tree-table-td-content-text",children:gE(pr(o,i),C)})]})]}),i.actions&&!o?.isNewNode&&e("div",{className:"table-tree-row-action",children:i.actions(o,r)})]})),xE=i.memo(({node:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:l,onCheckBoxChange:c,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:f,index:h,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>{const w=a(null);return e("tr",{"data-level":t.hierarchy,ref:w,className:"ff-table-tree-row show "+(p&&p===t.key?"hover-selected":""),onClick:e=>o(e,t),id:0===h?"table-first-row":t.key,children:n.map(n=>e(AE,{treeRowRef:w,col:n,node:t,selected:r,select:i,onCheckBoxChange:c,onToggleExpand:l,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:f,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y},n.name))})}),kE=({flattenedTreeData:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:a,onCheckBoxChange:l,newNode:c,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,expanding:f,rootNode:h,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>e("tbody",{className:"ff-table-tree-body",children:EE(t,c??{},h)?.map((t,c)=>t?.hide?null:e(xE,{node:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:a,onCheckBoxChange:l,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:t.key===f,index:c,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y},t.key))}),LE=o(({treeData:t,columnsData:r,selected:i=[],select:o=null,onChange:c,onClick:d,onExpand:f,loadMore:h=()=>{},tableBorder:m,height:C="calc(100vh - 134px)",newNode:g,onAddConfirm:v=e=>{},onAddCancel:y=()=>{},handleEditFieldError:w,loading:b=!1,rootNode:E,pagination:M=!0,selectedNode:A,tableHeaderBgColor:x="var(--border-color)",hideOnDisable:k=!1,freezeColumns:L,scriptLengthTruncate:H=25,addModuleInputWidth:_=150,addModuleSelectWidth:S,onScroll:V,disableEditLabelConfirmIcon:O=!1,transparentHeader:z=!1,navigateTreeNode:N=null,handleRemoveNavigateTreeNode:I=()=>{},scrollThreshold:T=128},D)=>{const[j,Z]=s(null),[R,B]=s(null),[P,F]=s(null),[U,q]=s(null),[W,Q]=s(null),K=a(null),Y=a([]),X=a({lastScrollTop:0,lastScrollTime:0,direction:null}),J=a(null),$=p(()=>{b||"above"===R||(B("above"),F(K.current?.scrollTop??null),q(K.current?.scrollHeight??null),h("above"))},[b,R,h]),ee=p(()=>{b||"below"===R||(B("below"),h("below"))},[b,R,h]),te=p(()=>{const e=K.current;if(!e||G(t))return;const n=Date.now(),r=e.scrollTop,i=e.scrollHeight,o=e.clientHeight,a=r>X.current.lastScrollTop?"down":"up";X.current={lastScrollTop:r,lastScrollTime:n,direction:a},J.current&&clearTimeout(J.current);const l=r<T;if("down"!==a||!(i-(r+o)<T)||b||R||!0===t[t.length-1]?.lastResource||(J.current=setTimeout(()=>{ee()},150)),"up"!==a||!l||b||R||!0===t[0]?.lastResource||(J.current=setTimeout(()=>{$()},150)),!b&&"above"===R&&Y.current.length>0&&null!==P){const n=Y.current;let r=0;for(let e=0;e<t.length&&n[0]!==t[e];e++)r++;let i=0;const o=30,a=()=>{const n=Array.from(e.querySelectorAll(".ff-table-tree-row"));let l=0;for(let e=0;e<r;e++){l+=n[e]?.getBoundingClientRect().height||0}const c=e.scrollHeight>e.clientHeight;l>0&&c?(e.scrollTop=P+l,Y.current=t):i<o?(i++,requestAnimationFrame(a)):(Y.current=t,console.warn("Failed to restore scroll position after max retries"))};requestAnimationFrame(a)}},[b,R,t,$,ee,P,V]);l(()=>{const e=K.current;return e&&V&&e.addEventListener("scroll",V),()=>{e&&V&&e.removeEventListener("scroll",V)}},[V]),l(()=>()=>{J.current&&clearTimeout(J.current)},[]),u(()=>{if(b||"above"!==R||null===P||null===U)b||B(null);else{const e=K.current;if(!e)return;const t=e.scrollHeight-U;t>0&&(e.scrollTop=P+t),B(null),F(null),q(null)}},[b,R,P,U]),l(()=>{if(N){const e=document.getElementById(N),t=K.current;if(e&&t){Q(t.scrollTop);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.scrollTop,o=n.top-r.top+i,a=r.height;t.scrollTo({top:o-a/2+n.height/2,behavior:"smooth"})}}return()=>{I()}},[N,t]),l(()=>{null!==W&&!b&&K.current&&(K.current.scrollTop=W,Q(null))},[W,b]),l(()=>{const e=K.current;if(e&&M)return e.addEventListener("scroll",te),te(),()=>{e.removeEventListener("scroll",te),J.current&&clearTimeout(J.current)}},[te,M]),l(()=>{t.length>0&&(Y.current=t)},[t]),l(()=>{!b&&j&&Z(null)},[b]);const ne=p(e=>{j||(Z(e.key),f?.(e))},[f,j]),re=p((e,t)=>{j||c?.(e,t)},[c,j]),ie=p((e,t)=>{j||d?.(e,t)},[d,j]);let oe;return L&&(oe=((e,t)=>e.slice(0,t).reduce((e,t)=>e+parseInt(t.width||"400",10),0))(r,L)),l(()=>{if(!g||!K.current)return;const e=K.current;if("addAbove"===g.action&&g.sourceId===t[0]?.key)e.scrollTo({top:0,behavior:"smooth"});else if("addAbove"===g.action&&g.sourceId===g.firstNodeKey){const t=e.scrollTop-64;e.scrollTo({top:t,behavior:"smooth"})}},[g]),u(()=>{if(!N)return;if(!K.current)return;let e=0;const n=()=>{const r=document.getElementById(N);r?setTimeout(()=>{r.scrollIntoView({behavior:"smooth",block:"center"}),I()},200):(0===e&&t?.length>1&&$?.(),e<30?(e++,requestAnimationFrame(n)):I())};n()},[N,$,I]),e("div",{className:"tree-table-wrapper-container",children:e("div",{className:"tree-table-wrap",ref:D,children:e("div",{className:"table-scrollable "+(t.length?"":"table-empty"),ref:K,style:{"--table-height":t.length?C:"auto","--frozen-column-width":L?`${oe}px`:"0px",border:m},children:n("table",{className:"tree-table",children:[e(vE,{columnsData:r,rootNode:E,onCheckBoxChange:re,selected:i,selectedNode:A,tableHeaderBgColor:x,hideOnDisable:k,transparentHeader:z,scriptLengthTruncate:H}),e(kE,{flattenedTreeData:yE(t),rootNode:E?.node,columnsData:r,selected:i,select:o,onRowClick:ie,onToggleExpand:ne,onCheckBoxChange:re,newNode:g,onAddConfirm:v,onAddCancel:y,handleEditFieldError:w,expanding:j,selectedNode:A,hideOnDisable:k,scriptLengthTruncate:H,addModuleInputWidth:_,addModuleSelectWidth:S,disableEditLabelConfirmIcon:O})]})})})})});function HE(e,t,n,r,i,o="children"){return function e(a){for(let l=0;l<a.length;l++){const c=a[l];if(c&&c[t]===n){const e=[...a];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(c&&c[o]&&Array.isArray(c[o])){const t=e(c[o]);if(t)return{updatedArray:a.map((e,n)=>n===l?{...e,[o]:t.updatedArray}:e)}}}return null}(e)}const _E=(e,t)=>{if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Array.isArray(e),r=Array.isArray(t);if(n!==r)return!1;const i=n?e:Object.keys(e),o=r?t:Object.keys(t);if(i.length!==o.length)return!1;if(n)return i.every((e,t)=>_E(e,o[t]));{const n=new Set(o);return i.every(r=>n.has(r)&&_E(e[r],t[r]))}},SE=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return _E(e,r)}));async function VE(e,t){const n=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),r=await crypto.subtle.importKey("spki",n,{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),i=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"RSA-OAEP"},r,i);return btoa(String.fromCharCode(...new Uint8Array(o)))}const OE=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":return 1024*n*1024*1024;case"mb":return 1024*n*1024;case"kb":return 1024*n;default:return n}},zE=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":default:return n;case"mb":return n/1024;case"kb":return n/1048576;case"b":return n/1073741824}},NE=({data:r,isYaxisSticky:i=!1,barWidth:o,height:c,barGap:d=20,colors:u=[],xAxisLabel:f,isTruncateText:h=!0,yAxisLabel:p,padding:m=20,yAxisDivisions:C=5,barBorderRadius:g=0,legend:v=!0,showXAxisLabels:y=!0,icons:w=[],iconSize:b,legendPosition:E="bottom",legendGap:M=5,extendBarChartRightWidth:A=0,isYAxisValuePercentage:x=!1,selectedBar:k,setSelectedBar:L,onSelectedBar:H=e=>{},totalLabel:_="Total Execution",customToolTip:S=!1,isOnclick:V=!1,isDashboardVersions:O,type:z="",isMemory:N,tooltipWidth:I="fit-content"})=>{const T=a(null),[D,j]=s(null),[Z,R]=s(!1);l(()=>{const e=()=>{const e=T.current;e&&Z&&(e.style.display="none")};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[Z]);const B=(e=>{const t=["TB","GB","MB","KB"];for(const n of t){if(e.some(e=>"string"==typeof e.value&&e.value.toLowerCase().includes(n.toLowerCase())))return n}return null})(r),U=r.map(e=>{if("string"==typeof e.value){let t=0;if("memory"===z)t=zE(e.value);else if(N)switch(B){case"TB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"tb":default:return n;case"gb":return n/1024;case"mb":return n/1048576;case"kb":return n/1073741824;case"b":return n/1099511627776}})(e.value);break;case"GB":t=zE(e.value);break;case"MB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"mb":default:return n;case"gb":return 1024*n;case"tb":return 1024*n*1024;case"kb":return n/1024;case"b":return n/1048576}})(e.value);break;case"KB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"kb":default:return n;case"mb":return 1024*n;case"gb":return 1024*n*1024;case"tb":return 1024*n*1024*1024;case"b":return n/1024}})(e.value)}else t=parseFloat(e.value);return{...e,normalizedValue:t}}return{...e,normalizedValue:e.value}});let q=0;"memory"===z&&(q=r.reduce((e,t)=>"string"==typeof t.value?e+OE(t.value):e+1024*Number(t.value)*1024*1024,0));const W=q/1048576,Q=W<1024?`${Math.round(W)} mb`:`${(W/1024).toFixed(1)} gb`;let G=Math.max(...U.map(e=>e.normalizedValue));G="memory"===z?Math.max(G,1):Math.max(G,C);const K=40,Y=40,X=U.length*o+(U.length-1)*d+(i?Y:90)+A,J=Date.now(),$=t=>t.filter(e=>e.length>1).map((t,n)=>e("defs",{children:e("linearGradient",{id:`gradient-${J}-${z}-${n}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:t.map((r,i)=>e("stop",{offset:i/(t.length-1)*100+"%",stopColor:r},`${n}-${i}`))})},n)),ee=e=>{if(!u.length)return"grey";const t=u[e%u.length];return 1===t?.length?t[0]:`url(#gradient-${J}-${z}-${e%u.length})`},te=(e,t,n,r,i)=>{R(!0);const o=T.current;if(o)if(o.style.display="block",S)o.innerHTML=`<div>\n <div><Typography fontWeight='semi-bold'>${e}</Typography></div>\n <div><Typography>${n||""}</Typography></div>\n <div><Typography>${_} : ${t} ${r?"("+r+"%)":""}</Typography></div>\n </div>`;else if(O){const e=i?i.join(", "):"";o.innerHTML=`\n <div>\n <div><Typography>${_} : ${t}</Typography></div>\n ${e?`<div><Typography>Versions : ${e}</Typography></div>`:""}\n </div>`}else o.innerHTML="memory"===z?`<strong>${e}</strong>: ${t} / ${Q}`:`<strong>${e}</strong>: ${t} ${x?"%":""}`},ne=(e,t=!1)=>{const n=T.current;if(n){const r=n.parentElement?.getBoundingClientRect(),i=window.scrollX,o=window.scrollY,a=1===U?.length||!t?e.clientX-(r?.left||0)+i+10:e.clientX-(r?.left||0)+i-n?.offsetWidth-10,l=e.clientY-(r?.top||0)+o-20;n.style.left=`${a}px`,n.style.top=`${l}px`}},re=()=>{R(!1);const e=T.current;e&&(e.style.display="none")},oe=e=>{L&&(L(e),V&&H(e))},ae=e=>{if(h){if(ie(e,10).endsWith("...")){const t=T.current;t&&(t.style.display="block",t.innerHTML=e)}}},le=(e,t,n)=>{if(h){ie(t,10).endsWith("...")&&ne(e,n===U.length-1)}};return n("div",{className:"ff-bar-chart-container",children:[e("div",{ref:T,className:"ff-bar-chart-tooltip",style:{width:I}}),v&&"top"===E&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${M}px`},children:U.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>j(r),onMouseLeave:()=>j(null),children:[w[r]&&"string"==typeof w[r]?e(P,{name:String(w[r]),width:b,height:b}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e(F,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})]},t.label))})}),i?n("div",{className:"ff-bar-chart-wrapper",children:[e("div",{className:"ff-y-axis",children:e("svg",{width:60,height:c+K+(f?20:0),children:n(t,{children:[Array.from({length:C+1}).map((t,n)=>{const r=c-n/C*c+K+4,i=n*G/C,o="memory"===z?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:50,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),p&&e("text",{x:-(c/2+35),y:i?20:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})})}),e("div",{className:"ff-chart-scrollable",children:n("svg",{width:X,height:c+K+5+(y?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),U.map((t,r)=>{const i=t.normalizedValue/G*c,a=t.normalizedValue<1?2:i,l=r*(o+d)+m,s=c-a+K,u=b||20,f=l+o/2-u/2,p=s-u,C=k===t.label,v=D===r;return n("g",{children:[w[r]&&"string"==typeof w[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,children:e(P,{name:String(w[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:s,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:C?3:0,opacity:null===D||v?1:.3,cursor:V?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===z||N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,onClick:()=>oe(t.label)}),C&&V&&e("rect",{x:l,y:s,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re}),y&&e("text",{onMouseEnter:()=>ae(t.label),onMouseMove:e=>le(e,t.label,r),onMouseLeave:re,x:0===r?l:r===U.length-1?l+o:l+o/2,y:c+K+15,className:"ff-bar-chart-labels",fill:C?"var(--brand-color)":"black",fontWeight:C?"bold":"normal",textAnchor:0===r?"start":"middle",children:h?ie(t.label,10):t.label})]},r)}),e("line",{x1:i?0:m,y1:c+K,x2:X,y2:c+K,stroke:"#D9D9D9",strokeWidth:"1"}),!i&&f&&e("text",{x:X/2,y:c+K+(y?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f})]})}),e("div",{className:"ff-bar-chart-x-axis-label",children:f})]}):e("div",{children:n("svg",{width:X,height:c+K+5+(y?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),Array.from({length:C+1}).map((t,n)=>{const r=c-n/C*c+K+4,i=n*G/C,o="memory"===z?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:Y,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),U.map((t,r)=>{const i=t.normalizedValue/G*c,a=t.normalizedValue<1?2:i,l=r*(o+d)+Y+m,s=c-a+K,u=b||20,f=l+o/2-u/2,p=s-u,C=k===t.label,v=D===r;return n("g",{children:[w[r]&&"string"==typeof w[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,children:e(P,{name:String(w[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:s,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:C?3:0,opacity:null===D||v?1:.3,cursor:V?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===z||N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,onClick:()=>oe(t.label)}),C&&V&&e("rect",{x:l,y:s,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re}),y&&e("g",{children:e("text",{x:0===r?l:r===U.length-1?l+o:l+o/2,y:c+K+15,className:"ff-bar-chart-labels",fill:C?"var(--brand-color)":"black",fontWeight:C?"bold":"normal",textAnchor:0===r?"start":"middle",onMouseEnter:()=>ae(t.label),onMouseMove:e=>le(e,t.label,r),onMouseLeave:re,children:h?ie(t.label,10):t.label})})]},r)}),e("line",{x1:60,y1:c+K,x2:X,y2:c+K,stroke:"#D9D9D9",strokeWidth:"1"}),f&&e("text",{x:X/2,y:c+K+(y?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f}),p&&e("text",{x:-(c/2+35),y:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})}),v&&"bottom"===E&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${M}px`},children:r.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>j(r),onMouseLeave:()=>j(null),children:[w[r]&&"string"==typeof w[r]?e(P,{name:String(w[r]),width:b,height:b}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e("div",{children:e(F,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})})]},t.label))})})]})},IE=(e,t,n,r,i)=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),c=t+n*Math.sin(i);return`M ${o} ${a} A ${n} ${n} 0 ${i-r>Math.PI?1:0} 1 ${l} ${c}`},TE=({radius:r,lineWidth:i,lineCap:o,barValues:a,labelHeading:l,legendType:c="numberLegend",isLegendDetails:d=!0,isPillValueVisible:u=!0,chartToLegendGap:f="16px",legendGap:h="8px",labelFontSize:p=12,subLabelFontSize:m=8,gapBetweenArch:C=10,capsuleStyle:g={padding:"4px"}})=>{const[v,y]=s({visible:!1,x:0,y:0,content:"",isArc:!1}),[w,b]=s(null),E=(e,t)=>Array.isArray(e.arcColor)?`url(#gradient-${t})`:e.arcColor,M=e=>Array.isArray(e.arcColor)?e.arcColor[0]:e.arcColor,A=a.map(e=>{if("string"==typeof e.value){const t=(e=>{if("string"!=typeof e)return e;{const t=e.trim().match(/^([\d.]+)\s*([a-zA-Z%]*)$/);if(!t)return 0;const n=parseFloat(t[1]??"0"),r=t[2]?.toUpperCase()||"";if(isNaN(n))return 0;switch(r){case"TB":return 1024*n*1024;case"GB":return 1024*n;case"MB":default:return n;case"KB":return n/1024}}})(e.value),n=isNaN(t)?0:t;return{...e,normalizedValue:n,labelValue:Number.isInteger(n)?n:n.toFixed(2)}}return{...e,normalizedValue:e.value,labelValue:Number.isInteger(e.value)?e.value:e.value?.toFixed(2)}}),x=A.reduce((e,t)=>e+t.normalizedValue,0),k=r,L=i+C,H=2*(k+L*(A.length-1)+i),_=[...A].reverse(),S=l.trim().split(" "),V=(e,t,n)=>{const{clientX:r,clientY:i}=e;y({visible:!0,x:r,y:i,content:t,isArc:n})},O=e=>{const{clientX:t,clientY:n}=e;y(e=>({...e,x:t,y:n}))},z=()=>{y({visible:!1,x:0,y:0,content:"",isArc:!1})};return n("div",{className:"ff-multi-radial-chart-container "+("numberLegend"===c?"ff-multi-radial-chart-number":"ff-multi-radial-chart-pill"),style:{gap:f},children:[e("div",{className:"relative",style:{width:H,height:H},children:n("svg",{width:H,height:H,viewBox:`0 0 ${H} ${H}`,className:"absolute top-0 left-0",children:[e("defs",{children:a.map((t,n)=>Array.isArray(t.arcColor)?e("linearGradient",{id:`gradient-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:"rotate(90)",children:t.arcColor.map((n,r)=>e("stop",{offset:r/(t.arcColor.length-1)*100+"%",stopColor:n},r))},`gradient-${n}`):null)}),n("g",{transform:`translate(${H/2+1}, ${H/2+1})`,children:[_.map((t,r)=>{const a=A.length-1-r,l=2*(t.normalizedValue/x)*Math.PI;let c=-Math.PI/2,s=c+l;t.normalizedValue===x&&(c=0,s=2*Math.PI);const d=k+L*a,u=IE(0,0,d,0,2*Math.PI),f={opacity:null!==w?t.barLabel===w?1:.2:1,transition:"opacity 0.3s ease"};if(0===t.normalizedValue){const r=d*Math.cos(-Math.PI/2),o=d*Math.sin(-Math.PI/2);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("circle",{cx:r,cy:o,r:i+1,fill:E({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),onMouseEnter:e=>V(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:O,onMouseLeave:z,style:f})]},a)}const h=IE(0,0,d,c,s);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("path",{d:h,fill:"none",stroke:E({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),strokeWidth:i,strokeLinecap:"square"===o?"butt":"round",onMouseEnter:e=>V(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:O,onMouseLeave:z,style:{pointerEvents:"stroke",...f}})]},a)}),e("text",{x:"0",y:`-${i+C+2}`,fill:(()=>{if(!v.visible)return"";const e=v.content.split(":")[0]?.trim();if(void 0===e)return"";const t=A.find(t=>t.barLabel===e);if(!t)return"";const n={...t,label:t.barLabel,key:t.labelValue?.toString()??""};return M(n)})(),textAnchor:"middle",dominantBaseline:"central",children:v.visible?n(t,{children:[e("tspan",{x:"0",dy:"0",className:"ff-center-text-tooltip",children:(N=v.content.split(":")[1]?.trim()||"",I=9,N.length>I?N.slice(0,I)+"...":N)}),v.content.split(":")[0]?.split(" ").map((t,n)=>e("tspan",{x:"0",dy:0===n?`${i+C+5}`:18,className:"ff-center-text-tooltip",children:t},n))]}):e(t,{children:S.map((t,r)=>{if(0===r){const[i,...o]=t.split(" ");return n("tspan",{children:[e("tspan",{x:"0",dy:"0",style:{fontSize:`${p}px`},className:"ff-center-first-text",children:i}),e("tspan",{x:"0",dy:18,style:{fontSize:`${m}px`},className:"ff-center-text",children:o.join(" ")})]},r)}return e("tspan",{x:"0",dy:0===r?0:18,className:"ff-center-text",style:{fontSize:`${m}px`},children:t},r)})})})]})]})}),v.visible&&e("div",{className:"ff-multi-radial-tooltip",style:{position:"fixed",top:`${v.y+10}px`,left:`${v.x+15}px`,zIndex:1e3,pointerEvents:"none"},children:v.content}),d&&((t,r)=>{switch(r){case"numberLegend":return e("div",{className:"ff-legend-container ff-number-legend",style:{gap:h},children:t.map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{b(t.barLabel||t.label),V(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:O,onMouseLeave:()=>{b(null),z()},children:[e(F,{fontSize:20,fontWeight:"semi-bold",className:"ff-legend-value",color:M(t),children:t.key.padStart(2,"0")}),e(F,{fontSize:10,className:"ff-legend-key",color:"var(--text-color)",children:t.label})]},r))});case"pillLegend":return e("div",{className:"ff-legend-container ff-pill-legend",style:{gap:h},children:t.slice().reverse().map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{b(t.barLabel||t.label),V(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:O,onMouseLeave:()=>{b(null),z()},children:[e("span",{className:"ff-legend-capsule",style:{backgroundColor:M(t)},children:e(F,{fontSize:10,color:"var(--tooltip-text-color)",style:g,children:u&&t.value})}),e(F,{className:"ff-legend-key",children:t.label})]},r))});default:return null}})(A.map(e=>({...e,label:e?.barLabel,key:e.labelValue?.toString()})),c)]});var N,I};function DE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZE(Object(n),!0).forEach(function(t){jE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(t){BE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UE(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function qE(e){return{}.toString.call(e).includes("Object")}function WE(e){return"function"==typeof e}var QE=UE(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),GE={changes:function(e,t){return qE(t)||QE("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&QE("changeField"),t},selector:function(e){WE(e)||QE("selectorType")},handler:function(e){WE(e)||qE(e)||QE("handlerType"),qE(e)&&Object.values(e).some(function(e){return!WE(e)})&&QE("handlersType")},initial:function(e){var t;e||QE("initialIsRequired"),qE(e)||QE("initialType"),t=e,Object.keys(t).length||QE("initialContent")}};function KE(e,t){return WE(t)?t(e.current):t}function YE(e,t){return e.current=FE(FE({},e.current),t),t}function XE(e,t,n){return WE(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var JE={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};GE.initial(e),GE.handler(t);var n={current:e},r=UE(XE)(n,t),i=UE(YE)(n),o=UE(GE.changes)(e),a=UE(KE)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return GE.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,a)(e)}]}};var $E={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},eM=function(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}(function(e,t){throw new Error(e[t]||e.default)})($E),tM={config:function(e){var t;return e||eM("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||eM("configType"),e.urls?(console.warn($E.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};function nM(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],nM(e[n],t[n]))}),RE(RE({},e),t)}var rM={type:"cancelation",msg:"operation is manually canceled"};function iM(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(rM):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var oM,aM,lM=["monaco"],cM=JE.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),sM=(aM=2,function(e){if(Array.isArray(e))return e}(oM=cM)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(oM,aM)||function(e,t){if(e){if("string"==typeof e)return DE(e,t);var n={}.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)?DE(e,t):void 0}}(oM,aM)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),dM=sM[0],uM=sM[1];function fM(e){return document.body.appendChild(e)}function hM(e){var t=dM(function(e){return{config:e.config,reject:e.reject}}),n=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function pM(){var e=dM(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m;mM(n),e.resolve(n)},function(t){e.reject(t)})}function mM(e){dM().monaco||uM({monaco:e})}var CM=new Promise(function(e,t){return uM({resolve:e,reject:t})}),gM={config:function(e){var t=tM.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,lM);uM(function(e){return{config:nM(e.config,r),monaco:n}})},init:function(){var e=dM(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(uM({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),iM(CM);if(window.monaco&&window.monaco.editor)return mM(window.monaco),e.resolve(window.monaco),iM(CM);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(fM,hM)(pM)}return iM(CM)},__getMonacoInstance:function(){return dM(function(e){return e.monaco})}},vM={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},yM={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var wM=function({children:e}){return i.createElement("div",{style:yM.container},e)},bM=wM;var EM=function({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:l}){return i.createElement("section",{style:{...vM.wrapper,width:e,height:t},...l},!n&&i.createElement(bM,null,r),i.createElement("div",{ref:o,style:{...vM.fullWidth,...!n&&vM.hide},className:a}))},MM=g(EM);var AM=function(e){l(e,[])};var xM=function(e,t,n=!0){let r=a(!0);l(r.current||!n?()=>{r.current=!1}:e,t)};function kM(){}function LM(e,t,n,r){return function(e,t){return e.editor.getModel(HM(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?HM(e,r):void 0)}(e,t,n,r)}function HM(e,t){return e.Uri.parse(t)}var _M=function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:c,modifiedModelPath:d,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:f=!1,theme:h="light",loading:m="Loading...",options:C={},height:g="100%",width:v="100%",className:y,wrapperProps:w={},beforeMount:b=kM,onMount:E=kM}){let[M,A]=s(!1),[x,k]=s(!0),L=a(null),H=a(null),_=a(null),S=a(E),V=a(b),O=a(!1);AM(()=>{let e=gM.init();return e.then(e=>(H.current=e)&&k(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>L.current?function(){let e=L.current?.getModel();u||e?.original?.dispose(),f||e?.modified?.dispose(),L.current?.dispose()}():e.cancel()}),xM(()=>{if(L.current&&H.current){let t=L.current.getOriginalEditor(),i=LM(H.current,e||"",r||n||"text",c||"");i!==t.getModel()&&t.setModel(i)}},[c],M),xM(()=>{if(L.current&&H.current){let e=L.current.getModifiedEditor(),r=LM(H.current,t||"",o||n||"text",d||"");r!==e.getModel()&&e.setModel(r)}},[d],M),xM(()=>{let e=L.current.getModifiedEditor();e.getOption(H.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],M),xM(()=>{L.current?.getModel()?.original.setValue(e||"")},[e],M),xM(()=>{let{original:e,modified:t}=L.current.getModel();H.current.editor.setModelLanguage(e,r||n||"text"),H.current.editor.setModelLanguage(t,o||n||"text")},[n,r,o],M),xM(()=>{H.current?.editor.setTheme(h)},[h],M),xM(()=>{L.current?.updateOptions(C)},[C],M);let z=p(()=>{if(!H.current)return;V.current(H.current);let i=LM(H.current,e||"",r||n||"text",c||""),a=LM(H.current,t||"",o||n||"text",d||"");L.current?.setModel({original:i,modified:a})},[n,t,o,e,r,c,d]),N=p(()=>{!O.current&&_.current&&(L.current=H.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...C}),z(),H.current?.editor.setTheme(h),A(!0),O.current=!0)},[C,h,z]);return l(()=>{M&&S.current(L.current,H.current)},[M]),l(()=>{!x&&!M&&N()},[x,M,N]),i.createElement(MM,{width:v,height:g,isEditorReady:M,loading:m,_ref:_,className:y,wrapperProps:w})};g(_M);var SM=function(e){let t=a();return l(()=>{t.current=e},[e]),t.current},VM=new Map;var OM,zM=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:c,theme:d="light",line:u,loading:f="Loading...",options:h={},overrideServices:m={},saveViewState:C=!0,keepCurrentModel:g=!1,width:v="100%",height:y="100%",className:w,wrapperProps:b={},beforeMount:E=kM,onMount:M=kM,onChange:A,onValidate:x=kM}){let[k,L]=s(!1),[H,_]=s(!0),S=a(null),V=a(null),O=a(null),z=a(M),N=a(E),I=a(),T=a(r),D=SM(c),j=a(!1),Z=a(!1);AM(()=>{let e=gM.init();return e.then(e=>(S.current=e)&&_(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>V.current?(I.current?.dispose(),g?C&&VM.set(c,V.current.saveViewState()):V.current.getModel()?.dispose(),void V.current.dispose()):e.cancel()}),xM(()=>{let i=LM(S.current,e||r||"",t||o||"",c||n||"");i!==V.current?.getModel()&&(C&&VM.set(D,V.current?.saveViewState()),V.current?.setModel(i),C&&V.current?.restoreViewState(VM.get(c)))},[c],k),xM(()=>{V.current?.updateOptions(h)},[h],k),xM(()=>{!V.current||void 0===r||(V.current.getOption(S.current.editor.EditorOption.readOnly)?V.current.setValue(r):r!==V.current.getValue()&&(Z.current=!0,V.current.executeEdits("",[{range:V.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),V.current.pushUndoStop(),Z.current=!1))},[r],k),xM(()=>{let e=V.current?.getModel();e&&o&&S.current?.editor.setModelLanguage(e,o)},[o],k),xM(()=>{void 0!==u&&V.current?.revealLine(u)},[u],k),xM(()=>{S.current?.editor.setTheme(d)},[d],k);let R=p(()=>{if(O.current&&S.current&&!j.current){N.current(S.current);let i=c||n,a=LM(S.current,r||e||"",t||o||"",i||"");V.current=S.current?.editor.create(O.current,{model:a,automaticLayout:!0,...h},m),C&&V.current.restoreViewState(VM.get(i)),S.current.editor.setTheme(d),void 0!==u&&V.current.revealLine(u),L(!0),j.current=!0}},[e,t,n,r,o,c,h,m,C,d,u]);return l(()=>{k&&z.current(V.current,S.current)},[k]),l(()=>{!H&&!k&&R()},[H,k,R]),T.current=r,l(()=>{k&&A&&(I.current?.dispose(),I.current=V.current?.onDidChangeModelContent(e=>{Z.current||A(V.current.getValue(),e)}))},[k,A]),l(()=>{if(k){let e=S.current.editor.onDidChangeMarkers(e=>{let t=V.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[k,x]),i.createElement(MM,{width:v,height:y,isEditorReady:k,loading:f,_ref:O,className:w,wrapperProps:b})},NM=g(zM),IM={exports:{}},TM={},DM={exports:{}},jM={},ZM={};function RM(){if(OM)return ZM;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function n(n,r){this.__indent_cache=new t(n,r),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return OM=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},t.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},n.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},ZM.Output=n,ZM}var BM,PM={};function FM(){if(BM)return PM;return BM=1,PM.Token=function(e,t,n,r){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},PM}var UM,qM={};function WM(){return UM||(UM=1,o="(?:"+(i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}")+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+(n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc")+"])",a="(?:"+i+"|["+(t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a")+n+(r="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f")+"])*",(e=qM).identifier=new RegExp(o+a,"g"),e.identifierStart=new RegExp(o),e.identifierMatch=new RegExp("(?:"+i+"|["+t+n+r+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")),qM;var e,t,n,r,i,o,a}var QM,GM,KM={},YM={};function XM(){if(QM)return YM;function e(e,n){this.raw_options=t(e,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function t(e,t){var r,i={};for(r in e=n(e))r!==t&&(i[r]=e[r]);if(t&&e[t])for(r in e[t])i[r]=e[t][r];return i}function n(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}return QM=1,e.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},e.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},e.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},e.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},e.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},e.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},e.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},YM.Options=e,YM.normalizeOpts=n,YM.mergeOpts=t,YM}function JM(){if(GM)return KM;GM=1;var e=XM().Options,t=["before-newline","after-newline","preserve-newline"];function n(n){e.call(this,n,"js");var r=this.raw_options.brace_style||null;"expand-strict"===r?this.raw_options.brace_style="expand":"collapse-preserve-inline"===r?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<i.length;o++)"preserve-inline"===i[o]?this.brace_preserve_inline=!0:this.brace_style=i[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return n.prototype=new e,KM.Options=n,KM}var $M,eA={},tA={};function nA(){if($M)return tA;$M=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},t.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},t.prototype.__match=function(t,n){t.lastIndex=n;var r=t.exec(this.__input);return!r||e&&t.sticky||r.index!==n&&(r=null),r},t.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},t.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},t.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},t.prototype.read=function(e,t,n){var r,i="";return e&&(r=this.match(e))&&(i+=r[0]),!t||!r&&e||(i+=this.readUntil(t,n)),i},t.prototype.readUntil=function(e,t){var n,r=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(r=i.index,t&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n},t.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},t.prototype.get_regexp=function(t,n){var r=null,i="g";return n&&e&&(i="y"),"string"==typeof t&&""!==t?r=new RegExp(t,i):t&&(r=new RegExp(t.source,i)),r},t.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},t.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},tA.InputScanner=t,tA}var rA,iA={},oA={};var aA,lA,cA,sA={},dA={};function uA(){if(aA)return dA;function e(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return aA=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},dA.Pattern=e,dA}function fA(){if(cA)return iA;cA=1;var e=nA().InputScanner,t=FM().Token,n=function(){if(rA)return oA;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return rA=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},oA.TokenStream=e,oA}().TokenStream,r=function(){if(lA)return sA;lA=1;var e=uA().Pattern;function t(t,n){e.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(e,t){e+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var t=this.__split(this._newline_regexp,e);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return e},t.prototype.matching=function(e,t){var n=this._create();return n.__set_whitespace_patterns(e,t),n._update(),n},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(e,t){e.lastIndex=0;for(var n=0,r=[],i=e.exec(t);i;)r.push(t.substring(n,i.index)),n=i.index+i[0].length,i=e.exec(t);return n<t.length?r.push(t.substring(n,t.length)):r.push(""),r},sA.WhitespacePattern=t,sA}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(t,n){this._input=new e(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};return o.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new n,this._reset();for(var r=new t(i.START,""),o=null,a=[],l=new n;r.type!==i.EOF;){for(e=this._get_next_token(r,o);this._is_comment(e);)l.add(e),e=this._get_next_token(r,o);l.isEmpty()||(e.comments_before=l,l=new n),e.parent=o,this._is_opening(e)?(a.push(o),o=e):o&&this._is_closing(e,o)&&(e.opened=o,o.closed=e,o=a.pop(),e.parent=o),e.previous=r,r.next=e,this.__tokens.add(e),r=e}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(i.RAW,n):this._create_token(i.EOF,"")},o.prototype._is_comment=function(e){return!1},o.prototype._is_opening=function(e){return!1},o.prototype._is_closing=function(e,t){return!1},o.prototype._create_token=function(e,n){return new t(e,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},iA.Tokenizer=o,iA.TOKEN=i,iA}var hA,pA={};function mA(){if(hA)return pA;function e(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return hA=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},pA.Directives=e,pA}var CA,gA,vA,yA,wA={};function bA(){if(CA)return wA;CA=1;var e=uA().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(n,r){e.call(this,n,r),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var i=new e(n);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return n.prototype=new e,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var n=this._create();for(var r in t)n._disabled[r]=-1===e.templating.indexOf(r);return n._update(),n},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},wA.TemplatablePattern=n,wA}function EA(){if(gA)return eA;gA=1;var e=nA().InputScanner,t=fA().Tokenizer,n=fA().TOKEN,r=mA().Directives,i=WM(),o=uA().Pattern,a=bA().TemplatablePattern;function l(e,t){return-1!==t.indexOf(e)}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},s=new r(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,u=/[0-9]/,f=/[^\d\.]/,h=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var m,C=new RegExp(p),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+v.join("|")+")$"),w=function(e,n){t.call(this,e,n),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var r=new o(this._input),l=new a(this._input).read_options(this._options);this.__patterns={template:l,identifier:l.starting_with(i.identifier).matching(i.identifierMatch),number:r.matching(d),punct:r.matching(C),comment:r.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:r.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:r.matching(/<!--/),html_comment_end:r.matching(/-->/),include:r.starting_with(/#include/).until_after(i.lineBreak),shebang:r.starting_with(/#!/).until_after(i.lineBreak),xml:r.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:l.until(/['\\\n\r\u2028\u2029]/),double_quote:l.until(/["\\\n\r\u2028\u2029]/),template_text:l.until(/[`\\$]/),template_expression:l.until(/[`}\\]/)}};return(w.prototype=new t)._is_comment=function(e){return e.type===c.COMMENT||e.type===c.BLOCK_COMMENT||e.type===c.UNKNOWN},w.prototype._is_opening=function(e){return e.type===c.START_BLOCK||e.type===c.START_EXPR},w.prototype._is_closing=function(e,t){return(e.type===c.END_BLOCK||e.type===c.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},w.prototype._reset=function(){m=!1},w.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(c.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(r))||this._read_string(r))||this._read_pair(r,this._input.peek(1)))||this._read_word(e))||this._read_singles(r))||this._read_comment(r))||this._read_regexp(r,e))||this._read_xml(r,e))||this._read_punctuation())||this._create_token(c.UNKNOWN,this._input.next())},w.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(i.allLineBreaks,"\n"),e.type!==c.DOT&&(e.type!==c.RESERVED||"set"!==e.text&&"get"!==e.text)&&y.test(t)?"in"!==t&&"of"!==t||e.type!==c.WORD&&e.type!==c.STRING?this._create_token(c.RESERVED,t):this._create_token(c.OPERATOR,t):this._create_token(c.WORD,t)):""!==(t=this.__patterns.number.read())?this._create_token(c.WORD,t):void 0},w.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(c.START_EXPR,e):")"===e||"]"===e?t=this._create_token(c.END_EXPR,e):"{"===e?t=this._create_token(c.START_BLOCK,e):"}"===e?t=this._create_token(c.END_BLOCK,e):";"===e?t=this._create_token(c.SEMICOLON,e):"."===e&&f.test(this._input.peek(1))?t=this._create_token(c.DOT,e):","===e&&(t=this._create_token(c.COMMA,e)),t&&this._input.next(),t},w.prototype._read_pair=function(e,t){var n=null;return"#"===e&&"{"===t&&(n=this._create_token(c.START_BLOCK,e+t)),n&&(this._input.next(),this._input.next()),n},w.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(c.EQUALS,e):"?."===e?this._create_token(c.DOT,e):this._create_token(c.OPERATOR,e)},w.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(c.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(c.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(u)){do{n+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)t+=this._input.next();return m=!0,this._create_token(c.COMMENT,t)}}else if(m&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return m=!1,this._create_token(c.COMMENT,t);return null},w.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var r=s.get_directives(n);r&&"start"===r.ignore&&(n+=s.readIgnored(this._input)),n=n.replace(i.allLineBreaks,"\n"),(t=this._create_token(c.BLOCK_COMMENT,n)).directives=r}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(c.COMMENT,n))}return t},w.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var n=this._input.next();return this.has_char_escapes=!1,n+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(n=function(t){var n="",r=0,i=new e(t),o=null;for(;i.hasNext();)if((o=i.match(/([\s]|[^\\]|\\\\)+/g))&&(n+=o[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())o=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){n+="\\",i.hasNext()&&(n+=i.next());continue}(o=i.match(/u([0-9A-Fa-f]{4})/g))||(o=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!o)return t;if((r=parseInt(o[1],16))>126&&r<=255&&0===o[0].indexOf("x"))return t;n+=r>=0&&r<32||r>1114111?"\\"+o[0]:34===r||39===r||92===r?"\\"+String.fromCharCode(r):String.fromCharCode(r)}return n}(n)),this._input.peek()===t&&(n+=this._input.next()),n=n.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,n)}return null},w.prototype._allow_regexp_or_xml=function(e){return e.type===c.RESERVED&&l(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===c.END_EXPR&&")"===e.text&&e.opened.previous.type===c.RESERVED&&l(e.opened.previous.text,["if","while","for"])||l(e.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},w.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),r=!1,o=!1;this._input.hasNext()&&(r||o||this._input.peek()!==e)&&!this._input.testChar(i.newline);)n+=this._input.peek(),r?r=!1:(r="\\"===this._input.peek(),"["===this._input.peek()?o=!0:"]"===this._input.peek()&&(o=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(i.identifier)),this._create_token(c.STRING,n)}return null},w.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",r=this.__patterns.xml.read_match();if(r){for(var o=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),a=0===o.indexOf("{"),l=0;r;){var s=!!r[1],d=r[2];if(!(!!r[r.length-1]||"![CDATA["===d.slice(0,8))&&(d===o||a&&d.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--l:++l),n+=r[0],l<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,n)}}return null},w.prototype._read_string_recursive=function(e,t,n){var r,o;"'"===e?o=this.__patterns.single_quote:'"'===e?o=this.__patterns.double_quote:"`"===e?o=this.__patterns.template_text:"}"===e&&(o=this.__patterns.template_expression);for(var a=o.read(),l="";this._input.hasNext();){if((l=this._input.next())===e||!t&&i.newline.test(l)){this._input.back();break}"\\"===l&&this._input.hasNext()?("x"===(r=this._input.peek())||"u"===r?this.has_char_escapes=!0:"\r"===r&&"\n"===this._input.peek(1)&&this._input.next(),l+=this._input.next()):n&&("${"===n&&"$"===l&&"{"===this._input.peek()&&(l+=this._input.next()),n===l&&(l+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(l+=this._input.next()))),a+=l+=o.read()}return a},eA.Tokenizer=w,eA.TOKEN=c,eA.positionable_operators=h.slice(),eA.line_starters=g.slice(),eA}function MA(){if(vA)return jM;vA=1;var e=RM().Output,t=FM().Token,n=WM(),r=JM().Options,i=EA().Tokenizer,o=EA().line_starters,a=EA().positionable_operators,l=EA().TOKEN;function c(e,t){return-1!==t.indexOf(e)}function s(e){return e.replace(/^\s+/g,"")}function d(e,t){return e&&e.type===l.RESERVED&&e.text===t}function u(e,t){return e&&e.type===l.RESERVED&&c(e.text,t)}var f=["case","return","do","if","throw","else","await","break","continue","async"],h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(["before-newline","after-newline","preserve-newline"]),p=[h.before_newline,h.preserve_newline],m="BlockStatement",C="Statement",g="ObjectLiteral",v="ArrayLiteral",y="ForInitializer",w="Conditional",b="Expression";function E(e,t){t.multiline_frame||t.mode===y||t.mode===w||e.remove_indent(t.start_line_index)}function M(e){return e===v}function A(e){return c(e,[b,y,w])}function x(e,t){t=t||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new r(t)}x.prototype.create_flags=function(e,n){var r=0;return e&&(r=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>r&&(r=e.line_indent_level)),{mode:n,parent:e,last_token:e?e.last_token:new t(l.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:r,alignment:0,line_indent_level:e?e.line_indent_level:r,start_line_index:this._output.get_line_number(),ternary_depth:0}},x.prototype._reset=function(t){var n=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,n),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m);var r=new i(t,this._options);return this._tokens=r.tokenize(),t},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&n.lineBreak.test(e||"")&&(t=e.match(n.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return this._output.get_code(t)},x.prototype.handle_token=function(e,t){e.type===l.START_EXPR?this.handle_start_expr(e):e.type===l.END_EXPR?this.handle_end_expr(e):e.type===l.START_BLOCK?this.handle_start_block(e):e.type===l.END_BLOCK?this.handle_end_block(e):e.type===l.WORD||e.type===l.RESERVED?this.handle_word(e):e.type===l.SEMICOLON?this.handle_semicolon(e):e.type===l.STRING?this.handle_string(e):e.type===l.EQUALS?this.handle_equals(e):e.type===l.OPERATOR?this.handle_operator(e):e.type===l.COMMA?this.handle_comma(e):e.type===l.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===l.COMMENT?this.handle_comment(e,t):e.type===l.DOT?this.handle_dot(e):e.type===l.EOF?this.handle_eof(e):(e.type,l.UNKNOWN,this.handle_unknown(e,t))},x.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,r=this._options.keep_array_indentation&&M(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,t),this.handle_token(i,t),i=e.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a<n;a+=1)this.print_newline(!0,t)}};var k=["async","break","continue","return","throw","yield"];return x.prototype.allow_wrap_or_preserved_newline=function(e,t){if(t=void 0!==t&&t,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&e.newlines||t;if(c(this._flags.last_token.text,a)||c(e.text,a)){var r=c(this._flags.last_token.text,a)&&c(this._options.operator_position,p)||c(e.text,a);n=n&&r}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(u(this._flags.last_token,k))return;this._output.set_wrap_point()}}},x.prototype.print_newline=function(e,t){if(!t&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==l.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==C||this._flags.if_block&&d(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},x.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||M(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},x.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===l.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var t=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(t),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},x.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===C&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===C&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"]))},x.prototype.start_of_statement=function(e){var t=!1;return!!(t=(t=(t=(t=(t=(t=(t=t||u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD)||d(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===C)&&u(this._flags.last_token,k)&&!e.newlines)||d(this._flags.last_token,"else")&&!(d(e,"if")&&!e.comments_before))||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===y||this._previous_flags.mode===w))||this._flags.last_token.type===l.WORD&&this._flags.mode===m&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==l.WORD&&e.type!==l.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"])))&&(this.set_mode(C),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,u(e,["do","for","if","while"])),!0)},x.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=b;if("["===e.text){if(this._flags.last_token.type===l.WORD||")"===this._flags.last_token.text)return u(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=v,M(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=y):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=w):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(c(this._flags.last_token.text,o)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);u(n,["async","function"])||"*"===n.text&&u(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==r.text&&","!==r.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===l.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===l.START_BLOCK?this.print_newline():this._flags.last_token.type!==l.END_EXPR&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==l.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},x.prototype.handle_end_expr=function(e){for(;this._flags.mode===C;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&M(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==l.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w&&(this._previous_flags.mode=b,this._flags.do_block=!1,this._flags.do_while=!1)},x.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(m),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m):n&&(c(n.text,[":",","])&&c(t.type,[l.STRING,l.WORD,l.RESERVED])||c(t.text,["get","set","..."])&&c(n.type,[l.WORD,l.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(n.text,[":",","])?this.set_mode(m):this.set_mode(g):this._flags.last_token.type===l.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(m):c(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||u(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(m),this._flags.last_token&&u(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!t.comments_before&&"}"===t.text,i=r&&"function"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do{if(o+=1,(a=this._tokens.peek(o-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==l.EOF&&(a.type!==l.END_BLOCK||a.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(i||this._flags.last_token.type===l.EQUALS||u(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!M(this._previous_flags.mode)||this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.COMMA||((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(c(this._flags.last_token.type,[l.START_BLOCK,l.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),r||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},x.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===C;)this.restore_mode();var t=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(M(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},x.prototype.handle_word=function(e){if(e.type===l.RESERVED)if(c(e.text,["set","get"])&&this._flags.mode!==g)e.type=l.WORD;else if("import"===e.text&&c(this._tokens.peek().text,["(","."]))e.type=l.WORD;else if(c(e.text,["as","from"])&&!this._flags.import_block)e.type=l.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=l.WORD)}if(this.start_of_statement(e)?u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD&&(this._flags.declaration_statement=!0):!e.newlines||A(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&u(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(d(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&d(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===C;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&u(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.EQUALS&&this._flags.last_token.type!==l.OPERATOR||this.start_of_object_property()||c(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),d(e,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==l.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?u(this._flags.last_token,["get","set","new","export"])||u(this._flags.last_token,k)||d(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!A(this._flags.mode)&&!M(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var t="NONE";(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":u(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===m?t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&A(this._flags.mode)?t="SPACE":this._flags.last_token.type===l.STRING?t="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===l.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),u(e,o)&&")"!==this._flags.last_token.text&&(t=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),u(e,["else","catch","finally"]))?(this._flags.last_token.type!==l.END_BLOCK||this._previous_flags.mode!==m||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===t?u(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&u(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?this._flags.last_token.type===l.START_EXPR&&u(e,["var","let","const"])||":"===this._flags.last_token.text||(d(e,"if")&&d(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):u(e,o)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&M(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===t&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==l.WORD&&e.previous.type!==l.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===l.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&d(e,"from")&&(this._flags.import_block=!1))},x.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==C||this._flags.if_block&&d(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},x.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==l.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==l.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},x.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},x.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(A(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===C&&this._flags.parent.mode===g?(this._flags.mode===C&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},x.prototype.handle_operator=function(e){var t="*"===e.text&&(u(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),n=c(e.text,["-","+"])&&(c(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||c(this._flags.last_token.text,o)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var r=!t;this.handle_whitespace_and_comments(e,r)}if("*"!==e.text||this._flags.last_token.type!==l.DOT)if("::"!==e.text)if(c(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===l.OPERATOR&&c(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,s=!0,d=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,d=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&c(e.text,a)){var g=":"===e.text,v=g&&d,y=g&&!d;switch(this._options.operator_position){case h.before_newline:return this._output.space_before_token=!y,this.print_token(e),g&&!v||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case h.after_newline:return this._output.space_before_token=!0,!g||v?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case h.preserve_newline:return y||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||y),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),i=!1;var w=this._tokens.peek();s=w&&c(w.type,[l.WORD,l.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===l.START_BLOCK,s=!1;else if(c(e.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,s=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var b=u(this._flags.last_token,f)&&e.newlines;b&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(b,!0)}";"===this._flags.last_token.text&&A(this._flags.mode)&&(i=!0),this._flags.last_token.type===l.RESERVED?i=!0:this._flags.last_token.type===l.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===l.OPERATOR&&(i=c(e.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(e.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==m||this._flags.inline_frame)&&this._flags.mode!==C||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=s}else this.print_token(e);else this.print_token(e)},x.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):n.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},x.prototype.print_block_commment=function(e,t){var r,i=function(e){for(var t=[],r=(e=e.replace(n.allLineBreaks,"\n")).indexOf("\n");-1!==r;)t.push(e.substring(0,r)),r=(e=e.substring(r+1)).indexOf("\n");return e.length&&t.push(e),t}(e.text),o=!1,a=!1,l=e.whitespace_before,c=l.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,t),i.length>1){for(o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].trim().charAt(0)!==t)return!1;return!0}(i=i.slice(1),"*"),a=function(e,t){for(var n,r=0,i=e.length;r<i;r++)if((n=e[r])&&0!==n.indexOf(t))return!1;return!0}(i,l),o&&(this._flags.alignment=1),r=0;r<i.length;r++)o?(this.print_token_line_indentation(e),this._output.add_token(s(i[r]))):a&&i[r]?(this.print_token_line_indentation(e),this._output.add_token(i[r].substring(c))):(this._output.current_line.set_indent(-1),this._output.add_token(i[r])),this.print_newline(!1,t);this._flags.alignment=0}},x.prototype.handle_comment=function(e,t){e.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,t)},x.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),u(this._flags.last_token,f)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},x.prototype.handle_unknown=function(e,t){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,t)},x.prototype.handle_eof=function(e){for(;this._flags.mode===C;)this.restore_mode();this.handle_whitespace_and_comments(e)},jM.Beautifier=x,jM}var AA,xA,kA,LA={exports:{}},HA={},_A={};function SA(){if(AA)return _A;AA=1;var e=XM().Options;function t(t){e.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<r.length;i++)"expand"!==r[i]?this.brace_style="collapse":this.brace_style=r[i]}return t.prototype=new e,_A.Options=t,_A}function VA(){if(kA)return LA.exports;kA=1;var e=function(){if(xA)return HA;xA=1;var e=SA().Options,t=RM().Output,n=nA().InputScanner,r=new(0,mA().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,c=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,s=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(t,n){this._source_text=t||"",this._options=new e(n),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=a.test(this._input.peek()),n=0;a.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,d=this._options.eol;"auto"===d&&(d="\n",e&&i.test(e||"")&&(d=e.match(i)[0]));var u=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0];this._output=new t(this._options,u),this._input=new n(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f,h,p=0,m=!1,C=!1,g=!1,v=!1,y=!1,w=this._ch,b=!1;f=""!==this._input.read(l),h=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var E=this._input.read(c),M=r.get_directives(E);M&&"start"===M.ignore&&(E+=r.readIgnored(this._input)),this.print_string(E),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(s)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(f),this.print_string(this._ch);var A=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);A.match(/[ :]$/)&&(A=this.eatString(": ").replace(/\s+$/,""),this.print_string(A),this._output.space_before_token=!0),0===p&&-1!==A.indexOf(":")&&(C=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(f),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),0===p&&-1!==x.indexOf(":")?(C=!0,this.indent()):x in this.NESTED_AT_RULE?(this._nestedLevel+=1,x in this.CONDITIONAL_GROUP_RULE&&(g=!0)):0!==p||C||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)C&&(C=!1,this.outdent()),v=!1,g?(g=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===h?this._output.space_before_token=!1:","!==h&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===h&&this._output.trim(!0),C&&(this.outdent(),C=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var k=0;k<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;k++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[k])){b=!0;break}!m&&!g||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),C||(C=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var L='"'===h||"'"===h;this.preserveSingleSpace(L||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)b=!1,0===p?(C&&(this.outdent(),C=!1),v=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var H=!1;this._input.lookBack("with")&&(H=!0),this.preserveSingleSpace(f||H),this.print_string(this._ch),C&&"$"===h&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||C&&!y||0!==p||v?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||C||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(f),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var _='"'===h||"'"===h;this.preserveSingleSpace(_||f),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&b&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));return this._output.get_code(d)},HA.Beautifier=d,HA}().Beautifier,t=SA().Options;return LA.exports=function(t,n){return new e(t,n).beautify()},LA.exports.defaultOptions=function(){return new t},LA.exports}var OA,zA={exports:{}},NA={},IA={};function TA(){if(OA)return IA;OA=1;var e=XM().Options;function t(t){e.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,IA.Options=t,IA}var DA,jA,ZA,RA,BA,PA={};function FA(){if(DA)return PA;DA=1;var e=fA().Tokenizer,t=fA().TOKEN,n=mA().Directives,r=bA().TemplatablePattern,i=uA().Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},a=new n(/<\!--/,/-->/),l=function(t,n){e.call(this,t,n),this._current_tag_name="";var o=new r(this._input).read_options(this._options),a=new i(this._input);if(this.__patterns={word:o.until(/[\n\r\t <]/),word_control_flow_close_excluded:o.until(/[\n\r\t <}]/),single_quote:o.until_after(/'/),double_quote:o.until_after(/"/),attribute:o.until(/[\n\r\t =>]|\/>/),element_name:o.until(/[\n\r\t >\/]/),angular_control_flow_start:a.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),handlebars_open:a.until(/[\n\r\t }]/),handlebars_raw_close:a.until(/}}/),comment:a.starting_with(/<!--/).until_after(/-->/),cdata:a.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:a.starting_with(/<!\[/).until_after(/]>/),processing:a.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var l=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=a.matching(l).until_after(l)}};return(l.prototype=new e)._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return e.type===o.TAG_OPEN||e.type===o.CONTROL_FLOW_OPEN},l.prototype._is_closing=function(e,t){return e.type===o.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])||e.type===o.CONTROL_FLOW_CLOSE&&"}"===e.text&&t.text.endsWith("{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(o.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(r,t))||this._read_attribute(r,e,t))||this._read_close(r,t))||this._read_script_and_style(r,e))||this._read_control_flows(r,t))||this._read_raw_content(r,e,t))||this._read_content_word(r,t))||this._read_comment_or_cdata(r))||this._read_processing(r))||this._read_open(r,t))||this._create_token(o.UNKNOWN,this._input.next())},l.prototype._read_comment_or_cdata=function(e){var t=null,n=null,r=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(r=a.get_directives(n))&&"start"===r.ignore&&(n+=a.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=r));return t},l.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=null)}return t},l.prototype._read_open=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(o.TAG_OPEN,n)),r},l.prototype._read_open_handlebars=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===e&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),r=this._create_token(o.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(o.TAG_OPEN,n))),r},l.prototype._read_control_flows=function(e,t){var n="",r=null;if(!this._options.templating.includes("angular"))return r;if("@"===e){if(""===(n=this.__patterns.angular_control_flow_start.read()))return r;for(var i=n.endsWith("(")?1:0,a=0;!n.endsWith("{")||i!==a;){var l=this._input.next();if(null===l)break;"("===l?i++:")"===l&&a++,n+=l}r=this._create_token(o.CONTROL_FLOW_OPEN,n)}else"}"===e&&t&&t.type===o.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(o.CONTROL_FLOW_CLOSE,n));return r},l.prototype._read_close=function(e,t){var n=null,r=null;return t&&t.type===o.TAG_OPEN&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),r=this._create_token(o.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),r=this._create_token(o.TAG_CLOSE,"}}"))),r},l.prototype._read_attribute=function(e,t,n){var r=null,i="";if(n&&"<"===n.text[0])if("="===e)r=this._create_token(o.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),r=this._create_token(o.VALUE,a)}else(i=this.__patterns.attribute.read())&&(r=t.type===o.EQUALS?this._create_token(o.VALUE,i):this._create_token(o.ATTRIBUTE,i));return r},l.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},l.prototype._read_raw_content=function(e,t,n){var r="";if(n&&"{"===n.text[0])r=this.__patterns.handlebars_raw_close.read();else if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var i=t.opened.text.substr(1).toLowerCase();this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(o.TEXT,r):null},l.prototype._read_script_and_style=function(e,t){if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var n=t.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var r=this._read_comment_or_cdata(e);if(r)return r.type=o.TEXT,r;var i=this._input.readUntil(new RegExp("</"+n+"[\\n\\r\\t ]*?>","ig"));if(i)return this._create_token(o.TEXT,i)}}return null},l.prototype._read_content_word=function(e,t){var n="";return this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=t&&t.type===o.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(o.TEXT,n):null},PA.Tokenizer=l,PA.TOKEN=o,PA}function UA(){if(jA)return NA;jA=1;var e=TA().Options,t=RM().Output,n=FA().Tokenizer,r=FA().TOKEN,i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=function(e,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new t(e,n)};a.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},a.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},a.prototype.print_preserved_newlines=function(e){var t=0;e.type!==r.TEXT&&e.previous.type!==r.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var n=0;n<t;n++)this.print_newline(n>0);return 0!==t},a.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(e){this._output.add_new_line(e)},a.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},a.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var l=function(e,t){var n=null,i=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),n=function(e){for(var t=null,n=e.next;n.type!==r.EOF&&e.closed!==n;){if(n.type===r.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===r.EQUALS&&n.next.next&&n.next.next.type===r.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function c(e,t){return-1!==t.indexOf(e)}function s(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function d(e){this._printer=e,this._current_frame=null}function u(t,n,r,i){this._source_text=t||"",n=n||{},this._js_beautify=r,this._css_beautify=i,this._tag_stack=null;var o=new e(n,"html");this._options=o,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(e){var t=new s(this._current_frame,e,this._printer.indent_level);this._current_frame=t},d.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},d.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&i.test(e)&&(t=e.match(i)[0]));var l=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0],c={text:"",type:""},s=new f(this._options),u=new a(this._options,l),h=new n(e,this._options).tokenize();this._tag_stack=new d(u);for(var p=null,m=h.next();m.type!==r.EOF;)m.type===r.TAG_OPEN||m.type===r.COMMENT?s=p=this._handle_tag_open(u,m,s,c,h):m.type===r.ATTRIBUTE||m.type===r.EQUALS||m.type===r.VALUE||m.type===r.TEXT&&!s.tag_complete?p=this._handle_inside_tag(u,m,s,c):m.type===r.TAG_CLOSE?p=this._handle_tag_close(u,m,s):m.type===r.TEXT?p=this._handle_text(u,m,s):m.type===r.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(u,m):m.type===r.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(u,m):u.add_raw_token(m),c=p,m=h.next();return u._output.get_code(t)},u.prototype._handle_control_flow_open=function(e,t){var n={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),e.indent(),n},u.prototype._handle_control_flow_close=function(e,t){var n={text:t.text,type:t.type};return e.deindent(),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),n},u.prototype._handle_tag_close=function(e,t,n){var r={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(e.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||e.set_wrap_point(),r},u.prototype._handle_inside_tag=function(e,t,n,i){var o=n.has_wrapped_attrs,a={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):"{"===n.tag_start_char&&t.type===r.TEXT?e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t):(t.type===r.ATTRIBUTE?e.set_space_before_token(!0):(t.type===r.EQUALS||t.type===r.VALUE&&t.previous.type===r.EQUALS)&&e.set_space_before_token(!1),t.type===r.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),o=o||0!==t.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==r.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),o=!0)),e.print_token(t),o=o||e.previous_token_wrapped(),n.has_wrapped_attrs=o),a},u.prototype._handle_text=function(e,t,n){var r={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),r},u.prototype._print_custom_beatifier_text=function(e,t,n){var r=this;if(""!==t.text){var i,o=t.text,a=1,l="",c="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===n.custom_beautifier_name&&(i=function(e,t){return new u(e,t,r._js_beautify,r._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-e.indent_level);var s=e.get_full_indent(a);if(o=o.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===o[0]&&o.match(/^(<!--|<!\[CDATA\[)/)){var d=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(o);if(!d)return void e.add_raw_token(t);l=s+d[1]+"\n",o=d[4],d[5]&&(c=s+d[5]),o=o.replace(/\n[ \t]*$/,""),(d[2]||-1!==d[3].indexOf("\n"))&&(d=d[3].match(/[ \t]+$/))&&(t.whitespace_before=d[0])}if(o)if(i){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,o=i(s+o,new f)}else{var h=t.whitespace_before;h&&(o=o.replace(new RegExp("\n("+h+")?","g"),"\n")),o=s+o.replace(/\n/g,"\n"+s)}l&&(o=o?l+o+"\n"+c:l+c),e.print_newline(!1),o&&(t.text=o,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},u.prototype._handle_tag_open=function(e,t,n,i,o){var a=this._get_tag_open_token(t);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==r.TAG_OPEN||a.is_start_tag?(e.traverse_whitespace(t),this._set_tag_position(e,t,a,n,i),a.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),a.start_tag_token=this._tag_stack.try_pop(a.tag_name)),a.is_start_tag&&this._is_wrap_attributes_force){var l,c=0;do{(l=o.peek(c)).type===r.ATTRIBUTE&&(a.attr_count+=1),c+=1}while(l.type!==r.EOF&&l.type!==r.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(a.alignment_size=t.text.length+1),a.tag_complete||a.is_unformatted||(e.alignment_size=a.alignment_size),a};var f=function(e,t,n){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var i;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(i=n.text.match(/^<([^\s>]*)/),this.tag_check=i?i[1]:""):(i=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===r.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var o=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(o=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!e.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(o)))}else this.tag_complete=!0};u.prototype._get_tag_open_token=function(e){var t=new f(this._options,this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||c(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&c(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&c(t.tag_check,this._options.content_unformatted),t.is_inline_element=c(t.tag_name,this._options.inline)||this._options.inline_custom_elements&&t.tag_name.includes("-")||"{"===t.tag_start_char,t},u.prototype._set_tag_position=function(e,t,n,i,o){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=l(n.tag_check,t)))),c(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&o.type===r.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(o.type===r.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==o.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===o.type&&!n.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n)},u.prototype._calcluate_parent_multiline=function(e,t){!t.parent||!e._output.just_added_newline()||(t.is_inline_element||t.is_unformatted)&&t.parent.is_inline_element||(t.parent.multiline_content=!0)};var h=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return u.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==h.indexOf(e.tag_name)){var n=e.parent.parent;n&&-1!==p.indexOf(n.tag_name)||(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},NA.Beautifier=u,NA}function qA(){if(RA)return TM;RA=1;var e=function(){if(yA)return DM.exports;yA=1;var e=MA().Beautifier,t=JM().Options;return DM.exports=function(t,n){return new e(t,n).beautify()},DM.exports.defaultOptions=function(){return new t},DM.exports}(),t=VA(),n=function(){if(ZA)return zA.exports;ZA=1;var e=UA().Beautifier,t=TA().Options;return zA.exports=function(t,n,r,i){return new e(t,n,r,i).beautify()},zA.exports.defaultOptions=function(){return new t},zA.exports}();function r(r,i,o,a){return n(r,i,o=o||e,a=a||t)}return r.defaultOptions=n.defaultOptions,TM.js=e,TM.css=t,TM.html=r,TM}var WA=(BA||(BA=1,function(e){var t,n,r,i,o=qA();o.js_beautify=o.js,o.css_beautify=o.css,o.html_beautify=o.html,e.exports=(t=o,n=o,r=o,i=function(e,n){return t.js_beautify(e,n)},i.js=t.js_beautify,i.css=n.css_beautify,i.html=r.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=n.css_beautify,i.html_beautify=r.html_beautify,i)}(IM)),IM.exports);const QA=(e,t,n=150)=>{if(!e||!t)return{top:0,left:0};const{top:r,left:i}=e,o=t.getBoundingClientRect();let a=r,l=i;return a-=a+n>t.clientHeight-n+130?Math.floor(n/2)+n-35:10,i>.6*o.width?l-=n+50:i<.5*o.width+n&&(l-=42),{top:a,left:l}},GA=o(({width:t="100%",height:r="100%",VariableDropdownHeight:i="160px",readOnly:o=!1,value:c="",handleChange:d,setValue:u,variableOptionsList:f=[],addForloopPrefix:h=!1,language:p="json",theme:m="light",isRequisiteType:C=!1,onPaste:g,showVariableDropdown:v=!0,defaultValue:y,customOptions:w={},editorVariableZindex:E=99999,showMinimap:M=!0},A)=>{const x=a(null),k=a([]),L=a(null),H=a(null),[_,S]=s(0),[V,O]=s(!1),[z,N]=s(!1),[I,T]=s({top:0,left:0}),[D,j]=s([]),Z=a(f);l(()=>{Z.current=f},[f]);l(()=>{const e=x.current;if(!e)return;const t=e.onDidBlurEditorWidget(()=>{N(!1),L.current=null,H.current=null,k.current=[],S(0)}),n=t=>{const n=e.getDomNode(),r=n&&n.contains(t.target);if(!r||r&&!t.target.closest(".view-line, .monaco-editor-textarea")){const e=n?.querySelector("textarea");e&&e.blur()}};return document.addEventListener("mousedown",n),()=>{t.dispose(),document.removeEventListener("mousedown",n)}},[z]),l(()=>{const e=x.current;if(!e||!_)return;const t=[],n=[];V?n.push({range:{startLineNumber:_,startColumn:1,endLineNumber:_,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"active-line-number"}}):t.push({range:{startLineNumber:_,startColumn:1,endLineNumber:_,endColumn:1},options:{isWholeLine:!0,className:"current-line-background"}}),k.current=e.deltaDecorations(k.current,[...t,...n])},[_,V]);const R=(e,t)=>{switch(t){case"json":case"javascript":return WA.js(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!0,brace_style:"collapse",space_before_conditional:!0,unescape_strings:!0,jslint_happy:!0,end_with_newline:!0,wrap_line_length:0,comma_first:!1,e4x:!0,indent_empty_lines:!0});case"html":case"xml":return WA.html(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,end_with_newline:!0,wrap_line_length:0,indent_empty_lines:!0});default:return e}};return b(A,()=>({getEditorInstance:()=>x.current,beautify:()=>{if(x.current){const e=x.current.getValue(),t=x.current.getModel()?.getLanguageId(),n=R(e,t||"json");x.current.setValue(n)}}})),n("div",{style:{width:t,height:r},className:"ff-editor-container",children:[e(NM,{defaultValue:y,height:r,width:t,language:p,value:c,options:{minimap:{enabled:M},lineNumbers:"on",wordWrap:"on",autoClosingBrackets:"always",scrollBeyondLastLine:!1,readOnly:o,guides:{indentation:!1},...w},onMount:(e,t)=>{x.current=e,e.onDidChangeCursorPosition(t=>{S(t.position.lineNumber);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-1;if(0===o)return void N(!1);const a=i.lastIndexOf("$",o-1),l=i.lastIndexOf("${",o-1),c=-1!==l?i.indexOf("}",l+2):-1,s=-1!==l&&-1!==c&&o-1>l&&o-1<c,d=!/\}/.test(i.slice(a+1,o));if(-1!==a&&o>a&&!/\s/.test(i.slice(a+1,o))&&!s&&d){L.current=a,H.current=i.slice(a+1,o);const r=(H.current??"").toLowerCase(),l=Z.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(r));j(l);const c=e.getScrolledVisiblePosition(n),s=e.getDomNode();T(QA(c,s,150)),["keyboard","mouse","deleteLeft"].includes(t?.source||"")&&N(!0)}else N(!1),L.current=null,H.current=null}),e.onMouseDown(()=>{setTimeout(()=>{const e=x.current;if(!e)return;const t=e.getPosition(),n=e.getModel();if(!t||!n)return;const r=n.getLineContent(t.lineNumber),i=t.column-2;"$"===r[i]?(L.current=i,H.current=""):(L.current=null,H.current=null)},0)}),e.onDidChangeCursorSelection(()=>{const t=(e.getSelections?.()||[]).some(e=>e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn);O(t)}),e.onDidChangeModelContent(()=>{const t=e.getValue();u(t);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-2;if("$"===i[L.current??o]){null===L.current&&(L.current=o),H.current=i.slice(L.current+1,o);const t=Z.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(H.current?.toLowerCase()));t.length?j(t):(j([]),L?.current!==o&&" "===i[o]&&(L.current=null,H.current=null,N(!1)));const r=e.getScrolledVisiblePosition(n),a=e.getDomNode();T(QA(r,a,150))}else L.current=null,H.current=null}),e.onDidPaste(()=>{const t=e.getValue();if(t){const n=R(t,p);e.setValue(n),g&&g(n)}}),t.languages.registerCompletionItemProvider(p,{triggerCharacters:["."],provideCompletionItems:(e,n)=>{const r=e.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=e.getWordAtPosition(n),o=i?new t.Range(n.lineNumber,i.startColumn,n.lineNumber,i.endColumn):new t.Range(n.lineNumber,n.column,n.lineNumber,n.column),a=[];return r.endsWith("ff.")&&a.push({label:"getVariable",kind:t.languages.CompletionItemKind.Method,insertText:"getVariable(${1:variableName})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Get a variable value",range:o},{label:"setVariable",kind:t.languages.CompletionItemKind.Method,insertText:"setVariable(${1:variableName}, ${2:value})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Set a variable value",range:o},{label:"sendRequest",kind:t.languages.CompletionItemKind.Method,insertText:'sendRequest({\n method: "GET",//add your method\n url: "https://fakestoreapi.com/products",//enter your url\n headers: { },//add your headers,\n params: params,//add your params,\n data: body,//add your request body,\n })',insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Make your http requests",range:o}),{suggestions:a}}})},onChange:(e,t)=>d(e,t),theme:m}),z&&I&&v&&e(Zb,{position:"absolute",width:"300px",height:i,optionsList:D,onSelectVariable:e=>{if(C&&x.current){const t=x.current,n=t.getPosition();if(n){const r=`'${e.name}'`,i=L?.current??0;t.executeEdits("",[{range:{startLineNumber:n.lineNumber,startColumn:i+1,endLineNumber:n.lineNumber,endColumn:i+(n.column-i)},text:r,forceMoveMarkers:!0}]),H.current=null,L.current=null,N(!1)}}else((e,t)=>{if(x.current){const n=x.current,r=n.getPosition();if(r){const i=`{${t}${"FLV_for:"===t?"":"_"}${e}}`,o=L?.current??0;n.executeEdits("",[{range:{startLineNumber:r.lineNumber,startColumn:o+2,endLineNumber:r.lineNumber,endColumn:o+(r.column-o)},text:i,forceMoveMarkers:!1}]);const a=[];a.push({range:{startLineNumber:_,startColumn:1,endLineNumber:_,endColumn:1},options:{isWholeLine:!1}}),k.current=n.deltaDecorations(k.current,a),H.current=null,L.current=null,N(!1)}}})("DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e?.name,"STEPGROUP"===e.parentVariableType?"SGV":"GLOBAL"===e?.type?"GV":"LOCAL"===e?.type?"LV":e?._id?.includes("PARAMETER")?"SGP":"_startforloop"===e?.type?"FLV_for:":"DATAPROVIDER"===e?.type?"DPV":"PEV")},dropdownPosition:I,zIndex:E})]})}),KA=e=>e.flatMap(e=>e.runLevelExecutionDataSets.map((t,n)=>{const{runLevelExecutionDataSets:r,...i}=e;return{...i,...t,runCount:n+1}}));var YA,XA={exports:{}};var JA=(YA||(YA=1,"undefined"!=typeof self&&self,XA.exports=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="lib/",n(n.s=5)}([function(t,n){t.exports=e},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainerContextProvider=t.ArcherContainerContext=void 0;var i=r(n(0));t.ArcherContainerContext=i.default.createContext(null),t.ArcherContainerContextProvider=t.ArcherContainerContext.Provider},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=void 0,t.encodeId=function(e){return encodeURI(e).replace(/%/g,"_")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getMarkerId=t.createShapeObj=t.getSourceToTargets=t.getEndShapeFromStyle=void 0;var r=["arrow","circle"];t.getEndShapeFromStyle=function(e){return e.endShape&&Object.keys(e.endShape).filter(function(e){return r.includes(e)})[0]||r[0]},t.getSourceToTargets=function(e){var t=Object.keys(e).map(function(t){return e[t]});return[].concat.apply([],t).sort(function(e,t){return e.order-t.order})},t.createShapeObj=function(e,n){return{arrow:function(){var t;return{arrow:Object.assign(Object.assign({},null==n?void 0:n.arrow),null===(t=e.endShape)||void 0===t?void 0:t.arrow)}},circle:function(){var t;return{circle:Object.assign(Object.assign({},null==n?void 0:n.circle),null===(t=e.endShape)||void 0===t?void 0:t.circle)}}}[(0,t.getEndShapeFromStyle)(e)]()},t.getMarkerId=function(e,t,n){return"".concat(e).concat(t.id).concat(n.id)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.endShapeDefaultProp=void 0,t.endShapeDefaultProp={arrow:{arrowLength:10,arrowThickness:6},circle:{radius:2,fillColor:"#f00",strokeColor:"#0ff",strokeWidth:1}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainer=t.ArcherElement=void 0;var i=n(6);Object.defineProperty(t,"ArcherElement",{enumerable:!0,get:function(){return r(i).default}});var o=n(11);Object.defineProperty(t,"ArcherContainer",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(0)),l=n(7),c=n(1),s=n(2),d=n(8),u=n(10);t.default=function(e){var t=e.id,n=e.relations,r=void 0===n?[]:n,i=e.children,o=(0,a.useMemo)(function(){return(0,s.encodeId)(t)},[t]),f=(0,a.useContext)(c.ArcherContainerContext),h=(0,a.useRef)(),p=(0,a.useCallback)(function(e){var t=(0,u.generateSourceToTarget)(o,e);(0,u.assertContextExists)(f),f.registerTransitions(o,t)},[f,o]),m=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterTransitions(o)},[f,o]),C=(0,a.useCallback)(function(e){e&&((0,u.assertContextExists)(f),f.registerChild(o,e))},[o,f]),g=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterChild(o)},[f,o]);(0,l.useIsomorphicLayoutEffect)(function(){return C(h.current),function(){return g()}},[C,g]),(0,d.useDeepCompareEffect)(function(){return p(r),function(){return m()}},[p,r,m]),a.default.Children.only(i);var v=i;return a.default.cloneElement(v,Object.assign(Object.assign({},v.props),{ref:h}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var r=n(0);t.useIsomorphicLayoutEffect="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDeepCompareEffect=void 0;var i=n(0),o=r(n(9));function a(e){var t=(0,i.useRef)();return(0,o.default)(e,t.current)||(t.current=e),t.current}t.useDeepCompareEffect=function(e,t){(0,i.useEffect)(e,t.map(a))}},function(e,t,n){var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var l,c,s,d=r(t),u=r(n);if(d&&u){if((c=t.length)!=n.length)return!1;for(l=c;0!=l--;)if(!e(t[l],n[l]))return!1;return!0}if(d!=u)return!1;var f=t instanceof Date,h=n instanceof Date;if(f!=h)return!1;if(f&&h)return t.getTime()==n.getTime();var p=t instanceof RegExp,m=n instanceof RegExp;if(p!=m)return!1;if(p&&m)return t.toString()==n.toString();var C=i(t);if((c=C.length)!==i(n).length)return!1;for(l=c;0!=l--;)if(!o.call(n,C[l]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(l=c;0!=l--;)if(!("_owner"===(s=C[l])&&t.$$typeof||e(t[s],n[s])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.generateSourceToTarget=t.assertContextExists=void 0;var r=n(2);t.assertContextExists=function(e){if(!e)throw new Error("Could not find ArcherContainerContext in <ArcherElement>. Please wrap the component in a <ArcherContainer>.")},t.generateSourceToTarget=function(e,t){return t.map(function(t){var n=t.targetId,i=t.sourceAnchor,o=t.targetAnchor,a=t.label,l=t.className,c=t.style,s=t.order,d=void 0===s?0:s,u=t.domAttributes,f=t.cursor,h=t.hitSlop;return{source:{id:(0,r.encodeId)(e),anchor:i},target:{id:(0,r.encodeId)(n),anchor:o},className:l,label:a,style:c,order:d,domAttributes:u,cursor:f,hitSlop:h}})}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return l(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=c(n(0)),u=s(n(12)),f=n(1),h=n(14),p=n(4),m=n(19),C=n(20),g={position:"absolute",width:"100%",height:"100%",top:0,left:0,pointerEvents:"none"},v=d.default.forwardRef(function(e,t){var n=e.endShape,o=void 0===n?p.endShapeDefaultProp:n,a=e.strokeColor,l=void 0===a?"#f00":a,c=e.strokeWidth,s=void 0===c?2:c,v=e.svgContainerStyle,y=void 0===v?{}:v,w=e.noCurves,b=e.children,E=e.className,M=e.endMarker,A=e.lineStyle,x=e.offset,k=e.startMarker,L=e.strokeDasharray,H=e.style,_=i((0,d.useState)({}),2),S=_[0],V=_[1],O=i((0,d.useState)({}),2),z=O[0],N=O[1],I=(0,d.useRef)(new u.default(function(){R()})).current,T=(0,d.useRef)(null),D=i(d.default.useState(),2)[1],j=(0,d.useRef)("arrow".concat(Math.random().toString().slice(2))).current;(0,d.useImperativeHandle)(t,function(){return{refreshScreen:R,arrowMarkerUniquePrefix:j}});var Z,R=d.default.useCallback(function(){return D({})},[]),B=(0,d.useCallback)(function(e,t){N(function(n){return Object.assign(Object.assign({},n),r({},e,t))})},[]),P=(0,d.useCallback)(function(e){N(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),F=(0,d.useCallback)(function(e,t){V(function(n){return n[e]===t?n:Object.assign(Object.assign({},n),r({},e,t))})},[]),U=(0,d.useCallback)(function(e){V(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),q=(0,d.useMemo)(function(){return Object.assign(Object.assign({},g),y)},[y]);Z="function"==typeof b?b(f.ArcherContainerContext):b,(0,C.useResizeListener)(R),(0,C.useObserveElements)(S,I);var W=(0,d.useMemo)(function(){return{registerTransitions:B,unregisterTransitions:P,registerChild:F,unregisterChild:U}},[B,P,F,U]);return d.default.createElement(f.ArcherContainerContextProvider,{value:W},d.default.createElement("div",{style:Object.assign(Object.assign({},H),{position:"relative"}),className:E},d.default.createElement("svg",{style:q},d.default.createElement("defs",null,d.default.createElement(m.ArrowMarkers,{endShape:o,sourceToTargetsMap:z,strokeColor:l,uniqueId:j})),d.default.createElement(h.SvgArrows,{startMarker:k,endMarker:M,endShape:o,strokeColor:l,strokeWidth:s,strokeDasharray:L,noCurves:w,lineStyle:A,offset:x,parentCurrent:T.current,refs:S,uniqueId:j,sourceToTargetsMap:z})),d.default.createElement("div",{style:{height:"100%"},ref:T},Z)))});t.default=v},function(e,t,n){n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},a=2,l=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,s=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function l(){n&&(n=!1,e()),r&&s()}function c(){o(l)}function s(){var e=Date.now();if(n){if(e-i<a)return;r=!0}else n=!0,r=!1,setTimeout(c,t);i=e}return s}(this.refresh.bind(this),20)};s.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},s.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},s.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},s.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},s.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},s.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},s.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),l.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},s.getInstance=function(){return this.instance_||(this.instance_=new s),this.instance_},s.instance_=null;var d=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function p(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+h(e["border-"+n+"-width"])},0)}function m(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,l=h(r.width),c=h(r.height);if("border-box"===r.boxSizing&&(Math.round(l+o)!==t&&(l-=p(r,"left","right")+o),Math.round(c+a)!==n&&(c-=p(r,"top","bottom")+a)),!function(e){return e===u(e).document.documentElement}(e)){var s=Math.round(l+o)-t,d=Math.round(c+a)-n;1!==Math.abs(s)&&(l-=s),1!==Math.abs(d)&&(c-=d)}return v(i.left,i.top,l,c)}var C="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?C(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):m(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e};y.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},y.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var w=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return d(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);d(this,{target:e,contentRect:n})},b=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};b.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},b.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},b.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},b.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},b.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new w(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},b.prototype.clearActive=function(){this.activeObservations_.splice(0)},b.prototype.hasActive=function(){return this.activeObservations_.length>0};var E="undefined"!=typeof WeakMap?new WeakMap:new n,M=function(e){if(!(this instanceof M))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s.getInstance(),n=new b(e,t,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){return(t=E.get(this))[e].apply(t,arguments);var t}});var A=void 0!==i.ResizeObserver?i.ResizeObserver:M;t.default=A}.call(this,n(13))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SvgArrows=void 0;var i=r(n(0)),o=n(15),a=r(n(17)),l=n(3),c=function(e){var t,n,r=e.style||{},c=r.startMarker||e.startMarker,s=null===(n=null!==(t=r.endMarker)&&void 0!==t?t:e.endMarker)||void 0===n||n,d=(0,l.createShapeObj)(r,e.endShape),u=e.domAttributes,f=e.cursor,h=e.hitSlop,p=r.strokeColor||e.strokeColor,m=r.strokeWidth||e.strokeWidth,C=r.strokeDasharray||e.strokeDasharray,g=!(!r.noCurves&&!e.noCurves),v=r.lineStyle||e.lineStyle||(g?"angle":"curve"),y=e.offset||0,w=e.source.anchor,b=(0,o.getPointCoordinatesFromAnchorPosition)(e.source.anchor,e.source.id,e.parentCoordinates,e.refs),E=e.target.anchor,M=(0,o.getPointCoordinatesFromAnchorPosition)(e.target.anchor,e.target.id,e.parentCoordinates,e.refs);return b?M?i.default.createElement(a.default,{className:e.className,startingPoint:b,startingAnchorOrientation:w,endingPoint:M,endingAnchorOrientation:E,strokeColor:p,strokeWidth:m,strokeDasharray:C,arrowLabel:e.label,arrowMarkerId:(0,l.getMarkerId)(e.uniqueId,e.source,e.target),lineStyle:v,offset:y,enableStartMarker:!!c,disableEndMarker:!s,endShape:d,domAttributes:u,hitSlop:h,cursor:f}):(console.warn("[React Archer] Could not find target element! Not drawing the arrow."),null):(console.warn("[React Archer] Could not find starting point of element! Not drawing the arrow."),null)};t.SvgArrows=function(e){var t=(0,o.getPointFromElement)(e.parentCurrent);return t?i.default.createElement(i.default.Fragment,null,(0,l.getSourceToTargets)(e.sourceToTargetsMap).map(function(n){return i.default.createElement(c,{key:JSON.stringify({source:n.source,target:n.target}),source:n.source,target:n.target,className:n.className,label:n.label,style:n.style||{},domAttributes:n.domAttributes,hitSlop:n.hitSlop,cursor:n.cursor,startMarker:e.startMarker,endMarker:e.endMarker,endShape:e.endShape,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,noCurves:e.noCurves,lineStyle:e.lineStyle,offset:e.offset,parentCoordinates:t,refs:e.refs,uniqueId:e.uniqueId})})):null}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPointCoordinatesFromAnchorPosition=t.getPointFromElement=void 0;var i=r(n(16));function o(e){return new i.default(e.left,e.top)}var a=function(e){return e?e.getBoundingClientRect():null};t.getPointFromElement=function(e){var t=a(e);return t?o(t):null},t.getPointCoordinatesFromAnchorPosition=function(e,t,n,r){var l=a(r[t]);if(!l)return null;var c=function(e,t){switch(e){case"top":return o(t).add(new i.default(t.width/2,0));case"bottom":return o(t).add(new i.default(t.width/2,t.height));case"left":return o(t).add(new i.default(0,t.height/2));case"right":return o(t).add(new i.default(t.width,t.height/2));case"middle":return o(t).add(new i.default(t.width/2,t.height/2));default:return console.error("[React Archer] Invalid anchor position was provided. Not drawing the arrow."),null}}(e,l);return c?c.substract(n):null}},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n}return function(e,t){t&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"add",value:function(t){return new e(this.x+t.x,this.y+t.y)}},{key:"substract",value:function(t){return new e(this.x-t.x,this.y-t.y)}}]),e}();t.default=i},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computeLabelDimensions=t.computeEndingAnchorPosition=t.computeStartingAnchorPosition=t.computeArrowPointAccordingToArrowHead=void 0;var i=r(n(0)),o=n(18);function a(e,t,n,r,i,a,l,c){var s=(0,o.computeArrowDirectionVector)(i),d=s.arrowX,u=s.arrowY;if("straight"===a&&void 0!==l&&void 0!==c){var f=Math.atan2(c-t,l-e);d=Math.cos(f),u=Math.sin(f)}return{xPoint:e+d*n*r/2,yPoint:t+u*n*r/2}}function l(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor1:e,yAnchor1:t+(r-t)/2}:"left"===i||"right"===i?{xAnchor1:e+(n-e)/2,yAnchor1:t}:{xAnchor1:e,yAnchor1:t}}function c(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor2:n,yAnchor2:r-(r-t)/2}:"left"===i||"right"===i?{xAnchor2:n-(n-e)/2,yAnchor2:r}:{xAnchor2:n,yAnchor2:r}}function s(e,t,n,r){return{xLabel:n>e?e:n,yLabel:r>t?t:r,labelWidth:Math.max(Math.abs(n-e),1),labelHeight:Math.max(Math.abs(r-t),1)}}t.computeArrowPointAccordingToArrowHead=a,t.computeStartingAnchorPosition=l,t.computeEndingAnchorPosition=c,t.computeLabelDimensions=s,t.default=function(e){var t=e.className,n=e.startingPoint,r=e.startingAnchorOrientation,o=e.endingPoint,d=e.endingAnchorOrientation,u=e.strokeColor,f=e.strokeWidth,h=e.strokeDasharray,p=e.arrowLabel,m=e.arrowMarkerId,C=e.lineStyle,g=e.offset,v=e.enableStartMarker,y=e.disableEndMarker,w=e.endShape,b=e.domAttributes,E=e.hitSlop,M=void 0===E?10:E,A=e.cursor,x=void 0===A?"pointer":A,k=w.circle?2*w.circle.radius:2*w.arrow.arrowLength,L=a(n.x,n.y,v?k:0,f,r,C,o.x,o.y),H=L.xPoint,_=L.yPoint,S=a(o.x,o.y,y?0:k,f,d,C,n.x,n.y),V=S.xPoint,O=S.yPoint,z=l(H,_,V,O,r),N=z.xAnchor1,I=z.yAnchor1,T=c(H,_,V,O,d),D=function(e){var t=e.xStart,n=e.yStart,r=e.xAnchor1,i=e.yAnchor1,o=e.xAnchor2,a=e.yAnchor2,l=e.xEnd,c=e.yEnd,s=e.lineStyle,d=e.offset;if(d&&0!==d){var u="straight"===s?Math.atan2(c-n,l-t):Math.atan2(i-n,r-t),f=d*Math.cos(u),h=d*Math.sin(u);"straight"!==s&&(t+=f,n+=h),l-=f,c-=h}var p="M".concat(t,",").concat(n," ");return["curve","angle"].includes(s)&&(p+="".concat("curve"===s?"C":"").concat(r,",").concat(i," ").concat(o,",").concat(a," ")),p+"".concat(l,",").concat(c)}({xStart:H,yStart:_,xAnchor1:N,yAnchor1:I,xAnchor2:T.xAnchor2,yAnchor2:T.yAnchor2,xEnd:V,yEnd:O,lineStyle:C,offset:g}),j=s(H,_,V,O),Z=j.xLabel,R=j.yLabel,B=j.labelWidth,P=j.labelHeight,F="url(#".concat(m,")");return i.default.createElement("g",{className:t},i.default.createElement("path",{d:D,style:{fill:"none",stroke:u,strokeWidth:f,strokeDasharray:h},markerStart:v?F:void 0,markerEnd:y?void 0:F}),b&&i.default.createElement("path",Object.assign({d:D,style:{fill:"none",stroke:"rgba(0, 0, 0, 0)",strokeWidth:M,cursor:b?x:"initial",pointerEvents:"all"}},b)),p&&i.default.createElement("foreignObject",{x:Z,y:R,width:B,height:P,style:{overflow:"visible",pointerEvents:"none"}},i.default.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)",pointerEvents:"all"}},i.default.createElement("div",null,p))))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.computeArrowDirectionVector=void 0,t.computeArrowDirectionVector=function(e){switch(e){case"left":return{arrowX:-1,arrowY:0};case"right":return{arrowX:1,arrowY:0};case"top":return{arrowX:0,arrowY:-1};case"bottom":return{arrowX:0,arrowY:1};default:return{arrowX:0,arrowY:0}}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowMarkers=void 0;var i=r(n(0)),o=n(4),a=n(3),l=function(e,t){return function(){var n,r,a,l,c,s,d,u,f,h,p,m,C=(null===(r=null===(n=e.endShape)||void 0===n?void 0:n.circle)||void 0===r?void 0:r.radius)||(null===(a=t.circle)||void 0===a?void 0:a.radius)||o.endShapeDefaultProp.circle.radius,g=(null===(c=null===(l=e.endShape)||void 0===l?void 0:l.circle)||void 0===c?void 0:c.strokeWidth)||(null===(s=t.circle)||void 0===s?void 0:s.strokeWidth)||o.endShapeDefaultProp.circle.strokeWidth,v=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.circle)||void 0===u?void 0:u.strokeColor)||(null===(f=t.circle)||void 0===f?void 0:f.strokeColor)||o.endShapeDefaultProp.circle.strokeColor,y=(null===(p=null===(h=e.endShape)||void 0===h?void 0:h.circle)||void 0===p?void 0:p.fillColor)||(null===(m=t.circle)||void 0===m?void 0:m.fillColor)||o.endShapeDefaultProp.circle.fillColor;return{markerWidth:4*C,markerHeight:4*C,refX:2*C+g,refY:2*C,path:i.default.createElement("circle",{cx:2*C,cy:2*C,r:C,fill:y,stroke:v,strokeWidth:g})}}},c=function(e,t,n){return function(){var r,a,l,c,s,d,u,f,h=e.strokeColor||n,p=null!==(s=null!==(l=null===(a=null===(r=e.endShape)||void 0===r?void 0:r.arrow)||void 0===a?void 0:a.arrowLength)&&void 0!==l?l:null===(c=null==t?void 0:t.arrow)||void 0===c?void 0:c.arrowLength)&&void 0!==s?s:o.endShapeDefaultProp.arrow.arrowLength,m=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.arrow)||void 0===u?void 0:u.arrowThickness)||(null===(f=null==t?void 0:t.arrow)||void 0===f?void 0:f.arrowThickness)||o.endShapeDefaultProp.arrow.arrowThickness,C="M0,0 L0,".concat(m," L").concat(p,",").concat(m/2," z");return{markerWidth:p,markerHeight:m,refX:0,refY:m/2,path:i.default.createElement("path",{d:C,fill:h})}}};t.ArrowMarkers=function(e){var t=e.sourceToTargetsMap,n=e.endShape,r=e.strokeColor,o=e.uniqueId;return i.default.createElement(i.default.Fragment,null,(0,a.getSourceToTargets)(t).map(function(e){var t=e.source,s=e.target,d=e.style,u=function(e){var t=e.style,n=e.strokeColor,r=e.endShape,i=(0,a.getEndShapeFromStyle)(t);return{circle:l(t,r),arrow:c(t,r,n)}[i]()}({style:void 0===d?{}:d,endShape:n,strokeColor:r}),f=u.markerHeight,h=u.markerWidth,p=u.path,m=u.refX,C=u.refY;return i.default.createElement("marker",{id:(0,a.getMarkerId)(o,t,s),key:(0,a.getMarkerId)(o,t,s),markerWidth:h,markerHeight:f,refX:m,refY:C,orient:"auto-start-reverse",markerUnits:"strokeWidth"},p)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useResizeListener=t.useObserveElements=void 0;var r=n(0);t.useObserveElements=function(e,t){(0,r.useEffect)(function(){return Object.keys(e).map(function(n){t.observe(e[n])}),function(){Object.keys(e).map(function(n){t.unobserve(e[n])})}},[e,t])},t.useResizeListener=function(e){(0,r.useEffect)(function(){return window&&window.addEventListener("resize",e),function(){window&&window.removeEventListener("resize",e)}},[e])}}])}(i)),XA.exports);const $A=({getChildNodeComponent:r,parentNodeIndex:i,parentNodeData:o,verticalLineHeight:a,datasetHeight:l,curveHeights:c,itemRefs:s,datasetRef:d,isReadOnlyMode:u})=>e(t,{children:0===o?.machineInstances?.length?e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon ff-left-icon-aligned"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i})})]})}):o?.machineInstances?.map((f,h)=>{const p=0===h;return n("div",{className:"ff-machine-instance-row",children:[n("div",{className:"ff-selectedMachines-connecting-line "+(p?"":"ff-second-line"),children:[n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon "+(p?"ff-left-icon-aligned":"")}),e("div",{className:"ff-right-icon"})]}),p&&e("div",{className:"ff-vertical-line",style:{height:`${a}px`}})]}),e("div",{className:"ff-machine-instance",children:f?.runLevelExecutionDataSets?.map((a,u)=>e("div",{className:"ff-run-level-execution-dataset",ref:0===u?d:null,children:n("div",{className:"ff-execution-item",ref:e=>s.current[u]=e,children:[e("div",{className:"ff-curved-connector",style:{top:-l+"px"},children:n("div",{className:`ff-curve ff-connector-${u}`,style:{height:`${c[u]}px`},children:[e("div",{className:`ff-curve-right-icon ff-curve-right-icon-${u}`}),Number(f?.runScriptCount)?e("div",{className:"ff-selectedMachines-connecting-line-text",children:e(F,{fontSize:8,fontWeight:"regular",children:`${[0,"0",null].includes(f.runScriptCount)?"":f.runScriptCount} Script${1!==f.runScriptCount?"s":""}`})}):e(t,{})]})}),e("div",{className:"ff-run-data-box",children:r({isButton:!1,childNodeData:f,childNodeIndex:h,runLevelExecutionDataSet:a,runLevelExecutionDataSetIndex:u,parentNodeData:o,parentNodeIndex:i})})]})},a?.runLevelExecutionDataSetId))}),h===o?.machineInstances.length-1&&e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line ff-second-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i,childNodeIndex:h+1})})]})})]},h)})}),ex=({data:t,noOfScripts:r,getChildNodeComponent:o,getParentNodeComponent:c,getParentNodeComponentActionItems:d,childNodeCurveHeight:u=1.28,isReadOnlyMode:f=!1})=>{const h=a(null),[p,m]=s(0),[C,g]=s([]),v=a([]);l(()=>{h.current&&m(h.current.offsetHeight)},[t]);l(()=>{(()=>{const e=v.current.map((e,t)=>0===t?0:p*u);g(e)})()},[p,t]);const y=e=>1+(e.machineInstances?.length+1||0);let w=1;const b=t?.machines?.selectedMachines.reduce((e,t)=>f?e+(e=>!e?.machineInstances||G(e.machineInstances)?1:e.machineInstances.length)(t):e+y(t),0),E=Math.round(b/2);let M=1===E&&f&&2===b||1===E&&!f&&2===b;return e("div",{className:"connecting-branch-container",children:e(JA.ArcherContainer,{strokeColor:"var(--brand-color)",strokeWidth:1,startMarker:!0,endMarker:!1,noCurves:!0,children:n("div",{className:"ff-connecting-branch-grid-container",children:[e(JA.ArcherElement,{id:"rootNode",children:e("div",{className:"ff-grid-item ff-dynamic-item",style:{gridRow:E,top:M?"44px":""},children:e("div",{className:"ff-script-count-container",children:n("div",{className:"ff-script-count-box",children:[e(F,{children:r}),e(F,{children:"Scripts"})]})})})}),t?.machines?.selectedMachines.map((t,r)=>{const a=w,l=y(t);w+=l;const s=((e,t,n)=>{if(1===e.length&&f)return 0;const r=e.reduce((t,n,r)=>t+(r===e.length-1&&f?0:n.runLevelExecutionDataSets?.length||0),0);return r*(t+n)})(t?.machineInstances,p,16);return e(i.Fragment,{children:n("div",{className:"ff-selectedMachines",style:{gridRow:`${a} / span ${l}`},children:[e("div",{className:"ff-selectedMachines-input",children:n("div",{className:"ff-input-box-container "+(t?.machineInstances.length?"":"ff-input-box-aligned"),children:[e(JA.ArcherElement,{id:`parentnode${r}`,relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:c({isMultiSelect:!1,parentNodeData:t,parentNodeIndex:r})}),d({parentNodeData:t,parentNodeIndex:r})]})}),e($A,{parentNodeIndex:r,parentNodeData:t,verticalLineHeight:s,datasetHeight:p,curveHeights:C,itemRefs:v,datasetRef:h,getChildNodeComponent:o,isReadOnlyMode:f})]})},r)}),!f&&e("div",{className:"ff-select-machine-input",style:{gridRow:`${w}`},children:e(JA.ArcherElement,{id:"lastNode",relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:e("div",{children:c({isMultiSelect:!0})})})})]})})})},tx=(e,t)=>{if(!(e&&e instanceof Blob))throw console.error("Invalid Blob object"),new Error("Invalid Blob object");const n=window.navigator;if(n.msSaveOrOpenBlob){const r=n.msSaveOrOpenBlob;r&&r(e,t)}else{const n=document.createElement("a");document.body.appendChild(n);const r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),setTimeout(()=>{window.URL.revokeObjectURL(r),document.body.removeChild(n)},0)}},nx=({hasAtSymbol:t,usersObj:n,optionClicked:r,charsAfterAt:i,mentionUserRef:o})=>{const[c,d]=s(0),u=a([]);if(!t)return null;const f=n.filter(e=>!i||e.name.toLowerCase().startsWith(i.toLowerCase()));l(()=>{d(0)},[i]);const h=p(e=>{if(t&&0!==f.length)switch(e.key){case"ArrowDown":e.preventDefault(),d(e=>(e+1)%f.length);break;case"ArrowUp":e.preventDefault(),d(e=>0===e?f.length-1:e-1);break;case"Enter":e.preventDefault();const t=f[c];t&&r(t.name,t.emailId)}},[f,c,t,r]);return l(()=>{u.current[c]&&u.current[c]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[c]),l(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),e("div",{className:"select-section",onMouseDown:e=>e.preventDefault(),children:e("div",{className:"select-group",ref:o,children:f.length?f.map((t,n)=>e("div",{ref:e=>u.current[n]=e,className:"mention-option "+(n===c?"hovered":""),onClick:()=>r(t.name,t.emailId),onMouseDown:e=>e.preventDefault(),children:e(F,{children:t.name})},t.id)):e("div",{className:"user-not-found",children:e(F,{children:"No user name found"})})})})},rx=e=>e&&Array.isArray(e)?e.map(({user:e})=>({id:e.id,name:e.name,emailId:e.emailId})):[],ix=(e,t)=>{const n=t.find(t=>`@${t.name.replace(/\s+/g,"")}`===e);return n?n.emailId:null},ox=({handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:o,depth:c=0,isDisable:d,userDetails:u,isEditDeleteActionAllowed:h=!0,createdByID:p,rowBreakCharCount:m=83,isVewMode:C=!1,deleteEnable:g=!0})=>{const[v,y]=s(""),[w,b]=s(!1),[E,M]=s(!1),[A,x]=s(!0),[k,L]=s([]),[H,_]=s(!1),[S,V]=s([]),[O,z]=s({top:0,left:0}),[N,I]=s(""),T=a(null),D=a(null),j=a(null);l(()=>{w&&o?.description&&y(o?.description)},[w,o.description]),l(()=>{const e=rx(u);L(e)},[u]),l(()=>{const e=(v.match(Lt)||[]).map(e=>ix(e,k)).filter(Boolean);V(e)},[v]),l(()=>{const e=e=>{const t=D.current&&!D.current.contains(e.target)&&T.current&&!T.current.contains(e.target),n=j.current&&!j.current.contains(e.target)&&T.current&&!T.current.contains(e.target);(t||n)&&(_(!1),y(e=>e.replace(/(?:^|\s)(@\w*)$/,"")))};return H&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[H]);const{modifiedByUname:Z,createdByUname:R,modifiedOn:B,createdOn:U}=o||{},q=B??U??(new Date).toLocaleString(),W=Z??R??"Anonymous",Q=c>2,G=W?W.charAt(0).toUpperCase():"A";l(()=>{w&&o.description&&y(o.description)},[w,o.description]);const Y=()=>{0!==v.trim().length&&(w?(r(o.id,v,S),M(!1),y("")):(x(!0),t(o.id,v,S),M(!1),y("")),w&&b(!1))};l(()=>{(()=>{if(!T.current)return;const e=T?.current,t=w?D?.current:j?.current,n=T.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top-20,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;z({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[v]);const X=e=>{const t=e.target.value;y(t);const n=(t.match(/@\S+/g)||[]).map(e=>ix(e,k)).filter(e=>null!==e);V(n);const r=e.target.selectionStart,i=t.slice(0,r),o=i.match(Nt);I(o?.[1]||"");const a=zt.test(i);_(!!a)},J=e=>{if("@"===e.key)_(!0);else if("Backspace"===e.key&&T.current){const t=T.current.selectionStart,n=v.slice(0,t);n.endsWith("@")&&_(!1);const r=n.match(St);if(r){e.preventDefault();const i=r[1],o=n.lastIndexOf(i||""),a=v.slice(0,o)+v.slice(t);y(a),_(!1),V(()=>(a.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>ix(e,k)).filter(Boolean)),setTimeout(()=>{T.current?.setSelectionRange(o,o)},0)}}},$=e=>{if(!T.current)return;const t=T.current.selectionStart,n=v.slice(0,t),r=n.match(Ht);if(r){const i=n.lastIndexOf(r[1]||""),o=v.slice(t),a=`@${e.replace(/\s+/g,"")} `,l=v.slice(0,i)+a+o;y(l),_(!1),setTimeout(()=>{T.current?.focus(),T.current?.setSelectionRange(i+a.length+1,i+a.length+1)},0),V(()=>(l.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>ix(e,k)).filter(Boolean))}};return e("div",{className:"commentsContainer",children:n("div",{className:"comment-wrapper",children:[n("div",{className:"commentContainer",children:[e("div",{className:"commentContainer__avatar",children:o?.profileImage?e("img",{height:30,width:30,src:`data:image/jpeg;base64,${o?.profileImage}`}):G}),n("div",{className:"ff-message-container",children:[n("div",{className:"ff-message",children:[e("div",{className:"ff-message-name",children:W}),e("div",{className:"ff-message-time",children:q})]}),n("div",{className:"ff-editable-container",children:[!w&&e(F,{className:"typography-text",children:o?.description?.split(It).map((t,n)=>t.startsWith("@")?e("b",{children:t},`highlight-${n}`):e(f,{children:t},`text-${n}`))}),w&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<m?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Edit comment",ref:T,onChange:e=>X(e),onKeyDown:J}),H&&e("div",{id:"mention-user",style:{position:"absolute",top:`${O.top}px`,left:`${O.left}px`},children:e(nx,{hasAtSymbol:H,usersObj:k,optionClicked:$,charsAfterAt:N,mentionUserRef:D})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",children:e(K,{title:w?"Update":"Add",children:e(P,{name:"comment_reply",hoverEffect:!0,disabled:w&&v.trim()===(o?.description?.trim()??"")||0===v.trim().length,onClick:()=>{Y(),b(!1),M(!1)}})})}),e("div",{className:"reply",onClick:()=>{b(!1),M(!1),y("")},children:e(K,{title:w?"Cancel":"Close",children:e(P,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]}),n("div",{className:"comment-actions",children:[!Q&&c<2&&o.comments?.length>0&&e("div",{className:"action-icon",onClick:()=>x(e=>!e),children:e(K,{title:""+(A?"collapse":"expand"),children:e(P,{name:A?"collapse-arrow":"expand-arrow",disabled:w||E,hoverEffect:!0})})}),!Q&&c<2&&0===o.comments?.length&&e("div",{className:"action-icon",children:e(P,{name:"expand-arrow",disabled:!0})}),!C&&n("div",{className:"ff-comment-action-item",children:[c<2&&e("div",{className:"action-icon",children:e(K,{title:"Reply",children:e(P,{name:"comment_icon",disabled:w||d,hoverEffect:!0,onClick:()=>{M(!0)}})})}),h&&e("div",{className:"action-icon",children:e(K,{title:"Edit",children:e(P,{name:"edit",disabled:E||d,hoverEffect:!0,onClick:()=>b(!0)})})}),h&&g&&e("div",{className:"action-icon",children:e(K,{title:"Delete",children:e(P,{name:"delete",color:"var(--ff-delete-button-attachment)",onClick:()=>{E||i(o.id)},disabled:w||E||d,hoverEffect:!0})})})]})]})]})]})]}),e("div",{className:"comment-reply-container",children:E&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<m?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Add reply comments",ref:T,onChange:e=>X(e),onKeyDown:J}),H&&e("div",{id:"mention-user",style:{position:"absolute",top:`${O.top}px`,left:`${O.left}px`},children:e(nx,{hasAtSymbol:H,usersObj:k,optionClicked:$,charsAfterAt:N,mentionUserRef:j})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",onClick:()=>{Y(),b(!1),M(!1)},children:e(K,{title:"Reply",children:e(P,{name:"comment_reply",hoverEffect:!0,disabled:Boolean(!v.length)})})}),e("div",{className:"reply",onClick:()=>{b(!1),M(!1),y("")},children:e(K,{title:"Cancel",children:e(P,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]})}),A&&o.comments?.length>0&&e("div",{className:`child-comments ${0===c?"first-level-child":""} ${1===c?"second-level-child":""}`,children:o.comments.map(n=>e("div",{className:`child-comments child-comments-${c+1}`,children:e(ox,{handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:n,depth:c+1,isDisable:d,userDetails:u,isEditDeleteActionAllowed:o.createdBy===p,createdByID:p,isVewMode:C})},n.id))})]})})},ax=({commentsData:t,handleAddComment:r,handleEditComment:i,handleDeleteComment:o,onCommentsDataChange:c,currentUser:d,isDisable:u=!1,userDetails:f,createdByID:h,rowBreakCharCount:m=83,isVewMode:C=!1,deleteEnable:g=!0,showTextarea:v=!1,autoFocus:y=!1})=>{const[w,b]=s(""),[E,M]=s([]),[A,x]=s(!1),[k,L]=s([]),[H,_]=s({top:0,left:0}),[S,V]=s(""),O=a(null),z=a(null),[N,I]=s(!1);l(()=>{const e=rx(f);L(e)},[f]);const T=(e,t)=>{for(const n of e){if(n.id===t)return n;const e=T(n.comments,t);if(e)return e}return null};l(()=>{t&&M(t)},[t]),l(()=>{const e=e=>{z.current&&!z.current.contains(e.target)&&(x(!1),b(e=>{const t=e.split(" ");return t.length>0&&t?.[t?.length-1]?.startsWith("@")?t.slice(0,-1).join(" "):e}))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const{insertNode:D,editNode:j,deleteNode:Z}=(()=>{const e=(t,n,r)=>t.map(t=>t.id===n?{...t,comments:[...t.comments,{id:Yh(),description:r.description,comments:[],createdBy:t.createdBy,modifiedBy:t.modifiedBy,createdByUname:t.createdByUname,modifiedByUname:t.modifiedByUname,createdOn:(new Date).toLocaleString(),modifiedOn:(new Date).toLocaleString(),commentParentId:n}]}:{...t,comments:e(t.comments,n,r)}),t=(e,n,r)=>e.map(e=>({...e,description:e.id===n?r:e.description,comments:t(e.comments,n,r)})),n=(e,t)=>e.filter(e=>e.id!==t).map(e=>({...e,comments:n(e.comments,t)}));return{insertNode:e,editNode:t,deleteNode:n}})(),R=(e,t,n)=>{if(!t.trim())return;const i={id:Yh(),description:t,commentParentId:e,emailId:n,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString()};M(t=>D(t,e,i)),r&&r(i,T(E,e))},B=p((e,t,n)=>{const r=j(E,e,t);M(r);const o=T(r,e);i&&i(e,t,o,n)},[E,j,i]),U=p(async e=>{try{if(o){const t=await o(e);if(t?.success){const t=Z(E,e);M(t)}}}catch(e){console.error("Error deleting comment:",e)}},[Z,o]);l(()=>{c&&c(E)},[E,c]);l(()=>{(()=>{if(!O.current)return;const e=O?.current,t=z?.current,n=O.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;_({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[w]);l(()=>{w.includes("\n")||I(!1)},[w]);return n("div",{className:"ff-comments-container-box",children:[!C&&n("div",{className:"ff-first-comment "+(v?"no-border":""),children:[e(F,{fontWeight:"semi-bold",className:"ff-comment-heading",children:"Comments"}),!v&&n("div",{className:"input-wrapper",children:[e("textarea",{className:"inputContainer_input first_input",rows:N?3:w.length<m?1:3,autoFocus:y,value:w,onChange:e=>(e=>{const t=e.target.value;b(t);const n=e.target.selectionStart,r=t.slice(0,n),i=r.match(Nt);V(i?.[1]||"");const o=zt.test(r);x(!!o),t||I(!1)})(e),placeholder:"Add a comment",disabled:u,ref:O,onKeyDown:e=>{if("@"===e.key)x(!0);else if("Backspace"===e.key&&O.current){const t=O.current.selectionStart;if(w.slice(0,t).endsWith("@")&&x(!1),A){e.preventDefault();const n=w.slice(0,t-1)+w.slice(t);b(n);const r=t-1,i=n.slice(0,r).match(Nt);V(i?.[1]||""),x(!!i),setTimeout(()=>{O.current?.setSelectionRange(r,r)},0)}}"Enter"===e.key&&I(!0)}}),A&&e("div",{id:"mention-user",style:{position:"absolute",top:`${H.top}px`,left:`${H.left}px`},children:e(nx,{hasAtSymbol:A,usersObj:k,optionClicked:e=>{if(!O.current)return;const t=O.current.selectionStart,n=w.slice(0,t),r=n.match(_t);if(r){const i=n.lastIndexOf(r[1]??""),o=w.slice(t),a=`@${e} `,l=w.slice(0,i)+a+o;b(l),x(!1),setTimeout(()=>{O.current?.focus();const e=i+a.length+1;O.current?.setSelectionRange(e,e)},0)}},charsAfterAt:S,mentionUserRef:z})}),e("span",{className:"reply-comment",children:e(K,{title:"Add",children:e(P,{name:"comment_reply",onClick:()=>{if(!w.trim())return;const e=k.filter(e=>new RegExp(`@${e.name}\\b`,"i").test(w)).map(e=>e.emailId),t={id:Yh(),description:w,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString(),commentParentId:"",emailId:e};r&&r(t,null),M(e=>[...e,t]),b("")},hoverEffect:!0,disabled:Boolean(!w.length)})})})]})]}),E.length>0&&E.map(t=>e(ox,{handleInsertNode:R,handleEditNode:B,handleDeleteNode:U,comment:t,depth:0,isDisable:u,userDetails:f,isEditDeleteActionAllowed:t.createdBy===h,createdByID:h,isVewMode:C,deleteEnable:g},t.id))]})},lx=()=>{const e=a(!0);return{canTrigger:()=>e.current,setTriggered:()=>{e.current=!1},resetTrigger:()=>{e.current=!0}}},cx=({isOpen:t,onClose:r,onContinue:i,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:l,modalMessage:c="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:s="Cancel",secondButtonLabel:d="Continue",buttonVariant:u="warning",border:f="1px solid var(--warning-modal-border-color)",popupWidth:h="420",popupHeight:p="226",colorForTitleMessage:m="var(--status-button-bg-warning)",footerContent:C,firstButtonDisabled:g=!1,secondButtonDisabled:v=!1,zIndex:y=1100,iconSize:w=94})=>e(Vf,{overlayClassName:"custom-overlay",isOpen:t,onClose:r,isHeaderDisplayed:!1,zIndex:y,children:n("div",{className:"warning_modal_container",children:[n("div",{className:"warning_modal_content",children:[e(P,{name:l,className:"warning_modal_icon",width:w,height:w}),n("div",{className:"warning_modal_message",children:[n(F,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[" ",n(F,{color:`${m}`,fontSize:20,fontWeight:"semi-bold",children:[" ",o," "]})," ",a]}),n("div",{className:"warning_modal_message_wrapper",children:[e(F,{fontSize:16,children:c}),e(F,{as:"div",children:C})]})]})]}),n("div",{className:"warning_modal_footer_button",children:[e(U,{buttonHeight:"24px",variant:"secondary",label:s,onClick:r,disabled:g}),d&&e(U,{buttonHeight:"24px",variant:u||"warning",label:d,onClick:i,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${h}px`,customHeight:`${p}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:f});function sx(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Ct,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}function dx(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):sx(e,t)}const ux=({onSelectVariable:t,dropdownPosition:r,filteredOptions:i=[],position:o="relative",width:a="300px",zIndex:l=1e3,height:c="160px",truncateTextValue:s=34,isTruncateText:d=!1})=>n("div",{className:z("ff-variable-dropdown",o),style:r?{top:r.top+30,left:r.left-30,width:a,zIndex:l}:{width:a,zIndex:l,height:c},children:[i?.map(n=>{const r=d?ie(n?.name,s,"pixel"):n?.name,i=!!d&&oe(n?.name,s,"pixel");return e("div",{className:"ff-variable-option",onClick:()=>t(n),children:d?e(K,{title:i?n?.name:"",children:e(F,{children:r})}):e(F,{children:r})},n?.id)}),0===i?.length&&e("div",{className:"ff-variable-option .ff-variable-option-no-data ",children:e(F,{as:"span",fontSize:14,children:"No Option"})})]}),fx=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],addForloopPrefix:c=!1,placeholder:d="Enter text",onChange:u,onCreateVariableClick:f,value:h="",dropdownWidth:p="inherit",isHash:m=!1,dataFiles:C=[],showAddVariableIcon:g=!0,helperText:v="",error:y,autoComplete:w="off",showHidePasswordIcon:E=!0,required:M=!1,formProps:A={},onlyDropdown:x=!1,type:k,onFocus:L,onBlur:H,readOnly:_=!1,height:S="160px",truncateTextValue:V=34,isTruncateText:O=!1,...z},N)=>{const[I,T]=s(!1),[D,j]=s(!1),[Z,R]=s(!1),[B,U]=s(null),[q,W]=s(0),[Q,Y]=s(!1),[X,J]=s(!1),[$,ee]=s([]),te=a(null);b(N,()=>te.current),l(()=>{null!==B&&te.current&&(te.current.setSelectionRange(B,B),te.current.focus())},[B]),l(()=>{if(m?T(h.startsWith("#")):J(!h?.includes("$")),h.startsWith("#")&&m){const e=h.slice(1).toLowerCase(),t=C.filter(t=>t.name.toLowerCase().includes(e));ee(t),T(!0)}},[h]),l(()=>{if(!Q&&x){const e=C.filter(e=>e.toLowerCase().includes(h.toLowerCase())).map((e,t)=>({id:t+1,name:e}));ee(e),T(e.length>0)}Y(!1)},[h]);const ne=()=>{te.current&&W(te.current.selectionStart||0)},re=ne,ie=ne;l(()=>{te.current&&W(te.current.selectionStart||0)},[h]);const oe=e=>{if(te.current){const{selectionStart:t,selectionEnd:n}=te.current,r=`{${"STEPGROUP"===e.parentVariableType?"SGV":"LOCAL"===e.type?"LV":"GLOBAL"===e.type?"GV":"GROUP"===e.type?"SGV":e?._id?.includes("PARAMETER")?"SGP":"_startforloop"===e.type?"FLV_for:":"DATAPROVIDER"===e.type?"DPV":"PEV"}${"_startforloop"===e?.type?"":"_"}${"DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e.name}}`;let o;if(o=m&&"#"===h[0]||x?e.name+h.slice(n||1):h.slice(0,function(e,t){const n=e.lastIndexOf("$",t-1),r=e.indexOf("$",t);return-1===n&&-1===r?-1:-1===n?r:-1===r||Math.abs(t-n)<=Math.abs(r-t)?n:r}(h,q)||0)+"$"+r+h.slice(n||0),u){u({target:{value:o}},e)}te.current.value=o,i?.(e),U((t||0)+r.length),T(!1),Y(!0),j(!0)}};const ae=function(e,t,n){let r=!1,i="";const o="}"===h[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf("$",t-1),l=e.indexOf("$",t);if(-1!==a&&(t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),D&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>("_startforloop"===e.type&&c?`FLV_for:${e.name}`:e.name).toLowerCase().includes(i.toLowerCase()))||(r=!1,i="")}return{showDropdown:r,searchString:i}}(h,q,o),[le,ce]=s(!1);return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",children:[e(en,{readOnly:_,...z,name:"add_variable",ref:te,type:((e,t)=>"password"===e?t?"text":"password":e??"text")(k,le),value:h,onChange:u,variant:"primary",label:t,placeholder:d,onClick:re,onKeyUp:ie,onFocus:e=>{setTimeout(()=>{R(!0),L?.(e)},500)},onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||R(!1)})(e),H?.(e)},autoComplete:w,helperText:v,error:y,required:M,...A}),"password"===k&&E&&e(K,{title:le?"Hide":"Show",children:e(F,{as:"span",className:"ff-password-icon",children:e(P,{onClick:()=>{ce(e=>!e)},name:le?"hide_access_icon":"view_access_icon",width:16,height:16,hoverEffect:!0})})}),!G(h)&&!m&&X&&g&&e(K,{title:"Add Variable",children:e(P,{onClick:f,name:"add_variable",width:24,height:24,hoverEffect:!0})})]}),ae?.showDropdown&&Z&&e(Zb,{position:"absolute",width:p,optionsList:o.filter(e=>("_startforloop"===e.type&&c?`FLV_for:${e.name}`:e.name).toLowerCase().includes(ae?.searchString.toLowerCase())),onSelectVariable:oe,height:S}),I&&(m||x)&&e(ux,{position:"relative",width:p,filteredOptions:$,zIndex:2e3,onSelectVariable:oe,height:S,isTruncateText:O,truncateTextValue:V})]})}),hx=(e,t)=>{const n=new Set;for(const r of e){const e=t?r[t]:JSON.stringify(r);if(n.has(e))return!0;n.add(e)}return!1};var px,mx;var Cx=(mx||(mx=1,px=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){e.exports=i},function(e,t,n){var r;
27
+ */function sg(){return ag||(ag=1,e=cg,"production"!==process.env.NODE_ENV&&function(){var t,n,r,i,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,c=function(){if(null!==a)try{var t=e.unstable_now();a(!0,t),a=null}catch(e){throw setTimeout(c,0),e}},s=Date.now();e.unstable_now=function(){return Date.now()-s},t=function(e){null!==a?setTimeout(t,0,e):(a=e,setTimeout(c,0))},n=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},i=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var d=window.performance,u=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.requestAnimationFrame,m=window.cancelAnimationFrame;"function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)e.unstable_now=function(){return d.now()};else{var C=u.now();e.unstable_now=function(){return u.now()-C}}var g=!1,v=null,y=-1,w=5,b=0;i=function(){return e.unstable_now()>=b},o=function(){},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=e>0?Math.floor(1e3/e):5};var E=new MessageChannel,M=E.port2;E.port1.onmessage=function(){if(null!==v){var t=e.unstable_now();b=t+w;try{v(!0,t)?M.postMessage(null):(g=!1,v=null)}catch(e){throw M.postMessage(null),e}}else g=!1},t=function(e){v=e,g||(g=!0,M.postMessage(null))},n=function(t,n){y=f(function(){t(e.unstable_now())},n)},r=function(){h(y),y=-1}}function A(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;;){var i=r-1>>>1,o=e[i];if(!(void 0!==o&&L(o,t)>0))return;e[i]=t,e[r]=o,r=i}}(e,t,n)}function x(e){var t=e[0];return void 0===t?null:t}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],l=o+1,c=e[l];if(void 0!==a&&L(a,t)<0)void 0!==c&&L(c,a)<0?(e[r]=c,e[l]=t,r=l):(e[r]=a,e[o]=t,r=o);else{if(!(void 0!==c&&L(c,t)<0))return;e[r]=c,e[l]=t,r=l}}}(e,n,0)),t}return null}function L(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var H=0,_=0,S="function"==typeof SharedArrayBuffer?new SharedArrayBuffer(4*Int32Array.BYTES_PER_ELEMENT):"function"==typeof ArrayBuffer?new ArrayBuffer(4*Int32Array.BYTES_PER_ELEMENT):null,V=null!==S?new Int32Array(S):[];V[0]=0,V[3]=0,V[1]=0;var O=0,z=null,N=null,I=0;function T(e){if(null!==N){var t=I;if((I+=e.length)+1>O){if((O*=2)>524288)return console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),void D();var n=new Int32Array(4*O);n.set(N),z=n.buffer,N=n}N.set(e,t)}}function D(){var e=z;return O=0,z=null,N=null,I=0,e}function j(e,t){V[3]++,null!==N&&T([1,1e3*t,e.id,e.priorityLevel])}function Z(e,t){V[0]=0,V[1]=0,V[3]--,null!==N&&T([2,1e3*t,e.id])}function R(e,t){H++,V[0]=e.priorityLevel,V[1]=e.id,V[2]=H,null!==N&&T([5,1e3*t,e.id,H])}function B(e,t){V[0]=0,V[1]=0,V[2]=0,null!==N&&T([6,1e3*t,e.id,H])}var P=[],F=[],U=1,q=null,W=3,Q=!1,G=!1,K=!1;function Y(e){for(var t=x(F);null!==t;){if(null===t.callback)k(F);else{if(!(t.startTime<=e))return;k(F),t.sortIndex=t.expirationTime,A(P,t),j(t,e),t.isQueued=!0}t=x(F)}}function X(e){if(K=!1,Y(e),!G)if(null!==x(P))G=!0,t(J);else{var r=x(F);null!==r&&n(X,r.startTime-e)}}function J(t,o){var a;a=o,null!==N&&T([8,1e3*a,_]),G=!1,K&&(K=!1,r()),Q=!0;var l=W;try{try{return function(t,r){var o=r;for(Y(o),q=x(P);null!==q&&(!(q.expirationTime>o)||t&&!i());){var a=q.callback;if(null!==a){q.callback=null,W=q.priorityLevel;var l=q.expirationTime<=o;R(q,o);var c=a(l);o=e.unstable_now(),"function"==typeof c?(q.callback=c,B(q,o)):(Z(q,o),q.isQueued=!1,q===x(P)&&k(P)),Y(o)}else k(P);q=x(P)}if(null!==q)return!0;var s=x(F);return null!==s&&n(X,s.startTime-o),!1}(t,o)}catch(t){if(null!==q){var c=e.unstable_now();!function(e,t){V[0]=0,V[1]=0,V[3]--,null!==N&&T([3,1e3*t,e.id])}(q,c),q.isQueued=!1}throw t}}finally{q=null,W=l,Q=!1,function(e){_++,null!==N&&T([7,1e3*e,_])}(e.unstable_now())}}function $(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var ee=o,te={startLoggingProfilingEvents:function(){O=131072,z=new ArrayBuffer(4*O),N=new Int32Array(z),I=0},stopLoggingProfilingEvents:D,sharedProfilingBuffer:S};e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=te,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.isQueued&&(function(e,t){V[3]--,null!==N&&T([4,1e3*t,e.id])}(t,e.unstable_now()),t.isQueued=!1),t.callback=null},e.unstable_continueExecution=function(){G||Q||(G=!0,t(J))},e.unstable_getCurrentPriorityLevel=function(){return W},e.unstable_getFirstCallbackNode=function(){return x(P)},e.unstable_next=function(e){var t;switch(W){case 1:case 2:case 3:t=3;break;default:t=W}var n=W;W=t;try{return e()}finally{W=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=ee,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=W;W=e;try{return t()}finally{W=n}},e.unstable_scheduleCallback=function(i,o,a){var l,c,s=e.unstable_now();if("object"==typeof a&&null!==a){var d=a.delay;l="number"==typeof d&&d>0?s+d:s,c="number"==typeof a.timeout?a.timeout:$(i)}else c=$(i),l=s;var u=l+c,f={id:U++,callback:o,priorityLevel:i,startTime:l,expirationTime:u,sortIndex:-1,isQueued:!1};return l>s?(f.sortIndex=l,A(F,f),null===x(P)&&f===x(F)&&(K?r():K=!0,n(X,l-s))):(f.sortIndex=u,A(P,f),j(f,s),f.isQueued=!0,G||Q||(G=!0,t(J))),f},e.unstable_shouldYield=function(){var t=e.unstable_now();Y(t);var n=x(P);return n!==q&&null!==q&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<q.expirationTime||i()},e.unstable_wrapCallback=function(e){var t=W;return function(){var n=W;W=t;try{return e.apply(this,arguments)}finally{W=n}}}}()),cg;var e}var dg=(lg||(lg=1,"production"===process.env.NODE_ENV?ig.exports=(rg||(rg=1,function(e){var t,n,r,i,o;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,l=null,c=function(){if(null!==a)try{var t=e.unstable_now();a(!0,t),a=null}catch(e){throw setTimeout(c,0),e}},s=Date.now();e.unstable_now=function(){return Date.now()-s},t=function(e){null!==a?setTimeout(t,0,e):(a=e,setTimeout(c,0))},n=function(e,t){l=setTimeout(e,t)},r=function(){clearTimeout(l)},i=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var d=window.performance,u=window.Date,f=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)e.unstable_now=function(){return d.now()};else{var m=u.now();e.unstable_now=function(){return u.now()-m}}var C=!1,g=null,v=-1,y=5,w=0;i=function(){return e.unstable_now()>=w},o=function(){},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):y=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,E=b.port2;b.port1.onmessage=function(){if(null!==g){var t=e.unstable_now();w=t+y;try{g(!0,t)?E.postMessage(null):(C=!1,g=null)}catch(e){throw E.postMessage(null),e}}else C=!1},t=function(e){g=e,C||(C=!0,E.postMessage(null))},n=function(t,n){v=f(function(){t(e.unstable_now())},n)},r=function(){h(v),v=-1}}function M(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],l=o+1,c=e[l];if(void 0!==a&&0>k(a,n))void 0!==c&&0>k(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==c&&0>k(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var L=[],H=[],_=1,S=null,V=3,O=!1,z=!1,N=!1;function I(e){for(var t=A(H);null!==t;){if(null===t.callback)x(H);else{if(!(t.startTime<=e))break;x(H),t.sortIndex=t.expirationTime,M(L,t)}t=A(H)}}function T(e){if(N=!1,I(e),!z)if(null!==A(L))z=!0,t(D);else{var r=A(H);null!==r&&n(T,r.startTime-e)}}function D(t,o){z=!1,N&&(N=!1,r()),O=!0;var a=V;try{for(I(o),S=A(L);null!==S&&(!(S.expirationTime>o)||t&&!i());){var l=S.callback;if(null!==l){S.callback=null,V=S.priorityLevel;var c=l(S.expirationTime<=o);o=e.unstable_now(),"function"==typeof c?S.callback=c:S===A(L)&&x(L),I(o)}else x(L);S=A(L)}if(null!==S)var s=!0;else{var d=A(H);null!==d&&n(T,d.startTime-o),s=!1}return s}finally{S=null,V=a,O=!1}}function j(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Z=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){z||O||(z=!0,t(D))},e.unstable_getCurrentPriorityLevel=function(){return V},e.unstable_getFirstCallbackNode=function(){return A(L)},e.unstable_next=function(e){switch(V){case 1:case 2:case 3:var t=3;break;default:t=V}var n=V;V=t;try{return e()}finally{V=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Z,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=V;V=e;try{return t()}finally{V=n}},e.unstable_scheduleCallback=function(i,o,a){var l=e.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;c="number"==typeof c&&0<c?l+c:l,a="number"==typeof a.timeout?a.timeout:j(i)}else a=j(i),c=l;return i={id:_++,callback:o,priorityLevel:i,startTime:c,expirationTime:a=c+a,sortIndex:-1},c>l?(i.sortIndex=c,M(H,i),null===A(L)&&i===A(H)&&(N?r():N=!0,n(T,c-l))):(i.sortIndex=a,M(L,i),z||O||(z=!0,t(D))),i},e.unstable_shouldYield=function(){var t=e.unstable_now();I(t);var n=A(L);return n!==S&&null!==S&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<S.expirationTime||i()},e.unstable_wrapCallback=function(e){var t=V;return function(){var n=V;V=t;try{return e.apply(this,arguments)}finally{V=n}}}}(og)),og):ig.exports=sg()),ig.exports);const ug=Symbol(),fg=Symbol(),hg="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,pg=dg.unstable_runWithPriority?e=>{try{dg.unstable_runWithPriority(dg.unstable_NormalPriority,e)}catch(t){if("Not implemented."!==t.message)throw t;e()}}:e=>e();function mg(e,t){const n=d(e)[ug];if("object"==typeof process&&"production"!==process.env.NODE_ENV&&!n)throw new Error("useContextSelector requires special context");const{v:{current:r},n:{current:i},l:o}=n,a=t(r),[l,c]=v((e,n)=>{if(!n)return[r,a];if("p"in n)throw n.p;if(n.n===i)return Object.is(e[1],a)?e:[r,a];try{if("v"in n){if(Object.is(e[0],n.v))return e;const r=t(n.v);return Object.is(e[1],r)?e:[n.v,r]}}catch(e){}return[...e]},[r,a]);return Object.is(l[1],a)||c(),hg(()=>(o.add(c),()=>{o.delete(c)}),[o]),l[1]}const Cg=function(e){const t=c({[ug]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[fg]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=a(e),i=a(0),[o,l]=s(null);o&&(o(e),l(null));const c=a();if(!c.current){const e=new Set,t=(t,n)=>{i.current+=1;const r={n:i.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{l(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()};c.current={[ug]:{v:r,n:i,l:e,u:t}}}return hg(()=>{r.current=e,i.current+=1,pg(()=>{c.current[ug].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),m(n,{value:c.current},t)}),delete t.Consumer,t}([tg,()=>{}]),gg=({children:t,useTableRef:n,totalWidth:r})=>{const i=a(null);return l(()=>{n&&i.current&&n(i)},[n]),e("table",{className:"ff-spreadsheet-table",ref:i,style:{minWidth:`${60+r}px`,tableLayout:"fixed"},children:t})},vg=t=>e("tr",{...t}),yg=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function wg(){return mg(Cg,([,e])=>e)}function bg(e){return mg(Cg,([t])=>e(t))}const Eg=({selected:t,onSelect:n})=>{const i=r.useCallback(()=>{n()},[n]);return e("th",{className:"ff-spreadsheet-corner-header",onClick:i,tabIndex:0,children:e("div",{className:z("corner-header",{"ff-spreadsheet-header--selected":t}),children:e(P,{variant:t?"dark":"light",color:t?"var(--hover-color)":"var(--text-color)",name:"excel_corner_menu"})})})},Mg=t=>function(n){const i=wg(),o=r.useCallback(()=>i({type:mp}),[i]),a=bg(e=>e.selected instanceof Ym);return e(t,{...n,selected:a,onSelect:o})},Ag=t=>function(n){const i=wg(),o=r.useCallback((e,t)=>i(function(e,t){return{type:pp,payload:{column:e,extend:t}}}(e,t)),[i]),a=bg(e=>e.selected.hasEntireColumn(n.column)),l=bg(e=>e.selectedColumn??void 0),c=bg(e=>e.active?zm(e.active,e.model.data):void 0);return e(t,{...n,cell:c,selected:a,selectedColumn:l,onSelect:o,scrollToColumn:n.scrollToColumn})},xg=Ag(({column:t,label:i,selected:o,onSelect:a,setContextMenu:l,deleteColumn:c,addColumnLeft:s,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:p,minimumColumnWidth:m,maxColLimit:C,disableDeleteOption:g,contextMenu:v,onAddColumn:y,onDeleteColumn:w,setVisibleRange:b,scrollToColumn:E})=>{const M=wg(),A=bg(e=>e.model.data),x=bg(e=>e.active),k=m,L=bg(e=>e.columnDimensions[t]?.width||k),H=bg(e=>e.model.data),{columnCount:_}=xC(H),S=r.useRef(A),V=r.useCallback(()=>{if(x){S.current?.[x.row]?.[x.column]!==bC&&S.current?.[0]?.length===A?.[0]?.length||(S.current=A);const e=S.current?.[x.row]?.[x.column]?.value,t=A?.[x.row]?.[x.column]?.value;return e===t}return!1},[x,A,S,bC]),O=e=>{b(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return p&&E(p),n})},N=h(()=>{const e=f?.contextDisable?.["Delete Column"]&&V();return[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{O("increment"),s(k),y?.(p??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:_>=C},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{O("increment"),d(k),y?.(p??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:_>=C},...g?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{O("decrement"),c(),w?.(p??t)},disableTooltip:"",visible:!!e,disable:!1}]]},[p,f,s,d,c,k,_,C,g,y,w,t,V]),I=r.useCallback((e,n)=>{const r=n?t-1:t,i=Math.max(r,0);a(i,e.shiftKey);const o=e.clientX,l=L,c=e=>{const t=Math.max(k,l+(e.clientX-o));M(nm(i,t))},s=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),M(_m())};document.addEventListener("mousemove",c),document.addEventListener("mouseup",s),M(Hm())},[t,L]),T=r.useCallback(e=>M(Mm(e)),[M]),D=r.useCallback(e=>{a(t,e.shiftKey)},[a,t]),j=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"column",options:N})},[t,p,u,N]);return r.useEffect(()=>{void 0!==p&&"column"===v?.contextType&&l(e=>({open:e.open,contextType:"column",options:N}))},[t,p,u,N,"column"===v?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{minWidth:`${L}px`},onClick:D,onContextMenu:j,tabIndex:0,children:[e(F,{fontWeight:"medium",children:i??kg(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>I(e,!1),onDoubleClick:()=>M(nm(t,k)),onClick:()=>T({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>I(e,!0),onDoubleClick:()=>M(nm(t,k)),onClick:()=>T({row:-1,column:t})})]},t)});function kg(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const Lg=({row:t,label:i,selected:o,onSelect:a,setContextMenu:l,addRowTop:c,addRowBottom:s,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:p,disableDeleteOption:m,contextMenu:C,setVisibleRange:g,scrollToRow:v})=>{const y=wg(),w=bg(e=>e.rowDimensions[t]?.height||32),b=bg(e=>e.model.data),{rowCount:E}=xC(b),M=e=>{g(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return f&&v(f),n})},A=r.useMemo(()=>[{label:"Add Row Top",value:"Add Row Top",iconName:"plus_icon",action:()=>{M("increment"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Top"]??!1,disable:E>=p},{label:"Add Row Bottom",value:"Add Row Bottom",iconName:"plus_icon",action:()=>{M("increment"),s()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:E>=p},...m?[]:[{label:"Delete Row",value:"Delete Row",iconName:"delete",action:()=>{M("decrement"),d()},disableTooltip:"",visible:h?.contextDisable?.["Delete Row"]??!1,disable:!1}]],[f,t]),x=r.useCallback((e,n)=>{const r=n?t:t-1,i=Math.max(r,0);a(i,e.shiftKey);const o=e.clientY,l=w,c=e=>{const t=Math.max(32,l+(e.clientY-o));y(tm(i,t))},s=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",s),y(_m())};document.addEventListener("mousemove",c),document.addEventListener("mouseup",s),y(_m())},[w,t]),k=r.useCallback(e=>y(Mm(e)),[y]),L=r.useCallback(e=>{a(t,e.shiftKey)},[t]),H=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"row",options:A})},[t,u,A,f]);return r.useEffect(()=>{void 0!==f&&"row"===C?.contextType&&l(e=>({open:e.open,contextType:"row",options:A}))},[t,u,A,f,"row"===C?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{height:`${w}px`,minWidth:"60px"},onClick:L,onContextMenu:H,tabIndex:0,children:[e(F,{fontWeight:"medium",children:void 0!==i?i:t+1}),e("div",{className:"drag-row-selector drag-row-down",onMouseDown:e=>x(e,!0),onDoubleClick:()=>y(tm(t,32)),onClick:()=>k({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>x(e,!1),onDoubleClick:()=>y(tm(t,32)),onClick:()=>k({row:t,column:-1})})]})},Hg=t=>function(n){const i=wg(),o=bg(e=>e.selected.hasEntireRow(n.row)),a=bg(e=>e.active?zm(e.active,e.model.data):void 0),l=bg(e=>e.selectedRow??void 0),c=r.useCallback((e,t)=>i(function(e,t){return{type:hp,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:o,cell:a,selectedRow:l,onSelect:c,scrollToRow:n.scrollToRow})},_g=({row:t,column:n,DataViewer:i,active:o,dragging:a,mode:l,data:c,evaluatedData:s,select:d,activate:u,setCellDimensions:f,setCellData:h,editable:p})=>{const m=r.useRef(null),C=r.useMemo(()=>({row:t,column:n}),[t,n]),g=r.useCallback(e=>{e.preventDefault(),p&&"view"===l&&(f(C,aC(e.currentTarget)),e.shiftKey?d(C):u(C))},[l,f,C,d,u]),v=r.useCallback(e=>{a&&(f(C,aC(e.currentTarget)),d(C))},[f,d,a,C]);return r.useEffect(()=>{const e=m.current;if(!e)return;const t=()=>{f(C,aC(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[f,C]),c&&c.DataViewer&&(i=c.DataViewer),e("td",{ref:m,style:{...c?.style,..."dropDown"===c?.inputType?.type&&{fontSize:"12px"}},className:z("ff-spreadsheet-cell",c?.className,{"ff-spreadsheet-active-cell":o||a}),onMouseEnter:v,onMouseDown:g,tabIndex:0,children:e(i,{row:t,column:n,cell:c,active:o,evaluatedCell:s,setCellData:h,inputValue:()=>null})})},Sg=t=>function(n){const{row:i,column:o}=n,a=wg(),l=r.useMemo(()=>({row:i,column:o}),[i,o]),c=r.useCallback(e=>a(Am(l,e)),[a,l]),s=r.useCallback(e=>a(function(e){return{type:gp,payload:{point:e}}}(e)),[a]),d=r.useCallback(e=>a(Mm(e)),[a]),u=r.useCallback((e,t)=>a(xm(e,t)),[a]),f=bg(e=>oC(e.active,l)),h=bg(e=>f?e.mode:"view"),p=bg(e=>zm(l,e.model.data)),m=bg(e=>zm(l,e.model.evaluatedData)),C=bg(e=>e.dragging),g=bg(e=>e.copied?.has(l)||!1);return e(t,{...n,active:f,copied:g,dragging:C,mode:h,evaluatedData:m,data:p,select:s,activate:d,setCellDimensions:u,setCellData:c})},Vg=({cell:r,evaluatedCell:i,active:o})=>{const a=function(e,t){const n=t?.value??e?.value;if(n&&"object"==typeof n)return n.toString();return n}(r,i);return e("span","boolean"==typeof a?{className:"ff-spreadsheet-data-viewer ff-spreadsheet-data-viewer--boolean",children:Og(a)}:{className:z("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":vC(a)}),children:o||"dropDown"!==r?.inputType?.type?o||"file"!==r?.inputType?.type?!o&&a:e(t,{children:G(r?.value)?n("div",{className:"ff-spreadsheet-data-viewer--without-fileType",children:[e(P,{name:"attachment_icon"})," Attachment"]}):(n=>{if(G(n))return e(t,{});return JSON.parse(n).map(t=>e("div",{className:"ff-spreadsheet-data-viewer--fileType",children:e(an,{width:r?.style?.width??100,title:t?.name?.split("*")?.[0]??""})},t.name))})(a)}):n("div",{className:"ff-spreadsheet-data-viewer--dropdownType",children:[a,e(P,{name:"arrow_down",height:8,className:"dropdownType-icon"})]})})};function Og(e){return e?"TRUE":"FALSE"}const zg=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:o={}},c)=>{const s=a(null);i.useImperativeHandle(c,()=>s.current),l(()=>{s.current&&t!==s.current.innerText&&(s.current.innerText=t)},[t]);const d=()=>{if(s.current){const e=s.current.innerText;n?.(e)}};return e("div",{style:o,children:e("div",{ref:s,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),document.execCommand("insertLineBreak"),void d();s.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:d,onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain"),n=window.getSelection();if(!n||!n.rangeCount)return;const r=n.getRangeAt(0);r.deleteContents();const i=document.createTextNode(t);r.insertNode(i),r.setStartAfter(i),r.collapse(!0),n.removeAllRanges(),n.addRange(r),d()},spellCheck:!1,autoCorrect:"off",autoCapitalize:"off",style:{outline:"none",transition:"border 0.2s",whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"inherit",fontSize:"inherit",lineHeight:"normal",minHeight:"32px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),Ng=({onChange:t,cell:n})=>{const i=r.useRef(null),o=r.useCallback(e=>{t({...n,value:e,style:n?.style,inputType:n?.inputType??{type:"text"}})},[t,n]);r.useEffect(()=>{i.current&&function(e){if(e)if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)e.selectionStart=e.selectionEnd=e.value.length;else if(e.isContentEditable){const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)}}(i.current)},[]);return e("div",{className:"ff-spreadsheet-data-editor",children:e(zg,{ref:i,initialValue:n?.value??"",onChange:o,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},Ig=t=>{const i=r.useRef(null),o=r.useRef(null),a=wg(),l=r.useCallback((e,t)=>a(Am(e,t)),[a]),c=r.useCallback(e=>a(Mm(e)),[a]),s=r.useCallback(()=>a({type:Ap}),[a]),d=r.useCallback(e=>a({type:Yp,payload:{autofill:e}}),[a]),u=r.useCallback(e=>a(function(e){return{type:Vp,payload:{changes:e}}}(e)),[a]),f=r.useCallback(()=>{a({type:xp})},[a]),h=bg(e=>e.rowDimensions),p=bg(e=>e.active),m=bg(e=>e.mode),C=bg(e=>e.active?zm(e.active,e.model.data):void 0),g=bg(e=>e.selected),v=bg(e=>g&&pC(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),y=bg(e=>{let t=p?fC(p,e.rowDimensions,e.columnDimensions):void 0;return t={top:t?.top?t?.top:0,height:t?.height?t?.height:0,left:t?.left?t?.left:0,width:t?.width?t?.width:0},t}),w=r.useMemo(()=>!p||!y||p.row<t.visibleRowRange.start||p.row>=t.visibleRowRange.end||p.column<t.visibleColRange.start||p.column>=t.visibleColRange.end,[p,y,t.visibleRowRange,t.visibleColRange]),b=r.useRef(void 0),E=r.useRef(null),M=r.useRef(void 0),A=r.useCallback(e=>{p&&l(p,e)},[l,p]),[x,k]=r.useState({value:"",name:""}),[L,H]=r.useState(!1),[_,S]=r.useState(),[V,O]=r.useState([]);r.useEffect(()=>{C&&p&&t.getActiveCell({value:C.value,active:p});const n=i.current;if(!w&&n){if(n.focus({preventScroll:!0}),"file"===C?.inputType?.type&&C?.value)try{const e=JSON.parse(C.value).map(e=>new File([new Blob],e.name.split("*")[0]??"default"));O(e)}catch(e){console.error("Error parsing cell value for files:",e),O([])}else O([]);if("dropDown"===C?.inputType?.type){k({value:C?.value,name:C?.value}),H(e=>!e);const t=C?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value}));S(t)}}},[i,w,p]),r.useEffect(()=>{const e=E.current,t=M.current;if(E.current=p,M.current=C,!e||!t)return;const n=p?.row!==e.row||p?.column!==e.column;if(n||"edit"!==m){const e=b.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||C===t||u([{prevCell:t,nextCell:C||null}]),b.current=C}});const N=C&&C.DataEditor||t.DataEditor,I=C&&C.readOnly,T=r.useCallback(e=>{p&&(e.preventDefault(),d(!0))},[c,d,p]),D=r.useCallback(e=>{e.preventDefault(),t.setContextMenu({open:t.contextOption?.open??!1,contextType:t.contextOption?.contextType??null,options:t.contextOption?.options||[]})},[t]),j=v?.height!==y?.height||v?.width!==y?.width,Z=r.useCallback(e=>{p&&j&&(xm(p,aC(e.currentTarget)),c(p))},[p,j]),R=t.isAtRight?t.maxWidth-(y?.left-t.scrollPos.left)+100:t.maxWidth,B=t.isAtBottom?t.maxHeight-(y?.top-t.scrollPos.top)+64:t.maxHeight;return n("div",{ref:i,className:z("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${m}`,{"ff-spreadsheet-active-cell--hidden":w,"ff-spreadsheet-active-cell--dragging":j&&"text"!==C?.inputType?.type}),onMouseDown:Z,style:{...y,backgroundColor:C?.style?.backgroundColor,...["file","dropDown"].includes(C?.inputType?.type||"")?{display:"flex",alignItems:C?.style?.alignContent,justifyContent:C?.style?.textAlign}:{},..."edit"===m&&p?{padding:"2px 4px 0px 4px",minWidth:Math.min(y?.width,t.maxWidth),minHeight:Math.min(y?.height,t.maxHeight),height:"auto",width:"max-content",maxWidth:`${R}px`,maxHeight:`${B}px`,overflow:"auto"}:{}},onContextMenu:D,onClick:"view"!==m||I?void 0:s,tabIndex:0,children:[e("div",{className:"active-cell-main",children:"dropDown"===C?.inputType?.type?e(ir,{...C?.inputType?.inputProps,dropDownRef:o,showOptions:{open:!("edit"!==m||!p),toggle:L},selectedOption:x,optionsList:_||[],height:26,showLabel:!1,showBorder:!1,optionZIndex:5e3,onChange:e=>{k({value:e.value,name:e.label}),A({...C,value:e.value,style:C?.style,inputType:C?.inputType})}}):"file"===C?.inputType?.type?e(rp,{...C?.inputType?.inputProps,label:"",onFileListClick:e=>{const n=e.target.closest(".ff-attachment-files"),r=e.target.closest(".ff-icon-container, .ff-icon-click, .ff-icon-danger");if(n&&!r&&C?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(C.value),r=n.parentElement?.querySelectorAll(".ff-attachment-files")||[],i=Array.from(r).indexOf(n);if(-1===i||!e[i])return void console.error("File index not found or invalid");const o=e[i];t.attachmentAction.viewAttachment(o.id,o.name?.split("*")[0]??"default")}catch(e){console.error("Error parsing cell value:",e)}else console.warn("Missing file element, icon click, cell value, or viewAttachment action")},selectedFiles:V,onFilesChange:async(e,n,r)=>{try{if("ADD"===r&&"file"===C?.inputType?.type){let n=[];try{C?.value&&(n=JSON.parse(C.value))}catch(e){console.error("Error parsing cell.value:",e)}let r=0;const i=e.filter((e,t,i)=>{const o=e.name.split("*")[0],a=i.findIndex(e=>e.name.split("*")[0]===o)!==t,l=n.some(e=>e.name.split("*")[0]===o);return!a&&!l||(r++,!1)});if(n.length+i.length>5)return void Zc.info("Cannot upload more than 5 files.");if(t.attachmentAction?.addAttachment&&i.length>0)try{let e=0,r=0,o=0;const l=V?.length+i?.length,c=l>0?25*l:1,s=[...n],d=i?.map(async e=>{try{if(e.name.includes("*"))return{file:e,status:"existing",data:{name:e.name}};const n=await(t?.attachmentAction?.addAttachment(e));if(!n||"string"==typeof n&&0===n.trim().length)return{file:e,status:"failed",reason:"no response"};if("string"==typeof n)try{const t=JSON.parse(n);return 507===t.responseCode?{file:e,status:"memory_full",reason:"no memory"}:400===t.responseCode?{file:e,status:"failed",reason:"invalid file"}:t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,t),{file:e,status:"failed",reason:"invalid response"})}catch(t){return console.error(`Parse error for ${e.name}:`,t),{file:e,status:"failed",reason:"parse error"}}if("object"==typeof n&&null!==n){const t=n;return t?.id&&t?.name?{file:e,status:"success",data:t}:(console.error(`Invalid response structure for ${e.name}:`,n),{file:e,status:"failed",reason:"invalid response"})}return console.error(`Unknown response for ${e.name}:`,n),{file:e,status:"failed",reason:"unknown"}}catch(t){return console.error(`Upload failed for ${e.name}:`,t),{file:e,status:"failed",reason:"upload error"}}});if((await Promise.allSettled(d)).forEach(t=>{if("fulfilled"===t.status&&t.value){const{status:n,data:i}=t.value;"success"===n&&i?.id&&i?.name?(s.push(i),e++):"existing"===n&&i?.name?s.push(i):"memory_full"===n?o++:r++}else r++}),e>0||s.length>n.length){const e=s.length>0?JSON.stringify(s):"";A({...C,value:e,style:C?.style,inputType:C?.inputType}),a(tm(p?.row||0,Math.max(c,h?.[p.row]?.height||c))),O(s.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}o>0&&Zc.info("No memory available to add the file"),e>0&&Zc.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&Zc.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),Zc.error("Operation failed")}}else if("DELETE"===r&&"file"===C?.inputType?.type)try{let e=[...C&&JSON.parse(C.value)],r=0;for(const i of n||[]){const n=e.findIndex(e=>e.name.split("*")[0]===i.name.split("*")[0]),o=e[n]?.id;if(-1!==n&&o&&t.attachmentAction?.deleteAttachment)try{const a=await t.attachmentAction.deleteAttachment(o);"SUCCESS"===a||"object"==typeof a&&null!==a&&("status"in a&&"SUCCESS"===a.status||"responseCode"in a&&200===a.responseCode)?(e.splice(n,1),r++):console.error(`Delete failed for ${i.name}: Invalid response`,a)}catch(e){console.error(`Delete error for ${i.name}:`,e),Zc.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:o,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),Zc.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";A({...C,value:t,style:C?.style,inputType:C?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),Zc.success(`${r} file${r>1?"s":""} deleted successfully`)}else if(n?.length){const t=e?.filter(e=>e.id&&e.name);if(t.length<e.length){const e=t.length>0?JSON.stringify(t):"";A({...C,value:e,style:C?.style,inputType:C?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),Zc.error("Failed to delete file(s). Invalid file data detected.")}else Zc.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),Zc.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),Zc.error("Operation failed")}},disabled:!1,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:!0,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:!0,isInfoIconRequired:!1,truncateMaxLimit:(y?.width??0)-60}):"edit"===m&&p?e(N,{row:p.row,column:p.column,cell:C,onChange:A,exitEditMode:f}):e(zg,{initialValue:C?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...C?.style,textDecoration:"underline"===C?.style?.textDecoration?"underline":"none",backgroundColor:j?"#1e161f00":C?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(C?.inputType?.type??"")&&("edit"===m||p&&e("div",{onMouseDown:T,className:"select_dot"}))]})},Tg=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const o=bg(e=>e.active),a=bg(e=>e.autoFill),l=bg(e=>o?fC(o,e.rowDimensions,e.columnDimensions):void 0),{width:c,height:s,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,p=c,m=s;return a.open&&c&&s&&l&&(c-h>s-f?(p=c,m=l.height):(m=s,p=l.width)),e("div",{className:z("ff-spreadsheet-floating-rect",{[`ff-spreadsheet-floating-rect--${i}`]:i,"ff-spreadsheet-floating-rect--dragging":n,"ff-spreadsheet-floating-rect--hidden":r}),style:{width:(p??0)+1,height:(m??0)+1,top:d,left:u}})},Dg=({scrollPos:t={top:0,left:0}})=>{const n=bg(e=>e.selected),i=bg(e=>e.dragging),o=bg(e=>e.selected.size(e.model.data)<2),a=bg(e=>n&&pC(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(a)return{...a,top:a.top,left:a.left,height:a.height-1,width:a.width-1}},[a,t]);return e(Tg,{variant:"selected",dimensions:l,dragging:i,hidden:o||!a})},jg=({scrollPos:t={top:0,left:0}})=>{const n=bg(e=>e.copied),i=null===n,o=bg(e=>n&&hC(e.rowDimensions,e.columnDimensions,n)),a=r.useMemo(()=>{if(o)return{...o,top:o.top,left:o.left,height:o.height-1,width:o.width-1}},[o,t]);return e(Tg,{variant:"copied",dimensions:a,hidden:i||!o,dragging:!1})},Zg=({getColorValue:t,disabled:n,initialColor:r})=>{const i=a(null),[o,l]=s(r);return e("div",{className:z("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:o},onClick:()=>{i.current&&!n&&i.current.click()},children:e("input",{type:"color",disabled:n,className:z("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:i,onChange:e=>{l(e.target.value),t(e.target.value.replace("#",""))}})})},Rg=e=>{switch(e.toUpperCase()){case"LEFT":default:return"left";case"RIGHT":return"right";case"CENTER":return"center";case"JUSTIFY":return"justify";case"BOTTOM":return"end";case"TOP":return"start"}},Bg=e=>{switch(e){case"left":return"LEFT";case"right":return"RIGHT";case"center":return"CENTER";case"justify":return"JUSTIFY";case"end":default:return"BOTTOM";case"start":return"TOP"}},Pg=e=>MC.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function Fg(e){const{border:t}=e;let n="",r="",i="",o="";return"THIN"!==t.top&&(n="MEDIUM"===t.top?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.right&&(r="MEDIUM"===t.right?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.bottom&&(i="MEDIUM"===t.bottom?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),"THIN"!==t.left&&(o="MEDIUM"===t.left?"2px solid var(--input-hover-border-color)":"1px solid var(--excel-header-border)"),{fontSize:yC(Pg(String(e.size))),fontFamily:(a=e.name,EC.some(e=>e.label===a)?a:"Poppins"),color:`#${e.color}`,backgroundColor:`#${e.backgroundColor}`,fontWeight:e.bold?"bold":"normal",fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":"normal",borderTop:n,borderRight:r,borderBottom:i,borderLeft:o,textAlign:Rg(e.alignment.horizontal),alignContent:Rg(e.alignment.vertical)};var a}const Ug=e=>{if(!e||"none"===e)return"THIN";if(e.includes("solid")||e.includes("dashed")||e.includes("dotted")){if(e.includes("2px")||e.includes("medium"))return"MEDIUM";if(e.includes("3px")||e.includes("medium"))return"THICK"}return"THIN"},qg=e=>({name:e.fontFamily||"Arial",size:wC(e.fontSize?.toString()||"12"),bold:"bold"===e.fontWeight,italic:"italic"===e.fontStyle,underline:"underline"===e.textDecoration,color:e.color?.replace("#","")||"000000",backgroundColor:e.backgroundColor?.replace("#","")||"FFFFFF",borderColor:"F2F2F2",border:{top:Ug(e.borderTop?e.borderTop.toString():void 0),right:Ug(e.borderRight?e.borderRight.toString():void 0),bottom:Ug(e.borderBottom?e.borderBottom.toString():void 0),left:Ug(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:Bg(e.textAlign),vertical:Bg(e.alignContent),wrapText:!1}}),Wg=({toolbar:t="show",editable:r,onBold:i,onItalic:o,setUnderlineType:c,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:p,setBorderType:m,setFormatePainter:C})=>{const g=bg(e=>e.selected instanceof Ym),[v,y]=s("disable"===t||!r),w=bg(e=>e.active?zm(e.active,e.model.data):null),b=bg(e=>e.model.data),E=bg(e=>e.formattedStyle.open),M={...bC.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[A,x]=s(w?.style||M),k=a(null);l(()=>{w?.style&&JSON.stringify(w.style)!==JSON.stringify(A)&&x(w?.style||M),g?y(!1):w&&"boolean"==typeof w.readOnly&&y(w.readOnly||"disable"===t||!r||"dropDown"===w?.inputType?.type)},[w]);const L=qg(A),[H,_]=s("border-none"),[S,V]=s({label:"",value:""}),[O,z]=s({label:"",value:""}),[N,I]=s({color:M.color,backgroundColor:M.backgroundColor,borderColor:M.borderColor}),T=[{value:"border-all-sides",label:"All Border",icon:"all_borders"},{value:"border-bottom",label:"Border Bottom",icon:"border_bottom"},{value:"border-left",label:"Border Left",icon:"border_left"},{value:"border-right",label:"Border Right",icon:"border_right"},{value:"border-top",label:"Border Top",icon:"border_top"},{value:"border-none",label:"No Border",icon:"no_border"}],D=MC.map(e=>({label:e,value:e}));l(()=>{let e=setTimeout(()=>{d(b,N.color)},0);return()=>{clearTimeout(e)}},[N.color]),l(()=>{let e=setTimeout(()=>{p(b,N.backgroundColor)},0);return()=>{clearTimeout(e)}},[N.backgroundColor]);return l(()=>{const e=A.fontFamily,t=`${wC(A.fontSize)}`;V({label:e??"Times New Roman",value:e??"Times New Roman"}),z({label:t??"11",value:t??"11"})},[A]),n("div",{className:"ff-excel-toolbar",children:[n("div",{className:"ff-excel-toolbar-font ",children:[e("div",{className:"ff-excel-toolbar-font-family",children:e(ir,{disabled:v,height:24,tooltip:!0,showToolTip:!0,showLabel:!1,optionZIndex:2e3,onChange:e=>{V({label:e.label,value:e.label}),f(b,e.value)},required:!1,optionsList:EC,selectedOption:S})}),e("div",{className:"ff-excel-toolbar-font-size",children:e(ir,{disabled:v,height:24,showLabel:!1,optionZIndex:2e3,required:!1,onChange:e=>{z({label:e.label,value:e.value}),u(b,e.value)},optionsList:D,selectedOption:O})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon",children:[e(K,{placement:"top",title:"Text Left",children:e(P,{disabled:v,variant:"left"===A.textAlign?"dark":"light",hoverEffect:"left"!==A.textAlign,onClick:()=>h(b,"left"),name:"text_align_left"})}),e(K,{placement:"top",title:"Text Center",children:e(P,{disabled:v,variant:"center"===A.textAlign?"dark":"light",hoverEffect:"center"!==A.textAlign,onClick:()=>h(b,"center"),name:"text_align_center"})}),e(K,{placement:"top",title:"Text Right",children:e(P,{disabled:v,variant:"right"===A.textAlign?"dark":"light",hoverEffect:"right"!==A.textAlign,onClick:()=>h(b,"right"),name:"text_align_right"})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-text",children:[e(K,{placement:"top",title:"Bold",children:e(P,{disabled:v,variant:L.bold?"dark":"light",hoverEffect:!L.bold,onClick:()=>i(b),name:"bold"})}),e(K,{placement:"top",title:"Italic",children:e(P,{disabled:v,variant:L.italic?"dark":"light",hoverEffect:!L.italic,onClick:()=>o(b),name:"italic"})}),e(K,{placement:"top",title:"Underline",children:e("div",{className:"ff-excel-toolbar-icon-underline",children:e(P,{disabled:v,variant:"underline"===A.textDecoration?"dark":"light",hoverEffect:"underline"!==A.textDecoration,onClick:()=>c(b),name:"underline"})})})]}),e("div",{className:"ff-excel-toolbar-divider"}),n("div",{className:"ff-excel-toolbar-icon",children:[e(K,{placement:"top",title:"Format Painter",children:e(P,{disabled:v,variant:E?"dark":"light",hoverEffect:!E,onClick:()=>{C(b)},name:"formate_painter"})}),e(K,{placement:"top",title:"Text Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(P,{disabled:v,hoverEffect:!0,width:12,height:12,onClick:()=>{d(b,N.color)},name:"text_color"}),e(Zg,{disabled:v,getColorValue:e=>{I(t=>({...t,color:e}))},initialColor:N.color})]})}),e(K,{placement:"top",title:"Background Color",children:n("div",{className:"ff-excel-toolbar-icon-color",children:[e(P,{disabled:v,hoverEffect:!0,width:12,height:12,onClick:()=>p(b,N.backgroundColor),name:"fill_color"}),e(Zg,{disabled:v,getColorValue:e=>{I(t=>({...t,backgroundColor:e}))},initialColor:N.backgroundColor})]})})]}),e("div",{className:"ff-excel-toolbar-divider"}),e("div",{className:"ff-excel-toolbar-menu",children:n("div",{className:"ff-excel-toolbar-menu-option",children:[e(K,{placement:"top",title:"Border Type",children:e(P,{hoverEffect:!0,disabled:v,onClick:()=>m(b,H,"var(--input-hover-border-color)"),name:(()=>{const e=T.find(e=>e.value===H);return e?e.icon:""})()})}),e("span",{ref:k,children:e(dr,{disabled:v,iconName:"arrow_down",targetRef:k,iconSize:12,zIndex:2e3,options:T,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;m(b,t,"var(--input-hover-border-color)"),_(t)}})})]})})]})},Qg=(e,t)=>{let n,r=null;const i=function(...i){const o=this;null===r||Date.now()-r>=t?(e.apply(o,i),r=Date.now()):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(o,i),r=Date.now()},t-(Date.now()-r)))};return i.cancel=()=>{n&&clearTimeout(n),n=null,r=null},i},Gg=r.forwardRef(function(t,i){const{className:o,columnLabels:a=[],rowLabels:l=[],toolbar:c,editable:s,onKeyDown:d,Table:u=gg,Row:f=vg,sheetHeight:h,HeaderRow:p=yg,DataEditor:m=Ng,DataViewer:C=Vg,onSelect:g=()=>{},onActivate:v=()=>{},onEvaluatedDataChange:y=()=>{},contextOption:w,attachmentAction:b,workRef:E,minimumColumnWidth:M,setContextMenu:A,maxRowLimit:x,maxColLimit:k,disableDeleteOption:L,contextMenu:H,getActiveCell:_,onAddColumn:S,onDeleteColumn:V}=t,O=t.minimumColumnWidth||100,N=r.useRef(!1),I=bg(e=>e.model.data),[T,D]=r.useState(!1),[j,Z]=r.useState(0),[R,B]=r.useState(0),[P,F]=r.useState({top:0,left:0}),[U,q]=r.useState(!1),[W,Q]=r.useState(!1),G=r.useMemo(()=>{const e=t.createFormulaParser||LC,n=new OC(e,t.data);return D(e=>!e),{...tg,model:n,selected:t.selected||tg.selected}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(ng,G),[Y,X]=K,J=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=Rm(e);return{rows:t?Math.max(i,t.length):i,columns:n?Math.max(r,n.length):r}}(Y.model.data,l,a),[Y.model.data,l,a]),[$,ee]=r.useState({start:0,end:Math.min(20,J.rows)}),[te,ne]=r.useState({start:0,end:Math.min(15,J.columns)}),re=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.rowDimensions[n]?.height||32;return t},[Y.rowDimensions,32]),ie=r.useCallback(e=>{let t=0;for(let n=0;n<e;n++)t+=Y.columnDimensions[n]?.width||O;return t},[Y.columnDimensions,O]),oe=re(J.rows),ae=ie(J.columns),le=re($.start),ce=oe-re($.end),se=ie(te.start),de=ae-ie(te.end),ue=Y.mode,fe=r.useRef(null),he=e=>r.useCallback((...t)=>X(e(...t)),[e]),pe=he(em),me=he(Vm),Ce=he(Sm),ge=he(Om),ve=he(km),ye=he(Lm),we=he(ym),be=he(Hm),Ee=he(_m),Me=he(wm),Ae=he(bm),xe=he(Em),ke=he(rm),Le=he(im),He=he(am),_e=he(sm),Se=he(lm),Ve=he(cm),Oe=he(om),ze=he(dm),Ne=he(um),Ie=he(fm),Te=he($p),De=he(hm),je=he(pm),Ze=he(mm),Re=he(Cm),Be=he(gm),Pe=he(vm);r.useImperativeHandle(i,()=>({removeSelect:ge}));const Fe=r.useRef(Y.active);r.useEffect(()=>{if(Y.active!==Fe.current)if(Y.active)v(Y.active);else{const e=E.current;e&&gC(e)&&document.activeElement&&document.activeElement.blur()}Fe.current=Y.active},[v,Y.active]);const Ue=r.useRef(Y.model.evaluatedData);r.useEffect(()=>{Y?.model?.evaluatedData!==Ue?.current&&y(Y?.model?.evaluatedData),Ue.current=Y.model.evaluatedData},[Y?.model?.evaluatedData,y]);const qe=r.useRef(Y.selected);r.useEffect(()=>{Y.selected.equals(qe.current)||t.selected&&Y.selected.equals(t.selected)||g(Y.selected),qe.current=Y.selected},[Y.selected,g,t.selected]);const We=r.useRef(t.selected);r.useEffect(()=>{t.selected&&We.current&&!t.selected.equals(We.current)&&xe(t.selected),We.current=t.selected},[t.selected,xe]);let Qe=r.useRef(t.data);r.useEffect(()=>{pe(s),t.data!==Qe.current&&Me(t.data),Qe.current=t.data},[t.data,Me,s]);const Ge=r.useRef(t.createFormulaParser);r.useEffect(()=>{t.createFormulaParser!==Ge.current&&t.createFormulaParser&&Ae(t.createFormulaParser),Ge.current=t.createFormulaParser},[t.createFormulaParser,Ae]);const Ke=r.useCallback(e=>{const{model:t,selected:n}=Y,{data:r}=t,i=n.toRange(r);if(i){!function(e,t){e.clipboardData?.setData(rC,t)}(e,mC(function(e,t,n){const r=[],i=t.column-e.column;for(let o=e.row;o<=t.row;o++){const a=o-e.row;r[a]=r[a]||Array(i);for(let i=e.column;i<=t.column;i++)r[a][i-e.column]=zm({row:o,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Ye=r.useCallback(e=>{CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),me())},[ue,Ke,me]),Xe=r.useCallback(e=>{CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),Ce())},[ue,Ke,Ce]),Je=r.useCallback(e=>{if(CC(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),e.clipboardData)){const t=function(e){return window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?e.clipboardData.getData(rC):""}(e);ve(t)}},[ue,ve]),$e=r.useCallback(e=>{e.persist();const t=e.ctrlKey||e.metaKey,n=e.key.toLowerCase();t&&"b"===n?(e.preventDefault(),ke(I)):t&&"i"===n?(e.preventDefault(),Le(I)):t&&"u"===n&&(e.preventDefault(),He(I)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==JC(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),ye(e))},[Y,d,ye]),et=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Te(Y.active)},[Y]),tt=r.useCallback(()=>{Ee(),window.getSelection()?.removeAllRanges(),document.removeEventListener("mouseup",tt)},[Ee]),nt=r.useCallback(e=>{Y.dragging||1!==e.buttons||(be(),document.addEventListener("mouseup",tt))},[Y,be,tt]),rt=r.useMemo(()=>Sg(t.Cell||_g),[t.Cell,T,s]),it=r.useMemo(()=>Mg(t.CornerIndicator||Eg),[t.CornerIndicator,T]),ot=r.useMemo(()=>Hg(t.RowIndicator||Lg),[t.RowIndicator,T]),at=r.useMemo(()=>Ag(t.ColumnIndicator||xg),[t.ColumnIndicator,T]);r.useEffect(()=>(document.addEventListener("cut",Ye),document.addEventListener("copy",Xe),document.addEventListener("paste",Je),()=>{document.removeEventListener("cut",Ye),document.removeEventListener("copy",Xe),document.removeEventListener("paste",Je)}),[Ye,Xe,Je]);const lt=e=>{const t=new ResizeObserver(e=>{const t=e[0];if(t&&fe.current){const e=t.target;if(e){const{clientWidth:t,clientHeight:n}=e;B(Math.min(fe.current.clientHeight,n)),Z(Math.min(fe.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},ct=r.useCallback(e=>{const t=e.target,{scrollTop:n,clientHeight:r,scrollLeft:i,clientWidth:o}=t;F({top:n,left:i});let a=0;for(;a<J.rows&&re(a)<n;)a++;let l=a;for(;l<J.rows&&re(l)<n+r;)l++;a=Math.max(0,a-10),l=Math.min(J.rows,l+10),ee({start:a,end:l});const c=l===J.rows;q(c);let s=0;for(;s<J.columns&&ie(s)<i;)s++;let d=s;for(;d<J.columns&&ie(d)<i+o;)d++;s=Math.max(0,s-10),d=Math.min(J.columns,d+10),ne({start:s,end:d});const u=d===J.columns;Q(u),H.open&&A({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},[J.rows,J.columns,re,ie]),st=r.useMemo(()=>Qg(ct,16),[ct]),dt=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.rowDimensions?.[n]?.height||32;requestAnimationFrame(()=>{fe.current&&e>=J.rows-1&&fe?.current?.scrollTo({top:t+32,behavior:"smooth"})})})},ut=e=>{N.current=!0,requestAnimationFrame(()=>{let t=0;for(let n=0;n<=e;n++)t+=Y.columnDimensions?.[n]?.width||O;requestAnimationFrame(()=>{fe.current&&e>=J.columns-1&&fe.current.scrollTo({left:t+60,behavior:"smooth"})})})};r.useEffect(()=>{N.current||(ee({start:0,end:Math.min(20,J.rows)}),ne({start:0,end:Math.min(15,J.columns)}))},[J.rows,J.columns,N.current]);const ft=iC($.end,$.start),ht=iC(te.end,te.start),pt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${se}px`}},"left-spacer")," ",ht.map(t=>e("col",{style:{width:`${Y.columnDimensions[t]?.width||O}px`}},t)),e("col",{style:{width:`${de}px`}},"right-spacer")," "]}),mt=r.useMemo(()=>n(u,{useTableRef:lt,totalWidth:ae,children:[pt,n("tbody",{children:[n(p,{children:[e(it,{}),e("div",{className:"spacer left"}),ht.map(n=>e(at,{column:n,minimumColumnWidth:M,setContextMenu:t.setContextMenu,label:n in a?a[n]:void 0,deleteColumn:Pe,addColumnLeft:Ze,addColumnRight:Re,columnContextEnable:t.columnContextEnable,maxColLimit:k,disableDeleteOption:L,contextMenu:H,onAddColumn:S,onDeleteColumn:V,setVisibleRange:ne,scrollToColumn:ut},n)),e("div",{className:"spacer right"})]}),e("tr",{style:{height:`${le}px`}}),ft.map(r=>n(f,{row:r,children:[e(ot,{label:r in l?l?.[r]:void 0,row:r,addRowTop:De,addRowBottom:je,deleteRow:Be,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:x,disableDeleteOption:L,contextMenu:H,setVisibleRange:ee,scrollToRow:dt},r),e("div",{className:"spacer left"}),ht.map(t=>e(rt,{row:r,column:t,DataViewer:C,editable:s},t)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${ce}px`}})]})]}),[u,J.rows,J.columns,f,p,it,a,at,l,ot,rt,C,$,te,le,ce,se,de,Y.rowDimensions,Y.columnDimensions]),Ct=r.useMemo(()=>e(Ig,{attachmentAction:b,contextOption:w,getActiveCell:_,setContextMenu:t.setContextMenu,DataEditor:m,visibleRowRange:$,visibleColRange:te,maxHeight:R-64,maxWidth:j-M,totalHeight:oe,totalWidth:ae,isAtBottom:U,isAtRight:W,scrollPos:P}),[m,$,te,Y.active,R,j,oe,ae,U,W]),gt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${j}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(c||""),"ff-excel-header-hider":"hide"===c})}),e("div",{style:{height:`${R}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(c||""),"ff-excel-header-hider":"hide"===c})}),"hide"!==c&&e("div",{className:"ff-excel-toolbar-container",children:e(Wg,{editable:s,toolbar:c,onBold:ke,onItalic:Le,setUnderlineType:He,setColor:ze,setBorderType:Oe,setFontSize:Se,setFontFamily:Ve,setTextAlign:_e,setBackgroundColor:Ne,setFormatePainter:Ie})}),n("div",{ref:fe,style:{height:h},className:z("ff-excel-spreadsheet",o),onKeyPress:we,onKeyDown:$e,onClick:et,onMouseMove:nt,onScroll:e=>st(e),children:[mt,Ct,e(Dg,{scrollPos:P}),e(jg,{scrollPos:P})]})]}),[o,we,$e,nt,mt,Ct,j]);return e(Cg.Provider,{value:K,children:gt})}),Kg=({contextMenu:t,position:r,editable:i})=>{if(!t.open)return null;return i&&e("div",{onContextMenu:e=>{e.preventDefault(),e.stopPropagation()},className:"ff-excel-menu",style:{left:r.x,top:r.y,position:"absolute",zIndex:9999999999},children:t.options.map(t=>{if(!t.visible){const i=t.disable;return e(K,{title:i?t.disableTooltip:"",children:n("div",{className:"ff-excel-menu-options "+(i?"disabled":""),onClick:()=>{i||t.action()},children:[t.iconName&&e(P,{name:t.iconName,height:16,width:16,color:(r=t.label,r.includes("Delete")?"var(--label-edit-error-text)":"var(--brand-color)"),disabled:i}),e(F,{as:"label",children:t.label})]})},t.label)}var r;return null})})},Yg=(e,t)=>{let n,r=null,i=null;const o=function(...o){r&&clearTimeout(r),i=o,n=this,r=setTimeout(()=>{i&&(e.apply(n,i),i=null,n=null),r=null},t)};return o.cancel=()=>{r&&clearTimeout(r),r=null,i=null,n=null},o.flush=()=>{r&&(clearTimeout(r),i&&(e.apply(n,i),i=null,n=null),r=null)},o},Xg=({excelData:r,contextOption:o,toolbar:c="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:p=!0,contextHeightPositioning:m=0,contextWidthPositioning:C=0,onSave:g=()=>Promise.resolve(),onSaveInfoChange:v,attachmentAction:y={addAttachment:()=>Promise.resolve(""),deleteAttachment:()=>Promise.resolve(""),viewAttachment:()=>Promise.resolve()},onSaveDelay:w=3e3,scroller:b=!1,columnContextEnable:E=!0,rowContextEnable:M=!0,sheetBarContextEnable:A=!0,minimumColumnWidth:x=100,disableDeleteOption:k=!1,maxRowLimit:L=1/0,maxColLimit:H=1/0,maxSheetLimit:_=1/0,getActiveCell:S=()=>{}})=>{const[V,O]=s([]),[N,I]=s(""),[T,D]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[j,Z]=s({name:"defaultSheet",index:0}),[R,B]=s({defaultSheet:[[bC]]}),[U,q]=s([[bC]]),[W,Q]=s((g.length,{})),[Y,X]=s({x:0,y:0}),J=a(""),$=a(null),ee=a(null),te=a(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);O(t),G(t.length)||(J.current=t[0]||"",Z({name:t[0]||"",index:0}));const n={},r={};e.forEach(e=>{const t=e.sheetName,i=e.data,o=Math.max(u,i.length),a=Math.max(f,Math.max(...i.map(e=>e.length)));let l=Array.from({length:o},()=>Array(a).fill({value:"",style:bC.style,readOnly:!1,inputType:void 0}));i.forEach((e,t)=>{e.forEach((e,n)=>{var r;t<o&&n<a&&(l[t]||(l[t]=[]),l[t][n]={value:(r=e.value,null==r?null:r),style:G(e?.style)?bC.style:Fg(e?.style),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const c=new Set([...e?.rows?.readOnly?e.rows.readOnly.map(e=>`r${e}`):[],...e?.columns?.readOnly?e.columns.readOnly.map(e=>`c${e}`):[],...e?.cells?.readOnly?e.cells.readOnly.map(([e,t])=>`${e},${t}`):[]]);if(l.forEach((t,n)=>{t.forEach((t,r)=>{l[n]||(l[n]=[]);const i=c.has(`r${n+1}`)||c.has(`c${r+1}`)||c.has(`${n+1},${r+1}`),o=((t,n,r)=>r?.inputType?r.inputType:e?.rows?.inputType?.[t+1]||e?.columns?.inputType?.[n+1]||e?.cells?.inputType?.[`${t+1},${n+1}`]||{type:"text"})(n,r,t||bC);l[n][r]={...t,value:t?.value??"",readOnly:t?.readOnly?t.readOnly:i,inputType:o,contextDisable:t?.contextDisable}})}),n[t]=l,g.length>1){const e=i[0]||[];r[t]=Array.from({length:a},(t,n)=>({newData:"",oldData:e[n]?.value||""}))}}),B(n),g.length>1&&Q(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&q(n[i])}},[r]),l(()=>{v&&v(N),"File saved"===N&&setTimeout(()=>{I("")},2e3)},[N]),l(()=>{I("Saving..."),ne(ie())},[R,J.current]);const ne=i.useCallback(Yg(e=>{if(g.length>1){const t={...W};V.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Q(t);const n=V.map(e=>({sheetName:e,headers:t[e]||[]}));g(e,n)}else g(e);I("File saved")},w),[g,W,V]),re=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),ne(ie()))},[g]);i.useEffect(()=>(document.addEventListener("keydown",re),()=>{document.removeEventListener("keydown",re)}),[re]);const ie=()=>V.map(e=>{const t=R[e]?.map(e=>{const t=e.reduce((e,t,n)=>""!==String(t?.value??"").trim()?n:e,-1),n=e.map((e,n)=>e&&e.style&&n<=t?{value:e.value,style:qg(e.style),readOnly:e.readOnly,inputType:e.inputType,contextDisable:e.contextDisable}:null).filter(e=>null!==e);return n.length>0?n:[]})||[],n=t.filter((e,n)=>{const r=t.slice(n+1).some(e=>e.length>0);return e.length>0||r});return{sheetName:e,data:G(n.length)?[[]]:n}}),[oe,ae]=s(null),le=()=>V.length>=_,ce=()=>{if(le())return;const e=((e,t)=>{const n=t.map(e=>e.toLowerCase());let r=`${e}1`,i=2;for(;n.includes(r.toLowerCase());)r=`${e}${i}`,i++;return r})("Sheet",V),t=Array.from({length:u},()=>Array.from({length:f},()=>bC));O(t=>[...t,e]),Z({index:V?.length,name:e}),B({...R,[e]:t}),q(t),g.length>1&&Q(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),J.current=e},se=(e=[[bC]])=>{q(e)},de=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void ae(null);const i=(r.textContent||"").trim();if(!i)return Zc.warning("Sheet name cannot be empty."),r.textContent=j.name,void ae(null);if(i.length>50)return Zc.warning("The sheet name cannot be greater than 50 characters"),r.textContent=j.name,void ae(null);if(V.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return Zc.warning("Sheet name already exists"),r.textContent=j.name,void ae(null);let o=V;se(R?.[n]),o.splice(t,1,i);const a=function(e,t,n){if(!(t in e))throw new Error(`Key "${t}" not found in object`);const{[t]:r,...i}=e;return{...i,[n]:r??[]}}(R,n,i);J.current=i,Z(e=>({...e,name:i})),B(a),g.length>1&&Q(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),ae(null)};const ue=(e,t)=>{e!==j.name&&t!==j.index&&(Z({index:t,name:e}),O(n=>{const r=[...n];return r[t]=e,r}),se(R[e]),J.current=e)},fe=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&T.open&&(D({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[T.open]);i.useEffect(()=>(document.addEventListener("contextmenu",fe),document.addEventListener("click",e=>fe(e,!0)),()=>{document.removeEventListener("contextmenu",fe),document.removeEventListener("click",e=>fe(e,!0))}),[fe]);const he=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ce(),disableTooltip:"Sheet limit reached",visible:!1,disable:le()},...k?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(V.length>1){let n=V.slice();n.splice(t,1);const r={...R};delete r[e];const i=Math.min(t,n.length-1);O(n),B(r),g.length>1&&Q(t=>{const n={...t};return delete n[e],n});const o=n[i]?n[i]:"";Z({index:i,name:o}),se(r?.[o]),J.current=o}else Zc.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];D(e=>({...e,open:!0,contextType:"sheet",options:r}))};return l(()=>{te.current?.removeSelect()},[j.name]),e(t,{children:V.length>0&&n("div",{ref:$,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=ee.current?.parentElement?.getBoundingClientRect(),n=window.scrollX,r=window.scrollY;let i=e.clientX-(t?.left||0)+n,o=e.clientY-(t?.top||0)+r;const a=300,l=window.innerWidth,c=window.innerHeight,s=l-e.clientX,d=e.clientX,u=c-e.clientY,f=e.clientY;s<a&&d>=a?i=e.clientX-(t?.left||0)+n-150:i+=2,u<200&&f>=200?o=e.clientY-(t?.top||0)+r-20:o+=2,e.target.classList.contains("ff-excel-tab-list")?X({x:i,y:o-(k?32:65)}):(i+a>l&&(i=l-a-2),i<0&&(i=2),X({x:i+C,y:o+m}))},onClick:e=>{e.stopPropagation(),T.open&&D({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},children:[e("div",{ref:ee,className:"ff-excel-sheet",children:e(Gg,{ref:te,editable:p,attachmentAction:y,toolbar:c,sheetHeight:h,setContextMenu:D,contextOption:o,data:U,columnContextEnable:E,rowContextEnable:M,minimumColumnWidth:x,onEvaluatedDataChange:e=>{B(t=>({...t,[J.current]:e}))},workRef:$,scroller:b,maxRowLimit:L,maxColLimit:H,disableDeleteOption:k,contextMenu:T,getActiveCell:S,onAddColumn:(e,t)=>{g.length>1&&Q(n=>{const r=j.name,i=[...n[r]||[]],o=t?e:e+1;return i.splice(o,0,{newData:"",oldData:""}),{...n,[r]:i}})},onDeleteColumn:e=>{g.length>1&&Q(t=>{const n=j.name,r=[...t[n]||[]];return r.splice(e,1),{...t,[n]:r}})}},j.name)}),"hide"!==d&&n("div",{className:"ff-excel-sheet-bar",children:["show"===d&&e("div",{className:"ff-excel-add-sheet-set",children:e(K,{title:le()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(P,{disabled:!p||le(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ce,name:"plus_icon",height:20,width:20})})}),e("div",{className:"ff-excel-tab-container",children:V.map((t,n)=>e(F,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{ue(t,n),A&&he(e,t,n)},className:z("ff-excel-tab-list",{active:t===j.name}),onClick:()=>{ue(t,n)},suppressContentEditableWarning:oe===n,onDoubleClick:e=>{"show"===d&&(ae(n),null===oe&&setTimeout(()=>(e=>{const t=document.createRange(),n=window.getSelection();t.selectNodeContents(e),t.collapse(!1),n?.removeAllRanges(),n?.addRange(t)})(e.target),0))},contentEditable:p&&oe===n,onBlur:e=>{de(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),de(e,n,t))},children:t})},t))})]}),T.open&&e(Kg,{contextMenu:T,position:Y,editable:p}),e(jc,{})]})})},Jg=({label:t="",isActive:n=!0,onClick:r=()=>{},isFilterChip:i=!1})=>{const o=i?"filter":"module";return e("div",{className:z("ff-module-chip",{"ff-filter-chip":i,[`ff-${o}-chip--active`]:n,[`ff-${o}-chip--hover`]:!n}),onClick:r,children:e(F,{lineHeight:"18px",className:"module-typography",children:t})})},$g=({x:e,y:t,radius:n,startAngle:r,endAngle:i})=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),c=t+n*Math.sin(i),s=i-r>Math.PI?1:0;return i-r>=2*Math.PI?`\n M ${e+n} ${t}\n A ${n} ${n} 0 1 1 ${e-n} ${t} \n A ${n} ${n} 0 1 1 ${e+n} ${t}\n `:`M ${o} ${a} A ${n} ${n} 0 ${s} 1 ${l} ${c}`},ev=({radius:t=15,lineWidth:r=5,label:i,percentageValue:o,icon:l,fontSize:c=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:p})=>{const[m,C]=s({x:0,y:0}),[g,v]=s(!1),y=a(null);let w=-Math.PI/2;const b=2*(t+r),{backgroundArcPath:E,foregroundArcPath:M}=((e,t,n)=>{const r=t,i=r+Math.max(0,Math.min(e,100))/100*2*Math.PI;return{backgroundArcPath:$g({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:$g({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(o,w,t),A=()=>{v(!0)},x=()=>{C({x:0,y:0}),v(!1)},k=e=>{if(y.current){const t=y.current.getBoundingClientRect();C({x:e.clientX-t.left,y:e.clientY-t.top})}};return n("div",{ref:y,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${c}px`},onClick:p,children:[e("svg",{width:b,height:b,viewBox:`0 0 ${b} ${b}`,role:"img",children:n("g",{transform:`translate(${t+r}, ${t+r})`,children:[e("path",{d:E,fill:"none",stroke:f,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),e("path",{d:M,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),h&&e("path",{d:M,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:k}),l?e("foreignObject",{x:"-10",y:"-10",width:"20",height:"20",children:e(P,{className:"ff-radial-chart-icon-padding",name:l,height:20,width:20})}):e("text",{x:"0",y:"0",fill:d||u,textAnchor:"middle",dominantBaseline:"central",children:`${Math.round(o)}%`})]})}),g&&n("div",{className:"ff-icon-radial-chart-tooltip",style:{position:"absolute",left:`${m.x+15}px`,top:m.y-5+"px"},children:[e(F,{children:`${i} : `}),n(F,{children:[o,"%"]})]})]})},tv=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:o,onDownloadClick:a,height:l="75px",width:c="79px",fileName:s,thumbnailMediaSrc:d,isDelete:u})=>e("div",{className:"ff-attach-media-container",style:{height:l,width:c},children:n("div",{className:"ff-media-wrapper",style:{height:l,width:c},children:[e("img",{src:d||t,alt:"Attached"}),n("div",{className:"ff-hover-icons",children:[n("div",{className:"ff-top-icons",children:[e("div",{className:"ff-icon-container",children:e(K,{title:"Download File",placement:"bottom",children:e(P,{name:"download_file_icon",height:10,width:10,onClick:a,color:"var(--icons-default-color)"})})}),u&&e("div",{className:"ff-icon-container",children:e(K,{title:"Delete",placement:"bottom",children:e(P,{name:"delete",height:10,width:10,color:"var(--ff-delete-button-attachment)",onClick:()=>{o&&o(r)}})})})]}),e("div",{className:"ff-expand-icon-container",children:e(K,{title:"Maximize",placement:"bottom",children:e(P,{name:"expand_icon",height:16,width:16,onClick:i})})})]}),e(F,{color:"var(--text-area-default-color)",fontWeight:"medium",className:"ff-media-text",children:s})]})}),nv=({icon:r,status:i,count:o,text:a,style:c={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=s(!1),p=["total defects","defect density","open defects","closed defects","quality score"],m=p.includes(i.toLowerCase()),C=p.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:c,onClick:()=>(e=>{p.includes(e.toLowerCase())||(h(!0),u(e))})(i),children:[n("div",{className:"ff-status-bar",children:[e("div",{children:e(P,{name:r,height:20,width:20,hoverEffect:!1})}),!p.includes(i.toLowerCase())&&e(F,{fontWeight:"semi-bold",fontSize:"10px",textAlign:"center",lineHeight:"15px",className:"ff-status-text",as:"div",children:i.charAt(0).toUpperCase()+i.slice(1).toLowerCase()})]}),e("div",{className:"ff-content "+(C?"red-background":""),children:n(t,m?{children:[e(F,{fontWeight:"semi-bold",fontSize:"10px",className:"ff-text",lineHeight:"15px",color:"var(--ff-chip-text-color)",children:a}),e(F,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"36px",children:"defect density"===i.toLowerCase()?n(t,{children:[o.toString().padStart(2,"0"),e(F,{fontSize:"15px",fontWeight:"semi-bold",children:"/ Modules"})]}):"quality score"===i.toLowerCase()?`${parseFloat(o.toString()).toFixed(2)}%`:o.toString().padStart(2,"0")})]}:{children:[e(F,{fontWeight:"semi-bold",fontSize:"24px",className:"ff-number",lineHeight:"24px",color:f?"var(--base-bg-color)":"",children:o.toString().padStart(2,"0")}),e(F,{className:"ff-text",lineHeight:"18px",color:f?"var(--base-bg-color)":"var(--ff-chip-text-color)",children:a})]})})]})},rv=({option:t})=>{const r=a(null),[i,o]=s(!1);l(()=>{const e=r.current;if(!e)return;const t=()=>{o(e.scrollWidth>e.clientWidth)},n=requestAnimationFrame(t);return window.addEventListener("resize",t),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",t)}},[t]);const c={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},d=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;return n("div",{style:{width:"-webkit-fill-available"},className:"ff-variable-option ff-variable-data",children:[e(K,{title:i?d(t):"",style:{width:"calc(100% - 32px)"},children:e("span",{ref:r,className:"ff-truncated_text",children:d(t)})}),e(P,{name:(e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"LOCAL"===e.type&&"STEPGROUP"===e?.parentVariableType?"step_group_variable":"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":c[e.type||""]||""})(t),height:24,width:24,hoverEffect:!0})]})};function iv(e){return()=>e}function ov(e){e()}function av(e,t){return n=>e(t(n))}function lv(e,t){return()=>e(t)}function cv(e){return void 0!==e}function sv(){}function dv(e,t){return t(e),e}function uv(e,t){return t(e)}function fv(...e){return e}function hv(e,t){return e(1,t)}function pv(e,t){e(0,t)}function mv(e){e(2)}function Cv(e){return e(4)}function gv(e,t){return hv(e,function(e,t){return n=>e(t,n)}(t,0))}function vv(e,t){const n=e(1,e=>{n(),t(e)});return n}function yv(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function wv(e,t){return e===t}function bv(e=wv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Ev(e){return t=>n=>{e(n)&&t(n)}}function Mv(e){return t=>av(t,e)}function Av(e){return t=>()=>{t(e)}}function xv(e,...t){const n=function(...e){return t=>e.reduceRight(uv,t)}(...t);return(t,r)=>{switch(t){case 2:return void mv(e);case 1:return hv(e,n(r))}}}function kv(e,t){return n=>r=>{n(t=e(t,r))}}function Lv(e){return t=>n=>{e>0?e--:t(n)}}function Hv(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function _v(...e){const t=new Array(e.length);let n=0,r=null;const i=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{const a=Math.pow(2,o);hv(e,e=>{const l=n;n|=a,t[o]=e,l!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{const a=()=>{e([o].concat(t))};n===i?a():r=a}}function Sv(e){let t=e;const n=Ov();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function Vv(e,t){return dv(Sv(t),t=>gv(e,t))}function Ov(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach(e=>{e(n)});case 2:return void e.splice(0,e.length);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function zv(e){return dv(Ov(),t=>gv(e,t))}function Nv(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Iv(),singleton:n}}const Iv=()=>Symbol();function Tv(...e){const t=Ov(),n=new Array(e.length);let r=0;const i=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{const a=Math.pow(2,o);hv(e,e=>{n[o]=e,r|=a,r===i&&pv(t,n)})}),function(e,o){switch(e){case 2:return void mv(t);case 1:return r===i&&o(n),hv(t,o)}}}function Dv(e,t=wv){return xv(e,bv(t))}function jv(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(ov)}}(...e.map(e=>hv(e,n)))}}}var Zv=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Zv||{});const Rv={0:"debug",3:"error",1:"log",2:"warn"},Bv=Nv(()=>{const e=Sv(3);return{log:Sv((t,n,r=1)=>{var i;r>=(null!=(i=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?i:Cv(e))&&console[Rv[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Pv(e,t,n){return Fv(e,t,n).callbackRef}function Fv(e,t,n){const r=i.useRef(null);let o=e=>{};const a=i.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return o=e=>{e&&t?(null==a||a.observe(e),r.current=e):(r.current&&(null==a||a.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function Uv(e,t,n,r,o,a,l,c,s){const d=i.useCallback(n=>{const i=function(e,t,n,r){const i=e.length;if(0===i)return null;const o=[];for(let a=0;a<i;a++){const i=e.item(a);if(void 0===i.dataset.index)continue;const l=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),s=t(i,n);if(0===s&&r("Zero-sized element, this should not happen",{child:i},Zv.ERROR),s===c)continue;const d=o[o.length-1];0===o.length||d.size!==s||d.endIndex!==l-1?o.push({endIndex:l,size:s,startIndex:l}):o[o.length-1].endIndex++}return o}(n.children,t,c?"offsetWidth":"offsetHeight",o);let s=n.parentElement;for(;!s.dataset.virtuosoScroller;)s=s.parentElement;const d="window"===s.lastElementChild.dataset.viewportType;let u;d&&(u=s.ownerDocument.defaultView);const f=l?c?l.scrollLeft:l.scrollTop:d?c?u.scrollX||u.document.documentElement.scrollLeft:u.scrollY||u.document.documentElement.scrollTop:c?s.scrollLeft:s.scrollTop,h=l?c?l.scrollWidth:l.scrollHeight:d?c?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:c?s.scrollWidth:s.scrollHeight,p=l?c?l.offsetWidth:l.offsetHeight:d?c?u.innerWidth:u.innerHeight:c?s.offsetWidth:s.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(f,0),viewportHeight:p}),null==a||a(c?qv("column-gap",getComputedStyle(n).columnGap,o):qv("row-gap",getComputedStyle(n).rowGap,o)),null!==i&&e(i)},[e,t,o,a,l,r,c]);return Fv(d,n,s)}function qv(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zv.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}function Wv(e,t,n){const r=i.useRef(null),o=i.useCallback(n=>{if(null==n||!n.offsetParent)return;const i=n.getBoundingClientRect(),o=i.width;let a,c;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),a=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),a=i.top+e.scrollY}r.current={offsetTop:a,visibleHeight:c,visibleWidth:o},e(r.current)},[e,t]),{callbackRef:a,ref:l}=Fv(o,!0,n),c=i.useCallback(()=>{o(l.current)},[o,l]);return i.useEffect(()=>{var e;if(t){t.addEventListener("scroll",c);const e=new ResizeObserver(()=>{requestAnimationFrame(c)});return e.observe(t),()=>{t.removeEventListener("scroll",c),e.unobserve(t)}}{const t=null==(e=l.current)?void 0:e.ownerDocument.defaultView;return null==t||t.addEventListener("scroll",c),null==t||t.addEventListener("resize",c),()=>{null==t||t.removeEventListener("scroll",c),null==t||t.removeEventListener("resize",c)}}},[c,t,l]),a}const Qv=Nv(()=>{const e=Ov(),t=Ov(),n=Sv(0),r=Ov(),i=Sv(0),o=Ov(),a=Ov(),l=Sv(0),c=Sv(0),s=Sv(0),d=Sv(0),u=Ov(),f=Ov(),h=Sv(!1),p=Sv(!1),m=Sv(!1);return gv(xv(e,Mv(({scrollTop:e})=>e)),t),gv(xv(e,Mv(({scrollHeight:e})=>e)),a),gv(t,i),{deviation:n,fixedFooterHeight:s,fixedHeaderHeight:c,footerHeight:d,headerHeight:l,horizontalDirection:p,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),Gv={lvl:0};function Kv(e,t){const n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]);const o=[];for(let a=1;a<n;a++){const{index:n,value:l}=t(e[a]);o.push({end:n-1,start:r,value:i}),r=n,i=l}return o.push({end:1/0,start:r,value:i}),o}function Yv(e){return e===Gv}function Xv(e,t){if(!Yv(e))return t===e.k?e.v:t<e.k?Xv(e.l,t):Xv(e.r,t)}function Jv(e,t,n="k"){if(Yv(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Jv(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Jv(e.l,t,n)}function $v(e,t,n){return Yv(e)?dy(t,n,1):t===e.k?ay(e,{k:t,v:n}):t<e.k?uy(ay(e,{l:$v(e.l,t,n)})):uy(ay(e,{r:$v(e.r,t,n)}))}function ey(){return Gv}function ty(e,t,n){if(Yv(e))return[];return function(e){return Kv(e,({k:e,v:t})=>({index:e,value:t}))}(iy(e,Jv(e,t)[0],n))}function ny(e,t){if(Yv(e))return Gv;const{k:n,l:r,r:i}=e;if(t===n){if(Yv(r))return i;if(Yv(i))return r;{const[t,n]=sy(r);return oy(ay(e,{k:t,l:ly(r),v:n}))}}return oy(ay(e,t<n?{l:ny(r,t)}:{r:ny(i,t)}))}function ry(e){return Yv(e)?[]:[...ry(e.l),{k:e.k,v:e.v},...ry(e.r)]}function iy(e,t,n){if(Yv(e))return[];const{k:r,l:i,r:o,v:a}=e;let l=[];return r>t&&(l=l.concat(iy(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:a}),r<=n&&(l=l.concat(iy(o,t,n))),l}function oy(e){const{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(cy(t))return fy(ay(e,{lvl:n-1}));if(!Yv(t)&&!Yv(t.r))return ay(t.r,{l:ay(t,{r:t.r.l}),lvl:n,r:ay(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(cy(e))return hy(ay(e,{lvl:n-1}));if(Yv(r)||Yv(r.l))throw new Error("Unexpected empty nodes");{const t=r.l,i=cy(t)?r.lvl-1:r.lvl;return ay(t,{l:ay(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:hy(ay(r,{l:t.r,lvl:i}))})}}function ay(e,t){return dy(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function ly(e){return Yv(e.r)?e.l:oy(ay(e,{r:ly(e.r)}))}function cy(e){return Yv(e)||e.lvl>e.r.lvl}function sy(e){return Yv(e.r)?[e.k,e.v]:sy(e.r)}function dy(e,t,n,r=Gv,i=Gv){return{k:e,l:r,lvl:n,r:i,v:t}}function uy(e){return hy(fy(e))}function fy(e){const{l:t}=e;return Yv(t)||t.lvl!==e.lvl?e:ay(t,{r:ay(e,{l:t.r})})}function hy(e){const{lvl:t,r:n}=e;return Yv(n)||Yv(n.r)||n.lvl!==t||n.r.lvl!==t?e:ay(n,{l:ay(e,{r:n.l}),lvl:t+1})}function py(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function my(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const Cy=Nv(()=>({recalcInProgress:Sv(!1)}),[],{singleton:!0});function gy(e,t,n){return e[vy(e,t,n)]}function vy(e,t,n,r=0){let i=e.length-1;for(;r<=i;){const o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function yy(e,t){return Math.round(e.getBoundingClientRect()[t])}function wy(e){return!Yv(e.groupOffsetTree)}function by({index:e},t){return t===e?0:t<e?-1:1}function Ey({offset:e},t){return t===e?0:t<e?-1:1}function My(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:o}=gy(t,e,by),a=e-r,l=o*a+(a-1)*n+i;return l>0?l+n:l}function Ay(e,t){if(!wy(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function xy(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let r=Ay("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function ky(e,t,n,r=0){return r>0&&(t=Math.max(t,gy(e,r,by).offset)),Kv(function(e,t,n,r){const i=vy(e,t,r),o=vy(e,n,r,i);return e.slice(i,o+1)}(e,t,n,Ey),Sy)}function Ly(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,Zv.DEBUG);const o=e.sizeTree;let a=o,l=0;if(n.length>0&&Yv(o)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>$v($v(t,n,e),n+1,r),a)}else[a,l]=function(e,t){let n=Yv(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),Yv(e)){e=$v(e,0,i);continue}const a=ty(e,o-1,t+1);if(a.some(Vy(r)))continue;let l=!1,c=!1;for(const{end:n,start:r,value:o}of a)l?(t>=r||i===o)&&(e=ny(e,r)):(c=o!==i,l=!0),n>t&&t>=r&&o!==i&&(e=$v(e,t+1,o));c&&(e=$v(e,o,i))}return[e,n]}(a,t);if(a===o)return e;const{lastIndex:c,lastOffset:s,lastSize:d,offsetTree:u}=_y(e.offsetTree,l,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>$v(e,t,My(t,u,i)),ey()),lastIndex:c,lastOffset:s,lastSize:d,offsetTree:u,sizeTree:a}}function Hy(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function _y(e,t,n,r){let i=e,o=0,a=0,l=0,c=0;if(0!==t){c=vy(i,t-1,by),l=i[c].offset;const e=Jv(n,t-1);o=e[0],a=e[1],i.length&&i[c].size===Jv(n,t)[1]&&(c-=1),i=i.slice(0,c+1)}else i=[];for(const{start:e,value:c}of ty(n,t,1/0)){const t=e-o,n=t*a+l+t*r;i.push({index:e,offset:n,size:c}),o=e,l=n,a=c}return{lastIndex:o,lastOffset:l,lastSize:a,offsetTree:i}}function Sy(e){return{index:e.index,value:e}}function Vy(e){const{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Oy={offsetHeight:"height",offsetWidth:"width"},zy=Nv(([{log:e},{recalcInProgress:t}])=>{const n=Ov(),r=Ov(),i=Vv(r,0),o=Ov(),a=Ov(),l=Sv(0),c=Sv([]),s=Sv(void 0),d=Sv(void 0),u=Sv((e,t)=>yy(e,Oy[t])),f=Sv(void 0),h=Sv(0),p={groupIndices:[],groupOffsetTree:ey(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:ey()},m=Vv(xv(n,_v(c,e,h),kv(Ly,p),bv()),p),C=Vv(xv(c,bv(),kv((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Mv(({prev:e})=>e)),[]);gv(xv(c,Ev(e=>e.length>0),_v(m,h),Mv(([e,t,n])=>{const r=e.reduce((e,r,i)=>$v(e,r,My(r,t.offsetTree,n)||i),ey());return{...t,groupIndices:e,groupOffsetTree:r}})),m),gv(xv(r,_v(m),Ev(([e,{lastIndex:t}])=>e<t),Mv(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),gv(s,d);const g=Vv(xv(s,Mv(e=>void 0===e)),!0);gv(xv(d,Ev(e=>void 0!==e&&Yv(Cv(m).sizeTree)),Mv(e=>[{endIndex:0,size:e,startIndex:0}])),n);const v=zv(xv(n,_v(m),kv(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:p}),Mv(e=>e.changed)));hv(xv(l,kv((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Mv(e=>e.diff)),e=>{const{groupIndices:n}=Cv(m);if(e>0)pv(t,!0),pv(o,e+Hy(e,n));else if(e<0){const t=Cv(C);t.length>0&&(e-=Hy(-e,t)),pv(a,e)}}),hv(xv(l,_v(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Zv.ERROR)});const y=zv(o);gv(xv(o,_v(m),Mv(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=Xv(t.sizeTree,0);let o=0,a=0;for(;o<e;){const e=t.groupIndices[a],l=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+l-1,size:i,startIndex:e+1}),a++,o+=l+1}const l=ry(t.sizeTree);return o!==e&&l.shift(),l.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return ry(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);const w=zv(xv(a,_v(m,h),Mv(([e,{offsetTree:t},n])=>My(-e,t,n))));return gv(xv(a,_v(m,h),Mv(([e,t,n])=>{if(t.groupIndices.length>0){if(Yv(t.sizeTree))return t;let r=ey();const i=Cv(C);let o=0,a=0,l=0;for(;o<-e;){l=i[a];const e=i[a+1]-l-1;a++,o+=e+1}if(r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>$v(t,Math.max(0,n+e),r),r),o!==-e){r=$v(r,0,Xv(t.sizeTree,l));r=$v(r,1,Jv(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}{const r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>$v(t,Math.max(0,n+e),r),ey());return{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}})),m),{beforeUnshiftWith:y,data:f,defaultItemSize:d,firstItemIndex:l,fixedItemSize:s,gap:h,groupIndices:c,itemSize:u,listRefresh:v,shiftWith:a,shiftWithOffset:w,sizeRanges:n,sizes:m,statefulTotalCount:i,totalCount:r,trackItemSizes:g,unshiftWith:o}},fv(Bv,Cy),{singleton:!0});function Ny(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const Iy=Nv(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const o=Ov(),a=Ov(),l=zv(xv(o,Mv(Ny)));return gv(xv(l,Mv(e=>e.totalCount)),n),gv(xv(l,Mv(e=>e.groupIndices)),e),gv(xv(Tv(i,t,r),Ev(([e,t])=>wy(t)),Mv(([e,t,n])=>Jv(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),bv(),Mv(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},fv(zy,Qv)),Ty=Nv(([{log:e}])=>{const t=Sv(!1),n=zv(xv(t,Ev(e=>e),bv()));return hv(t,t=>{t&&Cv(e)("props updated",{},Zv.DEBUG)}),{didMount:n,propsReady:t}},fv(Bv),{singleton:!0}),Dy=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function jy(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Dy)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Zy=Nv(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:l,scrollingInProgress:c,scrollTo:s,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=Ov(),p=Ov(),m=Sv(0);let C=null,g=null,v=null;function y(){C&&(C(),C=null),v&&(v(),v=null),g&&(clearTimeout(g),g=null),pv(c,!1)}return gv(xv(h,_v(n,u,r,m,l,a,f),_v(e,o,i),Mv(([[e,n,r,i,o,a,l,s],u,f,m])=>{const w=jy(e),{align:b,behavior:E,offset:M}=w,A=i-1,x=xy(w,n,A);let k=My(x,n.offsetTree,u)+a;"end"===b?(k+=f+Jv(n.sizeTree,x)[1]-r+m,x===A&&(k+=l)):"center"===b?k+=(f+Jv(n.sizeTree,x)[1]-r+m)/2:k-=o,M&&(k+=M);const L=t=>{y(),t?(s("retrying to scroll to",{location:e},Zv.DEBUG),pv(h,e)):(pv(p,!0),s("list did not change, scroll successful",{},Zv.DEBUG))};if(y(),"smooth"===E){let e=!1;v=hv(t,t=>{e=e||t}),C=vv(d,()=>{L(e)})}else C=vv(xv(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),L);return g=setTimeout(()=>{y()},1200),pv(c,!0),s("scrolling from index to",{behavior:E,index:x,top:k},Zv.DEBUG),{behavior:E,top:k}})),s),{scrollTargetReached:p,scrollToIndex:h,topListHeight:m}},fv(zy,Qv,Bv),{singleton:!0});function Ry(e,t){0==e?t():requestAnimationFrame(()=>{Ry(e-1,t)})}function By(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const Py=Nv(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const l=Sv(!0),c=Sv(0),s=Sv(!0);return gv(xv(a,_v(c),Ev(([e,t])=>!!t),Av(!1)),l),gv(xv(a,_v(c),Ev(([e,t])=>!!t),Av(!1)),s),hv(xv(Tv(t,a),_v(l,n,e,s),Ev(([[,e],t,{sizeTree:n},r,i])=>e&&(!Yv(n)||cv(r))&&!t&&!i),_v(c)),([,e])=>{vv(i,()=>{pv(s,!0)}),Ry(4,()=>{vv(r,()=>{pv(l,!0)}),pv(o,e)})}),{initialItemFinalLocationReached:s,initialTopMostItemIndex:c,scrolledToInitialItem:l}},fv(zy,Qv,Zy,Ty),{singleton:!0});function Fy(e,t){return Math.abs(e-t)<1.01}const Uy="up",qy="down",Wy={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Qy=Nv(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{const a=Sv(!1),l=Sv(!0),c=Ov(),s=Ov(),d=Sv(4),u=Sv(0),f=Vv(xv(jv(xv(Dv(i),Lv(1),Av(!0)),xv(Dv(i),Lv(1),Av(!1),yv(100))),bv()),!1),h=Vv(xv(jv(xv(n,Av(!0)),xv(n,Av(!1),yv(200))),bv()),!1);gv(xv(Tv(Dv(i),Dv(u)),Mv(([e,t])=>e<=t),bv()),l),gv(xv(l,Hv(50)),s);const p=zv(xv(Tv(r,Dv(o),Dv(t),Dv(e),Dv(d)),kv((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{const l={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:l}}let c;return c=l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:c,state:l}},Wy),bv((e,t)=>e&&e.atBottom===t.atBottom))),m=Vv(xv(r,kv((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(Fy(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{const i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ev(e=>e.changed),Mv(e=>e.jump)),0);gv(xv(p,Mv(e=>e.atBottom)),a),gv(xv(a,Hv(50)),c);const C=Sv(qy);gv(xv(r,Mv(({scrollTop:e})=>e),bv(),kv((e,t)=>Cv(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?Uy:qy,prevScrollTop:t},{direction:qy,prevScrollTop:0}),Mv(e=>e.direction)),C),gv(xv(r,Hv(50),Av("none")),C);const g=Sv(0);return gv(xv(f,Ev(e=>!e),Av(0)),g),gv(xv(i,Hv(100),_v(f),Ev(([e,t])=>!!t),kv(([e,t],[n])=>[t,n],[0,0]),Mv(([e,t])=>t-e)),g),{atBottomState:p,atBottomStateChange:c,atBottomThreshold:d,atTopStateChange:s,atTopThreshold:u,isAtBottom:a,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:m,scrollDirection:C,scrollVelocity:g}},fv(Qv)),Gy="top",Ky="bottom",Yy="none";function Xy(e,t,n){return"number"==typeof e?n===Uy&&t===Gy||n===qy&&t===Ky?e:0:n===Uy?t===Gy?e.main:e.reverse:t===Ky?e.main:e.reverse}function Jy(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}const $y=Nv(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const o=Ov(),a=Sv(0),l=Sv(0),c=Sv(0),s=Vv(xv(Tv(Dv(r),Dv(i),Dv(n),Dv(o,my),Dv(c),Dv(a),Dv(t),Dv(e),Dv(l)),Mv(([e,t,n,[r,i],o,a,l,c,s])=>{const d=e-c,u=a+l,f=Math.max(n-d,0);let h=Yy;const p=Jy(s,Gy),m=Jy(s,Ky);return r-=c,i+=n+l,(r+=n+l)>e+u-p&&(h=Uy),(i-=c)<e-f+t+m&&(h=qy),h!==Yy?[Math.max(d-n-Xy(o,Gy,h)-p,0),d-f-l+t+Xy(o,Ky,h)+m]:null}),Ev(e=>null!=e),bv(my)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:c,topListHeight:a,visibleRange:s}},fv(Qv),{singleton:!0});const ew={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tw(e,t,n,r,i,o){const{lastIndex:a,lastOffset:l,lastSize:c}=i;let s=0,d=0;if(e.length>0){s=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-a,f=s,h=l+u*c+(u-1)*r-d;return{bottom:d,firstItemIndex:o,items:rw(e,i,o),offsetBottom:h,offsetTop:s,top:f,topItems:rw(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function nw(e,t,n,r,i,o){let a=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-a>=e)break;a++}const l=e+a,c=By(t,l);return tw(Array.from({length:l}).map((e,t)=>({data:o[t+c],index:t+c,offset:0,size:0})),[],l,i,n,r)}function rw(e,t,n){if(0===e.length)return[];if(!wy(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));const r=e[0].index,i=e[e.length-1].index,o=[],a=ty(t.groupOffsetTree,r,i);let l,c=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=a.shift(),c=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:c,type:"group"}:{groupIndex:c,index:r.index-(c+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}const iw=Nv(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:l,visibleRange:c},{initialTopMostItemIndex:s,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:p}])=>{const m=Sv([]),C=Sv(0),g=Ov();gv(o.topItemsIndexes,m);const v=Vv(xv(Tv(h,p,Dv(c,my),Dv(i),Dv(r),Dv(s),d,Dv(m),Dv(t),Dv(n),e),Ev(([e,t,,n,,,,,,,r])=>{const i=r&&r.length!==n;return e&&!t&&!i}),Mv(([,,[e,t],n,r,i,o,a,l,c,s])=>{const d=r,{offsetTree:u,sizeTree:f}=d,h=Cv(C);if(0===n)return{...ew,totalCount:n};if(0===e&&0===t)return 0===h?{...ew,totalCount:n}:nw(h,i,r,l,c,s||[]);if(Yv(f))return h>0?null:tw(function(e,t,n){if(wy(t)){const r=Ay(e,t);return[{index:Jv(t.groupOffsetTree,r)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:r,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(By(i,n),d,s),[],n,c,d,l);const p=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of ty(f,e,t)){const i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)p.push({data:null==s?void 0:s[e],index:e,offset:n,size:i}),n+=i}}if(!o)return tw([],p,n,c,d,l);const m=a.length>0?a[a.length-1]+1:0,g=ky(u,e,t,m);if(0===g.length)return null;const v=n-1,y=dv([],n=>{for(const r of g){const i=r.value;let o=i.offset,a=r.start;const l=i.size;if(i.offset<e){a+=Math.floor((e-i.offset+c)/(l+c));const t=a-r.start;o+=t*l+t*c}a<m&&(o+=(m-a)*l,a=m);const d=Math.min(r.end,v);for(let e=a;e<=d&&!(o>=t);e++)n.push({data:null==s?void 0:s[e],index:e,offset:o,size:l}),o+=l+c}});return tw(y,p,n,c,d,l)}),Ev(e=>null!==e),bv()),ew);gv(xv(e,Ev(cv),Mv(e=>null==e?void 0:e.length)),i),gv(xv(v,Mv(e=>e.topListHeight)),u),gv(u,l),gv(xv(v,Mv(e=>[e.top,e.bottom])),a),gv(xv(v,Mv(e=>e.items)),g);const y=zv(xv(v,Ev(({items:e})=>e.length>0),_v(i,e),Ev(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Mv(([,e,t])=>[e-1,t]),bv(my),Mv(([e])=>e))),w=zv(xv(v,Hv(200),Ev(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Mv(({items:e})=>e[0].index),bv())),b=zv(xv(v,Ev(({items:e})=>e.length>0),Mv(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),bv(py)));return{endReached:y,initialItemCount:C,itemsRendered:g,listState:v,rangeChanged:b,startReached:w,topItemsIndexes:m,...f}},fv(zy,Iy,$y,Py,Zy,Qy,Ty,Cy),{singleton:!0}),ow=Nv(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const o=Ov(),a=Vv(xv(Tv(n,e,r,t,i),Mv(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return gv(Dv(a),o),{totalListHeight:a,totalListHeightChanged:o}},fv(Qv,iw),{singleton:!0}),aw=Nv(([{viewportHeight:e},{totalListHeight:t}])=>{const n=Sv(!1);return{alignToBottom:n,paddingTopAddition:Vv(xv(Tv(n,e,t),Ev(([e])=>e),Mv(([,e,t])=>Math.max(0,e-t)),Hv(0),bv()),0)}},fv(Qv,ow),{singleton:!0}),lw=Nv(()=>({context:Sv(null)})),cw=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:null!=n?n:"start",behavior:r}:e>o?{...i,align:null!=n?n:"end",behavior:r}:null,sw=Nv(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:l,viewportHeight:c},{scrollToIndex:s}])=>{const d=Ov();return gv(xv(d,_v(t,c,n,o,i,r,l),_v(e),Mv(([[e,t,n,r,i,o,l,c],s])=>{const{align:d,behavior:u,calculateViewLocation:f=cw,done:h,...p}=e,m=xy(e,t,r-1),C=My(m,t.offsetTree,s)+i+o,g=f({itemBottom:C+Jv(t.sizeTree,m)[1],itemTop:C,locationParams:{align:d,behavior:u,...p},viewportBottom:c+n-l,viewportTop:c+o});return g?h&&vv(xv(a,Ev(e=>!e),Lv(Cv(a)?1:2)),h):h&&h(),g}),Ev(e=>null!==e)),s),{scrollIntoView:d}},fv(zy,Qv,Zy,iw,Bv),{singleton:!0});function dw(e){return!!e&&("smooth"===e?"smooth":"auto")}const uw=Nv(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:l},{didMount:c,propsReady:s},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const p=Sv(!1),m=Ov();let C=null;function g(e){pv(a,{align:"end",behavior:e,index:"LAST"})}function v(e){const t=vv(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!C&&(Cv(d)("scrolling to bottom due to increased size",{},Zv.DEBUG),g("auto"))});setTimeout(t,100)}hv(xv(Tv(xv(Dv(t),Lv(1)),c),_v(Dv(p),o,l,u),Mv(([[e,t],n,r,i,o])=>{let a=t&&i,l="auto";return a&&(l=((e,t)=>"function"==typeof e?dw(e(t)):t&&dw(e))(n,r||o),a=a&&!!l),{followOutputBehavior:l,shouldFollow:a,totalCount:e}}),Ev(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{C&&(C(),C=null),Cv(n)?requestAnimationFrame(()=>{Cv(d)("following output to ",{totalCount:r},Zv.DEBUG),g(t)}):C=vv(e,()=>{Cv(d)("following output to ",{totalCount:r},Zv.DEBUG),g(t),C=null})}),hv(xv(Tv(Dv(p),t,s),Ev(([e,,t])=>e&&t),kv(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Ev(({refreshed:e})=>e),_v(p,t)),([,e])=>{Cv(l)&&v(!1!==e)}),hv(m,()=>{v(!1!==Cv(p))}),hv(Tv(Dv(p),i),([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&g("auto")});const y=Sv(null),w=Ov();return gv(jv(xv(Dv(r),Mv(e=>{var t;return null!=(t=null==e?void 0:e.length)?t:0})),xv(Dv(t))),w),hv(xv(Tv(xv(w,Lv(1)),c),_v(Dv(y),l,u,f),Mv(([[e,t],n,r,i,o])=>t&&r&&(null==n?void 0:n({context:o,totalCount:e,scrollingInProgress:i}))),Ev(e=>!!e),Hv(0)),t=>{C&&(C(),C=null),Cv(n)?requestAnimationFrame(()=>{Cv(d)("scrolling into view",{}),pv(h,t)}):C=vv(e,()=>{Cv(d)("scrolling into view",{}),pv(h,t),C=null})}),{autoscrollToBottom:m,followOutput:p,scrollIntoViewOnChange:y}},fv(zy,Qy,Zy,Py,Ty,Bv,Qv,lw,sw)),fw=Nv(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:l}])=>(gv(xv(l,_v(o),Ev(([,e])=>0!==e),_v(i,r,t,n,e),Mv(([[,e],t,n,r,i,o=[]])=>nw(e,t,n,r,i,o))),a),{}),fv(zy,Py,iw,Ty),{singleton:!0}),hw=Nv(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Sv(0);return hv(xv(e,_v(r),Ev(([,e])=>0!==e),Mv(([,e])=>({top:e}))),e=>{vv(xv(n,Lv(1),Ev(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{pv(t,e)})})}),{initialScrollTop:r}},fv(Ty,Qv,iw),{singleton:!0}),pw=Nv(([{scrollVelocity:e}])=>{const t=Sv(!1),n=Ov(),r=Sv(!1);return gv(xv(e,_v(r,t,n),Ev(([e,t])=>!!t),Mv(([e,t,n,r])=>{const{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),bv()),t),hv(xv(Tv(t,e,n),_v(r)),([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},fv(Qy),{singleton:!0}),mw=Nv(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ov(),r=Ov(),i=Ov(),o=Sv(!1),a=Sv(void 0);return gv(xv(Tv(n,r),Mv(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),gv(xv(t,_v(r),Mv(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},fv(Qv)),Cw=Nv(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:l,windowViewportRect:c}])=>{const s=Ov(),d=Sv(void 0),u=Sv(null),f=Sv(null);return gv(l,u),gv(c,f),hv(xv(s,_v(t,r,a,u,f,n)),([e,t,n,r,i,o,a])=>{const l=function(e){return ry(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:i?i.k-1:1/0,size:t,startIndex:e}})}(t.sizeTree);r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:l,scrollTop:n-=a})}),gv(xv(d,Ev(cv),Mv(gw)),i),gv(xv(o,_v(d),Ev(([,e])=>void 0!==e),bv(),Mv(([,e])=>e.ranges)),e),{getState:s,restoreStateFrom:d}},fv(zy,Qv,Py,Ty,mw));function gw(e){return{align:"start",index:0,offset:e.scrollTop}}const vw=Nv(([{topItemsIndexes:e}])=>{const t=Sv(0);return gv(xv(t,Ev(e=>e>=0),Mv(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},fv(iw));function yw(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const ww=yw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),bw=Nv(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:l},{listState:c},{beforeUnshiftWith:s,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:p}])=>{const m=zv(xv(c,_v(a),kv(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},l])=>{const c=r+o;let s=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(s=c-n,0!==s&&(s+=l))),[s,i,a,c]},[0,[],0,0]),Ev(([e])=>0!==e),_v(r,l,n,i,h,p),Ev(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===Uy),Mv(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},Zv.DEBUG),e))));function C(n){n>0?(pv(t,{behavior:"auto",top:-n}),pv(e,0)):(pv(e,0),pv(t,{behavior:"auto",top:-n}))}return hv(xv(m,_v(e,o)),([t,n,r])=>{r&&ww()?pv(e,n-t):C(-t)}),hv(xv(Tv(Vv(o,!1),e,p),Ev(([e,t,n])=>!e&&!n&&0!==t),Mv(([e,t])=>t),Hv(1)),C),gv(xv(u,Mv(e=>({top:-e}))),t),hv(xv(s,_v(f,d),Mv(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function o(e){return e*(n+i)}if(0===t.length)return o(e);{let n=0;const i=Xv(r,0);let a=0,l=0;for(;a<e;){a++,n+=i;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;a+r>e&&(n-=i,r=e-a+1),a+=r,n+=o(r),l++}return n}})),n=>{pv(e,n),requestAnimationFrame(()=>{pv(t,{top:n}),requestAnimationFrame(()=>{pv(e,0),pv(p,!1)})})}),{deviation:e}},fv(Qv,Qy,iw,zy,Bv,Cy)),Ew=Nv(([e,t,n,r,i,o,a,l,c,s,d])=>({...e,...t,...n,...r,...i,...o,...a,...l,...c,...s,...d}),fv($y,fw,Ty,pw,ow,hw,aw,mw,sw,Bv,lw)),Mw=Nv(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:i,groupIndices:o,itemSize:a,sizeRanges:l,sizes:c,statefulTotalCount:s,totalCount:d,trackItemSizes:u},{initialItemFinalLocationReached:f,initialTopMostItemIndex:h,scrolledToInitialItem:p},m,C,g,{listState:v,topItemsIndexes:y,...w},{scrollToIndex:b},E,{topItemCount:M},{groupCounts:A},x])=>(gv(w.rangeChanged,x.scrollSeekRangeChanged),gv(xv(x.windowViewportRect,Mv(e=>e.visibleHeight)),m.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:i,groupCounts:A,initialItemFinalLocationReached:f,initialTopMostItemIndex:h,scrolledToInitialItem:p,sizeRanges:l,topItemCount:M,topItemsIndexes:y,totalCount:d,...g,groupIndices:o,itemSize:a,listState:v,scrollToIndex:b,statefulTotalCount:s,trackItemSizes:u,...w,...x,...m,sizes:c,...C}),fv(zy,Py,Qv,Cw,uw,iw,Zy,bw,vw,Iy,Ew));function Aw(e,t){const n={},r={};let i=0;const o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(const e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}const xw=typeof document<"u"?i.useLayoutEffect:i.useEffect;function kw(t,n,r){const o=Object.keys(n.required||{}),a=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),c=Object.keys(n.events||{}),s=i.createContext({});function d(e,t){e.propsReady&&pv(e.propsReady,!1);for(const r of o){pv(e[n.required[r]],t[r])}for(const r of a)if(r in t){pv(e[n.optional[r]],t[r])}e.propsReady&&pv(e.propsReady,!0)}function u(e){return c.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>null==t?void 0:t();return function(i,o){switch(i){case 1:return o?n===o?void 0:(r(),n=o,t=hv(e,o),t):(r(),sv);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef((f,h)=>{const{children:p,...m}=f,[C]=i.useState(()=>dv(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:o})=>{if(o&&t.has(i))return t.get(i);const a=e(r.map(e=>n(e)));return o&&t.set(i,a),a};return n(e)}(t),e=>{d(e,m)})),[g]=i.useState(lv(u,C));xw(()=>{for(const e of c)e in m&&hv(g[e],m[e]);return()=>{Object.values(g).map(mv)}},[m,g,C]),xw(()=>{d(C,m)}),i.useImperativeHandle(h,iv(function(e){return l.reduce((t,r)=>(t[r]=t=>{pv(e[n.methods[r]],t)},t),{})}(C)));const v=r;return e(s.Provider,{value:C,children:r?e(v,{...Aw([...o,...a,...c],m),children:p}):p})});return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(s)[e];xw(()=>hv(n,t),[t,n])},useEmitterValue:i.version.startsWith("18")?e=>{const t=i.useContext(s)[e],n=i.useCallback(e=>hv(t,e),[t]);return i.useSyncExternalStore(n,()=>Cv(t),()=>Cv(t))}:e=>{const t=i.useContext(s)[e],[n,r]=i.useState(lv(Cv,t));return xw(()=>hv(t,e=>{e!==n&&r(iv(e))}),[t,n]),n},usePublisher:e=>{const t=i.useContext(s);return i.useCallback(n=>{pv(t[e],n)},[t,e])}}}const Lw=i.createContext(void 0),Hw=i.createContext(void 0),_w=typeof document<"u"?i.useLayoutEffect:i.useEffect;function Sw(e){return"self"in e}function Vw(e,t,n,r=sv,o,a){const l=i.useRef(null),c=i.useRef(null),s=i.useRef(null),d=i.useCallback(n=>{let r,i,o;const l=n.target;if(function(e){return"body"in e}(l)||Sw(l)){const e=Sw(l)?l:l.defaultView;o=a?e.scrollX:e.scrollY,r=a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a?e.innerWidth:e.innerHeight}else o=a?l.scrollLeft:l.scrollTop,r=a?l.scrollWidth:l.scrollHeight,i=a?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync?d():M.flushSync(d),null!==c.current&&(o===c.current||o<=0||o===r-i)&&(c.current=null,t(!0),s.current&&(clearTimeout(s.current),s.current=null))},[e,t,a]);return i.useEffect(()=>{const e=o||l.current;return r(o||l.current),d({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",d,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",d)}},[l,d,n,r,o]),{scrollByCallback:function(e){a&&(e={behavior:e.behavior,left:e.top}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(a?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let o,d,u;Sw(r)?(d=Math.max(yy(r.document.documentElement,a?"width":"height"),a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),o=a?r.innerWidth:r.innerHeight,u=a?window.scrollX:window.scrollY):(d=r[a?"scrollWidth":"scrollHeight"],o=yy(r,a?"width":"height"),u=r[a?"scrollLeft":"scrollTop"]);const f=d-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),Fy(o,d)||n.top===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:o}),void(i&&t(!0));i?(c.current=n.top,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,c.current=null,t(!0)},1e3)):c.current=null,a&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}}}const Ow="-webkit-sticky",zw="sticky",Nw=yw(()=>{if(typeof document>"u")return zw;const e=document.createElement("div");return e.style.position=Ow,e.style.position===Ow?Ow:zw});function Iw(e){return e}const Tw=Nv(()=>{const e=Sv(e=>`Item ${e}`),t=Sv(e=>`Group ${e}`),n=Sv({}),r=Sv(Iw),i=Sv("div"),o=Sv(sv),a=(e,t=null)=>Vv(xv(n,Mv(t=>t[e]),bv()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:i,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),Dw=Nv(([e,t])=>({...e,...t}),fv(Mw,Tw)),jw=({height:t})=>e("div",{style:{height:t}}),Zw={overflowAnchor:"none",position:Nw(),zIndex:1},Rw={overflowAnchor:"none"},Bw={...Rw,display:"inline-block",height:"100%"},Pw=i.memo(function({showTopList:t=!1}){const n=ob("listState"),r=ab("sizeRanges"),o=ob("useWindowScroll"),a=ob("customScrollParent"),l=ab("windowScrollContainerState"),c=ab("scrollContainerState"),s=a||o?l:c,d=ob("itemContent"),u=ob("context"),f=ob("groupContent"),h=ob("trackItemSizes"),p=ob("itemSize"),C=ob("log"),g=ab("gap"),v=ob("horizontalDirection"),{callbackRef:y}=Uv(r,p,h,t?sv:s,C,g,a,v,ob("skipAnimationFrameInResizeObserver")),[w,b]=i.useState(0);ib("deviation",e=>{w!==e&&b(e)});const E=ob("EmptyPlaceholder"),M=ob("ScrollSeekPlaceholder")||jw,A=ob("ListComponent"),x=ob("ItemComponent"),k=ob("GroupComponent"),L=ob("computeItemKey"),H=ob("isSeeking"),_=ob("groupIndices").length>0,S=ob("alignToBottom"),V=ob("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==w?w:S?"auto":0,paddingLeft:n.offsetTop,paddingRight:n.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==w?w:S?"auto":0,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...V?{}:{visibility:"hidden"}};return!t&&0===n.totalCount&&E?e(E,{...Qw(E,u)}):e(A,{...Qw(A,u),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:O,children:(t?n.topItems:n.items).map(e=>{const t=e.originalIndex,r=L(t+n.firstItemIndex,e.data,u);return H?m(M,{...Qw(M,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?m(k,{...Qw(k,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Zw},f(e.index,u)):m(x,{...Qw(x,u),...Gw(x,e.data),"data-index":t,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:v?Bw:Rw},_?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})})}),Fw={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Uw={outline:"none",overflowX:"auto",position:"relative"},qw=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Ww={position:Nw(),top:0,width:"100%",zIndex:1};function Qw(e,t){if("string"!=typeof e)return{context:t}}function Gw(e,t){return{item:"string"==typeof e?void 0:t}}const Kw=i.memo(function(){const t=ob("HeaderComponent"),n=ab("headerHeight"),r=ob("HeaderFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,ob("skipAnimationFrameInResizeObserver")),a=ob("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),Yw=i.memo(function(){const t=ob("FooterComponent"),n=ab("footerHeight"),r=ob("HeaderFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,ob("skipAnimationFrameInResizeObserver")),a=ob("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null});function Xw({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:o,context:a,...l}){const c=r("scrollContainerState"),s=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:m}=Vw(c,d,s,u,void 0,f);return t("scrollTo",m),t("scrollBy",h),e(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...f?Uw:Fw,...o},tabIndex:0,...l,...Qw(s,a),children:i})})}function Jw({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:o,style:a,context:l,...c}){const s=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),p=n("customScrollParent"),m=i.useRef(null),C=n("scrollerRef"),{scrollByCallback:g,scrollerRef:v,scrollToCallback:y}=Vw(s,u,d,C,p);return _w(()=>{var e;return v.current=p||(null==(e=m.current)?void 0:e.ownerDocument.defaultView),()=>{v.current=null}},[v,p]),t("windowScrollTo",y),t("scrollBy",g),e(d,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...0!==f?{height:f+h}:{}},...c,...Qw(d,l),children:o})})}const $w=({children:t})=>{const n=i.useContext(Lw),r=ab("viewportHeight"),o=ab("fixedItemHeight"),a=ob("alignToBottom"),l=ob("horizontalDirection"),c=Pv(i.useMemo(()=>av(r,e=>yy(e,l?"width":"height")),[r,l]),!0,ob("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),o(n.itemHeight))},[n,r,o]),e("div",{"data-viewport-type":"element",ref:c,style:qw(a),children:t})},eb=({children:t})=>{const n=i.useContext(Lw),r=ab("windowViewportRect"),o=ab("fixedItemHeight"),a=ob("customScrollParent"),l=Wv(r,a,ob("skipAnimationFrameInResizeObserver")),c=ob("alignToBottom");return i.useEffect(()=>{n&&(o(n.itemHeight),r({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:100}))},[n,r,o]),e("div",{"data-viewport-type":"window",ref:l,style:qw(c),children:t})},tb=({children:t})=>{const n=ob("TopItemListComponent")||"div",r=ob("headerHeight"),i={...Ww,marginTop:`${r}px`},o=ob("context");return e(n,{style:i,...Qw(n,o),children:t})},nb=i.memo(function(t){const r=ob("useWindowScroll"),i=ob("topItemsIndexes").length>0,o=ob("customScrollParent"),a=ob("context");return n(o||r?cb:lb,{...t,context:a,children:[i&&e(tb,{children:e(Pw,{showTopList:!0})}),n(o||r?eb:$w,{children:[e(Kw,{}),e(Pw,{}),e(Yw,{})]})]})}),{Component:rb,useEmitter:ib,useEmitterValue:ob,usePublisher:ab}=kw(Dw,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},nb),lb=Xw({useEmitter:ib,useEmitterValue:ob,usePublisher:ab}),cb=Jw({useEmitter:ib,useEmitterValue:ob,usePublisher:ab}),sb=rb,db=Nv(()=>{const e=Sv(e=>n("td",{children:["Item $",e]})),t=Sv(null),r=Sv(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=Sv(null),o=Sv(null),a=Sv({}),l=Sv(Iw),c=Sv(sv),s=(e,t=null)=>Vv(xv(a,Mv(t=>t[e]),bv()),t);return{components:a,computeItemKey:l,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:o,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:s("Scroller","div"),scrollerRef:c,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr"),GroupComponent:s("Group","tr")}});fv(Mw,db),Nw();const ub={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},fb={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:hb,floor:pb,max:mb,min:Cb,round:gb}=Math;function vb(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function yb(e,t){return e&&e.width===t.width&&e.height===t.height}function wb(e,t){return e&&e.column===t.column&&e.row===t.row}const bb=Nv(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:l,scrollTo:c,scrollTop:s,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:p,propsReady:m},{customScrollParent:C,useWindowScroll:g,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w},b])=>{const E=Sv(0),M=Sv(0),A=Sv(ub),x=Sv({height:0,width:0}),k=Sv({height:0,width:0}),L=Ov(),H=Ov(),_=Sv(0),S=Sv(null),V=Sv({column:0,row:0}),O=Ov(),z=Ov(),N=Sv(!1),I=Sv(0),T=Sv(!0),D=Sv(!1),j=Sv(!1);hv(xv(p,_v(I),Ev(([e,t])=>!!t)),()=>{pv(T,!1)}),hv(xv(Tv(p,T,k,x,I,D),Ev(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{pv(D,!0),Ry(1,()=>{pv(L,e)}),vv(xv(s),()=>{pv(t,[0,0]),pv(T,!0)})}),gv(xv(z,Ev(e=>null!=e&&e.scrollTop>0),Av(0)),M),hv(xv(p,_v(z),Ev(([,e])=>null!=e)),([,e])=>{e&&(pv(x,e.viewport),pv(k,e.item),pv(V,e.gap),e.scrollTop>0&&(pv(N,!0),vv(xv(s,Lv(1)),e=>{pv(N,!1)}),pv(c,{top:e.scrollTop})))}),gv(xv(x,Mv(({height:e})=>e)),u),gv(xv(Tv(Dv(x,yb),Dv(k,yb),Dv(V,(e,t)=>e&&e.column===t.column&&e.row===t.row),Dv(s)),Mv(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),gv(xv(Tv(Dv(E),r,Dv(V,wb),Dv(k,yb),Dv(x,yb),Dv(S),Dv(M),Dv(N),Dv(T),Dv(I)),Ev(([,,,,,,,e])=>!e),Mv(([e,[t,n],r,i,o,a,l,,c,s])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:p}=o;if(0===l&&(0===e||0===p))return ub;if(0===h){const t=By(s,e);return function(e){return{...fb,items:e}}(vb(t,t+Math.max(l-1,0),a))}const m=Eb(p,h,d);let C,g;c?0===t&&0===n&&l>0?(C=0,g=l-1):(C=m*pb((t+u)/(f+u)),g=m*hb((n+u)/(f+u))-1,g=Cb(e-1,mb(g,m-1)),C=Cb(g,mb(0,C))):(C=0,g=-1);const v=vb(C,g,a),{bottom:y,top:w}=Mb(o,r,i,v),b=hb(e/m);return{bottom:y,itemHeight:f,items:v,itemWidth:h,offsetBottom:b*f+(b-1)*u-y,offsetTop:w,top:w}})),A),gv(xv(S,Ev(e=>null!==e),Mv(e=>e.length)),E),gv(xv(Tv(x,k,A,V),Ev(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Mv(([e,t,{items:n},r])=>{const{bottom:i,top:o}=Mb(e,r,t,n);return[o,i]}),bv(my)),t);const Z=Sv(!1);gv(xv(s,_v(Z),Mv(([e,t])=>t||0!==e)),Z);const R=zv(xv(Tv(A,E),Ev(([{items:e}])=>e.length>0),_v(Z),Ev(([[e,t],n])=>{const r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),Mv(([[,e]])=>e-1),bv())),B=zv(xv(Dv(A),Ev(({items:e})=>e.length>0&&0===e[0].index),Av(0),bv())),P=zv(xv(Dv(A),_v(N),Ev(([{items:e},t])=>e.length>0&&!t),Mv(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),bv(py),Hv(0)));gv(P,h.scrollSeekRangeChanged),gv(xv(L,_v(x,k,E,V),Mv(([e,t,n,r,i])=>{const o=jy(e),{align:a,behavior:l,offset:c}=o;let s=o.index;"LAST"===s&&(s=r-1),s=mb(0,s,Cb(r-1,s));let d=Ab(t,i,n,s);return"end"===a?d=gb(d-t.height+n.height):"center"===a&&(d=gb(d-t.height/2+n.height/2)),c&&(d+=c),{behavior:l,top:d}})),c);const F=Vv(xv(A,Mv(e=>e.offsetBottom+e.bottom)),0);return gv(xv(w,Mv(e=>({height:e.visibleHeight,width:e.visibleWidth}))),x),{customScrollParent:C,data:S,deviation:_,footerHeight:i,gap:V,headerHeight:o,increaseViewportBy:e,initialItemCount:M,itemDimensions:k,overscan:n,restoreStateFrom:z,scrollBy:a,scrollContainerState:l,scrollHeight:H,scrollTo:c,scrollToIndex:L,scrollTop:s,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:g,viewportDimensions:x,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w,...h,gridState:A,horizontalDirection:j,initialTopMostItemIndex:I,totalListHeight:F,...f,endReached:R,propsReady:m,rangeChanged:P,startReached:B,stateChanged:O,stateRestoreInProgress:N,...b}},fv($y,Qv,Qy,pw,Ty,mw,Bv));function Eb(e,t,n){return mb(1,pb((e+n)/(pb(t)+n)))}function Mb(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const o=Ab(e,t,n,r[0].index);return{bottom:Ab(e,t,n,r[r.length-1].index)+i,top:o}}function Ab(e,t,n,r){const i=Eb(e.width,n.width,t.column),o=pb(r/i),a=o*n.height+mb(0,o-1)*t.row;return a>0?a+t.row:a}const xb=Nv(()=>{const e=Sv(e=>`Item ${e}`),t=Sv({}),n=Sv(null),r=Sv("virtuoso-grid-item"),i=Sv("virtuoso-grid-list"),o=Sv(Iw),a=Sv("div"),l=Sv(sv),c=(e,n=null)=>Vv(xv(t,Mv(t=>t[e]),bv()),n),s=Sv(!1),d=Sv(!1);return gv(Dv(d),s),{components:t,computeItemKey:o,context:n,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:c("Item","div"),itemContent:e,listClassName:i,ListComponent:c("List","div"),readyStateChanged:s,reportReadyState:d,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),kb=Nv(([e,t])=>({...e,...t}),fv(bb,xb)),Lb=i.memo(function(){const t=Nb("gridState"),n=Nb("listClassName"),r=Nb("itemClassName"),o=Nb("itemContent"),a=Nb("computeItemKey"),l=Nb("isSeeking"),c=Ib("scrollHeight"),s=Nb("ItemComponent"),d=Nb("ListComponent"),u=Nb("ScrollSeekPlaceholder"),f=Nb("context"),h=Ib("itemDimensions"),p=Ib("gap"),C=Nb("log"),g=Nb("stateRestoreInProgress"),v=Ib("reportReadyState"),y=Pv(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;c(t);const n=e.firstChild;if(n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}p({column:jb("column-gap",getComputedStyle(e).columnGap,C),row:jb("row-gap",getComputedStyle(e).rowGap,C)})},[c,h,p,C]),!0,!1);return _w(()=>{t.itemHeight>0&&t.itemWidth>0&&v(!0)},[t]),g?null:e(d,{className:n,ref:y,...Qw(d,f),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(n=>{const i=a(n.index,n.data,f);return l?e(u,{...Qw(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):m(s,{...Qw(s,f),className:r,"data-index":n.index,key:i},o(n.index,n.data,f))})})}),Hb=i.memo(function(){const t=Nb("HeaderComponent"),n=Ib("headerHeight"),r=Nb("headerFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,!1),a=Nb("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),_b=i.memo(function(){const t=Nb("FooterComponent"),n=Ib("footerHeight"),r=Nb("headerFooterTag"),o=Pv(i.useMemo(()=>e=>{n(yy(e,"height"))},[n]),!0,!1),a=Nb("context");return t?e(r,{ref:o,children:e(t,{...Qw(t,a)})}):null}),Sb=({children:t})=>{const n=i.useContext(Hw),r=Ib("itemDimensions"),o=Ib("viewportDimensions"),a=Pv(i.useMemo(()=>e=>{o(e.getBoundingClientRect())},[o]),!0,!1);return i.useEffect(()=>{n&&(o({height:n.viewportHeight,width:n.viewportWidth}),r({height:n.itemHeight,width:n.itemWidth}))},[n,o,r]),e("div",{ref:a,style:qw(!1),children:t})},Vb=({children:t})=>{const n=i.useContext(Hw),r=Ib("windowViewportRect"),o=Ib("itemDimensions"),a=Nb("customScrollParent"),l=Wv(r,a,!1);return i.useEffect(()=>{n&&(o({height:n.itemHeight,width:n.itemWidth}),r({offsetTop:0,visibleHeight:n.viewportHeight,visibleWidth:n.viewportWidth}))},[n,r,o]),e("div",{ref:l,style:qw(!1),children:t})},Ob=i.memo(function({...t}){const r=Nb("useWindowScroll"),i=Nb("customScrollParent"),o=i||r?Db:Tb,a=i||r?Vb:Sb,l=Nb("context");return e(o,{...t,...Qw(o,l),children:n(a,{children:[e(Hb,{}),e(Lb,{}),e(_b,{})]})})}),{useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib}=kw(kb,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Ob),Tb=Xw({useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib}),Db=Jw({useEmitter:zb,useEmitterValue:Nb,usePublisher:Ib});function jb(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Zv.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}const Zb=({optionsList:r=[],onSelectVariable:i,dropdownPosition:o,position:a="relative",width:l,height:c="160px",zIndex:s=9999})=>{const d={LOCAL:"local_variable_icon",GLOBAL:"global_variable_icon",PROJECT_ENVIRONMENT:"project_env_variable_icon"},u=e=>{if(!e)return"";const t=e._id||e.id;return t?.startsWith("PARAMETER")?"step_group_parameter":"STEPGROUP"!==e?.parentVariableType||"LOCAL"!==e.type&&"STEPGROUP"!==e?.type?"_startforloop"===e.type?"for_loop_variable":"DATAPROVIDER"===e.type?"data_provider_variable":d[e.type||""]||"":"step_group_variable"},f=e=>"_startforloop"===e?.type?`FLV_for:${e?.name}`:"DATAPROVIDER"===e?.type?`${e?.dpName}:${e?.varname}`:e?.name;function h(e){if(e.endsWith("px")){const t=parseInt(e.slice(0,-2),10);return isNaN(t)?212:t-66}return 212}return e("div",{className:z("ff-variable-dropdown",a),style:o?{top:o.top+30,left:o.left-30,width:l,height:c,zIndex:s}:{width:l,height:c,zIndex:s},children:G(r)?e("div",{className:"ff-variable-option ff-variable-option-no-data",children:e(F,{as:"span",fontSize:12,children:"No Option"})}):e(sb,{totalCount:r.length,itemContent:o=>{const a=r[o];return a?e("div",{className:"ff-variable-data",onMouseDown:()=>i(a),children:l.endsWith("px")?n(t,{children:[e(K,{title:oe(f(a),h(l),"pixel")?f(a):"",style:{width:`${h(l)}px`},children:e(F,{as:"span",fontSize:12,className:"ff-truncated_text",children:f(a)})}),e(P,{name:u(a),height:24,width:24,hoverEffect:!0})]}):e(rv,{option:a})},`${a.id}-${o}`):null},style:{height:c,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},Rb=({data:r=[],width:i,height:o,lineChartWidth:a,yAxisLabel:c,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:p,textSize:m,fontWeight:C,numberSize:g,chartName:v,shouldCenterSinglePoint:y,xAxisLabelGap:w=16,isLeftOverflow:b=!1})=>{const E=40,M=i-80,A=o-80,[x,k]=s(!1),[L,H]=s({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{k(!1),H(e=>({...e,tooltip:{...e.tooltip,visible:!1}}))};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[]);if(!(r&&r.length>0&&r?.some(e=>Array.isArray(e?.data)&&e?.data?.length>0))){const t=[];for(let e=6;e>=0;e--){const n=new Date;n.setDate(n.getDate()-e);const r=n?.toLocaleDateString("en-US",{day:"numeric",month:"short"});t.push(r)}const r=1024,a=6,l=7;return n("div",{className:"ff-line-chart-text",style:{width:i+20+w,gap:w},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:o},children:e(F,{className:"ff-line-chart-yAxisLabel",fontSize:m,fontWeight:"semi-bold",children:c})}),e("div",{className:"ff-line-chart-svg",children:e("svg",{height:o,width:i,className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:A,x2:M,y2:A,stroke:f,strokeWidth:1}),e("text",{x:M/2.1,y:A+E/1.2,textAnchor:"middle",fill:p,className:"ff-line-chart-x-axis-label",style:{fontSize:m,fontWeight:C},children:d}),t.map((t,n)=>e("text",{x:n*(M/(l-1)),y:A+15,textAnchor:0===n?"start":n===l-1?"end":"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:t},t)),Array.from({length:a}).map((t,n)=>{const i=n*r/(a-1),o=i/1024;return e("text",{x:-10,y:A-i*A/r,textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:o?.toFixed(1)},`y-${n}`)})]})})})]})}function _(e){if(!isNaN(e))return parseFloat(e);const t=at,n=e.match(t);if(!n)throw new Error("Invalid input format. Use '<value> <unit>' format (e.g., '10.9580078125 KB') or just a number.");const r=parseFloat(n[1]);switch(n[2]?n[2].toUpperCase():null){case"GB":return parseFloat((1024*r).toFixed(2));case"MB":return parseFloat(r.toFixed(2));case"KB":return parseFloat((r/1024).toFixed(2));default:throw new Error("Invalid unit. Supported units are GB, MB, and KB.")}}const S=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),V="date",O=S?"totalMemory":"value",z=e=>{const t=r?.[0]?.data?.length;if(1===t)return y?M/2:M;const n=r[0].data.findIndex(t=>t[V]===e);return-1===n?0:n/(t-1)*M},N=Math.max(...r?.flatMap(e=>e?.data?.map(e=>_(e[O]))),5),I=e=>{if("memory"===v){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>_(e[O]))));return A-e*A/(t>1024?t:1024)}return A-e*A/(0===N?1024:N)},T=e=>{if(1===e?.length){const t=e?.[0],n=z(t[V]),r=I(_(t[O]));return`M 0 ${I(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[V]),o=I(_(n[O]));if(0===r)return`M ${i} ${o}`;const a=e[r-1],l=a?z(a[V]):0;return`${t} C ${l+(i-l)/2} ${a?I(_(a[O])):0}, ${i-(i-l)/2} ${o}, ${i} ${o}`},"")},D=r[0].data;return n("div",{className:"ff-line-chart-text",style:{width:i+20+w,gap:w},children:[e("div",{className:"ff-line-chart-yAxisLabel-warpper",style:{height:o},children:e(F,{className:"ff-line-chart-yAxisLabel",fontSize:m,fontWeight:"semi-bold",children:c})}),n("div",{className:"ff-line-chart-svg",children:[e("svg",{height:o,width:i,onMouseMove:e=>{const t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.left-E;if(e.clientY-t.top-E>A)return k(!1),void H({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});let i={hoverValues:{},dotPositions:{}},o=null;r.forEach((e,t)=>{const r=e.data.reduce((e,t)=>{const r=Math.abs(n-z(t[V]));return r<e.distance?{point:t,distance:r}:e},{point:null,distance:1/0}).point;r&&(o=r[V],i.hoverValues[t]=((e,t=2)=>{let n="";if("string"==typeof e){const t=e.match(rt),r=e.match(it);t&&(e=parseFloat(t[0])),r&&(n=r[0])}const r=Math.pow(10,t);return`${Math.ceil(e*r)/r} ${n}`.trim()})(r[O]),i.dotPositions[t]={x:z(r[V]),y:I(_(r[O]))})}),k(!0),H({cursorX:n,hoverValues:i.hoverValues,dotPositions:i.dotPositions,currentXValue:o,tooltip:o?{visible:!0,left:e.clientX+10,top:e.clientY-20}:{visible:!1,left:0,top:0}})},onMouseLeave:()=>H({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null}),className:"ff-line-chart-svg",children:n("g",{transform:"translate(40, 40)",children:[e("line",{x1:0,y1:0,x2:0,y2:A,strokeWidth:2}),e("line",{x1:0,y1:A,x2:M,y2:A,stroke:f,strokeWidth:1}),e("text",{x:M/2.1,y:A+E/1.2,textAnchor:"middle",fill:p,className:"ff-line-chart-x-axis-label",style:{fontSize:m,fontWeight:C},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:T(r.data),fill:"none",stroke:r.color,strokeWidth:a,opacity:(o=r.data,o.every(e=>0===_(e[O]))?.5:1)}),L.dotPositions[i]&&n(t,{children:[e("line",{x1:L.dotPositions[i].x,y1:0,x2:L.dotPositions[i].x,y2:A,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:L.dotPositions[i].x,cy:L.dotPositions[i].y,r:5,fill:"white",stroke:r.color,strokeWidth:a,style:{transition:"cx 0.1s, cy 0.1s"}}),e("line",{x1:0,y1:L.dotPositions[i].y,x2:M,y2:L.dotPositions[i].y,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"})]})]},i):null;var o}),(()=>{if(1===D.length){const t=D?.[0];return e("text",{x:y?M/2:M,y:A+15,textAnchor:y?"middle":"end",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=t[V]?String(t[V]):""},String(t[V]))}if(D.length<7)return D.map(t=>e("text",{x:z(t[V]),y:A+15,textAnchor:"middle",fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=t[V]?String(t[V]):""},String(t[V])));{const t=(i-80-7*9.2)/6;return Array.from({length:7}).map((n,r)=>{const i=Math.floor(r*(D?.length-1)/6),o=D[i];return e("text",{x:r*t,y:A+15,fill:h,className:"ff--line-chart-x-line-data",style:{fontSize:g},children:null!=o?.[V]?String(o?.[V]):""},String(o?.[V]))})}})(),(()=>{if("memory"===v){const t=Math.max(N,1024);return Array.from({length:6}).map((n,r)=>{const i=r*t/5,o=i/1024;return e("text",{x:-10,y:I(i),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:o.toFixed(1)},`y-${r}`)})}return Array.from({length:6}).map((t,n)=>{const r=n*N/5;return e("text",{x:-10,y:I(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:r.toFixed(0)},`y-${n}`)})})()]})}),x&&L.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",style:{left:b&&L.tooltip.left/2>i/1.75?L.tooltip.left-180:L.tooltip.left,top:L.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:L.currentXValue}),Object.entries(L.hoverValues).map(([t,i])=>!1!==r[Number(t)]?.show&&n("div",{className:"ff-line-chart-inner-tooltip",children:["default"!==r[Number(t)]?.name&&e("div",{className:"ff-line-chart-status-dot",style:{backgroundColor:r[Number(t)]?.color}}),r[Number(t)]?.name,": ",i]},t))]})]})]})},Bb=({onClose:t,top:r="100px",left:i="0px",className:o,description:a="Download and Install the fireflink client to run the script",onClick:c=()=>{},optionZIndex:s=10000001})=>{l(()=>{const e=e=>{"Escape"===e.key&&t?.()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t]);return n("div",{className:`ff-download-client-wrapper ${o}`,style:{top:r,left:i,zIndex:s},children:[n("div",{className:"ff-download-client-header-wrapper",children:[e("div",{className:"ff-download-client-hollow-triangle"}),e(F,{fontWeight:"semi-bold",lineHeight:"32px",className:"ff-download-client-header-text",children:"Download client"}),e(P,{name:"close",color:"var(--brand-color)",className:"ff-download-client-close-icon",height:12,width:12})]}),n("div",{className:"ff-download-client-content-text",children:[e(F,{as:"div",color:"var(--download-client-content-text-color)",fontWeight:"semi-bold",textAlign:"center",lineHeight:"26px",children:a}),e(F,{as:"div",className:"ff-download-client-description-text",textAlign:"center",fontWeight:"medium",lineHeight:"26px",children:"Choose OS to Download"}),e("div",{className:"ff-download-client-os-wrapper",children:["windows","mac_icon","linux"].map(t=>e("div",{className:"ff-os-version-wrapper",onClick:()=>{c("mac_icon"===t?"mac":t)},children:e(P,{name:t,height:36,width:36})},t))})]})]})},Pb=({legendName:t,height:r,width:i,children:o})=>e("div",{className:"ff_fieldSet_container",children:n("fieldset",{className:"ff_fieldSet",style:{height:r,width:i},children:[e("legend",{className:"ff_legend_container",children:e(F,{color:"var(--license_header_text_color)",fontSize:8,lineHeight:"12px",children:t})}),e("div",{className:"ff_children_container",children:o})]})}),Fb=({onSelectVariable:t,dropdownPosition:n,filteredOptions:r=[],position:i="relative",width:o="100%",zIndex:a,truncateTextValue:l=34})=>e("div",{className:z(`ff-variable-dropdown-container ${i}`),style:n?{top:n.top+30,left:n.left-30,width:o,zIndex:a}:{width:o,zIndex:a},children:G(r)?e("div",{className:"ff-variable-option no-data",children:e(F,{as:"div",children:"No Option",fontSize:14})}):r?.map(n=>e("div",{className:"ff-variable-option",onMouseDown:()=>t(n),children:e(K,{title:oe(n?.name,l,"pixel")?n?.name:"",children:e(F,{children:ie(n?.name,l,"pixel")})})},n?.id))}),Ub=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],placeholder:c="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:p="",dropdownWidth:m="100%",dropdownHeight:C="160px",isHash:g=!1,isOnlyHash:v=!1,dataFiles:y=[],showAddVariableIcon:w=!0,helperText:E="",error:M,autoComplete:A="off",required:x=!1,zIndex:k=9999,truncateTextValue:L=34,formProps:H={},getSelectedVariable:_=()=>{},symbol:S="$",type:V="text",clearIcon:O=!0,inputTitle:N="",onBlur:I,helperTextWidth:T,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...j},Z)=>{const[R,B]=s(!1),[U,q]=s(!1),[W,Q]=s(!1),[Y,X]=s(null),[J,$]=s(0),[ee,te]=s(!1),[ne,re]=s([]),ie=a(null),oe=a(null),[ae,le]=s("auto"),ce=D?.isShowIcon;l(()=>{const e=oe.current?.querySelector(".ff-input-container");if(!e)return;const t=new ResizeObserver(e=>{for(let t of e){const e=`${t.contentRect.width}px`;le(e)}});return t.observe(e),()=>{t.disconnect()}},[]),b(Z,()=>ie.current),l(()=>{null!==Y&&ie.current&&(ie.current.setSelectionRange(Y,Y),ie.current.focus())},[Y]),l(()=>{g&&B(p.startsWith("#"));const e=y?.find(e=>e.name===p),t=o?.find(e=>e?.name===p);if(p.startsWith("#")&&g){const e=p.slice(1).toLowerCase(),t=y.filter(t=>t.name.toLowerCase().includes(e));re(t),B(!0)}const n=null!==e&&p.startsWith("#"),r=null!==t&&p.startsWith("$"),i=p.length>(t?.name.length||0),a=p.length>0&&!r||p.startsWith("#");v?te(!1):r||n||p.includes("$")||p.includes("#")?(te(!1),a&&te(!0)):i&&!p.includes("$")&&te(!0)},[p]);const se=()=>{ie.current&&$(ie.current.selectionStart||0)},de=se,ue=se;l(()=>{ie.current&&$(ie.current.selectionStart||0)},[p]);const fe=e=>{if(ie.current){const{selectionStart:t,selectionEnd:n}=ie.current,r=`${e.name}`;let o;if(o=g&&"#"===p[0]?e.name+p.slice(n||1):e.name,d){d({target:{value:o}},e),_(e.name)}ie.current.value=o,i?.(e),X((t||0)+r.length),B(!1),q(!0)}};const he=function(e,t,n){let r=!1,i="";const o="}"===p[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf(S,t-1),l=e.indexOf(S,t);if(-1!==a&&(v&&"$"===e[a]?r=!1:t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),U&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>e.name.toLowerCase().includes(i.toLowerCase()))||(n=[])}return{showDropdown:r,searchString:i}}(p,J,o),pe=()=>o?.filter(e=>e?.name?.toLowerCase()?.includes(he?.searchString?.toLowerCase()));return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",ref:oe,children:[n(K,{title:N,style:{width:"100%"},children:[e(en,{...j,name:"add_variable",ref:ie,type:V,className:z("ff-variable-input-container",{"ff-variable-input-container--show-icon":ce}),value:p,onChange:d,onPaste:()=>{te(!0)},variant:"primary",label:t,placeholder:c,onClick:de,onKeyUp:ue,onFocus:()=>Q(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||Q(!1)})(e),I?.(e)},autoComplete:A,helperText:E,error:M,required:x,helperTextWidth:T,...H}),!G(p)&&ee&&w&&e("div",{className:"ff-create-variable-container",onClick:f,children:e(F,{fontWeight:"regular",fontSize:"10px",color:"var(--brand-color)",children:"Create Variable"})})]}),!G(p)&&!v&&e("div",{className:z("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":ce}),children:O&&e(K,{title:"Cancel",style:{zIndex:99999},children:e(P,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),ce&&e("div",{className:"ff-info-icon-container",children:e(K,{title:ce&&!D?.isIconDisable?D?.iconToolTipTitle:"",children:e(P,{name:D?.iconName||"",hoverEffect:!1,height:16,width:16,color:D?.iconColor||"var(--text-area-default-color)",onClick:e=>{D?.onIconClick&&D?.onIconClick(e)},disabled:D?.isIconDisable,cursorType:"pointer"})})})]}),he?.showDropdown&&W&&e(Zb,{position:"absolute",zIndex:k,truncateTextValue:L,width:ae,height:G(pe())?"auto":C,optionsList:pe(),onSelectVariable:fe}),R&&g&&W&&e(Fb,{position:"relative",zIndex:k,truncateTextValue:L,width:ae,filteredOptions:ne,onSelectVariable:fe})]})}),qb=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:o,onValueChange:a,variableName:c,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:p,handleSubmit:m,mode:C="create",disabled:g,dataFiles:v=[],truncateTextValue:y=34,isEnterKeySubmit:w=!1})=>{const[b,E]=s(!1),[M,A]=s(""),[x,k]=s(),[L,H]=s(!1),[_,S]=s(!1),[V,O]=s({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===C&&O({name:c,value:d,isChecked:h})},[]);const z=e=>e&&0!==e.length?" "===e[0]||" "===e[e.length-1]?"Space is not allowed at starting and at the end":Ee.test(e)?e.length<3?"Name should contain at least 3 characters":e.length>25?"Name can contain at most 25 characters":"":"Name should be alphanumeric":"Variable Name is required";function N(e){const t=!!e,n=Ee.test(e),r=Vt.test(e),i=e.length>=3&&e.length<=25;return t&&n&&r&&i}l(()=>{const e=z(c);E(!!e),A(e)},[c]),l(()=>{if("edit"!==C)return;const{name:e,value:t,isChecked:n}=V;S(c!==e||d!==t||h!==n)},[C,c,d,h,V]);const I=()=>{!L&&N(c)&&(H(!0),m())};l(()=>{if(!w)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!N(c)||L||"edit"===C&&!_||I()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[w,c,d,h,L,C,_,f]);return e(X,{zIndex:1350,onClose:i,isOpen:t,title:"create"===C?"Create Variable":"Edit Variable",width:"284px",height:"280px",top:"30%",right:8,isFooterRequired:!0,overlay:!0,footerContent:e(()=>n("div",{className:"ff-create-slider-footer",children:[e(U,{onClick:i,label:"Cancel",variant:"tertiary"}),e(U,{variant:"primary",label:"create"===C?"Create":"Update",type:"submit",onClick:I,disabled:!N(c)||L||"edit"===C&&!_})]}),{}),children:n("div",{className:"ff-create-variable-slider",children:[e("div",{className:"ff-create-variable-slider-input",children:e(en,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:c||"",onChange:e=>{H(!1),o(e.target.value)},error:b,helperText:M,onBlur:e=>{const t=e.target.value,n=z(t);E(!!n),A(n)}})}),e(ir,{label:"Variable Type",required:!0,onChange:e=>{u(e),H(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===C}),e(Ub,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:y,dataFiles:v,dropdownWidth:"100%",setHashInputValue:k,hashInputValue:x||{},value:d||"",type:h?"password":"text",onChange:(e,t)=>{const n=e.target.value;a(n,t)},showAddVariableIcon:!1}),n("div",{className:"ff-hide-value-content",children:[e(te,{onChange:e=>p(e.target.checked),name:"hideValue",label:"Hide Value",checked:h,disabled:g}),e(K,{title:"Once the value is hidden, it cannot be undone",children:e(P,{name:"info",width:12,height:12})})]})]})})},Wb=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:o="row",noDataContent:a,height:l="100%",withFixedHeader:c=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,p]=s(-1),m=(e,t)=>{let n=e[t.accessor];return t.cell?t.cell({value:n,row:e,column:t.accessor}):t.accessor||n&&"object"!=typeof n?n:"--"},C=t=>{const n=t.map((t,n)=>e("table",{className:"ff-accordion-table",cellSpacing:0,children:e("tbody",{className:"ff-table-body",children:e("tr",{className:"ff-table-row",children:r.map((n,r)=>e("td",{className:"ff-table-cell",style:{width:n.width},children:"column"===o&&0===r?"":e(F,{children:m(t,n)})},n.accessor+r))},t.id||n)})},`accordion-table-${n}`));return n};return n("div",{style:{height:l},className:z("ff-accordion-table-container",{"ff-accordion-fixed-header-table":c}),children:[e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":c}),children:e("thead",{children:e("tr",{className:"ff-table-row",children:r.map(t=>e("th",{style:{width:t.width},className:z("ff-table-header",d&&`ff-accordion-table--${d}-bg`),children:e("div",{children:e(F,{fontWeight:"semi-bold",fontSize:12,children:t.header})})},`header-${t.header}`))})})}),"row"===o&&i.map((n,r)=>e($,{highlightText:t,headerTitle:n.title,color:"var(--text-color)",accordionContent:C(n.data),disable:n.disable,disableInfoMessage:n.disableInfoMessage,accordionStateIconName:"arrows_down_icon",AccordionStateIconWidth:u,AccordionStateIconHeight:f},`accordion-row-${r}`)),"column"===o&&i.map((i,o)=>n("div",{className:"column-table-accordion",children:[e("div",{className:"ff-display-flex",children:e(K,{title:i.disable?i?.disableInfoMessage:"string"==typeof i.title&&oe(i.title,r[0]?.width,"pixel")?i.title:"",placement:"bottom-start",children:n("div",{className:`accordion-header ${i.disable&&"accordion-header--disabled"}`,children:[e("div",{className:"header-title",children:e("span",{children:e(F,{children:e(J,{text:ie(i.title,r[0]?.width,"pixel"),highlight:t})})})}),e("div",{className:"accordion-arrow",onClick:()=>{!i.disable&&(e=>{p(e===h?-1:e)})(o)},children:e(P,{name:h===o?"arrows_down_icon":"arrows_right_icon",color:"var(--table-with-accordion-icon-color)",width:u,height:f,hoverEffect:!1})})]})})}),h===o&&e("div",{children:C(i.data)})]},`column-accordion-${o}`)),i.length<=0&&e("div",{className:"no-data-content",style:{height:`calc(${l} - 50px)`},children:a})]})},Qb=({progressPercentage:t,totalMemory:r,usedMemory:i,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:l=10,label:c,labelFontSize:s=12,labelTextColor:d="var(--ff-card-status-text-color)",showPercentage:u=!1,percentageFontSize:f=10,percentageTextColor:h="var(--tooltip-text-color)",progressBarWidth:p="200px"})=>{const m=e=>{const t=e.trim().toLowerCase();if("0"===t)return 0;const n=t.match(/^(\d+(?:\.\d+)?)\s*(kb|mb|gb)$/);if(!n||!n[1])return 0;const r=parseFloat(n[1]),i=n[2];return"gb"===i?1024*r:"kb"===i?r/1024:r};let C=0,g=c;if(void 0!==r&&void 0!==i){const e=m(i),t=m(r);t>0?(C=e/t*100,g=c||i):(C=0,g="0MB")}else C=t||0;const v=Math.max(0,Math.min(C,100));return n("div",{className:"ff-progress-bar-container "+(g?"ff-has-label":""),style:{width:p},children:[e("div",{className:"ff-progress-bar-track",style:{backgroundColor:a,height:`${l}px`},children:e("div",{className:"ff-progress-bar",style:{width:`${v}%`,backgroundColor:o,height:`${l}px`},children:u&&e(F,{className:"ff-progress-bar-percentage",fontSize:f,color:h,children:`${Math.round(v)}%`})})}),g&&e("div",{className:"ff-progress-bar-label",children:e(F,{fontSize:s,color:d,children:e(K,{title:oe(g,10,"count")?g:"",children:ie(g,10,"count")})})})]})},Gb=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:o=!1,type:l="button",className:c="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:p="auto",buttonHeight:m="auto",selectedFile:C={},handleCloseIcon:g,isMandatory:v=!1})=>{const y=a(null),[w,b]=s(0);u(()=>{y.current&&b(y.current.getBoundingClientRect().width-10)},[p]);const E=C?.name||i,M=w?ie(E,w,"pixel"):E,A=!!w&&oe(E,w,"pixel");return e("div",{ref:y,style:{width:p},children:e(K,{title:A?E:"",children:e(U,{variant:t,label:M,type:l,onClick:r,buttonWidth:p,buttonHeight:m,isChooseFile:h,size:n,disabled:o,className:c,iconName:f,style:d,iconPosition:"right",selectedFile:C,handleCloseIcon:g,isMandatory:v})})})},Kb=({selected:t="text",handleClick:r,tabList:i})=>{const o=i?.includes("Automation"),a=i?.includes("Manual");return n("div",{className:"ff-script-switch-container",children:[e(K,{title:o?"Automation":"Add Automation",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Automation"===t?"active":""),onClick:()=>r(o?"Automation":"Add Automation"),children:e(P,{name:o?"automation_testcase":"add_testcase",color:"Automation"===t?"var(--primary-button-text-color)":"var(--description-text)"})})}),e(K,{title:a?"Manual":"Add Manual",zIndex:1e3,children:e("div",{className:"ff-script-switch-button "+("Manual"===t?"active":""),onClick:()=>r(a?"Manual":"Add Manual"),children:e(P,{name:a?"manual_testcase":"add_testcase",color:"Manual"===t?"var(--primary-button-text-color)":"var(--description-text)"})})})]})},Yb=({selected:t,handleClick:n,tabList:r})=>e("div",{className:"ff-switch-container",children:r.map(r=>e(K,{title:t===r.name?null:r.tooltip,zIndex:1e3,children:e("div",{className:"ff-switch-button "+(t===r.name?"active":""),onClick:()=>n(r.name),children:e(P,{name:r.icon,color:t===r.name?"var(--primary-button-text-color)":"var(--description-text)"})})},r.name))}),Xb=({onModalClose:t,MediaSrc:r,fileName:o,onDeleteClick:a,mediaType:c,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:p,isMediaIcon:m=!1,previewOnly:C=!1,iconName:g="video_preview",isDisabled:v=!1})=>{const[y,w]=s(!1),b=i.useRef(null),E=()=>{w(!0),h&&h(d)},M=()=>{t?.(),w(!1)},A=()=>{p&&p(d)};return l(()=>{C&&w(!0)},[C]),n("div",{children:[!C&&(m?e(P,{name:g,hoverEffect:!0,onClick:E,disabled:v}):e(tv,{mediaSrc:r,mediaType:c,onDownloadClick:A,onDeleteClick:()=>a?.(r),onExpandClick:E,fileName:o,fileId:d,thumbnailMediaSrc:u,isDelete:f})),y&&e(Vf,{isOpen:y,onClose:M,isFooterDisplayed:!1,isHeaderDisplayed:!1,customWidth:"1130px",customHeight:"570px",zIndex:1e4,children:n("div",{className:"media-wrapper",children:[n("div",{className:"ff-expand-icons",children:[e(K,{title:"Download File",children:e(P,{name:"download_file_icon",onClick:A,color:"var(--icons-default-color)",className:"header-icons"})}),e(K,{title:"Expand",children:e(P,{name:"expand",onClick:E,color:"var(--icons-default-color)",className:"header-icons"})}),e(K,{title:"close",children:e(P,{name:"close",onClick:M,color:"var(--icons-default-color)",className:"header-icons"})})]}),"image"===c&&e("img",{src:r,alt:"fileName",height:"auto",width:"auto"}),"video"===c&&e("video",{src:r,controls:!0,controlsList:"nodownload",className:"ff-video-preview",ref:b,onCanPlay:()=>{if(b.current){const e=b.current.play();void 0!==e&&e.catch(e=>{console.error("Autoplay failed:",e)})}}})]})})]})},Jb=({children:t,orientation:r="",navBarIcons:o=[],mobileHeight:a=448,mobileWidth:l=220,UtilityBar:c,tooltip:s={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?a:l,p=f?l:a,m=c&&"top"===u,C=c&&"bottom"===u,g=c&&"left"===u;return n("div",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",g?"ff-side-nav-left":"",m?"navbar-top":"",C?"navbar-bottom":""].filter(Boolean).join(" "),children:[m&&e("div",{className:"ff-nav-bar top-nav-bar",children:o.map(({title:t,name:n,className:r,...i},a)=>{const l=s?.[n]??a;return e(K,{title:s?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${a===o.length-1?"last-icon":""} ${m?"navbar-top":""}`,children:e(P,{name:n,...i})})},l)})}),e("div",{className:"ff-mobileskin-container",style:{height:h+16,width:p+16},children:e("div",{className:"ff-mobile-container",style:{width:p,height:h,background:d||"transparent"},children:e("div",{className:"ff-mobile-image-container",children:i.isValidElement(t)?t:e("img",{src:t,alt:"Mobile content",style:{width:f?"100%":2.1*l+"px",height:f?"100%":.5*a+"px"}})})})}),c&&C&&e("div",{className:"ff-nav-bar",children:o?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-nav-bar-icon ${t?.className||""} ${n===o.length-1?"last-icon":""}`,children:e(K,{title:r,children:e(P,{...i})})},n)})}),c&&g&&e("div",{className:"ff-side-nav-bar",children:o?.map((t,n)=>{const{title:r,...i}=t;return e("div",{className:`ff-sidebar ${t?.className||""} ${n===o.length-1?"last-icon":""}`,children:e(K,{title:r,placement:"bottom",children:e(P,{...i})})},n)})})]})},$b=o(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:o=16,placeholder:l="Enter text",iconName:c="right_arrow_filled_icon",iconPosition:s="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:p="send",submitPrompt:m,onPromptChange:C,onBlur:g,onFocus:v,disableInput:y,isAdditionalIcon:w=!1,additionalIconName:b,additionIconToolTip:E,onAdditionalIconClick:M},A)=>{const x=a(null);se([{key:"Enter",action:()=>k()}],x);const k=e=>{f&&m?.(f.trim())};return n("div",{className:z("ff-prompt-container",{"icon-left":"left"===s,"icon-right":"left"!==s}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:x,children:[e(K,{placement:"top",title:p,children:e(P,{name:c,className:"ff-prompt-icon",height:i,width:o,onClick:m,color:h,disabled:G(f)})}),e("input",{ref:A,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:C,onFocus:v,onBlur:g,value:f,readOnly:y}),w&&b&&e(K,{placement:"top",title:E,children:e(P,{name:b,className:"ff-prompt-icon additional-icon",height:i,width:o,onClick:M})})]})}),eE=({content:t,isVisible:n,maxWidth:r=300,onClick:i,isClickable:o=!0,arrowPosition:a="left"})=>e("div",{onClick:i,style:{width:`${r}px`,"--triangle-position":r-4+"px"},className:z("ff-chat-msg-box",{visible:n,hidden:!n,pointer:o,default:!o,"chat-arrow-left":"left"===a,"chat-arrow-right":"left"!==a}),children:e("div",{className:z("content",`arrow-${a}`),children:e(F,{children:t})})}),tE=({iconName:r,iconPosition:{top:i,left:o,bottom:a,right:l},hoverIconPosition:{top:c,left:d,bottom:u,right:f},modalPosition:{top:h,left:p,bottom:m,right:C},modalWidth:g,modalHeight:v,headerContent:y="Header Content",footerContent:w="Footer Content",iconWidth:b,iconHeight:E,modalHeading:M="Ask Fia",children:x,onClearChat:k})=>{const[L,H]=s(!1),[_,S]=s(!1);return n(t,{children:[n("div",{style:{top:void 0!==i?`${i}px`:void 0,left:void 0!==o?`${o}px`:void 0,bottom:void 0!==a?`${a}px`:void 0,right:void 0!==l?`${l}px`:void 0},className:"ff-dynamic-icon-container",children:[e(P,{className:"ff-dynamic-icon",name:r,onClick:()=>{S(e=>!e),setTimeout(()=>H(e=>!e),10)},height:E,width:b}),e("div",{style:{top:void 0!==c?`${c}px`:void 0,left:void 0!==d?`${d}px`:void 0,bottom:void 0!==u?`${u}px`:void 0,right:void 0!==f?`${f}px`:void 0},className:"ff-chat-icon-hover",children:e(P,{name:"ask_fia_icon",height:32,width:82})})]}),_&&A(e("div",{className:z("ff-dynamic-modal",{open:L}),style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==p?`${p}px`:void 0,bottom:void 0!==m?`${m}px`:void 0,right:void 0!==C?`${C}px`:void 0,position:"fixed",height:v,width:g},children:n("div",{className:"ff-dynamic-modal-content",children:[y&&e("div",{className:"ff-dynamic-modal-header",children:n("div",{className:"header-container",children:[n("div",{className:"header-left",children:[e(P,{height:16,width:16,name:"fia_icon"}),e(F,{fontWeight:"medium",children:M})]}),n("div",{className:"header-right",children:[e("span",{className:"action",children:e(K,{title:"Clear chat",placement:"bottom",children:e(P,{height:16,width:16,name:"delete",color:"var(--tooltip-text-color)",onClick:k})})}),e("span",{className:"action",children:e(K,{title:"Close",placement:"bottom",children:e(P,{height:16,width:16,name:"close",color:"var(--tooltip-text-color)",onClick:()=>(H(!1),void setTimeout(()=>S(!1),300))})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:x}),w&&e("div",{className:"ff-dynamic-modal-footer",children:w})]})}),document.body)]})},nE=o(({iconName:r,hoverTitle:i,iconPosition:{top:o,left:c,bottom:d,right:u},hoverIconPosition:{top:f,left:h,bottom:p,right:m},modalPosition:{top:C,left:g,bottom:v,right:y},modalWidth:w,modalHeight:E,headerContent:M="Header Content",footerContent:x="Footer Content",iconWidth:k,iconHeight:L,children:H,onVisibilityChange:_},S)=>{const[V,O]=s(!1),[N,I]=s(!1),T=a(null),D=()=>{T.current&&clearTimeout(T.current),O(!1),T.current=setTimeout(()=>{I(!1),_?.(!1)},300)};return b(S,()=>({closeModal:D})),l(()=>()=>{T.current&&clearTimeout(T.current)},[]),n(t,{children:[n("div",{style:{top:void 0!==o?`${o}px`:void 0,left:void 0!==c?`${c}px`:void 0,bottom:void 0!==d?`${d}px`:void 0,right:void 0!==u?`${u}px`:void 0},className:"ff-ai-dynamic-icon-container",children:[e(P,{className:"ff-ai-dynamic-icon",name:r,onClick:()=>{T.current&&clearTimeout(T.current),I(e=>!e),_?.(!N),T.current=setTimeout(()=>O(e=>!e),10)},height:L,width:k}),e("div",{style:{top:void 0!==f?`${f}px`:void 0,left:void 0!==h?`${h}px`:void 0,bottom:void 0!==p?`${p}px`:void 0,right:void 0!==m?`${m}px`:void 0},className:"ff-ai-chat-icon-hover",children:e("div",{className:"ai-hover-leaf",children:e(F,{fontWeight:"bold",fontSize:14,color:"var(--chatbot-leaf-text)",children:i})})})]}),N&&A(e("div",{className:z("ff-ai-dynamic-modal",{open:V}),style:{top:void 0!==C?`${C}px`:void 0,left:void 0!==g?`${g}px`:void 0,bottom:void 0!==v?`${v}px`:void 0,right:void 0!==y?`${y}px`:void 0,position:"fixed",height:E,width:w},children:n("div",{className:"ff-ai-dynamic-modal-content",children:[M&&e("div",{className:"ff-ai-dynamic-modal-header",children:M}),e("div",{className:"ff-ai-dynamic-modal-body",children:H}),x&&e("div",{className:"ff-ai-dynamic-modal-footer",children:x})]})}),document.body)]})}),rE=({variant:t,title:r,tabTitle:i,comment:o,profileShortName:a})=>n("div",{className:"ff-history-card",children:[e("div",{className:z("header",`header--${t}`),children:e(F,{fontWeight:"semi-bold",children:i})}),n("div",{className:"body",children:[e("div",{className:"title",children:n("div",{className:"profile",children:[e(F,{className:z("avatar",`avatar--${t}`),children:a}),e(F,{children:r})]})}),n("div",{className:"comment-container",children:[e(F,{fontWeight:"semi-bold",className:"heading",children:"Comments:"}),e(F,{color:"var(--details-page-value-color)",className:"comment",children:o})]})]})]}),iE=({onChange:t,disabled:r,checked:i=!1,id:o="toggle",path:a})=>n("div",{className:"ff--ai-switch-container",children:[e("input",{className:"ff--ai-switch-checkbox",id:`ff-toggle-${o}`,type:"checkbox",disabled:!!r,onChange:e=>{t&&t(e)},checked:i}),e("label",{className:z("ff--ai-switch-label",{"ff--ai-switch-label--disabled":r}),htmlFor:`ff-toggle-${o}`,children:e("span",{className:"ff--ai-switch-content",children:n("span",{className:"ff--ai-switch-content",children:[e(F,{className:z("ff--ai-switch-typography",{left:i,right:!i}),as:"div",fontWeight:"bold",fontSize:18,color:i?"var(--base-bg-color)":"var(--ff-ai-toggle-text-color)",children:"AI"}),e("img",{className:"ff--ai-switch-image",src:a,alt:"AI image"})]})})})]}),oE=o(({name:t,height:n=30,width:r=30,path:i="",onClick:o,color:c="var(--brand-color)",hoverEffect:s=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:p,y:m,tabIndex:C=-1,...g},v)=>{if(!B[t])return null;const y=a(null);l(()=>{y.current&&(void 0!==p&&y.current.setAttribute("x",String(p)),void 0!==m&&y.current.setAttribute("y",String(m)))},[p,m]);const w={ref:v,onClick:u?void 0:o,style:{height:`${n}px`,width:`${r}px`,cursor:u?"not-allowed":"pointer",opacity:u?.3:1},tabIndex:C,...g};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:""})})}),aE=({id:r=0,serialNumber:i,activeId:o,setActiveId:c,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:p,onPreviousClick:m,disabled:C,isEditAccess:g,versionsLength:v,count:y,hiddenActions:w=[]})=>{const[b,E]=s(!1),[M,A]=s(!1),x=a(null),k=Array.isArray(w)?w:w?[w]:[],L=(e,t)=>{e.stopPropagation(),t()};l(()=>{x.current&&(()=>{if(x.current){const e=getComputedStyle(x.current),t=1.2*parseFloat(e.fontSize)*6;x.current.scrollHeight>t&&A(!0)}})()},[]);const H=e=>{e.stopPropagation(),E(!b)};return n("div",{className:`ff-prompt-container-Block ${o===r?"active":"inactive"} `,onClick:()=>{c(r),h()},children:[e(F,{fontSize:8,className:"ff-prompt-number-bg-color",as:"span",children:`Test cases ${i}`}),n(t,{children:[n("div",{className:"ff-prompt-content "+(b?"expanded":""),ref:x,children:[d,b&&n(t,{children:[e("span",{role:"button","aria-label":"toggleExpand",onClick:H,className:"read-less-btn",children:e(F,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read Less"})})," "]})]}),M&&!b&&e("div",{role:"button","aria-label":"toggleExpand",onClick:H,className:"read-more-btn",children:e(F,{color:"var(--brand-color)",fontWeight:"semi-bold",className:"read-more-btn-text",children:"Read More"})})]}),n("div",{className:"ff-prompt-icons",children:[e("div",{className:"ff-prompt-icons-leftside",children:[{action:"delete",title:"Delete",color:"var(--ff-delete-button-attachment)"},{action:"edit",title:"Edit",color:"var(--label-edit-text-label-color)"},{action:"regenerate",title:"Regenerate",color:"var(--label-edit-text-label-color)"}].filter(e=>!k.includes(e.action)).map((t,n)=>{const r=g&&"delete"===t?.action||"regenerate"===t?.action&&(v??0)>=3||C;return e(K,{title:t.title,placement:"bottom",children:e(P,{disabled:r,name:t.action,color:t.color,hoverEffect:!0,onClick:e=>((e,t)=>{e.stopPropagation(),u(t)})(e,t.action)})},`${t?.title}-${n}`)})}),n("div",{className:"ff-prompt-icons-rightside",children:[e(P,{disabled:1===y,className:"ff-prompt-icons-style",name:"arrow_left_accordian",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>L(e,m)}),f,e(P,{disabled:y===v,className:"ff-prompt-icons-style",name:"arrow_right_icon",color:"var(--table-column-text-color)",width:18,height:18,onClick:e=>L(e,p)})]})]})]})},lE=o(({type:t="text",variant:r="primary",name:i="",label:o,disabled:a=!1,disableLinkIcon:l=!1,required:c=!1,placeholder:s="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:p="",onChange:m,onBlur:C,onFocus:g,autoComplete:v="off",autoFocus:y=!1,minValue:w=-1/0,maxValue:b=1/0,transparentBackground:E=!1,size:M="small",isLabelRequired:A=!0,onClick:x,onKeyUp:k,isViewMode:L=!1,...H},_)=>{const S=!G(d);return n("fieldset",{className:z("ff-link-input-fieldset",{"ff-link-input-fieldset--disabled":a}),children:[n("div",{className:z("ff-link-input-container",{"ff-link-input-container--float":S,"ff-link-input-container--disabled":!!a}),children:[A&&n("label",{className:z(`ff-link-input-label-container ff-link-input-label-container--${M}`,{"ff-link-input-label-container--danger":!!u}),htmlFor:i,children:[c&&e("span",{className:"required-asterisk",children:"*"}),e("span",{className:z(`ff-link-input-label ff-link-input-label--${r}`,{"ff-link-input-label--no-hover":!!d,"ff-link-input-label--disabled":!!a,"ff-link-input-label--danger":!!u}),children:o})]}),e("input",{ref:_,name:i,value:d,type:t,spellCheck:!1,id:i,className:z(`ff-link-input ff-link-input-${r} default-input ff-link-input--${M}`,{"ff-link-input--transparentBackground":!!E,"ff-link-input--no-hover":!!d,"ff-link-input--disabled":!!a,"ff-link-input--danger":!!u,"ff-link-input--no-border":!!h,"ff-link-input--placeholder":!A},`${p}`),placeholder:s,disabled:L||a,onChange:m,onFocus:g,onBlur:C,autoComplete:v,autoFocus:y,min:w,max:b,onClick:x,onKeyUp:k,...H}),e("div",{className:"input-link-icon",children:l||u||!S?e(P,{name:"link",disabled:!0}):e(K,{title:"Click here to navigate",children:e("span",{children:e(P,{name:"link",disabled:!1,onClick:()=>{d&&!u&&window.open(d,"_blank")}})})})})]}),f&&u&&e("span",{className:z("ff-link-input-message",{"ff-link-input-message--danger":!!u}),children:f})]})}),cE=({labelsList:r=[]})=>{const i=e("div",{className:"ff-chip-tooltip",children:r.filter((e,t)=>t>0).map((t,n)=>e(F,{as:"div",className:"ff-chip-tooltip-label",children:t},`label-${n}-${t}`))});return e(t,{children:!G(r)&&n("div",{className:"ff-chip-with-count-container",children:[e(K,{title:r[0],children:e(F,{as:"div",children:ie(r[0]||"",10),className:"ff-chip-label",fontWeight:"medium"})}),r.length>1&&e(K,{title:e(F,{as:"div",children:i}),children:e(F,{as:"div",children:"+"+(r.length-1),className:"ff-chip-count",fontWeight:"medium"})})]})})};class sE extends E{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t)}render(){return this.state.hasError?this.props.fallback:this.props.children}}const dE=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:o="To Add Group",disableButton:a=!1,stepCount:l=1,iconWidth:c=120,iconHeight:s=120,addContentLabel:d="step"})=>n("div",{className:"add-content-button "+(a?"disabled":""),children:[!G(t)&&e("div",{className:"icon-container",children:e(P,{name:t,width:c,height:s})}),n("div",{className:"typography-label-button",children:[n(F,{fontSize:"12px",fontWeight:"regular",lineHeight:"18px",children:[d+l," :"]}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:"Click"}),e(Sf,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:a}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:o})]})]}),uE=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:o,noBorder:a=!1,noPadding:l=!1,titleSize:c="12px"})=>{const[d,u]=s(0);return n("div",{className:"ff-tabs-slider-container",children:[n("div",{className:z(`ff-tab-row--${t} ff-tab-row-section`,{"ff-tab-row--no-border":a,"ff-tab-row--no-padding":l,"ff-tab-row--position":r.length>4}),children:[r.length>4&&e(P,{className:"ff-tab-icon ff-tab-icon--previous",name:""+(d?"arrow_left_accordian":""),onClick:()=>{d>0&&u(e=>e-1)},hoverEffect:!0}),e("div",{className:"ff-tab-row-carousel",children:e("div",{className:"carousel_inner",style:{transform:`translateX(-${100*d}%)`},children:r.map(r=>n("button",{onClick:()=>!r.disabled&&o(r.id),disabled:r.disabled,className:z(`ff-tab-button--${t}`,{disabled:r.disabled,active:i===r.id}),style:{flex:"0 0 25%"},children:[n("div",{className:"label-count-section",children:[e(K,{title:r.label.length>9?r.label:"",children:e(F,{children:r.label.length>9?r.label.slice(0,9)+"...":r.label,fontSize:c,lineHeight:"18px",fontWeight:i===r.id?"semi-bold":"regular",color:i===r.id?"var(--tabs-label-active-color)":"var(--tabs-label-default-color)",className:z("ff-tab-label",{"ff-tab-label--active":i===r.id})})}),"default"===t&&r.count&&e("span",{className:z("tab-count",{"tab-count--active":i===r.id}),children:r.count})]}),e("div",{className:z("ff-tab-bar",{"ff-tab-bar--active":i===r.id})}),e("span",{className:"ff-defaultStatus "+("success"===r.status?"ff-successStatus":"error"===r.status?"ff-dangerStatus":"")})]},r.id))})}),r.length>4&&e(P,{className:"ff-tab-icon ff-tab-icon--next",name:""+(d<Math.ceil(r.length/4)-1?"arrow_right_icon":""),onClick:()=>{d<Math.ceil(r.length/4)-1&&u(e=>e+1)},hoverEffect:!0})]}),e("div",{className:"ff-tab-content",children:r.find(e=>e.id===i)?.component})]})},fE=o(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:o=!1,variant:a="default",backgroundColor:l=!1,border:c=!1},s)=>{const d={default:"var(--ff-avatar-background-color)",success:"var(--status-success-text-color)",danger:"var(--ff-delete-button-attachment)"};return e("button",{disabled:o,onClick:i,className:`\n ff-status-indicator\n ff-status-indicator--${a}\n ${l?`ff-status-indicator--with-bg ff-status-indicator--${a}-bg`:""}\n ${c?`ff-status-indicator--with-border ff-status-indicator--${a}-border`:""}\n `,ref:s,children:n("div",{className:"ff-status-indicator__content",children:[e(P,{name:"danger"===a?"close":r,color:d[a]||d.default,className:`ff-status-indicator__icon ff-status-indicator__icon--${a}`}),e(F,{as:"div",fontSize:12,className:`ff-status-indicator__label ff-status-indicator__label--${a}`,fontWeight:"medium",lineHeight:"20px",children:t})]})})}),hE=({rootLabel:t,childrenLabels:r,align:i="center",direction:o="horizontal"})=>{const a=r.length;return n("div","vertical"===o?{className:"ff-os-tree-vertical",style:{"--child-count":a},children:[n("div",{className:`ff-os-tree-vertical__row ff-os-tree-vertical__row--${i}`,children:[e("div",{className:"ff-os-tree-vertical__root-label",children:t}),e("div",{className:"ff-os-tree-vertical__horizontal-line"})]}),n("div",{className:"ff-os-tree-vertical__vertical-line-wrapper",children:[e("div",{className:"ff-os-tree-vertical__vertical-line"}),r.map((t,r)=>n("div",{className:"ff-os-tree-vertical__child",children:[e("div",{className:"ff-os-tree-vertical__child-connector"}),e("div",{className:"ff-os-tree-vertical__child-label",children:t})]},r))]})]}:{className:`ff-os-tree ff-os-tree--${i}`,style:{"--child-count":a},children:[n("div",{className:"ff-os-tree__root-wrapper",children:[e("div",{className:"ff-os-tree__root-label",children:t}),e("div",{className:"ff-os-tree__vertical-root"})]}),e("div",{className:"ff-os-tree__horizontal-connector",children:r.map((t,n)=>e("div",{className:"ff-os-tree__vertical-child"},n))}),e("div",{className:"ff-os-tree__children",children:r.map((t,n)=>e("div",{className:"ff-os-tree__child-container",children:e("div",{className:"ff-os-tree__child-label",children:t})},n))})]})},pE=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:o=30})=>{const[c,d]=s(Array(6).fill("")),[u,f]=s(o),[h,p]=s(!0),m=a(Array(6).fill(null));l(()=>{h||m.current[0]?.focus()},[h]),l(()=>{let e;return u>0&&(e=window.setInterval(()=>f(e=>e-1),1e3)),0===u&&p(!1),()=>clearInterval(e)},[u]);const C=e=>{e.preventDefault();const t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6),n=Array(6).fill("");t.split("").forEach((e,t)=>{n[t]=e}),d(n);const r=Math.min(t.length,5);m.current[r]?.focus()};return e(Vf,{isOpen:!0,onClose:t,isFooterDisplayed:!1,isHeaderDisplayed:!1,zIndex:999999,customWidth:"340px",children:n("div",{className:"ff-otp-popup",children:[n("div",{className:"ff-otp-header",children:[e(F,{fontSize:24,lineHeight:"36px",fontWeight:"semi-bold",children:"OTP Verification"}),e(P,{name:"close",height:16,width:16,onClick:t,className:"ff-close-icon"})]}),e("div",{className:"ff-otp-boxes",children:c.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===c.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...c];r[t]=n,d(r),t<5&&m.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...c];n[t]="",d(n),t>0&&m.current[t-1]?.focus()}})(e,n),onPaste:C,ref:e=>m.current[n]=e,readOnly:!0},n))}),e(U,{variant:"primary",label:"Submit",onClick:()=>i(c.join("")),disabled:c.includes(""),className:"ff-submit-btn"}),n("div",{className:"ff-resend "+(h?"disabled":""),onClick:h?void 0:()=>{f(o),p(!0),d(Array(6).fill("")),r()},children:["Re-send OTP",u>0?` (${u}s)`:""]})]})})},mE=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:o,mediaType:c,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:m=!0,showDownload:C=!0,showExpand:g=!0,width:v="800px",height:y="432px",showControls:w=!0,customStyle:b,overlay:E=!0,children:M,showControlDownload:A=!1,showControlExpand:x=!1})=>{const k=a(null),L=a(null),[H,_]=s(0),[S,V]=s(0),[O]=s(!1),[z,N]=s(!1),[I,T]=s(0);l(()=>{"video"===c&&k.current&&!M&&(i?k.current.play():k.current.pause())},[i,c,M]);const D=p(()=>{if(k.current&&!z){const e=k.current.currentTime/k.current.duration*100;T(e||0),_(k.current.currentTime)}},[z]),j=p(()=>{k.current&&V(k.current.duration)},[]),Z=p(()=>{_(0),T(0),o?.()},[o]),R=p(e=>`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`,[]),B=p(e=>{if(k.current){const t=e/100*k.current.duration;k.current.currentTime=t,T(e),_(t)}},[]),U=p(e=>{if(z||!L.current)return;const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B,z]),q=p(e=>{if(!L.current)return;N(!0);const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[B]),W=p(e=>{if(!z||!L.current||!k.current)return;const t=L.current.getBoundingClientRect(),n=e.clientX-t.left,r=t.width,i=Math.max(0,Math.min(100,n/r*100));B(i)},[z,B]),Q=p(()=>{N(!1)},[]);return l(()=>{if(z)return document.addEventListener("mousemove",W),document.addEventListener("mouseup",Q),()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",Q)}},[z,W,Q]),t?e(Mc,{isOpen:t,onClose:r,isMaximized:!1,showHeader:m,overlay:E,downloadHandler:()=>{},customStyle:b,header:n("div",{className:"ff-header-content",children:[e(P,{width:23,height:23,name:"automatic_locator"}),e(F,{children:e("span",{className:"ff-header-title",children:u})})]}),icons:e(K,{title:"Close",children:e(P,{name:"close",onClick:r})}),width:v,height:y,zIndex:999,children:n("div",{className:"ff-video-wrapper",children:[M||("video"===c?e("video",{ref:k,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:j,onEnded:Z}):e("img",{src:d,alt:"Preview",className:"ff-media-image"})),n("div",{className:"ff-top-right-icons",children:[C&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f})}),g&&e(K,{title:O?"Minimize":"Maximize",children:e(P,{name:O?"collapse_icon":"expand_icon",color:"white",onClick:h})})]}),"video"===c&&w&&!M&&n("div",{className:"ff-media-controls",children:[e("button",{onClick:o,className:"ff-play-pause-btn",children:e(P,i?{width:35,height:35,name:"pause_button",color:"white"}:{width:35,height:35,name:"play_button",color:"white"})}),n("div",{className:"ff-progress-bar",children:[e("span",{className:"ff-current-time",children:R(H)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:I,onChange:e=>B(parseFloat(e.target.value)),onClick:U,onMouseDown:q,ref:L}),e("span",{className:"ff-total-time",children:R(S)})]}),n("div",{className:"ff-control-icons",children:[A&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f,cursorType:"pointer"})}),x&&e(K,{title:O?"Minimize":"Maximize",children:e(P,{name:O?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer"})})]})]})]})}):null},CE=({header:r,secondaryHeader:i,primaryCount:o,secondaryCount:a,primaryItems:l,secondaryItems:c,width:s,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:p,actions:m,tabsData:C,notchPosition:g="top-left"})=>{const v=i&&"secondary"===d?c:l,y=a&&parseInt(a)>0,w=o&&parseInt(o)>0,b=i&&(w||y),{tooltip:E="Download",iconName:M="download_file",disabled:A=!1,onClick:x}=m?.download||{},{tooltip:k="Delete",iconName:L="delete_icon",disabled:H=!1,onClick:_}=m?.delete||{},S=()=>n("div",{className:"ff-dropdown-header-icons",children:[m?.download&&e(K,{title:E,children:e(P,{name:M||"",className:"ff-dropdown-icon ff-download-icon",onClick:x,width:18,height:20,disabled:A,hoverEffect:!0})}),m?.delete&&e(K,{title:k,children:e(P,{name:L||"",className:"ff-dropdown-icon ff-delete-icon",onClick:_,width:25,height:25,disabled:H,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:s?{minWidth:s}:{},children:[e("div",{className:"ff-dropdown-notch "+("bottom-center"===g?"bottom-center":"top-left")}),e("div",{className:"ff-dropdown-header",children:e("div",{className:"ff-dropdown-header-content",children:i&&C&&u?n(t,{children:[e(Ic,{tabsData:C,activeTabId:u,onTabClick:e=>{p&&p(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),b&&S()]}):i&&b?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),a&&e("span",{className:"ff-dropdown-count",children:a})]}),S()]}):i?n("div",{className:"ff-dropdown-header-dual",children:[n("div",{className:"ff-dropdown-header-item "+("primary"===d?"active":""),onClick:f,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:r}),o&&e("span",{className:"ff-dropdown-count",children:o})]}),n("div",{className:"ff-dropdown-header-item "+("secondary"===d?"active":""),onClick:h,children:[e(F,{fontWeight:"semi-bold",className:"ff-dropdown-text",children:i}),a&&e("span",{className:"ff-dropdown-count",children:a})]})]}):e(F,{fontSize:16,fontWeight:"semi-bold",children:r})})}),e("ul",{className:"ff-dropdown-list",children:v?.map((t,n)=>e("li",{className:"ff-dropdown-item",children:t},n))})]})},gE=(e,t)=>"string"==typeof e?ie(e,t):i.isValidElement(e)?i.cloneElement(e,{},gE(e.props.children,t)):Array.isArray(e)?e.map(e=>gE(e,t)):e,vE=i.memo(({columnsData:t,rootNode:r,selected:i,onCheckBoxChange:o,selectedNode:c,tableHeaderBgColor:d,hideOnDisable:u,transparentHeader:f,scriptLengthTruncate:h=25})=>{const p=a(null),[m,C]=s(!1),[g,v]=s(!1);return l(()=>{C(!0)},[]),n("thead",{className:"ff-table-tree-head",onMouseEnter:e=>{e.stopPropagation(),v(!0)},onMouseLeave:e=>{e.stopPropagation(),v(!1)},children:[e("tr",{className:"ff-table-tree-row no-hover",children:t.map(({name:t,width:n})=>e("th",{className:"ff-table-tree-th",style:{width:n,backgroundColor:f?"transparent":d,pointerEvents:f?"none":"auto"},children:t},t))}),r&&e("tr",{className:"ff-table-tree-row show "+(c&&c===r?.node?.key?"hover":""),ref:p,children:t.map((t,a)=>e("td",{className:"ff-table-tree-td",children:n("span",{className:"tree-table-default-content",children:[0===a&&"checkbox"===r.select&&!(u&&r.node.isDisabled)&&e(te,{checked:"partially"!==r?.node?.selectedStatus&&("completely"===r?.node?.selectedStatus||!1),partial:"partially"===r.node.selectedStatus,onChange:e=>o(e,r.node),disabled:r.node.isDisabled}),0===a&&"radio"===r.select&&!(u&&r.node.isDisabled)&&e(Sa,{name:r.node.key,checked:i.includes(r.node.key),value:r.node.key,onChange:e=>o(e,r.node),disabled:r.node.isDisabled}),n("span",{className:"tree-table-td-content-text",children:["name"===t.accessor?e("span",{children:r.node[t.accessor]}):e("span",{children:gE(pr(r.node,t),h)}),r.cell&&0===a&&e("span",{className:"table-tree-root-cell",children:r.cell(r.node)})]}),g&&r.actions&&0===a&&m&&p.current&&e("div",{className:"table-tree-row-action",children:r.actions(r.node,p)})]})},a))})]})}),yE=e=>{const t=new Map,n=e.map(e=>{const n={...e};if(e.parentId){const r=t.get(e.parentId)??[];r.push(n),t.set(e.parentId,r)}return n});return t.forEach(e=>{const t=e.at(-1);t&&(t.lastChild=!0);const n=e.at(-2);n&&(n.lastChild=!1)}),n},wE=(e,t)=>{const n=e.hierarchy||0;if(0===n)return[];const r=[],i=t.findIndex(t=>t.key===e.key);if(-1===i)return new Array(n).fill(!1);const o=bE(e,t);for(let e=0;e<n;e++)if(0===e){const e=t.slice(i+1).filter(e=>1===(e.hierarchy||0));r.push(e.length>0)}else{const n=o.find(t=>(t.hierarchy||0)===e);if(!n){r.push(!1);continue}const a=t.filter(e=>e.parentId===n.key);let l=!1;for(const e of a){if(t.findIndex(t=>t.key===e.key)>i){l=!0;break}}r.push(l)}return r},bE=(e,t)=>{const n=[];let r=e;for(;r&&(n.unshift(r),r.parentId);){const e=t.find(e=>e.key===r.parentId);if(!e)break;r=e}return n},EE=(e,t,n)=>{const{sourceId:r,action:i,value:o="",error:a="",label:l,type:c,options:s,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t;if(!r||!i)return e;const p=s?.map(e=>({label:e,value:e})),m=d?{label:d,value:d}:void 0,C=new Map(e.map(e=>[e.key,e]));n&&C.set(n.key,n);const g=C.get(r);if(!g)return e;let v;h&&(v=C.get(h));const y=[...e],w=e.findIndex(e=>e.key===r);let b=null,E=0;switch(i){case"addAbove":b=g.parentId,E=g.hierarchy;break;case"addBelow":b=v?.parentId??g.parentId,E=v?.hierarchy??g.hierarchy;break;case"addInside":b=v?.key??g.key,E=(v?.hierarchy??g.hierarchy)+1}const M={hierarchy:E,parentId:b,sourceId:g.key,isNewNode:!0,key:"new-node",value:o,error:a,label:l,type:c,options:p,selectedOption:m,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":y.splice(w,0,M);break;case"addBelow":case"addInside":y.splice(w+1,0,M)}const A=yE(y);return A.map(e=>({...e,parentSiblings:wE(e,A)}))},ME=(t,n=[],r,i,o)=>{let a=n,l=void 0!==i?!i:r;return G(n)&&(isNaN(t)||(a=Array(t).fill(!0))),e("div",{className:"tree-table-space-container",children:a?.map((n,r)=>e("span",{className:`tree-table-space-block tree-table-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${o?"folder":""}`},r))})},AE=i.memo(({treeRowRef:r,col:i,node:o,selected:a,select:l,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,columnTextColor:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>n("td",{className:"ff-table-tree-td "+(i.isTree&&o.container?"folder":""),style:{color:`${p||"var(--ff-primary-text-color)"}`},children:[i.isTree&&ME(o.hierarchy,o.parentSiblings,o.lastChild,o.nextSibling,o.container),n("div",{className:"tree-title-container",children:[i.isTree&&e("span",{className:`tree-table-space-block last-block last-block tree-table-space-block-${o.hierarchy} ${o?.expanded?"tree-row-expanded":"tree-row-collapsed"} ${o.container&&o.expandable?"":"no-folder"}`,children:o.container&&o.expandable&&n("span",{onClick:()=>s(o),children:[" ",e(h?_c:N,{})]})}),n("span",{className:"tree-table-td-content "+(i.isTree&&o.container?"folder":""),children:[!o?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===l&&!(m&&o.unselectable)&&e("span",{className:"tree-table-td-content-select",children:"none"===o.selectedStatus?e(K,{title:o?.currentEnvId&&o?.envId&&o?.currentEnvId!==o?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(te,{checked:"completely"===o.selectedStatus,partial:"partially"===o.selectedStatus,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable,isDefaultHover:"none"===o.selectedStatus&&!!o.machine})}):e(te,{checked:"completely"===o.selectedStatus,partial:"partially"===o.selectedStatus,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable})}),i.isTree&&"radio"===l&&!(m&&o.unselectable)&&e("span",{className:"tree-table-td-content-select",children:e(Sa,{name:o.key,checked:a.includes(o.key),value:o.key,onChange:e=>c(e,o),disabled:o.unselectable||"REVIEW"===o.state||!0===o?.isDisable})})]}),o.isNewNode&&i.isTree?e(Hc,{onCancel:u,onConfirm:d,value:o.value,label:o?.label,optionsList:o.options,selectedOption:o.selectedOption,withDropdown:"inputWithDropdown"===o.type,handleCustomError:f,inputFieldWidth:g,selectFieldWidth:v,confirmIconTooltip:o.confirmIconTooltip,cancelIconTooltip:o.cancelIconTooltip,isOnBlurTrue:!0,isDisable:{confirm:y}}):e("span",{className:"tree-table-td-content-text",children:gE(pr(o,i),C)})]})]}),i.actions&&!o?.isNewNode&&e("div",{className:"table-tree-row-action",children:i.actions(o,r)})]})),xE=i.memo(({node:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:l,onCheckBoxChange:c,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:f,index:h,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>{const w=a(null);return e("tr",{"data-level":t.hierarchy,ref:w,className:"ff-table-tree-row show "+(p&&p===t.key?"hover-selected":""),onClick:e=>o(e,t),id:0===h?"table-first-row":t.key,children:n.map(n=>e(AE,{treeRowRef:w,col:n,node:t,selected:r,select:i,onCheckBoxChange:c,onToggleExpand:l,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:f,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y},n.name))})}),kE=({flattenedTreeData:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:a,onCheckBoxChange:l,newNode:c,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,expanding:f,rootNode:h,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y})=>e("tbody",{className:"ff-table-tree-body",children:EE(t,c??{},h)?.map((t,c)=>t?.hide?null:e(xE,{node:t,columnsData:n,selected:r,select:i,onRowClick:o,onToggleExpand:a,onCheckBoxChange:l,onAddConfirm:s,onAddCancel:d,handleEditFieldError:u,isExpanding:t.key===f,index:c,selectedNode:p,hideOnDisable:m,scriptLengthTruncate:C,addModuleInputWidth:g,addModuleSelectWidth:v,disableEditLabelConfirmIcon:y},t.key))}),LE=o(({treeData:t,columnsData:r,selected:i=[],select:o=null,onChange:c,onClick:d,onExpand:f,loadMore:h=()=>{},tableBorder:m,height:C="calc(100vh - 134px)",newNode:g,onAddConfirm:v=e=>{},onAddCancel:y=()=>{},handleEditFieldError:w,loading:b=!1,rootNode:E,pagination:M=!0,selectedNode:A,tableHeaderBgColor:x="var(--border-color)",hideOnDisable:k=!1,freezeColumns:L,scriptLengthTruncate:H=25,addModuleInputWidth:_=150,addModuleSelectWidth:S,onScroll:V,disableEditLabelConfirmIcon:O=!1,transparentHeader:z=!1,navigateTreeNode:N=null,handleRemoveNavigateTreeNode:I=()=>{},scrollThreshold:T=128},D)=>{const[j,Z]=s(null),[R,B]=s(null),[P,F]=s(null),[U,q]=s(null),[W,Q]=s(null),K=a(null),Y=a([]),X=a({lastScrollTop:0,lastScrollTime:0,direction:null}),J=a(null),$=p(()=>{b||"above"===R||(B("above"),F(K.current?.scrollTop??null),q(K.current?.scrollHeight??null),h("above"))},[b,R,h]),ee=p(()=>{b||"below"===R||(B("below"),h("below"))},[b,R,h]),te=p(()=>{const e=K.current;if(!e||G(t))return;const n=Date.now(),r=e.scrollTop,i=e.scrollHeight,o=e.clientHeight,a=r>X.current.lastScrollTop?"down":"up";X.current={lastScrollTop:r,lastScrollTime:n,direction:a},J.current&&clearTimeout(J.current);const l=r<T;if("down"!==a||!(i-(r+o)<T)||b||R||!0===t[t.length-1]?.lastResource||(J.current=setTimeout(()=>{ee()},150)),"up"!==a||!l||b||R||!0===t[0]?.lastResource||(J.current=setTimeout(()=>{$()},150)),!b&&"above"===R&&Y.current.length>0&&null!==P){const n=Y.current;let r=0;for(let e=0;e<t.length&&n[0]!==t[e];e++)r++;let i=0;const o=30,a=()=>{const n=Array.from(e.querySelectorAll(".ff-table-tree-row"));let l=0;for(let e=0;e<r;e++){l+=n[e]?.getBoundingClientRect().height||0}const c=e.scrollHeight>e.clientHeight;l>0&&c?(e.scrollTop=P+l,Y.current=t):i<o?(i++,requestAnimationFrame(a)):(Y.current=t,console.warn("Failed to restore scroll position after max retries"))};requestAnimationFrame(a)}},[b,R,t,$,ee,P,V]);l(()=>{const e=K.current;return e&&V&&e.addEventListener("scroll",V),()=>{e&&V&&e.removeEventListener("scroll",V)}},[V]),l(()=>()=>{J.current&&clearTimeout(J.current)},[]),u(()=>{if(b||"above"!==R||null===P||null===U)b||B(null);else{const e=K.current;if(!e)return;const t=e.scrollHeight-U;t>0&&(e.scrollTop=P+t),B(null),F(null),q(null)}},[b,R,P,U]),l(()=>{if(N){const e=document.getElementById(N),t=K.current;if(e&&t){Q(t.scrollTop);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.scrollTop,o=n.top-r.top+i,a=r.height;t.scrollTo({top:o-a/2+n.height/2,behavior:"smooth"})}}return()=>{I()}},[N,t]),l(()=>{null!==W&&!b&&K.current&&(K.current.scrollTop=W,Q(null))},[W,b]),l(()=>{const e=K.current;if(e&&M)return e.addEventListener("scroll",te),te(),()=>{e.removeEventListener("scroll",te),J.current&&clearTimeout(J.current)}},[te,M]),l(()=>{t.length>0&&(Y.current=t)},[t]),l(()=>{!b&&j&&Z(null)},[b]);const ne=p(e=>{j||(Z(e.key),f?.(e))},[f,j]),re=p((e,t)=>{j||c?.(e,t)},[c,j]),ie=p((e,t)=>{j||d?.(e,t)},[d,j]);let oe;return L&&(oe=((e,t)=>e.slice(0,t).reduce((e,t)=>e+parseInt(t.width||"400",10),0))(r,L)),l(()=>{if(!g||!K.current)return;const e=K.current;if("addAbove"===g.action&&g.sourceId===t[0]?.key)e.scrollTo({top:0,behavior:"smooth"});else if("addAbove"===g.action&&g.sourceId===g.firstNodeKey){const t=e.scrollTop-64;e.scrollTo({top:t,behavior:"smooth"})}},[g]),u(()=>{if(!N)return;if(!K.current)return;let e=0;const n=()=>{const r=document.getElementById(N);r?setTimeout(()=>{r.scrollIntoView({behavior:"smooth",block:"center"}),I()},200):(0===e&&t?.length>1&&$?.(),e<30?(e++,requestAnimationFrame(n)):I())};n()},[N,$,I]),e("div",{className:"tree-table-wrapper-container",children:e("div",{className:"tree-table-wrap",ref:D,children:e("div",{className:"table-scrollable "+(t.length?"":"table-empty"),ref:K,style:{"--table-height":t.length?C:"auto","--frozen-column-width":L?`${oe}px`:"0px",border:m},children:n("table",{className:"tree-table",children:[e(vE,{columnsData:r,rootNode:E,onCheckBoxChange:re,selected:i,selectedNode:A,tableHeaderBgColor:x,hideOnDisable:k,transparentHeader:z,scriptLengthTruncate:H}),e(kE,{flattenedTreeData:yE(t),rootNode:E?.node,columnsData:r,selected:i,select:o,onRowClick:ie,onToggleExpand:ne,onCheckBoxChange:re,newNode:g,onAddConfirm:v,onAddCancel:y,handleEditFieldError:w,expanding:j,selectedNode:A,hideOnDisable:k,scriptLengthTruncate:H,addModuleInputWidth:_,addModuleSelectWidth:S,disableEditLabelConfirmIcon:O})]})})})})});function HE(e,t,n,r,i,o="children"){return function e(a){for(let l=0;l<a.length;l++){const c=a[l];if(c&&c[t]===n){const e=[...a];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(c&&c[o]&&Array.isArray(c[o])){const t=e(c[o]);if(t)return{updatedArray:a.map((e,n)=>n===l?{...e,[o]:t.updatedArray}:e)}}}return null}(e)}const _E=(e,t)=>{if(e===t)return!0;if(null==e||null==t||"object"!=typeof e||"object"!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Array.isArray(e),r=Array.isArray(t);if(n!==r)return!1;const i=n?e:Object.keys(e),o=r?t:Object.keys(t);if(i.length!==o.length)return!1;if(n)return i.every((e,t)=>_E(e,o[t]));{const n=new Set(o);return i.every(r=>n.has(r)&&_E(e[r],t[r]))}},SE=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return _E(e,r)}));async function VE(e,t){const n=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),r=await crypto.subtle.importKey("spki",n,{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),i=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"RSA-OAEP"},r,i);return btoa(String.fromCharCode(...new Uint8Array(o)))}const OE=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":return 1024*n*1024*1024;case"mb":return 1024*n*1024;case"kb":return 1024*n;default:return n}},zE=e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"gb":default:return n;case"mb":return n/1024;case"kb":return n/1048576;case"b":return n/1073741824}},NE=({data:r,isYaxisSticky:i=!1,barWidth:o,height:c,barGap:d=20,colors:u=[],xAxisLabel:f,isTruncateText:h=!0,yAxisLabel:p,padding:m=20,yAxisDivisions:C=5,barBorderRadius:g=0,legend:v=!0,showXAxisLabels:y=!0,icons:w=[],iconSize:b,legendPosition:E="bottom",legendGap:M=5,extendBarChartRightWidth:A=0,isYAxisValuePercentage:x=!1,selectedBar:k,setSelectedBar:L,onSelectedBar:H=e=>{},totalLabel:_="Total Execution",customToolTip:S=!1,isOnclick:V=!1,isDashboardVersions:O,type:z="",isMemory:N,tooltipWidth:I="fit-content"})=>{const T=a(null),[D,j]=s(null),[Z,R]=s(!1);l(()=>{const e=()=>{const e=T.current;e&&Z&&(e.style.display="none")};return window.addEventListener("scroll",e,!0),()=>window.removeEventListener("scroll",e,!0)},[Z]);const B=(e=>{const t=["TB","GB","MB","KB"];for(const n of t){if(e.some(e=>"string"==typeof e.value&&e.value.toLowerCase().includes(n.toLowerCase())))return n}return null})(r),U=r.map(e=>{if("string"==typeof e.value){let t=0;if("memory"===z)t=zE(e.value);else if(N)switch(B){case"TB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"tb":default:return n;case"gb":return n/1024;case"mb":return n/1048576;case"kb":return n/1073741824;case"b":return n/1099511627776}})(e.value);break;case"GB":t=zE(e.value);break;case"MB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"mb":default:return n;case"gb":return 1024*n;case"tb":return 1024*n*1024;case"kb":return n/1024;case"b":return n/1048576}})(e.value);break;case"KB":t=(e=>{const t=e.toLowerCase().trim(),n=parseFloat(t);switch(t.replace(/[0-9.]/g,"").trim()){case"kb":default:return n;case"mb":return 1024*n;case"gb":return 1024*n*1024;case"tb":return 1024*n*1024*1024;case"b":return n/1024}})(e.value)}else t=parseFloat(e.value);return{...e,normalizedValue:t}}return{...e,normalizedValue:e.value}});let q=0;"memory"===z&&(q=r.reduce((e,t)=>"string"==typeof t.value?e+OE(t.value):e+1024*Number(t.value)*1024*1024,0));const W=q/1048576,Q=W<1024?`${Math.round(W)} mb`:`${(W/1024).toFixed(1)} gb`;let G=Math.max(...U.map(e=>e.normalizedValue));G="memory"===z?Math.max(G,1):Math.max(G,C);const K=40,Y=40,X=U.length*o+(U.length-1)*d+(i?Y:90)+A,J=Date.now(),$=t=>t.filter(e=>e.length>1).map((t,n)=>e("defs",{children:e("linearGradient",{id:`gradient-${J}-${z}-${n}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:t.map((r,i)=>e("stop",{offset:i/(t.length-1)*100+"%",stopColor:r},`${n}-${i}`))})},n)),ee=e=>{if(!u.length)return"grey";const t=u[e%u.length];return 1===t?.length?t[0]:`url(#gradient-${J}-${z}-${e%u.length})`},te=(e,t,n,r,i)=>{R(!0);const o=T.current;if(o)if(o.style.display="block",S)o.innerHTML=`<div>\n <div><Typography fontWeight='semi-bold'>${e}</Typography></div>\n <div><Typography>${n||""}</Typography></div>\n <div><Typography>${_} : ${t} ${r?"("+r+"%)":""}</Typography></div>\n </div>`;else if(O){const e=i?i.join(", "):"";o.innerHTML=`\n <div>\n <div><Typography>${_} : ${t}</Typography></div>\n ${e?`<div><Typography>Versions : ${e}</Typography></div>`:""}\n </div>`}else o.innerHTML="memory"===z?`<strong>${e}</strong>: ${t} / ${Q}`:`<strong>${e}</strong>: ${t} ${x?"%":""}`},ne=(e,t=!1)=>{const n=T.current;if(n){const r=n.parentElement?.getBoundingClientRect(),i=window.scrollX,o=window.scrollY,a=1===U?.length||!t?e.clientX-(r?.left||0)+i+10:e.clientX-(r?.left||0)+i-n?.offsetWidth-10,l=e.clientY-(r?.top||0)+o-20;n.style.left=`${a}px`,n.style.top=`${l}px`}},re=()=>{R(!1);const e=T.current;e&&(e.style.display="none")},oe=e=>{L&&(L(e),V&&H(e))},ae=e=>{if(h){if(ie(e,10).endsWith("...")){const t=T.current;t&&(t.style.display="block",t.innerHTML=e)}}},le=(e,t,n)=>{if(h){ie(t,10).endsWith("...")&&ne(e,n===U.length-1)}};return n("div",{className:"ff-bar-chart-container",children:[e("div",{ref:T,className:"ff-bar-chart-tooltip",style:{width:I}}),v&&"top"===E&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${M}px`},children:U.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>j(r),onMouseLeave:()=>j(null),children:[w[r]&&"string"==typeof w[r]?e(P,{name:String(w[r]),width:b,height:b}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e(F,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})]},t.label))})}),i?n("div",{className:"ff-bar-chart-wrapper",children:[e("div",{className:"ff-y-axis",children:e("svg",{width:60,height:c+K+(f?20:0),children:n(t,{children:[Array.from({length:C+1}).map((t,n)=>{const r=c-n/C*c+K+4,i=n*G/C,o="memory"===z?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:50,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),p&&e("text",{x:-(c/2+35),y:i?20:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})})}),e("div",{className:"ff-chart-scrollable",children:n("svg",{width:X,height:c+K+5+(y?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),U.map((t,r)=>{const i=t.normalizedValue/G*c,a=t.normalizedValue<1?2:i,l=r*(o+d)+m,s=c-a+K,u=b||20,f=l+o/2-u/2,p=s-u,C=k===t.label,v=D===r;return n("g",{children:[w[r]&&"string"==typeof w[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,children:e(P,{name:String(w[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:s,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:C?3:0,opacity:null===D||v?1:.3,cursor:V?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===z||N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,onClick:()=>oe(t.label)}),C&&V&&e("rect",{x:l,y:s,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re}),y&&e("text",{onMouseEnter:()=>ae(t.label),onMouseMove:e=>le(e,t.label,r),onMouseLeave:re,x:0===r?l:r===U.length-1?l+o:l+o/2,y:c+K+15,className:"ff-bar-chart-labels",fill:C?"var(--brand-color)":"black",fontWeight:C?"bold":"normal",textAnchor:0===r?"start":"middle",children:h?ie(t.label,10):t.label})]},r)}),e("line",{x1:i?0:m,y1:c+K,x2:X,y2:c+K,stroke:"#D9D9D9",strokeWidth:"1"}),!i&&f&&e("text",{x:X/2,y:c+K+(y?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f})]})}),e("div",{className:"ff-bar-chart-x-axis-label",children:f})]}):e("div",{children:n("svg",{width:X,height:c+K+5+(y?20:0)+(f?20:0),children:[Array.isArray(u)&&u.length>0&&$(u),Array.from({length:C+1}).map((t,n)=>{const r=c-n/C*c+K+4,i=n*G/C,o="memory"===z?i.toFixed(1):x?`${i.toFixed(0).padStart(2,"0")}%`:i.toFixed(0).padStart(2,"0");return e("text",{x:Y,y:r,fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:o},n)}),U.map((t,r)=>{const i=t.normalizedValue/G*c,a=t.normalizedValue<1?2:i,l=r*(o+d)+Y+m,s=c-a+K,u=b||20,f=l+o/2-u/2,p=s-u,C=k===t.label,v=D===r;return n("g",{children:[w[r]&&"string"==typeof w[r]&&e("g",{onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,children:e(P,{name:String(w[r]),x:String(f),y:String(p),width:u,height:u,chartIcon:!0})}),e("rect",{x:l,y:s,width:o,height:a,fill:ee(r),rx:g,ry:g,style:{strokeWidth:C?3:0,opacity:null===D||v?1:.3,cursor:V?"pointer":"default",transition:"opacity 0.5s ease"},onMouseEnter:()=>te(t.label,"memory"===z||N?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re,onClick:()=>oe(t.label)}),C&&V&&e("rect",{x:l,y:s,width:o,height:a,fill:"var(--select-chart-highlight-color)",rx:g,ry:g,onMouseEnter:()=>te(t.label,"memory"===z?t.value:t.normalizedValue,t.id,t.percent,t.versions),onMouseMove:e=>ne(e,r===U.length-1),onMouseLeave:re}),y&&e("g",{children:e("text",{x:0===r?l:r===U.length-1?l+o:l+o/2,y:c+K+15,className:"ff-bar-chart-labels",fill:C?"var(--brand-color)":"black",fontWeight:C?"bold":"normal",textAnchor:0===r?"start":"middle",onMouseEnter:()=>ae(t.label),onMouseMove:e=>le(e,t.label,r),onMouseLeave:re,children:h?ie(t.label,10):t.label})})]},r)}),e("line",{x1:60,y1:c+K,x2:X,y2:c+K,stroke:"#D9D9D9",strokeWidth:"1"}),f&&e("text",{x:X/2,y:c+K+(y?40:20),fontSize:"12",fill:"black",textAnchor:"middle",className:"ff-bar-chart-labels",children:f}),p&&e("text",{x:-(c/2+35),y:10,transform:"rotate(-90)",fill:"black",textAnchor:"middle",alignmentBaseline:"middle",className:"ff-bar-chart-labels",children:p})]})}),v&&"bottom"===E&&e("div",{className:"ff-legend-container",children:e("div",{className:"ff-bar-chart-legend",style:{gap:`${M}px`},children:r.map((t,r)=>n("div",{className:"ff-bar-chart-legend-item",onMouseEnter:()=>j(r),onMouseLeave:()=>j(null),children:[w[r]&&"string"==typeof w[r]?e(P,{name:String(w[r]),width:b,height:b}):e("span",{className:"ff-bar-chart-legend-item-circle",style:{backgroundColor:u[r%u.length]?.[0]||"grey"}}),e("div",{children:e(F,{as:"div",fontSize:10,fontWeight:"regular",className:"ff-legend-label",children:t.label})})]},t.label))})})]})},IE=(e,t,n,r,i)=>{const o=e+n*Math.cos(r),a=t+n*Math.sin(r),l=e+n*Math.cos(i),c=t+n*Math.sin(i);return`M ${o} ${a} A ${n} ${n} 0 ${i-r>Math.PI?1:0} 1 ${l} ${c}`},TE=({radius:r,lineWidth:i,lineCap:o,barValues:a,labelHeading:l,legendType:c="numberLegend",isLegendDetails:d=!0,isPillValueVisible:u=!0,chartToLegendGap:f="16px",legendGap:h="8px",labelFontSize:p=12,subLabelFontSize:m=8,gapBetweenArch:C=10,capsuleStyle:g={padding:"4px"}})=>{const[v,y]=s({visible:!1,x:0,y:0,content:"",isArc:!1}),[w,b]=s(null),E=(e,t)=>Array.isArray(e.arcColor)?`url(#gradient-${t})`:e.arcColor,M=e=>Array.isArray(e.arcColor)?e.arcColor[0]:e.arcColor,A=a.map(e=>{if("string"==typeof e.value){const t=(e=>{if("string"!=typeof e)return e;{const t=e.trim().match(/^([\d.]+)\s*([a-zA-Z%]*)$/);if(!t)return 0;const n=parseFloat(t[1]??"0"),r=t[2]?.toUpperCase()||"";if(isNaN(n))return 0;switch(r){case"TB":return 1024*n*1024;case"GB":return 1024*n;case"MB":default:return n;case"KB":return n/1024}}})(e.value),n=isNaN(t)?0:t;return{...e,normalizedValue:n,labelValue:Number.isInteger(n)?n:n.toFixed(2)}}return{...e,normalizedValue:e.value,labelValue:Number.isInteger(e.value)?e.value:e.value?.toFixed(2)}}),x=A.reduce((e,t)=>e+t.normalizedValue,0),k=r,L=i+C,H=2*(k+L*(A.length-1)+i),_=[...A].reverse(),S=l.trim().split(" "),V=(e,t,n)=>{const{clientX:r,clientY:i}=e;y({visible:!0,x:r,y:i,content:t,isArc:n})},O=e=>{const{clientX:t,clientY:n}=e;y(e=>({...e,x:t,y:n}))},z=()=>{y({visible:!1,x:0,y:0,content:"",isArc:!1})};return n("div",{className:"ff-multi-radial-chart-container "+("numberLegend"===c?"ff-multi-radial-chart-number":"ff-multi-radial-chart-pill"),style:{gap:f},children:[e("div",{className:"relative",style:{width:H,height:H},children:n("svg",{width:H,height:H,viewBox:`0 0 ${H} ${H}`,className:"absolute top-0 left-0",children:[e("defs",{children:a.map((t,n)=>Array.isArray(t.arcColor)?e("linearGradient",{id:`gradient-${n}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:"rotate(90)",children:t.arcColor.map((n,r)=>e("stop",{offset:r/(t.arcColor.length-1)*100+"%",stopColor:n},r))},`gradient-${n}`):null)}),n("g",{transform:`translate(${H/2+1}, ${H/2+1})`,children:[_.map((t,r)=>{const a=A.length-1-r,l=2*(t.normalizedValue/x)*Math.PI;let c=-Math.PI/2,s=c+l;t.normalizedValue===x&&(c=0,s=2*Math.PI);const d=k+L*a,u=IE(0,0,d,0,2*Math.PI),f={opacity:null!==w?t.barLabel===w?1:.2:1,transition:"opacity 0.3s ease"};if(0===t.normalizedValue){const r=d*Math.cos(-Math.PI/2),o=d*Math.sin(-Math.PI/2);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("circle",{cx:r,cy:o,r:i+1,fill:E({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),onMouseEnter:e=>V(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:O,onMouseLeave:z,style:f})]},a)}const h=IE(0,0,d,c,s);return n("g",{children:[e("path",{d:u,fill:"none",stroke:t.arcBackgroundColor,strokeWidth:i,className:"transition-all duration-300",style:f}),e("path",{d:h,fill:"none",stroke:E({...t,label:t.barLabel||"",key:t.labelValue?.toString()||""},a),strokeWidth:i,strokeLinecap:"square"===o?"butt":"round",onMouseEnter:e=>V(e,`${t.barLabel||"Data"}: ${t.value}`,!0),onMouseMove:O,onMouseLeave:z,style:{pointerEvents:"stroke",...f}})]},a)}),e("text",{x:"0",y:`-${i+C+2}`,fill:(()=>{if(!v.visible)return"";const e=v.content.split(":")[0]?.trim();if(void 0===e)return"";const t=A.find(t=>t.barLabel===e);if(!t)return"";const n={...t,label:t.barLabel,key:t.labelValue?.toString()??""};return M(n)})(),textAnchor:"middle",dominantBaseline:"central",children:v.visible?n(t,{children:[e("tspan",{x:"0",dy:"0",className:"ff-center-text-tooltip",children:(N=v.content.split(":")[1]?.trim()||"",I=9,N.length>I?N.slice(0,I)+"...":N)}),v.content.split(":")[0]?.split(" ").map((t,n)=>e("tspan",{x:"0",dy:0===n?`${i+C+5}`:18,className:"ff-center-text-tooltip",children:t},n))]}):e(t,{children:S.map((t,r)=>{if(0===r){const[i,...o]=t.split(" ");return n("tspan",{children:[e("tspan",{x:"0",dy:"0",style:{fontSize:`${p}px`},className:"ff-center-first-text",children:i}),e("tspan",{x:"0",dy:18,style:{fontSize:`${m}px`},className:"ff-center-text",children:o.join(" ")})]},r)}return e("tspan",{x:"0",dy:0===r?0:18,className:"ff-center-text",style:{fontSize:`${m}px`},children:t},r)})})})]})]})}),v.visible&&e("div",{className:"ff-multi-radial-tooltip",style:{position:"fixed",top:`${v.y+10}px`,left:`${v.x+15}px`,zIndex:1e3,pointerEvents:"none"},children:v.content}),d&&((t,r)=>{switch(r){case"numberLegend":return e("div",{className:"ff-legend-container ff-number-legend",style:{gap:h},children:t.map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{b(t.barLabel||t.label),V(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:O,onMouseLeave:()=>{b(null),z()},children:[e(F,{fontSize:20,fontWeight:"semi-bold",className:"ff-legend-value",color:M(t),children:t.key.padStart(2,"0")}),e(F,{fontSize:10,className:"ff-legend-key",color:"var(--text-color)",children:t.label})]},r))});case"pillLegend":return e("div",{className:"ff-legend-container ff-pill-legend",style:{gap:h},children:t.slice().reverse().map((t,r)=>n("div",{className:"ff-legend-item",onMouseEnter:e=>{b(t.barLabel||t.label),V(e,`${t.barLabel||"Data"}: ${t.value}`,!1)},onMouseMove:O,onMouseLeave:()=>{b(null),z()},children:[e("span",{className:"ff-legend-capsule",style:{backgroundColor:M(t)},children:e(F,{fontSize:10,color:"var(--tooltip-text-color)",style:g,children:u&&t.value})}),e(F,{className:"ff-legend-key",children:t.label})]},r))});default:return null}})(A.map(e=>({...e,label:e?.barLabel,key:e.labelValue?.toString()})),c)]});var N,I};function DE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jE(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZE(Object(n),!0).forEach(function(t){jE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(t){BE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UE(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function qE(e){return{}.toString.call(e).includes("Object")}function WE(e){return"function"==typeof e}var QE=UE(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),GE={changes:function(e,t){return qE(t)||QE("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&QE("changeField"),t},selector:function(e){WE(e)||QE("selectorType")},handler:function(e){WE(e)||qE(e)||QE("handlerType"),qE(e)&&Object.values(e).some(function(e){return!WE(e)})&&QE("handlersType")},initial:function(e){var t;e||QE("initialIsRequired"),qE(e)||QE("initialType"),t=e,Object.keys(t).length||QE("initialContent")}};function KE(e,t){return WE(t)?t(e.current):t}function YE(e,t){return e.current=FE(FE({},e.current),t),t}function XE(e,t,n){return WE(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var JE={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};GE.initial(e),GE.handler(t);var n={current:e},r=UE(XE)(n,t),i=UE(YE)(n),o=UE(GE.changes)(e),a=UE(KE)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return GE.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,a)(e)}]}};var $E={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},eM=function(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}(function(e,t){throw new Error(e[t]||e.default)})($E),tM={config:function(e){var t;return e||eM("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||eM("configType"),e.urls?(console.warn($E.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};function nM(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],nM(e[n],t[n]))}),RE(RE({},e),t)}var rM={type:"cancelation",msg:"operation is manually canceled"};function iM(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(rM):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var oM,aM,lM=["monaco"],cM=JE.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),sM=(aM=2,function(e){if(Array.isArray(e))return e}(oM=cM)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(oM,aM)||function(e,t){if(e){if("string"==typeof e)return DE(e,t);var n={}.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)?DE(e,t):void 0}}(oM,aM)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),dM=sM[0],uM=sM[1];function fM(e){return document.body.appendChild(e)}function hM(e){var t=dM(function(e){return{config:e.config,reject:e.reject}}),n=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function pM(){var e=dM(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m;mM(n),e.resolve(n)},function(t){e.reject(t)})}function mM(e){dM().monaco||uM({monaco:e})}var CM=new Promise(function(e,t){return uM({resolve:e,reject:t})}),gM={config:function(e){var t=tM.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,lM);uM(function(e){return{config:nM(e.config,r),monaco:n}})},init:function(){var e=dM(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(uM({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),iM(CM);if(window.monaco&&window.monaco.editor)return mM(window.monaco),e.resolve(window.monaco),iM(CM);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(fM,hM)(pM)}return iM(CM)},__getMonacoInstance:function(){return dM(function(e){return e.monaco})}},vM={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},yM={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var wM=function({children:e}){return i.createElement("div",{style:yM.container},e)},bM=wM;var EM=function({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:l}){return i.createElement("section",{style:{...vM.wrapper,width:e,height:t},...l},!n&&i.createElement(bM,null,r),i.createElement("div",{ref:o,style:{...vM.fullWidth,...!n&&vM.hide},className:a}))},MM=g(EM);var AM=function(e){l(e,[])};var xM=function(e,t,n=!0){let r=a(!0);l(r.current||!n?()=>{r.current=!1}:e,t)};function kM(){}function LM(e,t,n,r){return function(e,t){return e.editor.getModel(HM(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?HM(e,r):void 0)}(e,t,n,r)}function HM(e,t){return e.Uri.parse(t)}var _M=function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:c,modifiedModelPath:d,keepCurrentOriginalModel:u=!1,keepCurrentModifiedModel:f=!1,theme:h="light",loading:m="Loading...",options:C={},height:g="100%",width:v="100%",className:y,wrapperProps:w={},beforeMount:b=kM,onMount:E=kM}){let[M,A]=s(!1),[x,k]=s(!0),L=a(null),H=a(null),_=a(null),S=a(E),V=a(b),O=a(!1);AM(()=>{let e=gM.init();return e.then(e=>(H.current=e)&&k(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>L.current?function(){let e=L.current?.getModel();u||e?.original?.dispose(),f||e?.modified?.dispose(),L.current?.dispose()}():e.cancel()}),xM(()=>{if(L.current&&H.current){let t=L.current.getOriginalEditor(),i=LM(H.current,e||"",r||n||"text",c||"");i!==t.getModel()&&t.setModel(i)}},[c],M),xM(()=>{if(L.current&&H.current){let e=L.current.getModifiedEditor(),r=LM(H.current,t||"",o||n||"text",d||"");r!==e.getModel()&&e.setModel(r)}},[d],M),xM(()=>{let e=L.current.getModifiedEditor();e.getOption(H.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],M),xM(()=>{L.current?.getModel()?.original.setValue(e||"")},[e],M),xM(()=>{let{original:e,modified:t}=L.current.getModel();H.current.editor.setModelLanguage(e,r||n||"text"),H.current.editor.setModelLanguage(t,o||n||"text")},[n,r,o],M),xM(()=>{H.current?.editor.setTheme(h)},[h],M),xM(()=>{L.current?.updateOptions(C)},[C],M);let z=p(()=>{if(!H.current)return;V.current(H.current);let i=LM(H.current,e||"",r||n||"text",c||""),a=LM(H.current,t||"",o||n||"text",d||"");L.current?.setModel({original:i,modified:a})},[n,t,o,e,r,c,d]),N=p(()=>{!O.current&&_.current&&(L.current=H.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...C}),z(),H.current?.editor.setTheme(h),A(!0),O.current=!0)},[C,h,z]);return l(()=>{M&&S.current(L.current,H.current)},[M]),l(()=>{!x&&!M&&N()},[x,M,N]),i.createElement(MM,{width:v,height:g,isEditorReady:M,loading:m,_ref:_,className:y,wrapperProps:w})};g(_M);var SM=function(e){let t=a();return l(()=>{t.current=e},[e]),t.current},VM=new Map;var OM,zM=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:c,theme:d="light",line:u,loading:f="Loading...",options:h={},overrideServices:m={},saveViewState:C=!0,keepCurrentModel:g=!1,width:v="100%",height:y="100%",className:w,wrapperProps:b={},beforeMount:E=kM,onMount:M=kM,onChange:A,onValidate:x=kM}){let[k,L]=s(!1),[H,_]=s(!0),S=a(null),V=a(null),O=a(null),z=a(M),N=a(E),I=a(),T=a(r),D=SM(c),j=a(!1),Z=a(!1);AM(()=>{let e=gM.init();return e.then(e=>(S.current=e)&&_(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>V.current?(I.current?.dispose(),g?C&&VM.set(c,V.current.saveViewState()):V.current.getModel()?.dispose(),void V.current.dispose()):e.cancel()}),xM(()=>{let i=LM(S.current,e||r||"",t||o||"",c||n||"");i!==V.current?.getModel()&&(C&&VM.set(D,V.current?.saveViewState()),V.current?.setModel(i),C&&V.current?.restoreViewState(VM.get(c)))},[c],k),xM(()=>{V.current?.updateOptions(h)},[h],k),xM(()=>{!V.current||void 0===r||(V.current.getOption(S.current.editor.EditorOption.readOnly)?V.current.setValue(r):r!==V.current.getValue()&&(Z.current=!0,V.current.executeEdits("",[{range:V.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),V.current.pushUndoStop(),Z.current=!1))},[r],k),xM(()=>{let e=V.current?.getModel();e&&o&&S.current?.editor.setModelLanguage(e,o)},[o],k),xM(()=>{void 0!==u&&V.current?.revealLine(u)},[u],k),xM(()=>{S.current?.editor.setTheme(d)},[d],k);let R=p(()=>{if(O.current&&S.current&&!j.current){N.current(S.current);let i=c||n,a=LM(S.current,r||e||"",t||o||"",i||"");V.current=S.current?.editor.create(O.current,{model:a,automaticLayout:!0,...h},m),C&&V.current.restoreViewState(VM.get(i)),S.current.editor.setTheme(d),void 0!==u&&V.current.revealLine(u),L(!0),j.current=!0}},[e,t,n,r,o,c,h,m,C,d,u]);return l(()=>{k&&z.current(V.current,S.current)},[k]),l(()=>{!H&&!k&&R()},[H,k,R]),T.current=r,l(()=>{k&&A&&(I.current?.dispose(),I.current=V.current?.onDidChangeModelContent(e=>{Z.current||A(V.current.getValue(),e)}))},[k,A]),l(()=>{if(k){let e=S.current.editor.onDidChangeMarkers(e=>{let t=V.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});x?.(e)}});return()=>{e?.dispose()}}return()=>{}},[k,x]),i.createElement(MM,{width:v,height:y,isEditorReady:k,loading:f,_ref:O,className:w,wrapperProps:b})},NM=g(zM),IM={exports:{}},TM={},DM={exports:{}},jM={},ZM={};function RM(){if(OM)return ZM;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function n(n,r){this.__indent_cache=new t(n,r),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return OM=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t},t.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},n.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join("\n");return"\n"!==e&&(n=n.replace(/[\n]/g,e)),n},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(t,n){for(var r=this.__lines.length-2;r>=0;){var i=this.__lines[r];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(r+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},ZM.Output=n,ZM}var BM,PM={};function FM(){if(BM)return PM;return BM=1,PM.Token=function(e,t,n,r){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},PM}var UM,qM={};function WM(){return UM||(UM=1,o="(?:"+(i="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}")+"|[\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+(n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc")+"])",a="(?:"+i+"|["+(t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a")+n+(r="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f")+"])*",(e=qM).identifier=new RegExp(o+a,"g"),e.identifierStart=new RegExp(o),e.identifierMatch=new RegExp("(?:"+i+"|["+t+n+r+"])+"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g")),qM;var e,t,n,r,i,o,a}var QM,GM,KM={},YM={};function XM(){if(QM)return YM;function e(e,n){this.raw_options=t(e,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs","\t"===this.indent_char),this.indent_with_tabs&&(this.indent_char="\t",1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}function t(e,t){var r,i={};for(r in e=n(e))r!==t&&(i[r]=e[r]);if(t&&e[t])for(r in e[t])i[r]=e[t][r];return i}function n(e){var t,n={};for(t in e){n[t.replace(/-/g,"_")]=e[t]}return n}return QM=1,e.prototype._get_array=function(e,t){var n=this.raw_options[e],r=t||[];return"object"==typeof n?null!==n&&"function"==typeof n.concat&&(r=n.concat()):"string"==typeof n&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r},e.prototype._get_boolean=function(e,t){var n=this.raw_options[e];return void 0===n?!!t:!!n},e.prototype._get_characters=function(e,t){var n=this.raw_options[e],r=t||"";return"string"==typeof n&&(r=n.replace(/\\r/,"\r").replace(/\\n/,"\n").replace(/\\t/,"\t")),r},e.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var r=parseInt(n,10);return isNaN(r)&&(r=t),r},e.prototype._get_selection=function(e,t,n){var r=this._get_selection_list(e,t,n);if(1!==r.length)throw new Error("Invalid Option Value: The option '"+e+"' can only be one of the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r[0]},e.prototype._get_selection_list=function(e,t,n){if(!t||0===t.length)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var r=this._get_array(e,n);if(!this._is_valid_selection(r,t))throw new Error("Invalid Option Value: The option '"+e+"' can contain only the following values:\n"+t+"\nYou passed in: '"+this.raw_options[e]+"'");return r},e.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(e){return-1===t.indexOf(e)})},YM.Options=e,YM.normalizeOpts=n,YM.mergeOpts=t,YM}function JM(){if(GM)return KM;GM=1;var e=XM().Options,t=["before-newline","after-newline","preserve-newline"];function n(n){e.call(this,n,"js");var r=this.raw_options.brace_style||null;"expand-strict"===r?this.raw_options.brace_style="expand":"collapse-preserve-inline"===r?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var o=0;o<i.length;o++)"preserve-inline"===i[o]?this.brace_preserve_inline=!0:this.brace_style=i[o];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}return n.prototype=new e,KM.Options=n,KM}var $M,eA={},tA={};function nA(){if($M)return tA;$M=1;var e=RegExp.prototype.hasOwnProperty("sticky");function t(e){this.__input=e||"",this.__input_length=this.__input.length,this.__position=0}return t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__input.charAt(this.__position),this.__position+=1),e},t.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__input_length&&(t=this.__input.charAt(e)),t},t.prototype.__match=function(t,n){t.lastIndex=n;var r=t.exec(this.__input);return!r||e&&t.sticky||r.index!==n&&(r=null),r},t.prototype.test=function(e,t){return t=t||0,(t+=this.__position)>=0&&t<this.__input_length&&!!this.__match(e,t)},t.prototype.testChar=function(e,t){var n=this.peek(t);return e.lastIndex=0,null!==n&&e.test(n)},t.prototype.match=function(e){var t=this.__match(e,this.__position);return t?this.__position+=t[0].length:t=null,t},t.prototype.read=function(e,t,n){var r,i="";return e&&(r=this.match(e))&&(i+=r[0]),!t||!r&&e||(i+=this.readUntil(t,n)),i},t.prototype.readUntil=function(e,t){var n,r=this.__position;e.lastIndex=this.__position;var i=e.exec(this.__input);return i?(r=i.index,t&&(r+=i[0].length)):r=this.__input_length,n=this.__input.substring(this.__position,r),this.__position=r,n},t.prototype.readUntilAfter=function(e){return this.readUntil(e,!0)},t.prototype.get_regexp=function(t,n){var r=null,i="g";return n&&e&&(i="y"),"string"==typeof t&&""!==t?r=new RegExp(t,i):t&&(r=new RegExp(t.source,i)),r},t.prototype.get_literal_regexp=function(e){return RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(e){var t=this.__position,n=this.readUntilAfter(e);return this.__position=t,n},t.prototype.lookBack=function(e){var t=this.__position-1;return t>=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e},tA.InputScanner=t,tA}var rA,iA={},oA={};var aA,lA,cA,sA={},dA={};function uA(){if(aA)return dA;function e(e,t){this._input=e,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,t&&(this._starting_pattern=this._input.get_regexp(t._starting_pattern,!0),this._match_pattern=this._input.get_regexp(t._match_pattern,!0),this._until_pattern=this._input.get_regexp(t._until_pattern),this._until_after=t._until_after)}return aA=1,e.prototype.read=function(){var e=this._input.read(this._starting_pattern);return this._starting_pattern&&!e||(e+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),e},e.prototype.read_match=function(){return this._input.match(this._match_pattern)},e.prototype.until_after=function(e){var t=this._create();return t._until_after=!0,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.until=function(e){var t=this._create();return t._until_after=!1,t._until_pattern=this._input.get_regexp(e),t._update(),t},e.prototype.starting_with=function(e){var t=this._create();return t._starting_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype.matching=function(e){var t=this._create();return t._match_pattern=this._input.get_regexp(e,!0),t._update(),t},e.prototype._create=function(){return new e(this._input,this)},e.prototype._update=function(){},dA.Pattern=e,dA}function fA(){if(cA)return iA;cA=1;var e=nA().InputScanner,t=FM().Token,n=function(){if(rA)return oA;function e(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}return rA=1,e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position<this.__tokens_length},e.prototype.next=function(){var e=null;return this.hasNext()&&(e=this.__tokens[this.__position],this.__position+=1),e},e.prototype.peek=function(e){var t=null;return e=e||0,(e+=this.__position)>=0&&e<this.__tokens_length&&(t=this.__tokens[e]),t},e.prototype.add=function(e){this.__parent_token&&(e.parent=this.__parent_token),this.__tokens.push(e),this.__tokens_length+=1},oA.TokenStream=e,oA}().TokenStream,r=function(){if(lA)return sA;lA=1;var e=uA().Pattern;function t(t,n){e.call(this,t,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}return t.prototype=new e,t.prototype.__set_whitespace_patterns=function(e,t){e+="\\t ",t+="\\n\\r",this._match_pattern=this._input.get_regexp("["+e+t+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+t+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var e=this._input.read(this._match_pattern);if(" "===e)this.whitespace_before_token=" ";else if(e){var t=this.__split(this._newline_regexp,e);this.newline_count=t.length-1,this.whitespace_before_token=t[this.newline_count]}return e},t.prototype.matching=function(e,t){var n=this._create();return n.__set_whitespace_patterns(e,t),n._update(),n},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(e,t){e.lastIndex=0;for(var n=0,r=[],i=e.exec(t);i;)r.push(t.substring(n,i.index)),n=i.index+i[0].length,i=e.exec(t);return n<t.length?r.push(t.substring(n,t.length)):r.push(""),r},sA.WhitespacePattern=t,sA}().WhitespacePattern,i={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(t,n){this._input=new e(t),this._options=n||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};return o.prototype.tokenize=function(){var e;this._input.restart(),this.__tokens=new n,this._reset();for(var r=new t(i.START,""),o=null,a=[],l=new n;r.type!==i.EOF;){for(e=this._get_next_token(r,o);this._is_comment(e);)l.add(e),e=this._get_next_token(r,o);l.isEmpty()||(e.comments_before=l,l=new n),e.parent=o,this._is_opening(e)?(a.push(o),o=e):o&&this._is_closing(e,o)&&(e.opened=o,o.closed=e,o=a.pop(),e.parent=o),e.previous=r,r.next=e,this.__tokens.add(e),r=e}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(e,t){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(i.RAW,n):this._create_token(i.EOF,"")},o.prototype._is_comment=function(e){return!1},o.prototype._is_opening=function(e){return!1},o.prototype._is_closing=function(e,t){return!1},o.prototype._create_token=function(e,n){return new t(e,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},iA.Tokenizer=o,iA.TOKEN=i,iA}var hA,pA={};function mA(){if(hA)return pA;function e(e,t){e="string"==typeof e?e:e.source,t="string"==typeof t?t:t.source,this.__directives_block_pattern=new RegExp(e+/ beautify( \w+[:]\w+)+ /.source+t,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(e+/\sbeautify\signore:end\s/.source+t,"g")}return hA=1,e.prototype.get_directives=function(e){if(!e.match(this.__directives_block_pattern))return null;var t={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(e);n;)t[n[1]]=n[2],n=this.__directive_pattern.exec(e);return t},e.prototype.readIgnored=function(e){return e.readUntilAfter(this.__directives_end_ignore_pattern)},pA.Directives=e,pA}var CA,gA,vA,yA,wA={};function bA(){if(CA)return wA;CA=1;var e=uA().Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function n(n,r){e.call(this,n,r),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var i=new e(n);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}return n.prototype=new e,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t},n.prototype.read_options=function(e){var n=this._create();for(var r in t)n._disabled[r]=-1===e.templating.indexOf(r);return n._update(),n},n.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t},n.prototype.read=function(){var e="";e=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},n.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},n.prototype._read_template=function(){var e="",t=this._input.peek();if("<"===t){var n=this._input.peek(1);this._disabled.php||this._excluded.php||"?"!==n||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==n||(e=e||this.__patterns.erb.read())}else"{"===t&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return e},wA.TemplatablePattern=n,wA}function EA(){if(gA)return eA;gA=1;var e=nA().InputScanner,t=fA().Tokenizer,n=fA().TOKEN,r=mA().Directives,i=WM(),o=uA().Pattern,a=bA().TemplatablePattern;function l(e,t){return-1!==t.indexOf(e)}var c={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},s=new r(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,u=/[0-9]/,f=/[^\d\.]/,h=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),p=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";p=(p="\\?\\.(?!\\d) "+(p=p.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|");var m,C=new RegExp(p),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),v=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+v.join("|")+")$"),w=function(e,n){t.call(this,e,n),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var r=new o(this._input),l=new a(this._input).read_options(this._options);this.__patterns={template:l,identifier:l.starting_with(i.identifier).matching(i.identifierMatch),number:r.matching(d),punct:r.matching(C),comment:r.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:r.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:r.matching(/<!--/),html_comment_end:r.matching(/-->/),include:r.starting_with(/#include/).until_after(i.lineBreak),shebang:r.starting_with(/#!/).until_after(i.lineBreak),xml:r.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:l.until(/['\\\n\r\u2028\u2029]/),double_quote:l.until(/["\\\n\r\u2028\u2029]/),template_text:l.until(/[`\\$]/),template_expression:l.until(/[`}\\]/)}};return(w.prototype=new t)._is_comment=function(e){return e.type===c.COMMENT||e.type===c.BLOCK_COMMENT||e.type===c.UNKNOWN},w.prototype._is_opening=function(e){return e.type===c.START_BLOCK||e.type===c.START_EXPR},w.prototype._is_closing=function(e,t){return(e.type===c.END_BLOCK||e.type===c.END_EXPR)&&t&&("]"===e.text&&"["===t.text||")"===e.text&&"("===t.text||"}"===e.text&&"{"===t.text)},w.prototype._reset=function(){m=!1},w.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(c.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(r))||this._read_string(r))||this._read_pair(r,this._input.peek(1)))||this._read_word(e))||this._read_singles(r))||this._read_comment(r))||this._read_regexp(r,e))||this._read_xml(r,e))||this._read_punctuation())||this._create_token(c.UNKNOWN,this._input.next())},w.prototype._read_word=function(e){var t;return""!==(t=this.__patterns.identifier.read())?(t=t.replace(i.allLineBreaks,"\n"),e.type!==c.DOT&&(e.type!==c.RESERVED||"set"!==e.text&&"get"!==e.text)&&y.test(t)?"in"!==t&&"of"!==t||e.type!==c.WORD&&e.type!==c.STRING?this._create_token(c.RESERVED,t):this._create_token(c.OPERATOR,t):this._create_token(c.WORD,t)):""!==(t=this.__patterns.number.read())?this._create_token(c.WORD,t):void 0},w.prototype._read_singles=function(e){var t=null;return"("===e||"["===e?t=this._create_token(c.START_EXPR,e):")"===e||"]"===e?t=this._create_token(c.END_EXPR,e):"{"===e?t=this._create_token(c.START_BLOCK,e):"}"===e?t=this._create_token(c.END_BLOCK,e):";"===e?t=this._create_token(c.SEMICOLON,e):"."===e&&f.test(this._input.peek(1))?t=this._create_token(c.DOT,e):","===e&&(t=this._create_token(c.COMMA,e)),t&&this._input.next(),t},w.prototype._read_pair=function(e,t){var n=null;return"#"===e&&"{"===t&&(n=this._create_token(c.START_BLOCK,e+t)),n&&(this._input.next(),this._input.next()),n},w.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(""!==e)return"="===e?this._create_token(c.EQUALS,e):"?."===e?this._create_token(c.DOT,e):this._create_token(c.OPERATOR,e)},w.prototype._read_non_javascript=function(e){var t="";if("#"===e){if(this._is_first_token()&&(t=this.__patterns.shebang.read()))return this._create_token(c.UNKNOWN,t.trim()+"\n");if(t=this.__patterns.include.read())return this._create_token(c.UNKNOWN,t.trim()+"\n");e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(u)){do{n+=e=this._input.next()}while(this._input.hasNext()&&"#"!==e&&"="!==e);return"#"===e||("["===this._input.peek()&&"]"===this._input.peek(1)?(n+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(n+="{}",this._input.next(),this._input.next())),this._create_token(c.WORD,n)}this._input.back()}else if("<"===e&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(i.newline);)t+=this._input.next();return m=!0,this._create_token(c.COMMENT,t)}}else if(m&&"-"===e&&(t=this.__patterns.html_comment_end.read()))return m=!1,this._create_token(c.COMMENT,t);return null},w.prototype._read_comment=function(e){var t=null;if("/"===e){var n="";if("*"===this._input.peek(1)){n=this.__patterns.block_comment.read();var r=s.get_directives(n);r&&"start"===r.ignore&&(n+=s.readIgnored(this._input)),n=n.replace(i.allLineBreaks,"\n"),(t=this._create_token(c.BLOCK_COMMENT,n)).directives=r}else"/"===this._input.peek(1)&&(n=this.__patterns.comment.read(),t=this._create_token(c.COMMENT,n))}return t},w.prototype._read_string=function(t){if("`"===t||"'"===t||'"'===t){var n=this._input.next();return this.has_char_escapes=!1,n+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(n=function(t){var n="",r=0,i=new e(t),o=null;for(;i.hasNext();)if((o=i.match(/([\s]|[^\\]|\\\\)+/g))&&(n+=o[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())o=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){n+="\\",i.hasNext()&&(n+=i.next());continue}(o=i.match(/u([0-9A-Fa-f]{4})/g))||(o=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!o)return t;if((r=parseInt(o[1],16))>126&&r<=255&&0===o[0].indexOf("x"))return t;n+=r>=0&&r<32||r>1114111?"\\"+o[0]:34===r||39===r||92===r?"\\"+String.fromCharCode(r):String.fromCharCode(r)}return n}(n)),this._input.peek()===t&&(n+=this._input.next()),n=n.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,n)}return null},w.prototype._allow_regexp_or_xml=function(e){return e.type===c.RESERVED&&l(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===c.END_EXPR&&")"===e.text&&e.opened.previous.type===c.RESERVED&&l(e.opened.previous.text,["if","while","for"])||l(e.type,[c.COMMENT,c.START_EXPR,c.START_BLOCK,c.START,c.END_BLOCK,c.OPERATOR,c.EQUALS,c.EOF,c.SEMICOLON,c.COMMA])},w.prototype._read_regexp=function(e,t){if("/"===e&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),r=!1,o=!1;this._input.hasNext()&&(r||o||this._input.peek()!==e)&&!this._input.testChar(i.newline);)n+=this._input.peek(),r?r=!1:(r="\\"===this._input.peek(),"["===this._input.peek()?o=!0:"]"===this._input.peek()&&(o=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(i.identifier)),this._create_token(c.STRING,n)}return null},w.prototype._read_xml=function(e,t){if(this._options.e4x&&"<"===e&&this._allow_regexp_or_xml(t)){var n="",r=this.__patterns.xml.read_match();if(r){for(var o=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),a=0===o.indexOf("{"),l=0;r;){var s=!!r[1],d=r[2];if(!(!!r[r.length-1]||"![CDATA["===d.slice(0,8))&&(d===o||a&&d.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--l:++l),n+=r[0],l<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(i.allLineBreaks,"\n"),this._create_token(c.STRING,n)}}return null},w.prototype._read_string_recursive=function(e,t,n){var r,o;"'"===e?o=this.__patterns.single_quote:'"'===e?o=this.__patterns.double_quote:"`"===e?o=this.__patterns.template_text:"}"===e&&(o=this.__patterns.template_expression);for(var a=o.read(),l="";this._input.hasNext();){if((l=this._input.next())===e||!t&&i.newline.test(l)){this._input.back();break}"\\"===l&&this._input.hasNext()?("x"===(r=this._input.peek())||"u"===r?this.has_char_escapes=!0:"\r"===r&&"\n"===this._input.peek(1)&&this._input.next(),l+=this._input.next()):n&&("${"===n&&"$"===l&&"{"===this._input.peek()&&(l+=this._input.next()),n===l&&(l+="`"===e?this._read_string_recursive("}",t,"`"):this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(l+=this._input.next()))),a+=l+=o.read()}return a},eA.Tokenizer=w,eA.TOKEN=c,eA.positionable_operators=h.slice(),eA.line_starters=g.slice(),eA}function MA(){if(vA)return jM;vA=1;var e=RM().Output,t=FM().Token,n=WM(),r=JM().Options,i=EA().Tokenizer,o=EA().line_starters,a=EA().positionable_operators,l=EA().TOKEN;function c(e,t){return-1!==t.indexOf(e)}function s(e){return e.replace(/^\s+/g,"")}function d(e,t){return e&&e.type===l.RESERVED&&e.text===t}function u(e,t){return e&&e.type===l.RESERVED&&c(e.text,t)}var f=["case","return","do","if","throw","else","await","break","continue","async"],h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].replace(/-/g,"_")]=e[n];return t}(["before-newline","after-newline","preserve-newline"]),p=[h.before_newline,h.preserve_newline],m="BlockStatement",C="Statement",g="ObjectLiteral",v="ArrayLiteral",y="ForInitializer",w="Conditional",b="Expression";function E(e,t){t.multiline_frame||t.mode===y||t.mode===w||e.remove_indent(t.start_line_index)}function M(e){return e===v}function A(e){return c(e,[b,y,w])}function x(e,t){t=t||{},this._source_text=e||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new r(t)}x.prototype.create_flags=function(e,n){var r=0;return e&&(r=e.indentation_level,!this._output.just_added_newline()&&e.line_indent_level>r&&(r=e.line_indent_level)),{mode:n,parent:e,last_token:e?e.last_token:new t(l.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:r,alignment:0,line_indent_level:e?e.line_indent_level:r,start_line_index:this._output.get_line_number(),ternary_depth:0}},x.prototype._reset=function(t){var n=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new e(this._options,n),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(m);var r=new i(t,this._options);return this._tokens=r.tokenize(),t},x.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._reset(this._source_text),t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&n.lineBreak.test(e||"")&&(t=e.match(n.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return this._output.get_code(t)},x.prototype.handle_token=function(e,t){e.type===l.START_EXPR?this.handle_start_expr(e):e.type===l.END_EXPR?this.handle_end_expr(e):e.type===l.START_BLOCK?this.handle_start_block(e):e.type===l.END_BLOCK?this.handle_end_block(e):e.type===l.WORD||e.type===l.RESERVED?this.handle_word(e):e.type===l.SEMICOLON?this.handle_semicolon(e):e.type===l.STRING?this.handle_string(e):e.type===l.EQUALS?this.handle_equals(e):e.type===l.OPERATOR?this.handle_operator(e):e.type===l.COMMA?this.handle_comma(e):e.type===l.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===l.COMMENT?this.handle_comment(e,t):e.type===l.DOT?this.handle_dot(e):e.type===l.EOF?this.handle_eof(e):(e.type,l.UNKNOWN,this.handle_unknown(e,t))},x.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,r=this._options.keep_array_indentation&&M(this._flags.mode);if(e.comments_before)for(var i=e.comments_before.next();i;)this.handle_whitespace_and_comments(i,t),this.handle_token(i,t),i=e.comments_before.next();if(r)for(var o=0;o<n;o+=1)this.print_newline(o>0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var a=1;a<n;a+=1)this.print_newline(!0,t)}};var k=["async","break","continue","return","throw","yield"];return x.prototype.allow_wrap_or_preserved_newline=function(e,t){if(t=void 0!==t&&t,!this._output.just_added_newline()){var n=this._options.preserve_newlines&&e.newlines||t;if(c(this._flags.last_token.text,a)||c(e.text,a)){var r=c(this._flags.last_token.text,a)&&c(this._options.operator_position,p)||c(e.text,a);n=n&&r}if(n)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(u(this._flags.last_token,k))return;this._output.set_wrap_point()}}},x.prototype.print_newline=function(e,t){if(!t&&";"!==this._flags.last_token.text&&","!==this._flags.last_token.text&&"="!==this._flags.last_token.text&&(this._flags.last_token.type!==l.OPERATOR||"--"===this._flags.last_token.text||"++"===this._flags.last_token.text))for(var n=this._tokens.peek();!(this._flags.mode!==C||this._flags.if_block&&d(n,"else")||this._flags.do_block);)this.restore_mode();this._output.add_new_line(e)&&(this._flags.multiline_frame=!0)},x.prototype.print_token_line_indentation=function(e){this._output.just_added_newline()&&(this._options.keep_array_indentation&&e.newlines&&("["===e.text||M(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(e.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},x.prototype.print_token=function(e){if(this._output.raw)this._output.add_raw_token(e);else{if(this._options.comma_first&&e.previous&&e.previous.type===l.COMMA&&this._output.just_added_newline()&&","===this._output.previous_line.last()){var t=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(t),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(e),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(e),this._output.non_breaking_space=!0,this._output.add_token(e.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)}},x.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},x.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===C&&E(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},x.prototype.start_of_object_property=function(){return this._flags.parent.mode===g&&this._flags.mode===C&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"]))},x.prototype.start_of_statement=function(e){var t=!1;return!!(t=(t=(t=(t=(t=(t=(t=t||u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD)||d(this._flags.last_token,"do"))||!(this._flags.parent.mode===g&&this._flags.mode===C)&&u(this._flags.last_token,k)&&!e.newlines)||d(this._flags.last_token,"else")&&!(d(e,"if")&&!e.comments_before))||this._flags.last_token.type===l.END_EXPR&&(this._previous_flags.mode===y||this._previous_flags.mode===w))||this._flags.last_token.type===l.WORD&&this._flags.mode===m&&!this._flags.in_case&&!("--"===e.text||"++"===e.text)&&"function"!==this._last_last_text&&e.type!==l.WORD&&e.type!==l.RESERVED)||this._flags.mode===g&&(":"===this._flags.last_token.text&&0===this._flags.ternary_depth||u(this._flags.last_token,["get","set"])))&&(this.set_mode(C),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,u(e,["do","for","if","while"])),!0)},x.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=b;if("["===e.text){if(this._flags.last_token.type===l.WORD||")"===this._flags.last_token.text)return u(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));t=v,M(this._flags.mode)&&("["!==this._flags.last_token.text&&(","!==this._flags.last_token.text||"]"!==this._last_last_text&&"}"!==this._last_last_text)||this._options.keep_array_indentation||this.print_newline()),c(this._flags.last_token.type,[l.START_EXPR,l.END_EXPR,l.WORD,l.OPERATOR,l.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===l.RESERVED)"for"===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,t=y):c(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=w):c(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:"import"===this._flags.last_token.text&&""===e.whitespace_before?this._output.space_before_token=!1:(c(this._flags.last_token.text,o)||"catch"===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===l.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);u(n,["async","function"])||"*"===n.text&&u(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===g?"{"!==n.text&&","!==n.text&&("*"!==n.text||"{"!==r.text&&","!==r.text)||(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===l.RESERVED&&("function"===this._flags.last_word||"typeof"===this._flags.last_word)||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}";"===this._flags.last_token.text||this._flags.last_token.type===l.START_BLOCK?this.print_newline():this._flags.last_token.type!==l.END_EXPR&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.END_BLOCK&&"."!==this._flags.last_token.text&&this._flags.last_token.type!==l.COMMA||this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},x.prototype.handle_end_expr=function(e){for(;this._flags.mode===C;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,"]"===e.text&&M(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==l.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(e),this.restore_mode(),E(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w&&(this._previous_flags.mode=b,this._flags.do_block=!1,this._flags.do_while=!1)},x.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);"switch"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR?(this.set_mode(m),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(m):n&&(c(n.text,[":",","])&&c(t.type,[l.STRING,l.WORD,l.RESERVED])||c(t.text,["get","set","..."])&&c(n.type,[l.WORD,l.RESERVED]))?c(this._last_last_text,["class","interface"])&&!c(n.text,[":",","])?this.set_mode(m):this.set_mode(g):this._flags.last_token.type===l.OPERATOR&&"=>"===this._flags.last_token.text?this.set_mode(m):c(this._flags.last_token.type,[l.EQUALS,l.START_EXPR,l.COMMA,l.OPERATOR])||u(this._flags.last_token,["return","throw","import","default"])?this.set_mode(g):this.set_mode(m),this._flags.last_token&&u(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!t.comments_before&&"}"===t.text,i=r&&"function"===this._flags.last_word&&this._flags.last_token.type===l.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do{if(o+=1,(a=this._tokens.peek(o-1)).newlines){this._flags.inline_frame=!1;break}}while(a.type!==l.EOF&&(a.type!==l.END_BLOCK||a.opened!==e))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==l.OPERATOR&&(i||this._flags.last_token.type===l.EQUALS||u(this._flags.last_token,f)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!M(this._previous_flags.mode)||this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.COMMA||((this._flags.last_token.type===l.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==l.OPERATOR&&this._flags.last_token.type!==l.START_EXPR&&(c(this._flags.last_token.type,[l.START_BLOCK,l.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),r||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},x.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===C;)this.restore_mode();var t=this._flags.last_token.type===l.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:"expand"===this._options.brace_style?t||this.print_newline():t||(M(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)},x.prototype.handle_word=function(e){if(e.type===l.RESERVED)if(c(e.text,["set","get"])&&this._flags.mode!==g)e.type=l.WORD;else if("import"===e.text&&c(this._tokens.peek().text,["(","."]))e.type=l.WORD;else if(c(e.text,["as","from"])&&!this._flags.import_block)e.type=l.WORD;else if(this._flags.mode===g){":"===this._tokens.peek().text&&(e.type=l.WORD)}if(this.start_of_statement(e)?u(this._flags.last_token,["var","let","const"])&&e.type===l.WORD&&(this._flags.declaration_statement=!0):!e.newlines||A(this._flags.mode)||this._flags.last_token.type===l.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===l.EQUALS||!this._options.preserve_newlines&&u(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(e):(this.handle_whitespace_and_comments(e),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(d(e,"while"))return this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&d(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===C;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&u(e,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(e),void(this._flags.in_case=!0);if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR&&this._flags.last_token.type!==l.EQUALS&&this._flags.last_token.type!==l.OPERATOR||this.start_of_object_property()||c(this._flags.last_token.text,["+","-"])&&":"===this._last_last_text&&this._flags.parent.mode===g||this.allow_wrap_or_preserved_newline(e),d(e,"function"))return(c(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!c(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==l.OPERATOR)&&(this._output.just_added_blankline()||e.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD?u(this._flags.last_token,["get","set","new","export"])||u(this._flags.last_token,k)||d(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===l.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!A(this._flags.mode)&&!M(this._flags.mode))&&this.print_newline(),this.print_token(e),void(this._flags.last_word=e.text);var t="NONE";(this._flags.last_token.type===l.END_BLOCK?this._previous_flags.inline_frame?t="SPACE":u(e,["else","catch","finally","from"])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines?t="NEWLINE":(t="SPACE",this._output.space_before_token=!0):t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&this._flags.mode===m?t="NEWLINE":this._flags.last_token.type===l.SEMICOLON&&A(this._flags.mode)?t="SPACE":this._flags.last_token.type===l.STRING?t="NEWLINE":this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||"*"===this._flags.last_token.text&&(c(this._last_last_text,["function","yield"])||this._flags.mode===g&&c(this._last_last_text,["{",","]))?t="SPACE":this._flags.last_token.type===l.START_BLOCK?t=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===l.END_EXPR&&(this._output.space_before_token=!0,t="NEWLINE"),u(e,o)&&")"!==this._flags.last_token.text&&(t=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),u(e,["else","catch","finally"]))?(this._flags.last_token.type!==l.END_BLOCK||this._previous_flags.mode!==m||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&e.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===t?u(this._flags.last_token,f)||"declare"===this._flags.last_token.text&&u(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==l.END_EXPR?this._flags.last_token.type===l.START_EXPR&&u(e,["var","let","const"])||":"===this._flags.last_token.text||(d(e,"if")&&d(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):u(e,o)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&M(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===t&&(this._output.space_before_token=!0);!e.previous||e.previous.type!==l.WORD&&e.previous.type!==l.RESERVED||(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===l.RESERVED&&("do"===e.text?this._flags.do_block=!0:"if"===e.text?this._flags.if_block=!0:"import"===e.text?this._flags.import_block=!0:this._flags.import_block&&d(e,"from")&&(this._flags.import_block=!1))},x.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();!(this._flags.mode!==C||this._flags.if_block&&d(t,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)},x.prototype.handle_string=function(e){(!e.text.startsWith("`")||0!==e.newlines||""!==e.whitespace_before||")"!==e.previous.text&&this._flags.last_token.type!==l.WORD)&&(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===l.RESERVED||this._flags.last_token.type===l.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===l.COMMA||this._flags.last_token.type===l.START_EXPR||this._flags.last_token.type===l.EQUALS||this._flags.last_token.type===l.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):!e.text.startsWith("`")||this._flags.last_token.type!==l.END_EXPR||"]"!==e.previous.text&&")"!==e.previous.text||0!==e.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(e)},x.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0},x.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(A(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===g||this._flags.mode===C&&this._flags.parent.mode===g?(this._flags.mode===C&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)},x.prototype.handle_operator=function(e){var t="*"===e.text&&(u(this._flags.last_token,["function","yield"])||c(this._flags.last_token.type,[l.START_BLOCK,l.COMMA,l.END_BLOCK,l.SEMICOLON])),n=c(e.text,["-","+"])&&(c(this._flags.last_token.type,[l.START_BLOCK,l.START_EXPR,l.EQUALS,l.OPERATOR])||c(this._flags.last_token.text,o)||","===this._flags.last_token.text);if(this.start_of_statement(e));else{var r=!t;this.handle_whitespace_and_comments(e,r)}if("*"!==e.text||this._flags.last_token.type!==l.DOT)if("::"!==e.text)if(c(e.text,["-","+"])&&this.start_of_object_property())this.print_token(e);else{if(this._flags.last_token.type===l.OPERATOR&&c(this._options.operator_position,p)&&this.allow_wrap_or_preserved_newline(e),":"===e.text&&this._flags.in_case)return this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==l.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,s=!0,d=!1;if(":"===e.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,d=!0):"?"===e.text&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&c(e.text,a)){var g=":"===e.text,v=g&&d,y=g&&!d;switch(this._options.operator_position){case h.before_newline:return this._output.space_before_token=!y,this.print_token(e),g&&!v||this.allow_wrap_or_preserved_newline(e),void(this._output.space_before_token=!0);case h.after_newline:return this._output.space_before_token=!0,!g||v?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),void(this._output.space_before_token=!0);case h.preserve_newline:return y||this.allow_wrap_or_preserved_newline(e),i=!(this._output.just_added_newline()||y),this._output.space_before_token=i,this.print_token(e),void(this._output.space_before_token=!0)}}if(t){this.allow_wrap_or_preserved_newline(e),i=!1;var w=this._tokens.peek();s=w&&c(w.type,[l.WORD,l.RESERVED])}else if("..."===e.text)this.allow_wrap_or_preserved_newline(e),i=this._flags.last_token.type===l.START_BLOCK,s=!1;else if(c(e.text,["--","++","!","~"])||n){if(this._flags.last_token.type!==l.COMMA&&this._flags.last_token.type!==l.START_EXPR||this.allow_wrap_or_preserved_newline(e),i=!1,s=!1,e.newlines&&("--"===e.text||"++"===e.text||"~"===e.text)){var b=u(this._flags.last_token,f)&&e.newlines;b&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(b,!0)}";"===this._flags.last_token.text&&A(this._flags.mode)&&(i=!0),this._flags.last_token.type===l.RESERVED?i=!0:this._flags.last_token.type===l.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===e.text||"++"===e.text)):this._flags.last_token.type===l.OPERATOR&&(i=c(e.text,["--","-","++","+"])&&c(this._flags.last_token.text,["--","-","++","+"]),c(e.text,["+","-"])&&c(this._flags.last_token.text,["--","++"])&&(s=!0)),(this._flags.mode!==m||this._flags.inline_frame)&&this._flags.mode!==C||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(e),this._output.space_before_token=s}else this.print_token(e);else this.print_token(e)},x.prototype.handle_block_comment=function(e,t){return this._output.raw?(this._output.add_raw_token(e),void(e.directives&&"end"===e.directives.preserve&&(this._output.raw=this._options.test_output_raw))):e.directives?(this.print_newline(!1,t),this.print_token(e),"start"===e.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):n.newline.test(e.text)||e.newlines?void this.print_block_commment(e,t):(this._output.space_before_token=!0,this.print_token(e),void(this._output.space_before_token=!0))},x.prototype.print_block_commment=function(e,t){var r,i=function(e){for(var t=[],r=(e=e.replace(n.allLineBreaks,"\n")).indexOf("\n");-1!==r;)t.push(e.substring(0,r)),r=(e=e.substring(r+1)).indexOf("\n");return e.length&&t.push(e),t}(e.text),o=!1,a=!1,l=e.whitespace_before,c=l.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(i[0]),this.print_newline(!1,t),i.length>1){for(o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].trim().charAt(0)!==t)return!1;return!0}(i=i.slice(1),"*"),a=function(e,t){for(var n,r=0,i=e.length;r<i;r++)if((n=e[r])&&0!==n.indexOf(t))return!1;return!0}(i,l),o&&(this._flags.alignment=1),r=0;r<i.length;r++)o?(this.print_token_line_indentation(e),this._output.add_token(s(i[r]))):a&&i[r]?(this.print_token_line_indentation(e),this._output.add_token(i[r].substring(c))):(this._output.current_line.set_indent(-1),this._output.add_token(i[r])),this.print_newline(!1,t);this._flags.alignment=0}},x.prototype.handle_comment=function(e,t){e.newlines?this.print_newline(!1,t):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(e),this.print_newline(!1,t)},x.prototype.handle_dot=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),u(this._flags.last_token,f)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(e,")"===this._flags.last_token.text&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(e)},x.prototype.handle_unknown=function(e,t){this.print_token(e),"\n"===e.text[e.text.length-1]&&this.print_newline(!1,t)},x.prototype.handle_eof=function(e){for(;this._flags.mode===C;)this.restore_mode();this.handle_whitespace_and_comments(e)},jM.Beautifier=x,jM}var AA,xA,kA,LA={exports:{}},HA={},_A={};function SA(){if(AA)return _A;AA=1;var e=XM().Options;function t(t){e.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<r.length;i++)"expand"!==r[i]?this.brace_style="collapse":this.brace_style=r[i]}return t.prototype=new e,_A.Options=t,_A}function VA(){if(kA)return LA.exports;kA=1;var e=function(){if(xA)return HA;xA=1;var e=SA().Options,t=RM().Output,n=nA().InputScanner,r=new(0,mA().Directives)(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=/\s/,l=/(?:\s|\n)+/g,c=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,s=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(t,n){this._source_text=t||"",this._options=new e(n),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}return d.prototype.eatString=function(e){var t="";for(this._ch=this._input.next();this._ch;){if(t+=this._ch,"\\"===this._ch)t+=this._input.next();else if(-1!==e.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return t},d.prototype.eatWhitespace=function(e){for(var t=a.test(this._input.peek()),n=0;a.test(this._input.peek());)this._ch=this._input.next(),e&&"\n"===this._ch&&(0===n||n<this._options.max_preserve_newlines)&&(n++,this._output.add_new_line(!0));return t},d.prototype.foundNestedPseudoClass=function(){for(var e=0,t=1,n=this._input.peek(t);n;){if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(";"===n||"}"===n)return!1;t++,n=this._input.peek(t)}return!1},d.prototype.print_string=function(e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(e)},d.prototype.preserveSingleSpace=function(e){e&&(this._output.space_before_token=!0)},d.prototype.indent=function(){this._indentLevel++},d.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,d=this._options.eol;"auto"===d&&(d="\n",e&&i.test(e||"")&&(d=e.match(i)[0]));var u=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0];this._output=new t(this._options,u),this._input=new n(e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var f,h,p=0,m=!1,C=!1,g=!1,v=!1,y=!1,w=this._ch,b=!1;f=""!==this._input.read(l),h=w,this._ch=this._input.next(),"\\"===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),w=this._ch,this._ch;)if("/"===this._ch&&"*"===this._input.peek()){this._output.add_new_line(),this._input.back();var E=this._input.read(c),M=r.get_directives(E);M&&"start"===M.ignore&&(E+=r.readIgnored(this._input)),this.print_string(E),this.eatWhitespace(!0),this._output.add_new_line()}else if("/"===this._ch&&"/"===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(s)),this.eatWhitespace(!0);else if("$"===this._ch){this.preserveSingleSpace(f),this.print_string(this._ch);var A=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);A.match(/[ :]$/)&&(A=this.eatString(": ").replace(/\s+$/,""),this.print_string(A),this._output.space_before_token=!0),0===p&&-1!==A.indexOf(":")&&(C=!0,this.indent())}else if("@"===this._ch)if(this.preserveSingleSpace(f),"{"===this._input.peek())this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var x=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);x.match(/[ :]$/)&&(x=this.eatString(": ").replace(/\s+$/,""),this.print_string(x),this._output.space_before_token=!0),0===p&&-1!==x.indexOf(":")?(C=!0,this.indent()):x in this.NESTED_AT_RULE?(this._nestedLevel+=1,x in this.CONDITIONAL_GROUP_RULE&&(g=!0)):0!==p||C||(v=!0)}else if("#"===this._ch&&"{"===this._input.peek())this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if("{"===this._ch)C&&(C=!1,this.outdent()),v=!1,g?(g=!1,m=this._indentLevel>=this._nestedLevel):m=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&m&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===h?this._output.space_before_token=!1:","!==h&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===h&&this._output.trim(!0),C&&(this.outdent(),C=!1),this.print_string(this._ch),m=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var k=0;k<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;k++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[k])){b=!0;break}!m&&!g||this._input.lookBack("&")||this.foundNestedPseudoClass()||this._input.lookBack("(")||v||0!==p?(this._input.lookBack(" ")&&(this._output.space_before_token=!0),":"===this._input.peek()?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):(this.print_string(":"),C||(C=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent()))}else if('"'===this._ch||"'"===this._ch){var L='"'===h||"'"===h;this.preserveSingleSpace(L||f),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(";"===this._ch)b=!1,0===p?(C&&(this.outdent(),C=!1),v=!1,this.print_string(this._ch),this.eatWhitespace(!0),"/"!==this._input.peek()&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if("("===this._ch)if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),p++,this.indent(),this._ch=this._input.next(),")"===this._ch||'"'===this._ch||"'"===this._ch?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),p&&(p--,this.outdent()));else{var H=!1;this._input.lookBack("with")&&(H=!0),this.preserveSingleSpace(f||H),this.print_string(this._ch),C&&"$"===h&&this._options.selector_separator_newline?(this._output.add_new_line(),y=!0):(this.eatWhitespace(),p++,this.indent())}else if(")"===this._ch)p&&(p--,this.outdent()),y&&";"===this._input.peek()&&this._options.selector_separator_newline&&(y=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(","===this._ch)this.print_string(this._ch),this.eatWhitespace(!0),!this._options.selector_separator_newline||C&&!y||0!==p||v?this._output.space_before_token=!0:this._output.add_new_line();else if(">"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||C||0!==p)if("]"===this._ch)this.print_string(this._ch);else if("["===this._ch)this.preserveSingleSpace(f),this.print_string(this._ch);else if("="===this._ch)this.eatWhitespace(),this.print_string("="),a.test(this._ch)&&(this._ch="");else if("!"!==this._ch||this._input.lookBack("\\")){var _='"'===h||"'"===h;this.preserveSingleSpace(_||f),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&b&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&a.test(this._ch)&&(this._ch=""));return this._output.get_code(d)},HA.Beautifier=d,HA}().Beautifier,t=SA().Options;return LA.exports=function(t,n){return new e(t,n).beautify()},LA.exports.defaultOptions=function(){return new t},LA.exports}var OA,zA={exports:{}},NA={},IA={};function TA(){if(OA)return IA;OA=1;var e=XM().Options;function t(t){e.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}return t.prototype=new e,IA.Options=t,IA}var DA,jA,ZA,RA,BA,PA={};function FA(){if(DA)return PA;DA=1;var e=fA().Tokenizer,t=fA().TOKEN,n=mA().Directives,r=bA().TemplatablePattern,i=uA().Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:t.START,RAW:t.RAW,EOF:t.EOF},a=new n(/<\!--/,/-->/),l=function(t,n){e.call(this,t,n),this._current_tag_name="";var o=new r(this._input).read_options(this._options),a=new i(this._input);if(this.__patterns={word:o.until(/[\n\r\t <]/),word_control_flow_close_excluded:o.until(/[\n\r\t <}]/),single_quote:o.until_after(/'/),double_quote:o.until_after(/"/),attribute:o.until(/[\n\r\t =>]|\/>/),element_name:o.until(/[\n\r\t >\/]/),angular_control_flow_start:a.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:a.starting_with(/{{!--/).until_after(/--}}/),handlebars:a.starting_with(/{{/).until_after(/}}/),handlebars_open:a.until(/[\n\r\t }]/),handlebars_raw_close:a.until(/}}/),comment:a.starting_with(/<!--/).until_after(/-->/),cdata:a.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:a.starting_with(/<!\[/).until_after(/]>/),processing:a.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var l=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=a.matching(l).until_after(l)}};return(l.prototype=new e)._is_comment=function(e){return!1},l.prototype._is_opening=function(e){return e.type===o.TAG_OPEN||e.type===o.CONTROL_FLOW_OPEN},l.prototype._is_closing=function(e,t){return e.type===o.TAG_CLOSE&&t&&((">"===e.text||"/>"===e.text)&&"<"===t.text[0]||"}}"===e.text&&"{"===t.text[0]&&"{"===t.text[1])||e.type===o.CONTROL_FLOW_CLOSE&&"}"===e.text&&t.text.endsWith("{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(e,t){var n=null;this._readWhitespace();var r=this._input.peek();return null===r?this._create_token(o.EOF,""):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(r,t))||this._read_attribute(r,e,t))||this._read_close(r,t))||this._read_script_and_style(r,e))||this._read_control_flows(r,t))||this._read_raw_content(r,e,t))||this._read_content_word(r,t))||this._read_comment_or_cdata(r))||this._read_processing(r))||this._read_open(r,t))||this._create_token(o.UNKNOWN,this._input.next())},l.prototype._read_comment_or_cdata=function(e){var t=null,n=null,r=null;"<"===e&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(r=a.get_directives(n))&&"start"===r.ignore&&(n+=a.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=r));return t},l.prototype._read_processing=function(e){var t=null,n=null;if("<"===e){var r=this._input.peek(1);"!"!==r&&"?"!==r||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((t=this._create_token(o.COMMENT,n)).directives=null)}return t},l.prototype._read_open=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||"<"===e&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(o.TAG_OPEN,n)),r},l.prototype._read_open_handlebars=function(e,t){var n=null,r=null;return t&&t.type!==o.CONTROL_FLOW_OPEN||(this._options.templating.includes("angular")||this._options.indent_handlebars)&&"{"===e&&"{"===this._input.peek(1)&&(this._options.indent_handlebars&&"!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),r=this._create_token(o.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(o.TAG_OPEN,n))),r},l.prototype._read_control_flows=function(e,t){var n="",r=null;if(!this._options.templating.includes("angular"))return r;if("@"===e){if(""===(n=this.__patterns.angular_control_flow_start.read()))return r;for(var i=n.endsWith("(")?1:0,a=0;!n.endsWith("{")||i!==a;){var l=this._input.next();if(null===l)break;"("===l?i++:")"===l&&a++,n+=l}r=this._create_token(o.CONTROL_FLOW_OPEN,n)}else"}"===e&&t&&t.type===o.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(o.CONTROL_FLOW_CLOSE,n));return r},l.prototype._read_close=function(e,t){var n=null,r=null;return t&&t.type===o.TAG_OPEN&&("<"===t.text[0]&&(">"===e||"/"===e&&">"===this._input.peek(1))?(n=this._input.next(),"/"===e&&(n+=this._input.next()),r=this._create_token(o.TAG_CLOSE,n)):"{"===t.text[0]&&"}"===e&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),r=this._create_token(o.TAG_CLOSE,"}}"))),r},l.prototype._read_attribute=function(e,t,n){var r=null,i="";if(n&&"<"===n.text[0])if("="===e)r=this._create_token(o.EQUALS,this._input.next());else if('"'===e||"'"===e){var a=this._input.next();a+='"'===e?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),r=this._create_token(o.VALUE,a)}else(i=this.__patterns.attribute.read())&&(r=t.type===o.EQUALS?this._create_token(o.VALUE,i):this._create_token(o.ATTRIBUTE,i));return r},l.prototype._is_content_unformatted=function(e){return-1===this._options.void_elements.indexOf(e)&&(-1!==this._options.content_unformatted.indexOf(e)||-1!==this._options.unformatted.indexOf(e))},l.prototype._read_raw_content=function(e,t,n){var r="";if(n&&"{"===n.text[0])r=this.__patterns.handlebars_raw_close.read();else if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var i=t.opened.text.substr(1).toLowerCase();this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("</"+i+"[\\n\\r\\t ]*?>","ig")))}return r?this._create_token(o.TEXT,r):null},l.prototype._read_script_and_style=function(e,t){if(t.type===o.TAG_CLOSE&&"<"===t.opened.text[0]&&"/"!==t.text[0]){var n=t.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){var r=this._read_comment_or_cdata(e);if(r)return r.type=o.TEXT,r;var i=this._input.readUntil(new RegExp("</"+n+"[\\n\\r\\t ]*?>","ig"));if(i)return this._create_token(o.TEXT,i)}}return null},l.prototype._read_content_word=function(e,t){var n="";return this._options.unformatted_content_delimiter&&e===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=t&&t.type===o.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n?this._create_token(o.TEXT,n):null},PA.Tokenizer=l,PA.TOKEN=o,PA}function UA(){if(jA)return NA;jA=1;var e=TA().Options,t=RM().Output,n=FA().Tokenizer,r=FA().TOKEN,i=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,a=function(e,n){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=e.max_preserve_newlines,this.preserve_newlines=e.preserve_newlines,this._output=new t(e,n)};a.prototype.current_line_has_match=function(e){return this._output.current_line.has_match(e)},a.prototype.set_space_before_token=function(e,t){this._output.space_before_token=e,this._output.non_breaking_space=t},a.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},a.prototype.add_raw_token=function(e){this._output.add_raw_token(e)},a.prototype.print_preserved_newlines=function(e){var t=0;e.type!==r.TEXT&&e.previous.type!==r.TEXT&&(t=e.newlines?1:0),this.preserve_newlines&&(t=e.newlines<this.max_preserve_newlines+1?e.newlines:this.max_preserve_newlines+1);for(var n=0;n<t;n++)this.print_newline(n>0);return 0!==t},a.prototype.traverse_whitespace=function(e){return!(!e.whitespace_before&&!e.newlines)&&(this.print_preserved_newlines(e)||(this._output.space_before_token=!0),!0)},a.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},a.prototype.print_newline=function(e){this._output.add_new_line(e)},a.prototype.print_token=function(e){e.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(e.text))},a.prototype.indent=function(){this.indent_level++},a.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},a.prototype.get_full_indent=function(e){return(e=this.indent_level+(e||0))<1?"":this._output.get_indent_string(e)};var l=function(e,t){var n=null,i=null;return t.closed?("script"===e?n="text/javascript":"style"===e&&(n="text/css"),n=function(e){for(var t=null,n=e.next;n.type!==r.EOF&&e.closed!==n;){if(n.type===r.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===r.EQUALS&&n.next.next&&n.next.next.type===r.VALUE&&(t=n.next.next.text);break}n=n.next}return t}(t)||n,n.search("text/css")>-1?i="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?i="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?i="html":n.search(/test\/null/)>-1&&(i="null"),i):null};function c(e,t){return-1!==t.indexOf(e)}function s(e,t,n){this.parent=e||null,this.tag=t?t.tag_name:"",this.indent_level=n||0,this.parser_token=t||null}function d(e){this._printer=e,this._current_frame=null}function u(t,n,r,i){this._source_text=t||"",n=n||{},this._js_beautify=r,this._css_beautify=i,this._tag_stack=null;var o=new e(n,"html");this._options=o,this._is_wrap_attributes_force="force"===this._options.wrap_attributes.substr(0,5),this._is_wrap_attributes_force_expand_multiline="force-expand-multiline"===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned="force-aligned"===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple="aligned-multiple"===this._options.wrap_attributes,this._is_wrap_attributes_preserve="preserve"===this._options.wrap_attributes.substr(0,8),this._is_wrap_attributes_preserve_aligned="preserve-aligned"===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(e){var t=new s(this._current_frame,e,this._printer.indent_level);this._current_frame=t},d.prototype._try_pop_frame=function(e){var t=null;return e&&(t=e.parser_token,this._printer.indent_level=e.indent_level,this._current_frame=e.parent),t},d.prototype._get_frame=function(e,t){for(var n=this._current_frame;n&&-1===e.indexOf(n.tag);){if(t&&-1!==t.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(e,t){var n=this._get_frame([e],t);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(e){var t=this._get_frame(e);t&&(this._printer.indent_level=t.indent_level)},u.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e=this._source_text,t=this._options.eol;"auto"===this._options.eol&&(t="\n",e&&i.test(e)&&(t=e.match(i)[0]));var l=(e=e.replace(o,"\n")).match(/^[\t ]*/)[0],c={text:"",type:""},s=new f(this._options),u=new a(this._options,l),h=new n(e,this._options).tokenize();this._tag_stack=new d(u);for(var p=null,m=h.next();m.type!==r.EOF;)m.type===r.TAG_OPEN||m.type===r.COMMENT?s=p=this._handle_tag_open(u,m,s,c,h):m.type===r.ATTRIBUTE||m.type===r.EQUALS||m.type===r.VALUE||m.type===r.TEXT&&!s.tag_complete?p=this._handle_inside_tag(u,m,s,c):m.type===r.TAG_CLOSE?p=this._handle_tag_close(u,m,s):m.type===r.TEXT?p=this._handle_text(u,m,s):m.type===r.CONTROL_FLOW_OPEN?p=this._handle_control_flow_open(u,m):m.type===r.CONTROL_FLOW_CLOSE?p=this._handle_control_flow_close(u,m):u.add_raw_token(m),c=p,m=h.next();return u._output.get_code(t)},u.prototype._handle_control_flow_open=function(e,t){var n={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),e.indent(),n},u.prototype._handle_control_flow_close=function(e,t){var n={text:t.text,type:t.type};return e.deindent(),t.newlines?e.print_preserved_newlines(t):e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),e.print_token(t),n},u.prototype._handle_tag_close=function(e,t,n){var r={text:t.text,type:t.type};return e.alignment_size=0,n.tag_complete=!0,e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):("<"===n.tag_start_char&&(e.set_space_before_token("/"===t.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&e.print_newline(!1)),e.print_token(t)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(e.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||e.set_wrap_point(),r},u.prototype._handle_inside_tag=function(e,t,n,i){var o=n.has_wrapped_attrs,a={text:t.text,type:t.type};return e.set_space_before_token(t.newlines||""!==t.whitespace_before,!0),n.is_unformatted?e.add_raw_token(t):"{"===n.tag_start_char&&t.type===r.TEXT?e.print_preserved_newlines(t)?(t.newlines=0,e.add_raw_token(t)):e.print_token(t):(t.type===r.ATTRIBUTE?e.set_space_before_token(!0):(t.type===r.EQUALS||t.type===r.VALUE&&t.previous.type===r.EQUALS)&&e.set_space_before_token(!1),t.type===r.ATTRIBUTE&&"<"===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(e.traverse_whitespace(t),o=o||0!==t.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(i.type!==r.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(e.print_newline(!1),o=!0)),e.print_token(t),o=o||e.previous_token_wrapped(),n.has_wrapped_attrs=o),a},u.prototype._handle_text=function(e,t,n){var r={text:t.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(e,t,n):n.is_unformatted||n.is_content_unformatted?e.add_raw_token(t):(e.traverse_whitespace(t),e.print_token(t)),r},u.prototype._print_custom_beatifier_text=function(e,t,n){var r=this;if(""!==t.text){var i,o=t.text,a=1,l="",c="";"javascript"===n.custom_beautifier_name&&"function"==typeof this._js_beautify?i=this._js_beautify:"css"===n.custom_beautifier_name&&"function"==typeof this._css_beautify?i=this._css_beautify:"html"===n.custom_beautifier_name&&(i=function(e,t){return new u(e,t,r._js_beautify,r._css_beautify).beautify()}),"keep"===this._options.indent_scripts?a=0:"separate"===this._options.indent_scripts&&(a=-e.indent_level);var s=e.get_full_indent(a);if(o=o.replace(/\n[ \t]*$/,""),"html"!==n.custom_beautifier_name&&"<"===o[0]&&o.match(/^(<!--|<!\[CDATA\[)/)){var d=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(o);if(!d)return void e.add_raw_token(t);l=s+d[1]+"\n",o=d[4],d[5]&&(c=s+d[5]),o=o.replace(/\n[ \t]*$/,""),(d[2]||-1!==d[3].indexOf("\n"))&&(d=d[3].match(/[ \t]+$/))&&(t.whitespace_before=d[0])}if(o)if(i){var f=function(){this.eol="\n"};f.prototype=this._options.raw_options,o=i(s+o,new f)}else{var h=t.whitespace_before;h&&(o=o.replace(new RegExp("\n("+h+")?","g"),"\n")),o=s+o.replace(/\n/g,"\n"+s)}l&&(o=o?l+o+"\n"+c:l+c),e.print_newline(!1),o&&(t.text=o,t.whitespace_before="",t.newlines=0,e.add_raw_token(t),e.print_newline(!0))}},u.prototype._handle_tag_open=function(e,t,n,i,o){var a=this._get_tag_open_token(t);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||t.type!==r.TAG_OPEN||a.is_start_tag?(e.traverse_whitespace(t),this._set_tag_position(e,t,a,n,i),a.is_inline_element||e.set_wrap_point(),e.print_token(t)):(e.add_raw_token(t),a.start_tag_token=this._tag_stack.try_pop(a.tag_name)),a.is_start_tag&&this._is_wrap_attributes_force){var l,c=0;do{(l=o.peek(c)).type===r.ATTRIBUTE&&(a.attr_count+=1),c+=1}while(l.type!==r.EOF&&l.type!==r.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(a.alignment_size=t.text.length+1),a.tag_complete||a.is_unformatted||(e.alignment_size=a.alignment_size),a};var f=function(e,t,n){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",n){var i;this.tag_start_char=n.text[0],this.text=n.text,"<"===this.tag_start_char?(i=n.text.match(/^<([^\s>]*)/),this.tag_check=i?i[1]:""):(i=n.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=i?i[1]:"",(n.text.startsWith("{{#>")||n.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==n.next?this.tag_check=n.next.text.split(" ")[0]:this.tag_check=n.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),n.type===r.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||n.closed&&"/>"===n.closed.text;var o=2;"{"===this.tag_start_char&&this.text.length>=3&&"~"===this.text.charAt(2)&&(o=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(!e.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(o)))}else this.tag_complete=!0};u.prototype._get_tag_open_token=function(e){var t=new f(this._options,this._tag_stack.get_parser_token(),e);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||c(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&c(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&c(t.tag_check,this._options.content_unformatted),t.is_inline_element=c(t.tag_name,this._options.inline)||this._options.inline_custom_elements&&t.tag_name.includes("-")||"{"===t.tag_start_char,t},u.prototype._set_tag_position=function(e,t,n,i,o){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||e.print_newline(!1)),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=l(n.tag_check,t)))),c(n.tag_check,this._options.extra_liners)&&(e.print_newline(!1),e._output.just_added_blankline()||e.print_newline(!0)),n.is_empty_element){if("{"===n.tag_start_char&&"else"===n.tag_check)this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,e.current_line_has_match(/{{#if/)||e.print_newline(!1);"!--"===n.tag_name&&o.type===r.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n))}else if(n.is_end_tag){var a=!1;a=(a=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(o.type===r.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==o.type,(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&e.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===o.type&&!n.is_content_unformatted||e.print_newline(!1),this._calcluate_parent_multiline(e,n)},u.prototype._calcluate_parent_multiline=function(e,t){!t.parent||!e._output.just_added_newline()||(t.is_inline_element||t.is_unformatted)&&t.parent.is_inline_element||(t.parent.multiline_content=!0)};var h=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],p=["a","audio","del","ins","map","noscript","video"];return u.prototype._do_optional_end_element=function(e){var t=null;if(!e.is_empty_element&&e.is_start_tag&&e.parent){if("body"===e.tag_name)t=t||this._tag_stack.try_pop("head");else if("li"===e.tag_name)t=t||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if("dd"===e.tag_name||"dt"===e.tag_name)t=(t=t||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]);else if("p"===e.parent.tag_name&&-1!==h.indexOf(e.tag_name)){var n=e.parent.parent;n&&-1!==p.indexOf(n.tag_name)||(t=t||this._tag_stack.try_pop("p"))}else"rp"===e.tag_name||"rt"===e.tag_name?t=(t=t||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===e.tag_name?t=t||this._tag_stack.try_pop("optgroup",["select"]):"option"===e.tag_name?t=t||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===e.tag_name?t=t||this._tag_stack.try_pop("caption",["table"]):"thead"===e.tag_name?t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===e.tag_name||"tfoot"===e.tag_name?t=(t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===e.tag_name?t=(t=(t=t||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==e.tag_name&&"td"!==e.tag_name||(t=(t=t||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return e.parent=this._tag_stack.get_parser_token(),t}},NA.Beautifier=u,NA}function qA(){if(RA)return TM;RA=1;var e=function(){if(yA)return DM.exports;yA=1;var e=MA().Beautifier,t=JM().Options;return DM.exports=function(t,n){return new e(t,n).beautify()},DM.exports.defaultOptions=function(){return new t},DM.exports}(),t=VA(),n=function(){if(ZA)return zA.exports;ZA=1;var e=UA().Beautifier,t=TA().Options;return zA.exports=function(t,n,r,i){return new e(t,n,r,i).beautify()},zA.exports.defaultOptions=function(){return new t},zA.exports}();function r(r,i,o,a){return n(r,i,o=o||e,a=a||t)}return r.defaultOptions=n.defaultOptions,TM.js=e,TM.css=t,TM.html=r,TM}var WA=(BA||(BA=1,function(e){var t,n,r,i,o=qA();o.js_beautify=o.js,o.css_beautify=o.css,o.html_beautify=o.html,e.exports=(t=o,n=o,r=o,i=function(e,n){return t.js_beautify(e,n)},i.js=t.js_beautify,i.css=n.css_beautify,i.html=r.html_beautify,i.js_beautify=t.js_beautify,i.css_beautify=n.css_beautify,i.html_beautify=r.html_beautify,i)}(IM)),IM.exports);const QA=(e,t,n=150)=>{if(!e||!t)return{top:0,left:0};const{top:r,left:i}=e,o=t.getBoundingClientRect();let a=r,l=i;return a-=a+n>t.clientHeight-n+130?Math.floor(n/2)+n-35:10,i>.6*o.width?l-=n+50:i<.5*o.width+n&&(l-=42),{top:a,left:l}},GA=o(({width:t="100%",height:r="100%",VariableDropdownHeight:i="160px",readOnly:o=!1,value:c="",handleChange:d,setValue:u,variableOptionsList:f=[],addForloopPrefix:h=!1,language:p="json",theme:m="light",isRequisiteType:C=!1,onPaste:g,showVariableDropdown:v=!0,defaultValue:y,customOptions:w={},editorVariableZindex:E=99999,showMinimap:M=!0,isFocus:A=!1},x)=>{const k=a(null),L=a([]),H=a(null),_=a(null),[S,V]=s(0),[O,z]=s(!1),[N,I]=s(!1),[T,D]=s({top:0,left:0}),[j,Z]=s([]),R=a(f);l(()=>{R.current=f},[f]);l(()=>{const e=k.current;if(!e)return;const t=e.onDidBlurEditorWidget(()=>{I(!1),H.current=null,_.current=null,L.current=[],V(0)}),n=t=>{const n=e.getDomNode(),r=n&&n.contains(t.target);if(!r||r&&!t.target.closest(".view-line, .monaco-editor-textarea")){const e=n?.querySelector("textarea");e&&e.blur()}};return document.addEventListener("mousedown",n),()=>{t.dispose(),document.removeEventListener("mousedown",n)}},[N]),l(()=>{const e=k.current;if(!e||!S)return;const t=[],n=[];O?n.push({range:{startLineNumber:S,startColumn:1,endLineNumber:S,endColumn:1},options:{isWholeLine:!1,linesDecorationsClassName:"active-line-number"}}):t.push({range:{startLineNumber:S,startColumn:1,endLineNumber:S,endColumn:1},options:{isWholeLine:!0,className:"current-line-background"}}),L.current=e.deltaDecorations(L.current,[...t,...n])},[S,O]);const B=(e,t)=>{switch(t){case"json":case"javascript":return WA.js(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!0,brace_style:"collapse",space_before_conditional:!0,unescape_strings:!0,jslint_happy:!0,end_with_newline:!0,wrap_line_length:0,comma_first:!1,e4x:!0,indent_empty_lines:!0});case"html":case"xml":return WA.html(e,{indent_size:4,indent_char:" ",max_preserve_newlines:5,preserve_newlines:!0,end_with_newline:!0,wrap_line_length:0,indent_empty_lines:!0});default:return e}};return b(x,()=>({getEditorInstance:()=>k.current,focus:()=>{k.current?.focus()},beautify:()=>{if(k.current){const e=k.current.getValue(),t=k.current.getModel()?.getLanguageId(),n=B(e,t||"json");k.current.setValue(n)}}})),n("div",{style:{width:t,height:r},className:"ff-editor-container",children:[e(NM,{defaultValue:y,height:r,width:t,language:p,value:c,options:{minimap:{enabled:M},lineNumbers:"on",wordWrap:"on",autoClosingBrackets:"always",scrollBeyondLastLine:!1,readOnly:o,guides:{indentation:!1},...w},onMount:(e,t)=>{k.current=e,A&&setTimeout(()=>{e.focus()},0),e.onDidChangeCursorPosition(t=>{V(t.position.lineNumber);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-1;if(0===o)return void I(!1);const a=i.lastIndexOf("$",o-1),l=i.lastIndexOf("${",o-1),c=-1!==l?i.indexOf("}",l+2):-1,s=-1!==l&&-1!==c&&o-1>l&&o-1<c,d=!/\}/.test(i.slice(a+1,o));if(-1!==a&&o>a&&!/\s/.test(i.slice(a+1,o))&&!s&&d){H.current=a,_.current=i.slice(a+1,o);const r=(_.current??"").toLowerCase(),l=R.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(r));Z(l);const c=e.getScrolledVisiblePosition(n),s=e.getDomNode();D(QA(c,s,150)),["keyboard","mouse","deleteLeft"].includes(t?.source||"")&&I(!0)}else I(!1),H.current=null,_.current=null}),e.onMouseDown(()=>{setTimeout(()=>{const e=k.current;if(!e)return;const t=e.getPosition(),n=e.getModel();if(!t||!n)return;const r=n.getLineContent(t.lineNumber),i=t.column-2;"$"===r[i]?(H.current=i,_.current=""):(H.current=null,_.current=null)},0)}),e.onDidChangeCursorSelection(()=>{const t=(e.getSelections?.()||[]).some(e=>e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn);z(t)}),e.onDidChangeModelContent(()=>{const t=e.getValue();u(t);const n=e.getPosition(),r=e.getModel();if(!n||!r)return;const i=r.getLineContent(n.lineNumber),o=n.column-2;if("$"===i[H.current??o]){null===H.current&&(H.current=o),_.current=i.slice(H.current+1,o);const t=R.current.filter(e=>("_startforloop"===e.type&&h?`FLV_for:${e.name}`:e.name).toLowerCase().includes(_.current?.toLowerCase()));t.length?Z(t):(Z([]),H?.current!==o&&" "===i[o]&&(H.current=null,_.current=null,I(!1)));const r=e.getScrolledVisiblePosition(n),a=e.getDomNode();D(QA(r,a,150))}else H.current=null,_.current=null}),e.onDidPaste(()=>{const t=e.getValue();if(t){const n=B(t,p);e.setValue(n),g&&g(n)}}),t.languages.registerCompletionItemProvider(p,{triggerCharacters:["."],provideCompletionItems:(e,n)=>{const r=e.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}),i=e.getWordAtPosition(n),o=i?new t.Range(n.lineNumber,i.startColumn,n.lineNumber,i.endColumn):new t.Range(n.lineNumber,n.column,n.lineNumber,n.column),a=[];return r.endsWith("ff.")&&a.push({label:"getVariable",kind:t.languages.CompletionItemKind.Method,insertText:"getVariable(${1:variableName})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Get a variable value",range:o},{label:"setVariable",kind:t.languages.CompletionItemKind.Method,insertText:"setVariable(${1:variableName}, ${2:value})",insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Set a variable value",range:o},{label:"sendRequest",kind:t.languages.CompletionItemKind.Method,insertText:'sendRequest({\n method: "GET",//add your method\n url: "https://fakestoreapi.com/products",//enter your url\n headers: { },//add your headers,\n params: params,//add your params,\n data: body,//add your request body,\n })',insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,detail:"Make your http requests",range:o}),{suggestions:a}}})},onChange:(e,t)=>d(e,t),theme:m}),N&&T&&v&&e(Zb,{position:"absolute",width:"300px",height:i,optionsList:j,onSelectVariable:e=>{if(C&&k.current){const t=k.current,n=t.getPosition();if(n){const r=`'${e.name}'`,i=H?.current??0;t.executeEdits("",[{range:{startLineNumber:n.lineNumber,startColumn:i+1,endLineNumber:n.lineNumber,endColumn:i+(n.column-i)},text:r,forceMoveMarkers:!0}]),_.current=null,H.current=null,I(!1)}}else((e,t)=>{if(k.current){const n=k.current,r=n.getPosition();if(r){const i=`{${t}${"FLV_for:"===t?"":"_"}${e}}`,o=H?.current??0;n.executeEdits("",[{range:{startLineNumber:r.lineNumber,startColumn:o+2,endLineNumber:r.lineNumber,endColumn:o+(r.column-o)},text:i,forceMoveMarkers:!1}]);const a=[];a.push({range:{startLineNumber:S,startColumn:1,endLineNumber:S,endColumn:1},options:{isWholeLine:!1}}),L.current=n.deltaDecorations(L.current,a),_.current=null,H.current=null,I(!1)}}})("DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e?.name,"STEPGROUP"===e.parentVariableType?"SGV":"GLOBAL"===e?.type?"GV":"LOCAL"===e?.type?"LV":e?._id?.includes("PARAMETER")?"SGP":"_startforloop"===e?.type?"FLV_for:":"DATAPROVIDER"===e?.type?"DPV":"PEV")},dropdownPosition:T,zIndex:E})]})}),KA=e=>e.flatMap(e=>e.runLevelExecutionDataSets.map((t,n)=>{const{runLevelExecutionDataSets:r,...i}=e;return{...i,...t,runCount:n+1}}));var YA,XA={exports:{}};var JA=(YA||(YA=1,"undefined"!=typeof self&&self,XA.exports=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="lib/",n(n.s=5)}([function(t,n){t.exports=e},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainerContextProvider=t.ArcherContainerContext=void 0;var i=r(n(0));t.ArcherContainerContext=i.default.createContext(null),t.ArcherContainerContextProvider=t.ArcherContainerContext.Provider},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=void 0,t.encodeId=function(e){return encodeURI(e).replace(/%/g,"_")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getMarkerId=t.createShapeObj=t.getSourceToTargets=t.getEndShapeFromStyle=void 0;var r=["arrow","circle"];t.getEndShapeFromStyle=function(e){return e.endShape&&Object.keys(e.endShape).filter(function(e){return r.includes(e)})[0]||r[0]},t.getSourceToTargets=function(e){var t=Object.keys(e).map(function(t){return e[t]});return[].concat.apply([],t).sort(function(e,t){return e.order-t.order})},t.createShapeObj=function(e,n){return{arrow:function(){var t;return{arrow:Object.assign(Object.assign({},null==n?void 0:n.arrow),null===(t=e.endShape)||void 0===t?void 0:t.arrow)}},circle:function(){var t;return{circle:Object.assign(Object.assign({},null==n?void 0:n.circle),null===(t=e.endShape)||void 0===t?void 0:t.circle)}}}[(0,t.getEndShapeFromStyle)(e)]()},t.getMarkerId=function(e,t,n){return"".concat(e).concat(t.id).concat(n.id)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.endShapeDefaultProp=void 0,t.endShapeDefaultProp={arrow:{arrowLength:10,arrowThickness:6},circle:{radius:2,fillColor:"#f00",strokeColor:"#0ff",strokeWidth:1}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArcherContainer=t.ArcherElement=void 0;var i=n(6);Object.defineProperty(t,"ArcherElement",{enumerable:!0,get:function(){return r(i).default}});var o=n(11);Object.defineProperty(t,"ArcherContainer",{enumerable:!0,get:function(){return r(o).default}})},function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n(0)),l=n(7),c=n(1),s=n(2),d=n(8),u=n(10);t.default=function(e){var t=e.id,n=e.relations,r=void 0===n?[]:n,i=e.children,o=(0,a.useMemo)(function(){return(0,s.encodeId)(t)},[t]),f=(0,a.useContext)(c.ArcherContainerContext),h=(0,a.useRef)(),p=(0,a.useCallback)(function(e){var t=(0,u.generateSourceToTarget)(o,e);(0,u.assertContextExists)(f),f.registerTransitions(o,t)},[f,o]),m=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterTransitions(o)},[f,o]),C=(0,a.useCallback)(function(e){e&&((0,u.assertContextExists)(f),f.registerChild(o,e))},[o,f]),g=(0,a.useCallback)(function(){(0,u.assertContextExists)(f),f.unregisterChild(o)},[f,o]);(0,l.useIsomorphicLayoutEffect)(function(){return C(h.current),function(){return g()}},[C,g]),(0,d.useDeepCompareEffect)(function(){return p(r),function(){return m()}},[p,r,m]),a.default.Children.only(i);var v=i;return a.default.cloneElement(v,Object.assign(Object.assign({},v.props),{ref:h}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useIsomorphicLayoutEffect=void 0;var r=n(0);t.useIsomorphicLayoutEffect="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useDeepCompareEffect=void 0;var i=n(0),o=r(n(9));function a(e){var t=(0,i.useRef)();return(0,o.default)(e,t.current)||(t.current=e),t.current}t.useDeepCompareEffect=function(e,t){(0,i.useEffect)(e,t.map(a))}},function(e,t,n){var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var l,c,s,d=r(t),u=r(n);if(d&&u){if((c=t.length)!=n.length)return!1;for(l=c;0!=l--;)if(!e(t[l],n[l]))return!1;return!0}if(d!=u)return!1;var f=t instanceof Date,h=n instanceof Date;if(f!=h)return!1;if(f&&h)return t.getTime()==n.getTime();var p=t instanceof RegExp,m=n instanceof RegExp;if(p!=m)return!1;if(p&&m)return t.toString()==n.toString();var C=i(t);if((c=C.length)!==i(n).length)return!1;for(l=c;0!=l--;)if(!o.call(n,C[l]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(l=c;0!=l--;)if(!("_owner"===(s=C[l])&&t.$$typeof||e(t[s],n[s])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.generateSourceToTarget=t.assertContextExists=void 0;var r=n(2);t.assertContextExists=function(e){if(!e)throw new Error("Could not find ArcherContainerContext in <ArcherElement>. Please wrap the component in a <ArcherContainer>.")},t.generateSourceToTarget=function(e,t){return t.map(function(t){var n=t.targetId,i=t.sourceAnchor,o=t.targetAnchor,a=t.label,l=t.className,c=t.style,s=t.order,d=void 0===s?0:s,u=t.domAttributes,f=t.cursor,h=t.hitSlop;return{source:{id:(0,r.encodeId)(e),anchor:i},target:{id:(0,r.encodeId)(n),anchor:o},className:l,label:a,style:c,order:d,domAttributes:u,cursor:f,hitSlop:h}})}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return l(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=c(n(0)),u=s(n(12)),f=n(1),h=n(14),p=n(4),m=n(19),C=n(20),g={position:"absolute",width:"100%",height:"100%",top:0,left:0,pointerEvents:"none"},v=d.default.forwardRef(function(e,t){var n=e.endShape,o=void 0===n?p.endShapeDefaultProp:n,a=e.strokeColor,l=void 0===a?"#f00":a,c=e.strokeWidth,s=void 0===c?2:c,v=e.svgContainerStyle,y=void 0===v?{}:v,w=e.noCurves,b=e.children,E=e.className,M=e.endMarker,A=e.lineStyle,x=e.offset,k=e.startMarker,L=e.strokeDasharray,H=e.style,_=i((0,d.useState)({}),2),S=_[0],V=_[1],O=i((0,d.useState)({}),2),z=O[0],N=O[1],I=(0,d.useRef)(new u.default(function(){R()})).current,T=(0,d.useRef)(null),D=i(d.default.useState(),2)[1],j=(0,d.useRef)("arrow".concat(Math.random().toString().slice(2))).current;(0,d.useImperativeHandle)(t,function(){return{refreshScreen:R,arrowMarkerUniquePrefix:j}});var Z,R=d.default.useCallback(function(){return D({})},[]),B=(0,d.useCallback)(function(e,t){N(function(n){return Object.assign(Object.assign({},n),r({},e,t))})},[]),P=(0,d.useCallback)(function(e){N(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),F=(0,d.useCallback)(function(e,t){V(function(n){return n[e]===t?n:Object.assign(Object.assign({},n),r({},e,t))})},[]),U=(0,d.useCallback)(function(e){V(function(t){var n=Object.assign({},t);return delete n[e],n})},[]),q=(0,d.useMemo)(function(){return Object.assign(Object.assign({},g),y)},[y]);Z="function"==typeof b?b(f.ArcherContainerContext):b,(0,C.useResizeListener)(R),(0,C.useObserveElements)(S,I);var W=(0,d.useMemo)(function(){return{registerTransitions:B,unregisterTransitions:P,registerChild:F,unregisterChild:U}},[B,P,F,U]);return d.default.createElement(f.ArcherContainerContextProvider,{value:W},d.default.createElement("div",{style:Object.assign(Object.assign({},H),{position:"relative"}),className:E},d.default.createElement("svg",{style:q},d.default.createElement("defs",null,d.default.createElement(m.ArrowMarkers,{endShape:o,sourceToTargetsMap:z,strokeColor:l,uniqueId:j})),d.default.createElement(h.SvgArrows,{startMarker:k,endMarker:M,endShape:o,strokeColor:l,strokeWidth:s,strokeDasharray:L,noCurves:w,lineStyle:A,offset:x,parentCurrent:T.current,refs:S,uniqueId:j,sourceToTargetsMap:z})),d.default.createElement("div",{style:{height:"100%"},ref:T},Z)))});t.default=v},function(e,t,n){n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},a=2,l=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,s=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function l(){n&&(n=!1,e()),r&&s()}function c(){o(l)}function s(){var e=Date.now();if(n){if(e-i<a)return;r=!0}else n=!0,r=!1,setTimeout(c,t);i=e}return s}(this.refresh.bind(this),20)};s.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},s.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},s.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},s.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},s.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},s.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},s.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),l.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},s.getInstance=function(){return this.instance_||(this.instance_=new s),this.instance_},s.instance_=null;var d=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=v(0,0,0,0);function h(e){return parseFloat(e)||0}function p(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+h(e["border-"+n+"-width"])},0)}function m(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=u(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,l=h(r.width),c=h(r.height);if("border-box"===r.boxSizing&&(Math.round(l+o)!==t&&(l-=p(r,"left","right")+o),Math.round(c+a)!==n&&(c-=p(r,"top","bottom")+a)),!function(e){return e===u(e).document.documentElement}(e)){var s=Math.round(l+o)-t,d=Math.round(c+a)-n;1!==Math.abs(s)&&(l-=s),1!==Math.abs(d)&&(c-=d)}return v(i.left,i.top,l,c)}var C="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?C(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):m(e):f}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e};y.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},y.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var w=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return d(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);d(this,{target:e,contentRect:n})},b=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};b.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},b.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},b.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},b.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},b.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new w(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},b.prototype.clearActive=function(){this.activeObservations_.splice(0)},b.prototype.hasActive=function(){return this.activeObservations_.length>0};var E="undefined"!=typeof WeakMap?new WeakMap:new n,M=function(e){if(!(this instanceof M))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s.getInstance(),n=new b(e,t,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){return(t=E.get(this))[e].apply(t,arguments);var t}});var A=void 0!==i.ResizeObserver?i.ResizeObserver:M;t.default=A}.call(this,n(13))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SvgArrows=void 0;var i=r(n(0)),o=n(15),a=r(n(17)),l=n(3),c=function(e){var t,n,r=e.style||{},c=r.startMarker||e.startMarker,s=null===(n=null!==(t=r.endMarker)&&void 0!==t?t:e.endMarker)||void 0===n||n,d=(0,l.createShapeObj)(r,e.endShape),u=e.domAttributes,f=e.cursor,h=e.hitSlop,p=r.strokeColor||e.strokeColor,m=r.strokeWidth||e.strokeWidth,C=r.strokeDasharray||e.strokeDasharray,g=!(!r.noCurves&&!e.noCurves),v=r.lineStyle||e.lineStyle||(g?"angle":"curve"),y=e.offset||0,w=e.source.anchor,b=(0,o.getPointCoordinatesFromAnchorPosition)(e.source.anchor,e.source.id,e.parentCoordinates,e.refs),E=e.target.anchor,M=(0,o.getPointCoordinatesFromAnchorPosition)(e.target.anchor,e.target.id,e.parentCoordinates,e.refs);return b?M?i.default.createElement(a.default,{className:e.className,startingPoint:b,startingAnchorOrientation:w,endingPoint:M,endingAnchorOrientation:E,strokeColor:p,strokeWidth:m,strokeDasharray:C,arrowLabel:e.label,arrowMarkerId:(0,l.getMarkerId)(e.uniqueId,e.source,e.target),lineStyle:v,offset:y,enableStartMarker:!!c,disableEndMarker:!s,endShape:d,domAttributes:u,hitSlop:h,cursor:f}):(console.warn("[React Archer] Could not find target element! Not drawing the arrow."),null):(console.warn("[React Archer] Could not find starting point of element! Not drawing the arrow."),null)};t.SvgArrows=function(e){var t=(0,o.getPointFromElement)(e.parentCurrent);return t?i.default.createElement(i.default.Fragment,null,(0,l.getSourceToTargets)(e.sourceToTargetsMap).map(function(n){return i.default.createElement(c,{key:JSON.stringify({source:n.source,target:n.target}),source:n.source,target:n.target,className:n.className,label:n.label,style:n.style||{},domAttributes:n.domAttributes,hitSlop:n.hitSlop,cursor:n.cursor,startMarker:e.startMarker,endMarker:e.endMarker,endShape:e.endShape,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,noCurves:e.noCurves,lineStyle:e.lineStyle,offset:e.offset,parentCoordinates:t,refs:e.refs,uniqueId:e.uniqueId})})):null}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPointCoordinatesFromAnchorPosition=t.getPointFromElement=void 0;var i=r(n(16));function o(e){return new i.default(e.left,e.top)}var a=function(e){return e?e.getBoundingClientRect():null};t.getPointFromElement=function(e){var t=a(e);return t?o(t):null},t.getPointCoordinatesFromAnchorPosition=function(e,t,n,r){var l=a(r[t]);if(!l)return null;var c=function(e,t){switch(e){case"top":return o(t).add(new i.default(t.width/2,0));case"bottom":return o(t).add(new i.default(t.width/2,t.height));case"left":return o(t).add(new i.default(0,t.height/2));case"right":return o(t).add(new i.default(t.width,t.height/2));case"middle":return o(t).add(new i.default(t.width/2,t.height/2));default:return console.error("[React Archer] Invalid anchor position was provided. Not drawing the arrow."),null}}(e,l);return c?c.substract(n):null}},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=n}return function(e,t){t&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"add",value:function(t){return new e(this.x+t.x,this.y+t.y)}},{key:"substract",value:function(t){return new e(this.x-t.x,this.y-t.y)}}]),e}();t.default=i},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computeLabelDimensions=t.computeEndingAnchorPosition=t.computeStartingAnchorPosition=t.computeArrowPointAccordingToArrowHead=void 0;var i=r(n(0)),o=n(18);function a(e,t,n,r,i,a,l,c){var s=(0,o.computeArrowDirectionVector)(i),d=s.arrowX,u=s.arrowY;if("straight"===a&&void 0!==l&&void 0!==c){var f=Math.atan2(c-t,l-e);d=Math.cos(f),u=Math.sin(f)}return{xPoint:e+d*n*r/2,yPoint:t+u*n*r/2}}function l(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor1:e,yAnchor1:t+(r-t)/2}:"left"===i||"right"===i?{xAnchor1:e+(n-e)/2,yAnchor1:t}:{xAnchor1:e,yAnchor1:t}}function c(e,t,n,r,i){return"top"===i||"bottom"===i?{xAnchor2:n,yAnchor2:r-(r-t)/2}:"left"===i||"right"===i?{xAnchor2:n-(n-e)/2,yAnchor2:r}:{xAnchor2:n,yAnchor2:r}}function s(e,t,n,r){return{xLabel:n>e?e:n,yLabel:r>t?t:r,labelWidth:Math.max(Math.abs(n-e),1),labelHeight:Math.max(Math.abs(r-t),1)}}t.computeArrowPointAccordingToArrowHead=a,t.computeStartingAnchorPosition=l,t.computeEndingAnchorPosition=c,t.computeLabelDimensions=s,t.default=function(e){var t=e.className,n=e.startingPoint,r=e.startingAnchorOrientation,o=e.endingPoint,d=e.endingAnchorOrientation,u=e.strokeColor,f=e.strokeWidth,h=e.strokeDasharray,p=e.arrowLabel,m=e.arrowMarkerId,C=e.lineStyle,g=e.offset,v=e.enableStartMarker,y=e.disableEndMarker,w=e.endShape,b=e.domAttributes,E=e.hitSlop,M=void 0===E?10:E,A=e.cursor,x=void 0===A?"pointer":A,k=w.circle?2*w.circle.radius:2*w.arrow.arrowLength,L=a(n.x,n.y,v?k:0,f,r,C,o.x,o.y),H=L.xPoint,_=L.yPoint,S=a(o.x,o.y,y?0:k,f,d,C,n.x,n.y),V=S.xPoint,O=S.yPoint,z=l(H,_,V,O,r),N=z.xAnchor1,I=z.yAnchor1,T=c(H,_,V,O,d),D=function(e){var t=e.xStart,n=e.yStart,r=e.xAnchor1,i=e.yAnchor1,o=e.xAnchor2,a=e.yAnchor2,l=e.xEnd,c=e.yEnd,s=e.lineStyle,d=e.offset;if(d&&0!==d){var u="straight"===s?Math.atan2(c-n,l-t):Math.atan2(i-n,r-t),f=d*Math.cos(u),h=d*Math.sin(u);"straight"!==s&&(t+=f,n+=h),l-=f,c-=h}var p="M".concat(t,",").concat(n," ");return["curve","angle"].includes(s)&&(p+="".concat("curve"===s?"C":"").concat(r,",").concat(i," ").concat(o,",").concat(a," ")),p+"".concat(l,",").concat(c)}({xStart:H,yStart:_,xAnchor1:N,yAnchor1:I,xAnchor2:T.xAnchor2,yAnchor2:T.yAnchor2,xEnd:V,yEnd:O,lineStyle:C,offset:g}),j=s(H,_,V,O),Z=j.xLabel,R=j.yLabel,B=j.labelWidth,P=j.labelHeight,F="url(#".concat(m,")");return i.default.createElement("g",{className:t},i.default.createElement("path",{d:D,style:{fill:"none",stroke:u,strokeWidth:f,strokeDasharray:h},markerStart:v?F:void 0,markerEnd:y?void 0:F}),b&&i.default.createElement("path",Object.assign({d:D,style:{fill:"none",stroke:"rgba(0, 0, 0, 0)",strokeWidth:M,cursor:b?x:"initial",pointerEvents:"all"}},b)),p&&i.default.createElement("foreignObject",{x:Z,y:R,width:B,height:P,style:{overflow:"visible",pointerEvents:"none"}},i.default.createElement("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)",pointerEvents:"all"}},i.default.createElement("div",null,p))))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.computeArrowDirectionVector=void 0,t.computeArrowDirectionVector=function(e){switch(e){case"left":return{arrowX:-1,arrowY:0};case"right":return{arrowX:1,arrowY:0};case"top":return{arrowX:0,arrowY:-1};case"bottom":return{arrowX:0,arrowY:1};default:return{arrowX:0,arrowY:0}}}},function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowMarkers=void 0;var i=r(n(0)),o=n(4),a=n(3),l=function(e,t){return function(){var n,r,a,l,c,s,d,u,f,h,p,m,C=(null===(r=null===(n=e.endShape)||void 0===n?void 0:n.circle)||void 0===r?void 0:r.radius)||(null===(a=t.circle)||void 0===a?void 0:a.radius)||o.endShapeDefaultProp.circle.radius,g=(null===(c=null===(l=e.endShape)||void 0===l?void 0:l.circle)||void 0===c?void 0:c.strokeWidth)||(null===(s=t.circle)||void 0===s?void 0:s.strokeWidth)||o.endShapeDefaultProp.circle.strokeWidth,v=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.circle)||void 0===u?void 0:u.strokeColor)||(null===(f=t.circle)||void 0===f?void 0:f.strokeColor)||o.endShapeDefaultProp.circle.strokeColor,y=(null===(p=null===(h=e.endShape)||void 0===h?void 0:h.circle)||void 0===p?void 0:p.fillColor)||(null===(m=t.circle)||void 0===m?void 0:m.fillColor)||o.endShapeDefaultProp.circle.fillColor;return{markerWidth:4*C,markerHeight:4*C,refX:2*C+g,refY:2*C,path:i.default.createElement("circle",{cx:2*C,cy:2*C,r:C,fill:y,stroke:v,strokeWidth:g})}}},c=function(e,t,n){return function(){var r,a,l,c,s,d,u,f,h=e.strokeColor||n,p=null!==(s=null!==(l=null===(a=null===(r=e.endShape)||void 0===r?void 0:r.arrow)||void 0===a?void 0:a.arrowLength)&&void 0!==l?l:null===(c=null==t?void 0:t.arrow)||void 0===c?void 0:c.arrowLength)&&void 0!==s?s:o.endShapeDefaultProp.arrow.arrowLength,m=(null===(u=null===(d=e.endShape)||void 0===d?void 0:d.arrow)||void 0===u?void 0:u.arrowThickness)||(null===(f=null==t?void 0:t.arrow)||void 0===f?void 0:f.arrowThickness)||o.endShapeDefaultProp.arrow.arrowThickness,C="M0,0 L0,".concat(m," L").concat(p,",").concat(m/2," z");return{markerWidth:p,markerHeight:m,refX:0,refY:m/2,path:i.default.createElement("path",{d:C,fill:h})}}};t.ArrowMarkers=function(e){var t=e.sourceToTargetsMap,n=e.endShape,r=e.strokeColor,o=e.uniqueId;return i.default.createElement(i.default.Fragment,null,(0,a.getSourceToTargets)(t).map(function(e){var t=e.source,s=e.target,d=e.style,u=function(e){var t=e.style,n=e.strokeColor,r=e.endShape,i=(0,a.getEndShapeFromStyle)(t);return{circle:l(t,r),arrow:c(t,r,n)}[i]()}({style:void 0===d?{}:d,endShape:n,strokeColor:r}),f=u.markerHeight,h=u.markerWidth,p=u.path,m=u.refX,C=u.refY;return i.default.createElement("marker",{id:(0,a.getMarkerId)(o,t,s),key:(0,a.getMarkerId)(o,t,s),markerWidth:h,markerHeight:f,refX:m,refY:C,orient:"auto-start-reverse",markerUnits:"strokeWidth"},p)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useResizeListener=t.useObserveElements=void 0;var r=n(0);t.useObserveElements=function(e,t){(0,r.useEffect)(function(){return Object.keys(e).map(function(n){t.observe(e[n])}),function(){Object.keys(e).map(function(n){t.unobserve(e[n])})}},[e,t])},t.useResizeListener=function(e){(0,r.useEffect)(function(){return window&&window.addEventListener("resize",e),function(){window&&window.removeEventListener("resize",e)}},[e])}}])}(i)),XA.exports);const $A=({getChildNodeComponent:r,parentNodeIndex:i,parentNodeData:o,verticalLineHeight:a,datasetHeight:l,curveHeights:c,itemRefs:s,datasetRef:d,isReadOnlyMode:u})=>e(t,{children:0===o?.machineInstances?.length?e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon ff-left-icon-aligned"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i})})]})}):o?.machineInstances?.map((f,h)=>{const p=0===h;return n("div",{className:"ff-machine-instance-row",children:[n("div",{className:"ff-selectedMachines-connecting-line "+(p?"":"ff-second-line"),children:[n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon "+(p?"ff-left-icon-aligned":"")}),e("div",{className:"ff-right-icon"})]}),p&&e("div",{className:"ff-vertical-line",style:{height:`${a}px`}})]}),e("div",{className:"ff-machine-instance",children:f?.runLevelExecutionDataSets?.map((a,u)=>e("div",{className:"ff-run-level-execution-dataset",ref:0===u?d:null,children:n("div",{className:"ff-execution-item",ref:e=>s.current[u]=e,children:[e("div",{className:"ff-curved-connector",style:{top:-l+"px"},children:n("div",{className:`ff-curve ff-connector-${u}`,style:{height:`${c[u]}px`},children:[e("div",{className:`ff-curve-right-icon ff-curve-right-icon-${u}`}),Number(f?.runScriptCount)?e("div",{className:"ff-selectedMachines-connecting-line-text",children:e(F,{fontSize:8,fontWeight:"regular",children:`${[0,"0",null].includes(f.runScriptCount)?"":f.runScriptCount} Script${1!==f.runScriptCount?"s":""}`})}):e(t,{})]})}),e("div",{className:"ff-run-data-box",children:r({isButton:!1,childNodeData:f,childNodeIndex:h,runLevelExecutionDataSet:a,runLevelExecutionDataSetIndex:u,parentNodeData:o,parentNodeIndex:i})})]})},a?.runLevelExecutionDataSetId))}),h===o?.machineInstances.length-1&&e(t,{children:!u&&n(t,{children:[e("div",{className:"ff-selectedMachines-connecting-line ff-second-line",children:n("div",{className:"ff-line",children:[e("div",{className:"ff-left-icon"}),e("div",{className:"ff-right-icon"})]})}),e("div",{className:"ff-machine-instance ff-machine-env-button",children:r({isButton:!0,parentNodeData:o,parentNodeIndex:i,childNodeIndex:h+1})})]})})]},h)})}),ex=({data:t,noOfScripts:r,getChildNodeComponent:o,getParentNodeComponent:c,getParentNodeComponentActionItems:d,childNodeCurveHeight:u=1.28,isReadOnlyMode:f=!1})=>{const h=a(null),[p,m]=s(0),[C,g]=s([]),v=a([]);l(()=>{h.current&&m(h.current.offsetHeight)},[t]);l(()=>{(()=>{const e=v.current.map((e,t)=>0===t?0:p*u);g(e)})()},[p,t]);const y=e=>1+(e.machineInstances?.length+1||0);let w=1;const b=t?.machines?.selectedMachines.reduce((e,t)=>f?e+(e=>!e?.machineInstances||G(e.machineInstances)?1:e.machineInstances.length)(t):e+y(t),0),E=Math.round(b/2);let M=1===E&&f&&2===b||1===E&&!f&&2===b;return e("div",{className:"connecting-branch-container",children:e(JA.ArcherContainer,{strokeColor:"var(--brand-color)",strokeWidth:1,startMarker:!0,endMarker:!1,noCurves:!0,children:n("div",{className:"ff-connecting-branch-grid-container",children:[e(JA.ArcherElement,{id:"rootNode",children:e("div",{className:"ff-grid-item ff-dynamic-item",style:{gridRow:E,top:M?"44px":""},children:e("div",{className:"ff-script-count-container",children:n("div",{className:"ff-script-count-box",children:[e(F,{children:r}),e(F,{children:"Scripts"})]})})})}),t?.machines?.selectedMachines.map((t,r)=>{const a=w,l=y(t);w+=l;const s=((e,t,n)=>{if(1===e.length&&f)return 0;const r=e.reduce((t,n,r)=>t+(r===e.length-1&&f?0:n.runLevelExecutionDataSets?.length||0),0);return r*(t+n)})(t?.machineInstances,p,16);return e(i.Fragment,{children:n("div",{className:"ff-selectedMachines",style:{gridRow:`${a} / span ${l}`},children:[e("div",{className:"ff-selectedMachines-input",children:n("div",{className:"ff-input-box-container "+(t?.machineInstances.length?"":"ff-input-box-aligned"),children:[e(JA.ArcherElement,{id:`parentnode${r}`,relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:c({isMultiSelect:!1,parentNodeData:t,parentNodeIndex:r})}),d({parentNodeData:t,parentNodeIndex:r})]})}),e($A,{parentNodeIndex:r,parentNodeData:t,verticalLineHeight:s,datasetHeight:p,curveHeights:C,itemRefs:v,datasetRef:h,getChildNodeComponent:o,isReadOnlyMode:f})]})},r)}),!f&&e("div",{className:"ff-select-machine-input",style:{gridRow:`${w}`},children:e(JA.ArcherElement,{id:"lastNode",relations:[{targetId:"rootNode",targetAnchor:"left",sourceAnchor:"left"}],children:e("div",{children:c({isMultiSelect:!0})})})})]})})})},tx=(e,t)=>{if(!(e&&e instanceof Blob))throw console.error("Invalid Blob object"),new Error("Invalid Blob object");const n=window.navigator;if(n.msSaveOrOpenBlob){const r=n.msSaveOrOpenBlob;r&&r(e,t)}else{const n=document.createElement("a");document.body.appendChild(n);const r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),setTimeout(()=>{window.URL.revokeObjectURL(r),document.body.removeChild(n)},0)}},nx=({hasAtSymbol:t,usersObj:n,optionClicked:r,charsAfterAt:i,mentionUserRef:o})=>{const[c,d]=s(0),u=a([]);if(!t)return null;const f=n.filter(e=>!i||e.name.toLowerCase().startsWith(i.toLowerCase()));l(()=>{d(0)},[i]);const h=p(e=>{if(t&&0!==f.length)switch(e.key){case"ArrowDown":e.preventDefault(),d(e=>(e+1)%f.length);break;case"ArrowUp":e.preventDefault(),d(e=>0===e?f.length-1:e-1);break;case"Enter":e.preventDefault();const t=f[c];t&&r(t.name,t.emailId)}},[f,c,t,r]);return l(()=>{u.current[c]&&u.current[c]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[c]),l(()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)),[h]),e("div",{className:"select-section",onMouseDown:e=>e.preventDefault(),children:e("div",{className:"select-group",ref:o,children:f.length?f.map((t,n)=>e("div",{ref:e=>u.current[n]=e,className:"mention-option "+(n===c?"hovered":""),onClick:()=>r(t.name,t.emailId),onMouseDown:e=>e.preventDefault(),children:e(F,{children:t.name})},t.id)):e("div",{className:"user-not-found",children:e(F,{children:"No user name found"})})})})},rx=e=>e&&Array.isArray(e)?e.map(({user:e})=>({id:e.id,name:e.name,emailId:e.emailId})):[],ix=(e,t)=>{const n=t.find(t=>`@${t.name.replace(/\s+/g,"")}`===e);return n?n.emailId:null},ox=({handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:o,depth:c=0,isDisable:d,userDetails:u,isEditDeleteActionAllowed:h=!0,createdByID:p,rowBreakCharCount:m=83,isVewMode:C=!1,deleteEnable:g=!0})=>{const[v,y]=s(""),[w,b]=s(!1),[E,M]=s(!1),[A,x]=s(!0),[k,L]=s([]),[H,_]=s(!1),[S,V]=s([]),[O,z]=s({top:0,left:0}),[N,I]=s(""),T=a(null),D=a(null),j=a(null);l(()=>{w&&o?.description&&y(o?.description)},[w,o.description]),l(()=>{const e=rx(u);L(e)},[u]),l(()=>{const e=(v.match(Lt)||[]).map(e=>ix(e,k)).filter(Boolean);V(e)},[v]),l(()=>{const e=e=>{const t=D.current&&!D.current.contains(e.target)&&T.current&&!T.current.contains(e.target),n=j.current&&!j.current.contains(e.target)&&T.current&&!T.current.contains(e.target);(t||n)&&(_(!1),y(e=>e.replace(/(?:^|\s)(@\w*)$/,"")))};return H&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[H]);const{modifiedByUname:Z,createdByUname:R,modifiedOn:B,createdOn:U}=o||{},q=B??U??(new Date).toLocaleString(),W=Z??R??"Anonymous",Q=c>2,G=W?W.charAt(0).toUpperCase():"A";l(()=>{w&&o.description&&y(o.description)},[w,o.description]);const Y=()=>{0!==v.trim().length&&(w?(r(o.id,v,S),M(!1),y("")):(x(!0),t(o.id,v,S),M(!1),y("")),w&&b(!1))};l(()=>{(()=>{if(!T.current)return;const e=T?.current,t=w?D?.current:j?.current,n=T.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top-20,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;z({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[v]);const X=e=>{const t=e.target.value;y(t);const n=(t.match(/@\S+/g)||[]).map(e=>ix(e,k)).filter(e=>null!==e);V(n);const r=e.target.selectionStart,i=t.slice(0,r),o=i.match(Nt);I(o?.[1]||"");const a=zt.test(i);_(!!a)},J=e=>{if("@"===e.key)_(!0);else if("Backspace"===e.key&&T.current){const t=T.current.selectionStart,n=v.slice(0,t);n.endsWith("@")&&_(!1);const r=n.match(St);if(r){e.preventDefault();const i=r[1],o=n.lastIndexOf(i||""),a=v.slice(0,o)+v.slice(t);y(a),_(!1),V(()=>(a.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>ix(e,k)).filter(Boolean)),setTimeout(()=>{T.current?.setSelectionRange(o,o)},0)}}},$=e=>{if(!T.current)return;const t=T.current.selectionStart,n=v.slice(0,t),r=n.match(Ht);if(r){const i=n.lastIndexOf(r[1]||""),o=v.slice(t),a=`@${e.replace(/\s+/g,"")} `,l=v.slice(0,i)+a+o;y(l),_(!1),setTimeout(()=>{T.current?.focus(),T.current?.setSelectionRange(i+a.length+1,i+a.length+1)},0),V(()=>(l.match(/@\w+/g)||[]).map(e=>e.slice(1)).map(e=>ix(e,k)).filter(Boolean))}};return e("div",{className:"commentsContainer",children:n("div",{className:"comment-wrapper",children:[n("div",{className:"commentContainer",children:[e("div",{className:"commentContainer__avatar",children:o?.profileImage?e("img",{height:30,width:30,src:`data:image/jpeg;base64,${o?.profileImage}`}):G}),n("div",{className:"ff-message-container",children:[n("div",{className:"ff-message",children:[e("div",{className:"ff-message-name",children:W}),e("div",{className:"ff-message-time",children:q})]}),n("div",{className:"ff-editable-container",children:[!w&&e(F,{className:"typography-text",children:o?.description?.split(It).map((t,n)=>t.startsWith("@")?e("b",{children:t},`highlight-${n}`):e(f,{children:t},`text-${n}`))}),w&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<m?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Edit comment",ref:T,onChange:e=>X(e),onKeyDown:J}),H&&e("div",{id:"mention-user",style:{position:"absolute",top:`${O.top}px`,left:`${O.left}px`},children:e(nx,{hasAtSymbol:H,usersObj:k,optionClicked:$,charsAfterAt:N,mentionUserRef:D})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",children:e(K,{title:w?"Update":"Add",children:e(P,{name:"comment_reply",hoverEffect:!0,disabled:w&&v.trim()===(o?.description?.trim()??"")||0===v.trim().length,onClick:()=>{Y(),b(!1),M(!1)}})})}),e("div",{className:"reply",onClick:()=>{b(!1),M(!1),y("")},children:e(K,{title:w?"Cancel":"Close",children:e(P,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]}),n("div",{className:"comment-actions",children:[!Q&&c<2&&o.comments?.length>0&&e("div",{className:"action-icon",onClick:()=>x(e=>!e),children:e(K,{title:""+(A?"collapse":"expand"),children:e(P,{name:A?"collapse-arrow":"expand-arrow",disabled:w||E,hoverEffect:!0})})}),!Q&&c<2&&0===o.comments?.length&&e("div",{className:"action-icon",children:e(P,{name:"expand-arrow",disabled:!0})}),!C&&n("div",{className:"ff-comment-action-item",children:[c<2&&e("div",{className:"action-icon",children:e(K,{title:"Reply",children:e(P,{name:"comment_icon",disabled:w||d,hoverEffect:!0,onClick:()=>{M(!0)}})})}),h&&e("div",{className:"action-icon",children:e(K,{title:"Edit",children:e(P,{name:"edit",disabled:E||d,hoverEffect:!0,onClick:()=>b(!0)})})}),h&&g&&e("div",{className:"action-icon",children:e(K,{title:"Delete",children:e(P,{name:"delete",color:"var(--ff-delete-button-attachment)",onClick:()=>{E||i(o.id)},disabled:w||E||d,hoverEffect:!0})})})]})]})]})]})]}),e("div",{className:"comment-reply-container",children:E&&n("div",{className:"inputContainer",children:[e("textarea",{rows:v.length<m?1:3,className:"inputContainer_input first_input",value:v,autoFocus:!0,placeholder:"Add reply comments",ref:T,onChange:e=>X(e),onKeyDown:J}),H&&e("div",{id:"mention-user",style:{position:"absolute",top:`${O.top}px`,left:`${O.left}px`},children:e(nx,{hasAtSymbol:H,usersObj:k,optionClicked:$,charsAfterAt:N,mentionUserRef:j})}),n("div",{className:"edit-comment",children:[e("div",{className:"reply",onClick:()=>{Y(),b(!1),M(!1)},children:e(K,{title:"Reply",children:e(P,{name:"comment_reply",hoverEffect:!0,disabled:Boolean(!v.length)})})}),e("div",{className:"reply",onClick:()=>{b(!1),M(!1),y("")},children:e(K,{title:"Cancel",children:e(P,{name:"close",color:"var(--ff-delete-button-attachment)",hoverEffect:!0})})})]})]})}),A&&o.comments?.length>0&&e("div",{className:`child-comments ${0===c?"first-level-child":""} ${1===c?"second-level-child":""}`,children:o.comments.map(n=>e("div",{className:`child-comments child-comments-${c+1}`,children:e(ox,{handleInsertNode:t,handleEditNode:r,handleDeleteNode:i,comment:n,depth:c+1,isDisable:d,userDetails:u,isEditDeleteActionAllowed:o.createdBy===p,createdByID:p,isVewMode:C})},n.id))})]})})},ax=({commentsData:t,handleAddComment:r,handleEditComment:i,handleDeleteComment:o,onCommentsDataChange:c,currentUser:d,isDisable:u=!1,userDetails:f,createdByID:h,rowBreakCharCount:m=83,isVewMode:C=!1,deleteEnable:g=!0,showTextarea:v=!1,autoFocus:y=!1})=>{const[w,b]=s(""),[E,M]=s([]),[A,x]=s(!1),[k,L]=s([]),[H,_]=s({top:0,left:0}),[S,V]=s(""),O=a(null),z=a(null),[N,I]=s(!1);l(()=>{const e=rx(f);L(e)},[f]);const T=(e,t)=>{for(const n of e){if(n.id===t)return n;const e=T(n.comments,t);if(e)return e}return null};l(()=>{t&&M(t)},[t]),l(()=>{const e=e=>{z.current&&!z.current.contains(e.target)&&(x(!1),b(e=>{const t=e.split(" ");return t.length>0&&t?.[t?.length-1]?.startsWith("@")?t.slice(0,-1).join(" "):e}))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const{insertNode:D,editNode:j,deleteNode:Z}=(()=>{const e=(t,n,r)=>t.map(t=>t.id===n?{...t,comments:[...t.comments,{id:Yh(),description:r.description,comments:[],createdBy:t.createdBy,modifiedBy:t.modifiedBy,createdByUname:t.createdByUname,modifiedByUname:t.modifiedByUname,createdOn:(new Date).toLocaleString(),modifiedOn:(new Date).toLocaleString(),commentParentId:n}]}:{...t,comments:e(t.comments,n,r)}),t=(e,n,r)=>e.map(e=>({...e,description:e.id===n?r:e.description,comments:t(e.comments,n,r)})),n=(e,t)=>e.filter(e=>e.id!==t).map(e=>({...e,comments:n(e.comments,t)}));return{insertNode:e,editNode:t,deleteNode:n}})(),R=(e,t,n)=>{if(!t.trim())return;const i={id:Yh(),description:t,commentParentId:e,emailId:n,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString()};M(t=>D(t,e,i)),r&&r(i,T(E,e))},B=p((e,t,n)=>{const r=j(E,e,t);M(r);const o=T(r,e);i&&i(e,t,o,n)},[E,j,i]),U=p(async e=>{try{if(o){const t=await o(e);if(t?.success){const t=Z(E,e);M(t)}}}catch(e){console.error("Error deleting comment:",e)}},[Z,o]);l(()=>{c&&c(E)},[E,c]);l(()=>{(()=>{if(!O.current)return;const e=O?.current,t=z?.current,n=O.current.selectionStart,r=((e,t)=>{const n=document.createElement("div"),r=getComputedStyle(e);n.style.cssText=`\n position: absolute;\n visibility: hidden;\n white-space: pre-wrap;\n word-wrap: break-word;\n overflow: auto;\n width: ${e.offsetWidth}px;\n height: ${e.offsetHeight}px;\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n padding: ${r.padding};\n border: ${r.border};\n box-sizing: ${r.boxSizing};\n line-height: ${r.lineHeight};\n `,n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,document.body.appendChild(n);const i=e.value.slice(0,t);n.textContent=i||".";const o=document.createElement("span");o.textContent=".",n.appendChild(o);const a=o.getBoundingClientRect();return document.body.removeChild(n),{top:a.top,left:a.left}})(e,n),i=t?.getBoundingClientRect().height??0,o=e?.getBoundingClientRect();if(!o)return;const a=window.innerHeight-o.bottom,l=o.top;_({top:a<i&&l>i?n-i-16:n+32,left:r.left+10})})()},[w]);l(()=>{w.includes("\n")||I(!1)},[w]);return n("div",{className:"ff-comments-container-box",children:[!C&&n("div",{className:"ff-first-comment "+(v?"no-border":""),children:[e(F,{fontWeight:"semi-bold",className:"ff-comment-heading",children:"Comments"}),!v&&n("div",{className:"input-wrapper",children:[e("textarea",{className:"inputContainer_input first_input",rows:N?3:w.length<m?1:3,autoFocus:y,value:w,onChange:e=>(e=>{const t=e.target.value;b(t);const n=e.target.selectionStart,r=t.slice(0,n),i=r.match(Nt);V(i?.[1]||"");const o=zt.test(r);x(!!o),t||I(!1)})(e),placeholder:"Add a comment",disabled:u,ref:O,onKeyDown:e=>{if("@"===e.key)x(!0);else if("Backspace"===e.key&&O.current){const t=O.current.selectionStart;if(w.slice(0,t).endsWith("@")&&x(!1),A){e.preventDefault();const n=w.slice(0,t-1)+w.slice(t);b(n);const r=t-1,i=n.slice(0,r).match(Nt);V(i?.[1]||""),x(!!i),setTimeout(()=>{O.current?.setSelectionRange(r,r)},0)}}"Enter"===e.key&&I(!0)}}),A&&e("div",{id:"mention-user",style:{position:"absolute",top:`${H.top}px`,left:`${H.left}px`},children:e(nx,{hasAtSymbol:A,usersObj:k,optionClicked:e=>{if(!O.current)return;const t=O.current.selectionStart,n=w.slice(0,t),r=n.match(_t);if(r){const i=n.lastIndexOf(r[1]??""),o=w.slice(t),a=`@${e} `,l=w.slice(0,i)+a+o;b(l),x(!1),setTimeout(()=>{O.current?.focus();const e=i+a.length+1;O.current?.setSelectionRange(e,e)},0)}},charsAfterAt:S,mentionUserRef:z})}),e("span",{className:"reply-comment",children:e(K,{title:"Add",children:e(P,{name:"comment_reply",onClick:()=>{if(!w.trim())return;const e=k.filter(e=>new RegExp(`@${e.name}\\b`,"i").test(w)).map(e=>e.emailId),t={id:Yh(),description:w,comments:[],createdBy:d?.createdBy,modifiedBy:d?.modifiedBy,createdByUname:d?.createdByUname,modifiedByUname:d?.modifiedByUname,createdOn:(new Date).toISOString(),modifiedOn:(new Date).toISOString(),commentParentId:"",emailId:e};r&&r(t,null),M(e=>[...e,t]),b("")},hoverEffect:!0,disabled:Boolean(!w.length)})})})]})]}),E.length>0&&E.map(t=>e(ox,{handleInsertNode:R,handleEditNode:B,handleDeleteNode:U,comment:t,depth:0,isDisable:u,userDetails:f,isEditDeleteActionAllowed:t.createdBy===h,createdByID:h,isVewMode:C,deleteEnable:g},t.id))]})},lx=()=>{const e=a(!0);return{canTrigger:()=>e.current,setTriggered:()=>{e.current=!1},resetTrigger:()=>{e.current=!0}}},cx=({isOpen:t,onClose:r,onContinue:i,titleMessage:o="Warning!",subTitleMessage:a="Unsaved Changes.",iconName:l,modalMessage:c="Your web service data will be lost. Are you sure you want to exit?",firstButtonLabel:s="Cancel",secondButtonLabel:d="Continue",buttonVariant:u="warning",border:f="1px solid var(--warning-modal-border-color)",popupWidth:h="420",popupHeight:p="226",colorForTitleMessage:m="var(--status-button-bg-warning)",footerContent:C,firstButtonDisabled:g=!1,secondButtonDisabled:v=!1,zIndex:y=1100,iconSize:w=94})=>e(Vf,{overlayClassName:"custom-overlay",isOpen:t,onClose:r,isHeaderDisplayed:!1,zIndex:y,children:n("div",{className:"warning_modal_container",children:[n("div",{className:"warning_modal_content",children:[e(P,{name:l,className:"warning_modal_icon",width:w,height:w}),n("div",{className:"warning_modal_message",children:[n(F,{fontSize:20,fontWeight:"semi-bold",className:"warning_modal_title_wrapper",children:[" ",n(F,{color:`${m}`,fontSize:20,fontWeight:"semi-bold",children:[" ",o," "]})," ",a]}),n("div",{className:"warning_modal_message_wrapper",children:[e(F,{fontSize:16,children:c}),e(F,{as:"div",children:C})]})]})]}),n("div",{className:"warning_modal_footer_button",children:[e(U,{buttonHeight:"24px",variant:"secondary",label:s,onClick:r,disabled:g}),d&&e(U,{buttonHeight:"24px",variant:u||"warning",label:d,onClick:i,disabled:v})]})]}),ariaHideApp:!0,isFooterDisplayed:!1,customWidth:`${h}px`,customHeight:`${p}px`,boxShadow:"0px 1px 4px 0px var(--toaster-boxshadow)",border:f});function sx(e,t=[]){return t.reduce((e,t)=>e.replace(new RegExp(function(e){return e.replace(Ct,"\\$&")}(t),"gi"),""),e).replace(/([A-Z])/g," $1").trim().replace(/^./,e=>e.toUpperCase())}function dx(e,t=[]){return e.toUpperCase()===e&&(e=e.toLowerCase()),e.includes("_")?function(e){return e.toLowerCase().replace(/_/g," ").replace(/^./,e=>e.toUpperCase())}(e):sx(e,t)}const ux=({onSelectVariable:t,dropdownPosition:r,filteredOptions:i=[],position:o="relative",width:a="300px",zIndex:l=1e3,height:c="160px",truncateTextValue:s=34,isTruncateText:d=!1})=>n("div",{className:z("ff-variable-dropdown",o),style:r?{top:r.top+30,left:r.left-30,width:a,zIndex:l}:{width:a,zIndex:l,height:c},children:[i?.map(n=>{const r=d?ie(n?.name,s,"pixel"):n?.name,i=!!d&&oe(n?.name,s,"pixel");return e("div",{className:"ff-variable-option",onClick:()=>t(n),children:d?e(K,{title:i?n?.name:"",children:e(F,{children:r})}):e(F,{children:r})},n?.id)}),0===i?.length&&e("div",{className:"ff-variable-option .ff-variable-option-no-data ",children:e(F,{as:"span",fontSize:14,children:"No Option"})})]}),fx=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],addForloopPrefix:c=!1,placeholder:d="Enter text",onChange:u,onCreateVariableClick:f,value:h="",dropdownWidth:p="inherit",isHash:m=!1,dataFiles:C=[],showAddVariableIcon:g=!0,helperText:v="",error:y,autoComplete:w="off",showHidePasswordIcon:E=!0,required:M=!1,formProps:A={},onlyDropdown:x=!1,type:k,onFocus:L,onBlur:H,readOnly:_=!1,height:S="160px",truncateTextValue:V=34,isTruncateText:O=!1,...z},N)=>{const[I,T]=s(!1),[D,j]=s(!1),[Z,R]=s(!1),[B,U]=s(null),[q,W]=s(0),[Q,Y]=s(!1),[X,J]=s(!1),[$,ee]=s([]),te=a(null);b(N,()=>te.current),l(()=>{null!==B&&te.current&&(te.current.setSelectionRange(B,B),te.current.focus())},[B]),l(()=>{if(m?T(h.startsWith("#")):J(!h?.includes("$")),h.startsWith("#")&&m){const e=h.slice(1).toLowerCase(),t=C.filter(t=>t.name.toLowerCase().includes(e));ee(t),T(!0)}},[h]),l(()=>{if(!Q&&x){const e=C.filter(e=>e.toLowerCase().includes(h.toLowerCase())).map((e,t)=>({id:t+1,name:e}));ee(e),T(e.length>0)}Y(!1)},[h]);const ne=()=>{te.current&&W(te.current.selectionStart||0)},re=ne,ie=ne;l(()=>{te.current&&W(te.current.selectionStart||0)},[h]);const oe=e=>{if(te.current){const{selectionStart:t,selectionEnd:n}=te.current,r=`{${"STEPGROUP"===e.parentVariableType?"SGV":"LOCAL"===e.type?"LV":"GLOBAL"===e.type?"GV":"GROUP"===e.type?"SGV":e?._id?.includes("PARAMETER")?"SGP":"_startforloop"===e.type?"FLV_for:":"DATAPROVIDER"===e.type?"DPV":"PEV"}${"_startforloop"===e?.type?"":"_"}${"DATAPROVIDER"===e?.type?e?.dpName+":"+e?.varname:e.name}}`;let o;if(o=m&&"#"===h[0]||x?e.name+h.slice(n||1):h.slice(0,function(e,t){const n=e.lastIndexOf("$",t-1),r=e.indexOf("$",t);return-1===n&&-1===r?-1:-1===n?r:-1===r||Math.abs(t-n)<=Math.abs(r-t)?n:r}(h,q)||0)+"$"+r+h.slice(n||0),u){u({target:{value:o}},e)}te.current.value=o,i?.(e),U((t||0)+r.length),T(!1),Y(!0),j(!0)}};const ae=function(e,t,n){let r=!1,i="";const o="}"===h[t-1];if(t<0||t>e.length)return{showDropdown:r,searchString:i};const a=e.lastIndexOf("$",t-1),l=e.indexOf("$",t);if(-1!==a&&(t===a+1?(r=!0,i=""):(i=e.slice(a+1,-1===l?void 0:l),t>a+1&&(i=e.slice(a+1,t)),r=!0),D&&o&&(r=!1),(/[{}]/.test(i)||0===t)&&(r=!1,i=""),i)){n.some(e=>("_startforloop"===e.type&&c?`FLV_for:${e.name}`:e.name).toLowerCase().includes(i.toLowerCase()))||(r=!1,i="")}return{showDropdown:r,searchString:i}}(h,q,o),[le,ce]=s(!1);return n("div",{className:"ff-add-variable-container",children:[n("div",{className:"ff-add-variable-input",children:[e(en,{readOnly:_,...z,name:"add_variable",ref:te,type:((e,t)=>"password"===e?t?"text":"password":e??"text")(k,le),value:h,onChange:u,variant:"primary",label:t,placeholder:d,onClick:re,onKeyUp:ie,onFocus:e=>{setTimeout(()=>{R(!0),L?.(e)},500)},onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||R(!1)})(e),H?.(e)},autoComplete:w,helperText:v,error:y,required:M,...A}),"password"===k&&E&&e(K,{title:le?"Hide":"Show",children:e(F,{as:"span",className:"ff-password-icon",children:e(P,{onClick:()=>{ce(e=>!e)},name:le?"hide_access_icon":"view_access_icon",width:16,height:16,hoverEffect:!0})})}),!G(h)&&!m&&X&&g&&e(K,{title:"Add Variable",children:e(P,{onClick:f,name:"add_variable",width:24,height:24,hoverEffect:!0})})]}),ae?.showDropdown&&Z&&e(Zb,{position:"absolute",width:p,optionsList:o.filter(e=>("_startforloop"===e.type&&c?`FLV_for:${e.name}`:e.name).toLowerCase().includes(ae?.searchString.toLowerCase())),onSelectVariable:oe,height:S}),I&&(m||x)&&e(ux,{position:"relative",width:p,filteredOptions:$,zIndex:2e3,onSelectVariable:oe,height:S,isTruncateText:O,truncateTextValue:V})]})}),hx=(e,t)=>{const n=new Set;for(const r of e){const e=t?r[t]:JSON.stringify(r);if(n.has(e))return!0;n.add(e)}return!1};var px,mx;var Cx=(mx||(mx=1,px=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t){e.exports=i},function(e,t,n){var r;
28
28
  /*!
29
29
  Copyright (c) 2017 Jed Watson.
30
30
  Licensed under the MIT License (MIT), see
31
31
  http://jedwatson.github.io/classnames
32
32
  */!function(){var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),d=Object.prototype.toString,u=s.Symbol,f=u?u.prototype:void 0,h=f?f.toString:void 0;function p(e){if("string"==typeof e)return e;if(C(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function C(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}function g(e){return e?(e=function(e){if("number"==typeof e)return e;if(C(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=i.test(e);return l||o.test(e)?a(e.slice(2),l?2:8):r.test(e)?NaN:+e}(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}e.exports=function(e,t,n){var r,i,o;return e=null==(r=e)?"":p(r),i=function(e){var t=g(e),n=t%1;return t==t?n?t-n:t:0}(n),o=e.length,i==i&&(void 0!==o&&(i=i<=o?i:o),i=i>=0?i:0),n=i,t=p(t),e.slice(n,n+t.length)==t}}).call(this,n(3))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){var n,r=/^\[object .+?Constructor\]$/,i="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")(),l=Array.prototype,c=Function.prototype,s=Object.prototype,d=a["__core-js_shared__"],u=(n=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",f=c.toString,h=s.hasOwnProperty,p=s.toString,m=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=l.splice,g=x(a,"Map"),v=x(Object,"create");function y(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function M(e){return!(!L(e)||(t=e,u&&u in t))&&(function(e){var t=L(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?m:r).test(function(e){if(null!=e){try{return f.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function A(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function x(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return M(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||b),n}function L(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}y.prototype.clear=function(){this.__data__=v?v(null):{}},y.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},y.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return h.call(t,e)?t[e]:void 0},y.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:h.call(t,e)},y.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=E(t,e);return!(n<0||(n==t.length-1?t.pop():C.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=E(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return E(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,r=E(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},b.prototype.clear=function(){this.__data__={hash:new y,map:new(g||w),string:new y}},b.prototype.delete=function(e){return A(this,e).delete(e)},b.prototype.get=function(e){return A(this,e).get(e)},b.prototype.has=function(e){return A(this,e).has(e)},b.prototype.set=function(e,t){return A(this,e).set(e,t),this},k.Cache=b,e.exports=k}).call(this,n(3))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,s=l||c||Function("return this")(),d=Object.prototype.toString,u=Math.max,f=Math.min,h=function(){return s.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=i.test(e);return l||o.test(e)?a(e.slice(2),l?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,l,c,s=0,d=!1,C=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,s=t,a=e.apply(o,n)}function y(e){var n=e-c;return void 0===c||n>=t||n<0||C&&e-s>=o}function w(){var e=h();if(y(e))return b(e);l=setTimeout(w,function(e){var n=t-(e-c);return C?f(n,o-(e-s)):n}(e))}function b(e){return l=void 0,g&&r?v(e):(r=i=void 0,a)}function E(){var e=h(),n=y(e);if(r=arguments,i=this,c=e,n){if(void 0===l)return function(e){return s=e,l=setTimeout(w,t),d?v(e):a}(c);if(C)return l=setTimeout(w,t),v(c)}return void 0===l&&(l=setTimeout(w,t)),a}return t=m(t)||0,p(n)&&(d=!!n.leading,o=(C="maxWait"in n)?u(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),E.cancel=function(){void 0!==l&&clearTimeout(l),s=0,r=c=i=l=void 0},E.flush=function(){return void 0===l?a:b(h())},E}}).call(this,n(3))},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",o="[object Object]",a="[object Set]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,s=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[r]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[o]=p["[object RegExp]"]=p[a]=p["[object String]"]=p["[object WeakMap]"]=!1;var m="object"==typeof e&&e&&e.Object===Object&&e,C="object"==typeof self&&self&&self.Object===Object&&self,g=m||C||Function("return this")(),v=t&&!t.nodeType&&t,y=v&&"object"==typeof n&&n&&!n.nodeType&&n,w=y&&y.exports===v&&m.process,b=function(){try{return w&&w.binding("util")}catch(e){}}(),E=b&&b.isTypedArray;function M(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function A(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function x(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function k(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function L(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function H(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var _,S,V,O=Array.prototype,z=Function.prototype,N=Object.prototype,I=g["__core-js_shared__"],T=(_=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",D=z.toString,j=N.hasOwnProperty,Z=N.toString,R=RegExp("^"+D.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=g.Symbol,P=g.Uint8Array,F=N.propertyIsEnumerable,U=O.splice,q=(S=Object.keys,V=Object,function(e){return S(V(e))}),W=be(g,"DataView"),Q=be(g,"Map"),G=be(g,"Promise"),K=be(g,"Set"),Y=be(g,"WeakMap"),X=be(Object,"create"),J=_e(W),$=_e(Q),ee=_e(G),te=_e(K),ne=_e(Y),re=B?B.prototype:void 0,ie=re?re.valueOf:void 0,oe=re?re.toString:void 0;function ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function le(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var t=-1,n=e?e.length:0;for(this.__data__=new ce;++t<n;)this.add(e[t])}function de(e){this.__data__=new le(e)}function ue(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}ae.prototype.clear=function(){this.__data__=X?X(null):{}},ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ae.prototype.get=function(e){var t=this.__data__;if(X){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return j.call(t,e)?t[e]:void 0},ae.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:j.call(t,e)},ae.prototype.set=function(e,t){return this.__data__[e]=X&&void 0===t?"__lodash_hash_undefined__":t,this},le.prototype.clear=function(){this.__data__=[]},le.prototype.delete=function(e){var t=this.__data__,n=ue(t,e);return!(n<0||(n==t.length-1?t.pop():U.call(t,n,1),0))},le.prototype.get=function(e){var t=this.__data__,n=ue(t,e);return n<0?void 0:t[n][1]},le.prototype.has=function(e){return ue(this.__data__,e)>-1},le.prototype.set=function(e,t){var n=this.__data__,r=ue(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ce.prototype.clear=function(){this.__data__={hash:new ae,map:new(Q||le),string:new ae}},ce.prototype.delete=function(e){return we(this,e).delete(e)},ce.prototype.get=function(e){return we(this,e).get(e)},ce.prototype.has=function(e){return we(this,e).has(e)},ce.prototype.set=function(e,t){return we(this,e).set(e,t),this},se.prototype.add=se.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},se.prototype.has=function(e){return this.__data__.has(e)},de.prototype.clear=function(){this.__data__=new le},de.prototype.delete=function(e){return this.__data__.delete(e)},de.prototype.get=function(e){return this.__data__.get(e)},de.prototype.has=function(e){return this.__data__.has(e)},de.prototype.set=function(e,t){var n=this.__data__;if(n instanceof le){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this;n=this.__data__=new ce(r)}return n.set(e,t),this};var fe,he=(fe=function(e,t){return e&&pe(e,t,Be)},function(e,t){if(null==e)return e;if(!Ne(e))return fe(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e}),pe=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var l=o[++r];if(!1===t(i[l],l,i))break}return e};function me(e,t){for(var n=0,r=(t=Ae(t,e)?[t]:ve(t)).length;null!=e&&n<r;)e=e[He(t[n++])];return n&&n==r?e:void 0}function Ce(e,t){return null!=e&&t in Object(e)}function ge(e,t,n,l,c){return e===t||(null==e||null==t||!De(e)&&!je(t)?e!=e&&t!=t:function(e,t,n,l,c,s){var d=ze(e),u=ze(t),f="[object Array]",h="[object Array]";d||(f=(f=Ee(e))==r?o:f),u||(h=(h=Ee(t))==r?o:h);var p=f==o&&!k(e),m=h==o&&!k(t),C=f==h;if(C&&!p)return s||(s=new de),d||Re(e)?ye(e,t,n,l,c,s):function(e,t,n,r,o,l,c){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!r(new P(e),new P(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ve(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var s=L;case a:var d=2&l;if(s||(s=H),e.size!=t.size&&!d)return!1;var u=c.get(e);if(u)return u==t;l|=1,c.set(e,t);var f=ye(s(e),s(t),r,o,l,c);return c.delete(e),f;case"[object Symbol]":if(ie)return ie.call(e)==ie.call(t)}return!1}(e,t,f,n,l,c,s);if(!(2&c)){var g=p&&j.call(e,"__wrapped__"),v=m&&j.call(t,"__wrapped__");if(g||v){var y=g?e.value():e,w=v?t.value():t;return s||(s=new de),n(y,w,l,c,s)}}return!!C&&(s||(s=new de),function(e,t,n,r,i,o){var a=2&i,l=Be(e),c=l.length;if(c!=Be(t).length&&!a)return!1;for(var s=c;s--;){var d=l[s];if(!(a?d in t:j.call(t,d)))return!1}var u=o.get(e);if(u&&o.get(t))return u==t;var f=!0;o.set(e,t),o.set(t,e);for(var h=a;++s<c;){var p=e[d=l[s]],m=t[d];if(r)var C=a?r(m,p,d,t,e,o):r(p,m,d,e,t,o);if(!(void 0===C?p===m||n(p,m,r,i,o):C)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var g=e.constructor,v=t.constructor;g==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,l,c,s))}(e,t,ge,n,l,c))}function ve(e){return ze(e)?e:Le(e)}function ye(e,t,n,r,i,o){var a=2&i,l=e.length,c=t.length;if(l!=c&&!(a&&c>l))return!1;var s=o.get(e);if(s&&o.get(t))return s==t;var d=-1,u=!0,f=1&i?new se:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var h=e[d],p=t[d];if(r)var m=a?r(p,h,d,t,e,o):r(h,p,d,e,t,o);if(void 0!==m){if(m)continue;u=!1;break}if(f){if(!A(t,function(e,t){if(!f.has(t)&&(h===e||n(h,e,r,i,o)))return f.add(t)})){u=!1;break}}else if(h!==p&&!n(h,p,r,i,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function we(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function be(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!De(e)||function(e){return!!T&&T in e}(e))&&(Ie(e)||k(e)?R:f).test(_e(e))}(n)?n:void 0}var Ee=function(e){return Z.call(e)};function Me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e<t}function Ae(e,t){if(ze(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ze(e))||c.test(e)||!l.test(e)||null!=t&&e in Object(t)}function xe(e){return e==e&&!De(e)}function ke(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(W&&"[object DataView]"!=Ee(new W(new ArrayBuffer(1)))||Q&&Ee(new Q)!=i||G&&"[object Promise]"!=Ee(G.resolve())||K&&Ee(new K)!=a||Y&&"[object WeakMap]"!=Ee(new Y))&&(Ee=function(e){var t=Z.call(e),n=t==o?e.constructor:void 0,r=n?_e(n):void 0;if(r)switch(r){case J:return"[object DataView]";case $:return i;case ee:return"[object Promise]";case te:return a;case ne:return"[object WeakMap]"}return t});var Le=Se(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Ze(e))return oe?oe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return s.test(e)&&n.push(""),e.replace(d,function(e,t,r,i){n.push(r?i.replace(u,"$1"):t||e)}),n});function He(e){if("string"==typeof e||Ze(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function _e(e){if(null!=e){try{return D.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Se(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(Se.Cache||ce),n}function Ve(e,t){return e===t||e!=e&&t!=t}function Oe(e){return function(e){return je(e)&&Ne(e)}(e)&&j.call(e,"callee")&&(!F.call(e,"callee")||Z.call(e)==r)}Se.Cache=ce;var ze=Array.isArray;function Ne(e){return null!=e&&Te(e.length)&&!Ie(e)}function Ie(e){var t=De(e)?Z.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function De(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function je(e){return!!e&&"object"==typeof e}function Ze(e){return"symbol"==typeof e||je(e)&&"[object Symbol]"==Z.call(e)}var Re=E?function(e){return function(t){return e(t)}}(E):function(e){return je(e)&&Te(e.length)&&!!p[Z.call(e)]};function Be(e){return Ne(e)?function(e){var t=ze(e)||Oe(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],n=t.length,r=!!n;for(var i in e)!j.call(e,i)||r&&("length"==i||Me(i,n))||t.push(i);return t}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||N))return q(e);var t,n,r=[];for(var i in Object(e))j.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e)}function Pe(e){return e}n.exports=function(e,t,n){var r=ze(e)?M:x,i=arguments.length<3;return r(e,function(e){return"function"==typeof e?e:null==e?Pe:"object"==typeof e?ze(e)?function(e,t){return Ae(e)&&xe(t)?ke(He(e),t):function(n){var r=function(e,t){var n=null==e?void 0:me(e,t);return void 0===n?void 0:n}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r,i=-1,o=(t=Ae(t,e)?[t]:ve(t)).length;++i<o;){var a=He(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}return r||!!(o=e?e.length:0)&&Te(o)&&Me(a,o)&&(ze(e)||Oe(e))}(e,t,Ce)}(n,e):ge(t,r,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Be(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,xe(i)]}return t}(e);return 1==t.length&&t[0][2]?ke(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n){var r=n.length,i=r;if(null==e)return!i;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<i;){var a=(o=n[r])[0],l=e[a],c=o[1];if(o[2]){if(void 0===l&&!(a in e))return!1}else if(!ge(c,l,void 0,3,new de))return!1}return!0}(n,0,t)}}(e):Ae(t=e)?(n=He(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return me(t,e)}}(t);var t,n}(t),n,i,he)}}).call(this,n(3),n(7)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e>>=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))})},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){if(Array.isArray(e))return e}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return(d="function"==typeof Symbol&&"symbol"===s(Symbol.iterator)?function(e){return s(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":s(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.r(t);var p=n(0),m=n.n(p),C=n(5),g=n.n(C),v=n(4),y=n.n(v),w=n(6),b=n.n(w),E=n(2),M=n.n(E),A=n(1),x=n.n(A);function k(e,t){return a(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(e,t)||l()}n(8);var L=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],H=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function _(e,t,n,r,i){return!n||i?e+"".padEnd(t.length,".")+" "+r:e+"".padEnd(t.length,".")+" "+n}function S(e,t,n,i,a){var l,c,s=[];return c=!0===t,[(l=[]).concat.apply(l,o(e.map(function(e){var o={name:e[0],regions:e[1],iso2:e[2],countryCode:e[3],dialCode:e[3],format:_(n,e[3],e[4],i,a),priority:e[5]||0},l=[];return e[6]&&e[6].map(function(t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}({},o);n.dialCode=e[3]+t,n.isAreaCode=!0,n.areaCodeLength=t.length,l.push(n)}),l.length>0?(o.mainCode=!0,c||"Array"===t.constructor.name&&t.includes(e[2])?(o.hasAreaCodes=!0,[o].concat(l)):(s=s.concat(l),[o])):[o]}))),s]}function V(e,t,n,r){if(null!==n){var i=Object.keys(n),o=Object.values(n);i.forEach(function(n,i){if(r)return e.push([n,o[i]]);var a=e.findIndex(function(e){return e[0]===n});if(-1===a){var l=[n];l[t]=o[i],e.push(l)}else e[a][t]=o[i]})}}function O(e,t){return 0===t.length?e:e.map(function(e){var n=t.findIndex(function(t){return t[0]===e[2]});if(-1===n)return e;var r=t[n];return r[1]&&(e[4]=r[1]),r[3]&&(e[5]=r[3]),r[2]&&(e[6]=r[2]),e})}var z=function e(t,n,r,i,a,l,s,d,u,f,h,p,m,C){c(this,e),this.filterRegions=function(e,t){if("string"==typeof e){var n=e;return t.filter(function(e){return e.regions.some(function(e){return e===n})})}return t.filter(function(t){return e.map(function(e){return t.regions.some(function(t){return t===e})}).some(function(e){return e})})},this.sortTerritories=function(e,t){var n=[].concat(o(e),o(t));return n.sort(function(e,t){return e.name<t.name?-1:e.name>t.name?1:0}),n},this.getFilteredCountryList=function(e,t,n){return 0===e.length?t:n?e.map(function(e){var n=t.find(function(t){return t.iso2===e});if(n)return n}).filter(function(e){return e}):t.filter(function(t){return e.some(function(e){return e===t.iso2})})},this.localizeCountries=function(e,t,n){for(var r=0;r<e.length;r++)void 0!==t[e[r].iso2]?e[r].localName=t[e[r].iso2]:void 0!==t[e[r].name]&&(e[r].localName=t[e[r].name]);return n||e.sort(function(e,t){return e.localName<t.localName?-1:e.localName>t.localName?1:0}),e},this.getCustomAreas=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=JSON.parse(JSON.stringify(e));i.dialCode+=t[r],n.push(i)}return n},this.excludeCountries=function(e,t){return 0===t.length?e:e.filter(function(e){return!t.includes(e.iso2)})};var g=function(e,t,n){var r=[];return V(r,1,e,!0),V(r,3,t),V(r,2,n),r}(d,u,f),v=O(JSON.parse(JSON.stringify(L)),g),y=O(JSON.parse(JSON.stringify(H)),g),w=k(S(v,t,p,m,C),2),b=w[0],E=w[1];if(n){var M=k(S(y,t,p,m,C),2),A=M[0];M[1],b=this.sortTerritories(A,b)}r&&(b=this.filterRegions(r,b)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(i,b,s.includes("onlyCountries")),l),h,s.includes("onlyCountries")),this.preferredCountries=0===a.length?[]:this.localizeCountries(this.getFilteredCountryList(a,b,s.includes("preferredCountries")),h,s.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(i,E),l)},N=function(e){function t(e){var n;c(this,t),(n=function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?u(e):t}(this,f(t).call(this,e))).getProbableCandidate=y()(function(e){return e&&0!==e.length?n.state.onlyCountries.filter(function(t){return M()(t.name.toLowerCase(),e.toLowerCase())},u(u(n)))[0]:null}),n.guessSelectedCountry=y()(function(e,t,r,i){var o;if(!1===n.props.enableAreaCodes&&(i.some(function(t){if(M()(e,t.dialCode))return r.some(function(e){if(t.iso2===e.iso2&&e.mainCode)return o=e,!0}),!0}),o))return o;var a=r.find(function(e){return e.iso2==t});if(""===e.trim())return a;var l=r.reduce(function(t,n){if(M()(e,n.dialCode)){if(n.dialCode.length>t.dialCode.length)return n;if(n.dialCode.length===t.dialCode.length&&n.priority<t.priority)return n}return t},{dialCode:"",priority:10001},u(u(n)));return l.name?l:a}),n.updateCountry=function(e){var t,r=n.state.onlyCountries;(t=e.indexOf(0)>="0"&&e.indexOf(0)<="9"?r.find(function(t){return t.dialCode==+e}):r.find(function(t){return t.iso2==e}))&&t.dialCode&&n.setState({selectedCountry:t,formattedNumber:n.props.disableCountryCode?"":n.formatNumber(t.dialCode,t)})},n.scrollTo=function(e,t){if(e){var r=n.dropdownRef;if(r&&document.body){var i=r.offsetHeight,o=r.getBoundingClientRect().top+document.body.scrollTop,a=o+i,l=e,c=l.getBoundingClientRect(),s=l.offsetHeight,d=c.top+document.body.scrollTop,u=d+s,f=d-o+r.scrollTop,h=i/2-s/2;if(n.props.enableSearch?d<o+32:d<o)t&&(f-=h),r.scrollTop=f;else if(u>a){t&&(f+=h);var p=i-s;r.scrollTop=f-p}}}},n.scrollToTop=function(){var e=n.dropdownRef;e&&document.body&&(e.scrollTop=0)},n.formatNumber=function(e,t){if(!t)return e;var r,o=t.format,c=n.props,s=c.disableCountryCode,d=c.enableAreaCodeStretch,u=c.enableLongNumbers,f=c.autoFormat;if(s?((r=o.split(" ")).shift(),r=r.join(" ")):d&&t.isAreaCode?((r=o.split(" "))[1]=r[1].replace(/\.+/,"".padEnd(t.areaCodeLength,".")),r=r.join(" ")):r=o,!e||0===e.length)return s?"":n.props.prefix;if(e&&e.length<2||!r||!f)return s?e:n.props.prefix+e;var h,p=b()(r,function(e,t){if(0===e.remainingText.length)return e;if("."!==t)return{formattedText:e.formattedText+t,remainingText:e.remainingText};var n,r=a(n=e.remainingText)||i(n)||l(),o=r[0],c=r.slice(1);return{formattedText:e.formattedText+o,remainingText:c}},{formattedText:"",remainingText:e.split("")});return(h=u?p.formattedText+p.remainingText.join(""):p.formattedText).includes("(")&&!h.includes(")")&&(h+=")"),h},n.cursorToEnd=function(){var e=n.numberInputRef;if(document.activeElement===e){e.focus();var t=e.value.length;")"===e.value.charAt(t-1)&&(t-=1),e.setSelectionRange(t,t)}},n.getElement=function(e){return n["flag_no_".concat(e)]},n.getCountryData=function(){return n.state.selectedCountry?{name:n.state.selectedCountry.name||"",dialCode:n.state.selectedCountry.dialCode||"",countryCode:n.state.selectedCountry.iso2||"",format:n.state.selectedCountry.format||""}:{}},n.handleFlagDropdownClick=function(e){if(e.preventDefault(),n.state.showDropdown||!n.props.disabled){var t=n.state,r=t.preferredCountries,i=t.onlyCountries,o=t.selectedCountry,a=n.concatPreferredCountries(r,i).findIndex(function(e){return e.dialCode===o.dialCode&&e.iso2===o.iso2});n.setState({showDropdown:!n.state.showDropdown,highlightCountryIndex:a},function(){n.state.showDropdown&&n.scrollTo(n.getElement(n.state.highlightCountryIndex))})}},n.handleInput=function(e){var t=e.target.value,r=n.props,i=r.prefix,o=r.onChange,a=n.props.disableCountryCode?"":i,l=n.state.selectedCountry,c=n.state.freezeSelection;if(!n.props.countryCodeEditable){var s=i+(l.hasAreaCodes?n.state.onlyCountries.find(function(e){return e.iso2===l.iso2&&e.mainCode}).dialCode:l.dialCode);if(t.slice(0,s.length)!==s)return}if(t===i)return o&&o("",n.getCountryData(),e,""),n.setState({formattedNumber:""});if(t.replace(/\D/g,"").length>15){if(!1===n.props.enableLongNumbers)return;if("number"==typeof n.props.enableLongNumbers&&t.replace(/\D/g,"").length>n.props.enableLongNumbers)return}if(t!==n.state.formattedNumber){e.preventDefault?e.preventDefault():e.returnValue=!1;var d=n.props.country,u=n.state,f=u.onlyCountries,h=u.selectedCountry,p=u.hiddenAreaCodes;if(o&&e.persist(),t.length>0){var m=t.replace(/\D/g,"");(!n.state.freezeSelection||h&&h.dialCode.length>m.length)&&(l=n.props.disableCountryGuess?h:n.guessSelectedCountry(m.substring(0,6),d,f,p)||h,c=!1),a=n.formatNumber(m,l),l=l.dialCode?l:h}var C=e.target.selectionStart,g=e.target.selectionStart,v=n.state.formattedNumber,y=a.length-v.length;n.setState({formattedNumber:a,freezeSelection:c,selectedCountry:l},function(){y>0&&(g-=y),")"==a.charAt(a.length-1)?n.numberInputRef.setSelectionRange(a.length-1,a.length-1):g>0&&v.length>=a.length?n.numberInputRef.setSelectionRange(g,g):C<v.length&&n.numberInputRef.setSelectionRange(C,C),o&&o(a.replace(/[^0-9]+/g,""),n.getCountryData(),e,a)})}},n.handleInputClick=function(e){n.setState({showDropdown:!1}),n.props.onClick&&n.props.onClick(e,n.getCountryData())},n.handleDoubleClick=function(e){var t=e.target.value.length;e.target.setSelectionRange(0,t)},n.handleFlagItemClick=function(e,t){var r=n.state.selectedCountry,i=n.state.onlyCountries.find(function(t){return t==e});if(i){var o=n.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),a=o.length>1?o.replace(r.dialCode,i.dialCode):i.dialCode,l=n.formatNumber(a.replace(/\D/g,""),i);n.setState({showDropdown:!1,selectedCountry:i,freezeSelection:!0,formattedNumber:l,searchValue:""},function(){n.cursorToEnd(),n.props.onChange&&n.props.onChange(l.replace(/[^0-9]+/g,""),n.getCountryData(),t,l)})}},n.handleInputFocus=function(e){n.numberInputRef&&n.numberInputRef.value===n.props.prefix&&n.state.selectedCountry&&!n.props.disableCountryCode&&n.setState({formattedNumber:n.props.prefix+n.state.selectedCountry.dialCode},function(){n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)}),n.setState({placeholder:""}),n.props.onFocus&&n.props.onFocus(e,n.getCountryData()),n.props.jumpCursorToEnd&&setTimeout(n.cursorToEnd,0)},n.handleInputBlur=function(e){e.target.value||n.setState({placeholder:n.props.placeholder}),n.props.onBlur&&n.props.onBlur(e,n.getCountryData())},n.handleInputCopy=function(e){if(n.props.copyNumbersOnly){var t=window.getSelection().toString().replace(/[^0-9]+/g,"");e.clipboardData.setData("text/plain",t),e.preventDefault()}},n.getHighlightCountryIndex=function(e){var t=n.state.highlightCountryIndex+e;return t<0||t>=n.state.onlyCountries.length+n.state.preferredCountries.length?t-e:n.props.enableSearch&&t>n.getSearchFilteredCountries().length?0:t},n.searchCountry=function(){var e=n.getProbableCandidate(n.state.queryString)||n.state.onlyCountries[0],t=n.state.onlyCountries.findIndex(function(t){return t==e})+n.state.preferredCountries.length;n.scrollTo(n.getElement(t),!0),n.setState({queryString:"",highlightCountryIndex:t})},n.handleKeydown=function(e){var t=n.props.keys,r=e.target.className;if(r.includes("selected-flag")&&e.which===t.ENTER&&!n.state.showDropdown)return n.handleFlagDropdownClick(e);if(r.includes("form-control")&&(e.which===t.ENTER||e.which===t.ESC))return e.target.blur();if(n.state.showDropdown&&!n.props.disabled&&(!r.includes("search-box")||e.which===t.UP||e.which===t.DOWN||e.which===t.ENTER||e.which===t.ESC&&""===e.target.value)){e.preventDefault?e.preventDefault():e.returnValue=!1;var i=function(e){n.setState({highlightCountryIndex:n.getHighlightCountryIndex(e)},function(){n.scrollTo(n.getElement(n.state.highlightCountryIndex),!0)})};switch(e.which){case t.DOWN:i(1);break;case t.UP:i(-1);break;case t.ENTER:n.props.enableSearch?n.handleFlagItemClick(n.getSearchFilteredCountries()[n.state.highlightCountryIndex]||n.getSearchFilteredCountries()[0],e):n.handleFlagItemClick([].concat(o(n.state.preferredCountries),o(n.state.onlyCountries))[n.state.highlightCountryIndex],e);break;case t.ESC:case t.TAB:n.setState({showDropdown:!1},n.cursorToEnd);break;default:(e.which>=t.A&&e.which<=t.Z||e.which===t.SPACE)&&n.setState({queryString:n.state.queryString+String.fromCharCode(e.which)},n.state.debouncedQueryStingSearcher)}}},n.handleInputKeyDown=function(e){var t=n.props,r=t.keys,i=t.onEnterKeyPress,o=t.onKeyDown;e.which===r.ENTER&&i&&i(e),o&&o(e)},n.handleClickOutside=function(e){n.dropdownRef&&!n.dropdownContainerRef.contains(e.target)&&n.state.showDropdown&&n.setState({showDropdown:!1})},n.handleSearchChange=function(e){var t=e.currentTarget.value,r=n.state,i=r.preferredCountries,o=r.selectedCountry,a=0;if(""===t&&o){var l=n.state.onlyCountries;a=n.concatPreferredCountries(i,l).findIndex(function(e){return e==o}),setTimeout(function(){return n.scrollTo(n.getElement(a))},100)}n.setState({searchValue:t,highlightCountryIndex:a})},n.concatPreferredCountries=function(e,t){return e.length>0?o(new Set(e.concat(t))):t},n.getDropdownCountryName=function(e){return e.localName||e.name},n.getSearchFilteredCountries=function(){var e=n.state,t=e.preferredCountries,r=e.onlyCountries,i=e.searchValue,a=n.props.enableSearch,l=n.concatPreferredCountries(t,r),c=i.trim().toLowerCase().replace("+","");if(a&&c){if(/^\d+$/.test(c))return l.filter(function(e){var t=e.dialCode;return["".concat(t)].some(function(e){return e.toLowerCase().includes(c)})});var s=l.filter(function(e){var t=e.iso2;return["".concat(t)].some(function(e){return e.toLowerCase().includes(c)})}),d=l.filter(function(e){var t=e.name,n=e.localName;return e.iso2,["".concat(t),"".concat(n||"")].some(function(e){return e.toLowerCase().includes(c)})});return n.scrollToTop(),o(new Set([].concat(s,d)))}return l},n.getCountryDropdownList=function(){var e=n.state,t=e.preferredCountries,i=e.highlightCountryIndex,o=e.showDropdown,a=e.searchValue,l=n.props,c=l.disableDropdown,s=l.prefix,d=n.props,u=d.enableSearch,f=d.searchNotFound,h=d.disableSearchIcon,p=d.searchClass,C=d.searchStyle,g=d.searchPlaceholder,v=d.autocompleteSearch,y=n.getSearchFilteredCountries().map(function(e,t){var r=i===t,o=x()({country:!0,preferred:"us"===e.iso2||"gb"===e.iso2,active:"us"===e.iso2,highlight:r}),a="flag ".concat(e.iso2);return m.a.createElement("li",Object.assign({ref:function(e){return n["flag_no_".concat(t)]=e},key:"flag_no_".concat(t),"data-flag-key":"flag_no_".concat(t),className:o,"data-dial-code":"1",tabIndex:c?"-1":"0","data-country-code":e.iso2,onClick:function(t){return n.handleFlagItemClick(e,t)},role:"option"},r?{"aria-selected":!0}:{}),m.a.createElement("div",{className:a}),m.a.createElement("span",{className:"country-name"},n.getDropdownCountryName(e)),m.a.createElement("span",{className:"dial-code"},e.format?n.formatNumber(e.dialCode,e):s+e.dialCode))}),w=m.a.createElement("li",{key:"dashes",className:"divider"});t.length>0&&(!u||u&&!a.trim())&&y.splice(t.length,0,w);var b=x()(r({"country-list":!0,hide:!o},n.props.dropdownClass,!0));return m.a.createElement("ul",{ref:function(e){return!u&&e&&e.focus(),n.dropdownRef=e},className:b,style:n.props.dropdownStyle,role:"listbox",tabIndex:"0"},u&&m.a.createElement("li",{className:x()(r({search:!0},p,p))},!h&&m.a.createElement("span",{className:x()(r({"search-emoji":!0},"".concat(p,"-emoji"),p)),role:"img","aria-label":"Magnifying glass"},"🔎"),m.a.createElement("input",{className:x()(r({"search-box":!0},"".concat(p,"-box"),p)),style:C,type:"search",placeholder:g,autoFocus:!0,autoComplete:v?"on":"off",value:a,onChange:n.handleSearchChange})),y.length>0?y:m.a.createElement("li",{className:"no-entries-message"},m.a.createElement("span",null,f)))};var s,h=new z(e.enableAreaCodes,e.enableTerritories,e.regions,e.onlyCountries,e.preferredCountries,e.excludeCountries,e.preserveOrder,e.masks,e.priority,e.areaCodes,e.localization,e.prefix,e.defaultMask,e.alwaysDefaultMask),p=h.onlyCountries,C=h.preferredCountries,v=h.hiddenAreaCodes,w=e.value?e.value.replace(/\D/g,""):"";s=e.disableInitialCountryGuess?0:w.length>1?n.guessSelectedCountry(w.substring(0,6),e.country,p,v)||0:e.country&&p.find(function(t){return t.iso2==e.country})||0;var E,A=w.length<2&&s&&!M()(w,s.dialCode)?s.dialCode:"";E=""===w&&0===s?"":n.formatNumber((e.disableCountryCode?"":A)+w,s.name?s:void 0);var k=p.findIndex(function(e){return e==s});return n.state={showDropdown:e.showDropdown,formattedNumber:E,onlyCountries:p,preferredCountries:C,hiddenAreaCodes:v,selectedCountry:s,highlightCountryIndex:k,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:g()(n.searchCountry,250),searchValue:""},n}var n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),(n=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(e,t,n){e.country!==this.props.country?this.updateCountry(this.props.country):e.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(e){if(null===e)return this.setState({selectedCountry:0,formattedNumber:""});var t=this.state,n=t.onlyCountries,r=t.selectedCountry,i=t.hiddenAreaCodes,o=this.props,a=o.country,l=o.prefix;if(""===e)return this.setState({selectedCountry:r,formattedNumber:""});var c,s,d=e.replace(/\D/g,"");if(r&&M()(e,l+r.dialCode))s=this.formatNumber(d,r),this.setState({formattedNumber:s});else{var u=(c=this.props.disableCountryGuess?r:this.guessSelectedCountry(d.substring(0,6),a,n,i)||r)&&M()(d,l+c.dialCode)?c.dialCode:"";s=this.formatNumber((this.props.disableCountryCode?"":u)+d,c||void 0),this.setState({selectedCountry:c,formattedNumber:s})}}},{key:"render",value:function(){var e,t,n,i=this,o=this.state,a=o.onlyCountries,l=o.selectedCountry,c=o.showDropdown,s=o.formattedNumber,d=o.hiddenAreaCodes,u=this.props,f=u.disableDropdown,h=u.renderStringAsFlag,p=u.isValid,C=u.defaultErrorMessage,g=u.specialLabel;if("boolean"==typeof p)t=p;else{var v=p(s.replace(/\D/g,""),l,a,d);"boolean"==typeof v?!1===(t=v)&&(n=C):(t=!1,n=v)}var y=x()((r(e={},this.props.containerClass,!0),r(e,"react-tel-input",!0),e)),w=x()({arrow:!0,up:c}),b=x()(r({"form-control":!0,"invalid-number":!t,open:c},this.props.inputClass,!0)),E=x()({"selected-flag":!0,open:c}),M=x()(r({"flag-dropdown":!0,"invalid-number":!t,open:c},this.props.buttonClass,!0)),A="flag ".concat(l&&l.iso2);return m.a.createElement("div",{className:"".concat(y," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},g&&m.a.createElement("div",{className:"special-label"},g),n&&m.a.createElement("div",{className:"invalid-number-message"},n),m.a.createElement("input",Object.assign({className:b,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:s,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(e){i.numberInputRef=e,"function"==typeof i.props.inputProps.ref?i.props.inputProps.ref(e):"object"==typeof i.props.inputProps.ref&&(i.props.inputProps.ref.current=e)}})),m.a.createElement("div",{className:M,style:this.props.buttonStyle,ref:function(e){return i.dropdownContainerRef=e}},h?m.a.createElement("div",{className:E},h):m.a.createElement("div",{onClick:f?void 0:this.handleFlagDropdownClick,className:E,title:l?"".concat(l.localName||l.name,": + ").concat(l.dialCode):"",tabIndex:f?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!c||void 0},m.a.createElement("div",{className:A},!f&&m.a.createElement("div",{className:w}))),c&&this.getCountryDropdownList()))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),t}(m.a.Component);N.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=N}])),px),gx=H(Cx),vx={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]","(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|2[23]"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","(?:[025-7]\\d|44)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[024-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","(?:01\\d|8)\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],BL:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37|86)","300|4(?:0(?:0|20)|370|864)"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[178]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-6]|7[246]|8[2-4]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|[78]"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","[2-9]\\d{9}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|5[07]|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|33|44|66|77|88)|6(?:22|33))[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["5"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["60|809"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9(?:10|[2-9])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["46"]],["(\\d{3})(\\d{7})","$1 $2",["6|90"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|9[14]"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:79[01]|83[0-36-9]|95[0-3])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9,10,11,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|3[13])"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,"0|180020",0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0|180020","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",[7,8,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","[2-589]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13,14,15,16,17],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0|180020","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11,12],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[03]"]]],0,0,0,0,0,0,[["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],["3[2-8]\\d{9,10}",[11,12]],0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0|180020","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[47]"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["3|4(?:2[09]|7[01])|6[1-9]","3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[25-9]"],"0$1"]],"0",0,"(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[36]0|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["3"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|78|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2679]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|[67]\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[67]"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|452|678|86","[12]|452|6788|86"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","(?:596\\d|7091)\\d{5}|(?:69|[89]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]|8(?:0[6-9]|[36])"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","[2-9]\\d{9}",[10],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"]]],0,0,0,0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[0467]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","(?:20|9\\d)\\d{8}|[78]\\d{9,13}",[10,11,12,13,14],[["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[24-9]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[136]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","709\\d{6}|(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[26-9]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","(?:[15]\\d|800|92)\\d{7}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","[6-9]\\d{6}|[1-6]\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","(?:[2489]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10,12],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|[6-8]\\d|90)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-9]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","(?:[267]\\d\\d|500)\\d{5}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[25-7]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-359]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-4]|5[1-3]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[59]"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|30|[689]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[236-9]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","(?:[0-57-9]\\d|66)\\d{7}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3(?:[1245]|3[12])"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["\\d"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["3052(?:0[0-8]|[1-9]\\d)\\d{4}|(?:2742|305[3-9])\\d{6}|(?:472|983)[2-47-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}",[4,5,6,7,8,9,10,11,12,13],[["(\\d{4,5})","$1",["21"]],["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","00","(?:20|33|[5-9]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"]]]],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11,12],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[47-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|[579]\\d|63)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[579]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[235-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"],0,0,0,0,0,0,["2\\d{8}",[9]]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,["348[57]\\d{7}",[11]],0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function yx(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return wx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wx(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bx(e,t){for(var n,r=0,i=yx(t.split(""));!(n=i()).done;){n.value===e&&r++}return r}function Ex(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Mx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mx(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Mx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ax(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",n=arguments.length>2?arguments[2]:void 0;if(!e)return function(e){return{text:e}};var r=bx(t,e);return function(i){if(!i)return{text:"",template:e};for(var o,a=0,l="",c=Ex(e.split(""));!(o=c()).done;){var s=o.value;if(s===t){if(l+=i[a],++a===i.length&&i.length<r)break}else l+=s}return n&&(l=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:" ",i=e.length,o=bx("(",e)-bx(")",e);o>0&&i<t.length;)e+=t[i].replace(n,r),")"===t[i]&&o--,i++;return e}(l,e)),{text:l,template:e}}}var xx=8,kx=46;function Lx(e,t){void 0!==t&&(!function(){if("undefined"!=typeof navigator)return Hx.test(navigator.userAgent)}()?e.setSelectionRange(t,t):setTimeout(function(){return e.setSelectionRange(t,t)},0))}var Hx=/Android/i;function _x(e,t,n,r,i){if(!t.hasAttribute("readonly")){var o=function(e){switch(e.keyCode){case xx:return"Backspace";case kx:return"Delete"}}(e);switch(o){case"Delete":case"Backspace":e.preventDefault();var a=function(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}(t);return a?(function(e,t){var n=e.value;n=n.slice(0,t.start)+n.slice(t.end),e.value=n,Lx(e,t.start)}(t,a),Sx(t,n,r,void 0,i)):Sx(t,n,r,o,i)}}}function Sx(e,t,n,r,i){var o=function(e,t,n){for(var r={},i="",o=0,a=0;a<e.length;){var l=n(e[a],i,r);void 0!==l&&(i+=l,void 0!==t&&(t===a?o=i.length-1:t>a&&(o=i.length))),a++}return void 0===t&&(o=i.length),{value:i,caret:o}}(e.value,e.selectionStart,t),a=o.value,l=o.caret;if(r){var c=function(e,t,n){switch(n){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1)}return{value:e,caret:t}}(a,l,r);a=c.value,l=c.caret}var s=function(e,t,n){"string"==typeof n&&(n=Ax(n));var r=n(e)||{},i=r.text,o=r.template;if(void 0===i&&(i=e),o)if(void 0===t)t=i.length;else{for(var a=0,l=!1,c=-1;a<i.length&&a<o.length;){if(i[a]!==o[a]){if(0===t){l=!0,t=a;break}c=a,t--}a++}l||(t=c+1)}return{text:i,caret:t}}(a,l,n),d=s.text;l=s.caret,e.value=d,Lx(e,l),i&&i(a)}var Vx=["ref","parse","format","value","defaultValue","controlled","onChange","onKeyDown"];function Ox(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ox(Object(n),!0).forEach(function(t){Nx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ox(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ix(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Tx(e){var t=e.ref,n=e.parse,r=e.format,i=e.value,o=e.defaultValue,l=e.controlled,c=void 0===l||l,s=e.onChange,d=e.onKeyDown,u=Ix(e,Vx),f=a(),h=p(function(e){f.current=e,t&&("function"==typeof t?t(e):t.current=e)},[t]),m=p(function(e){Sx(f.current,n,r,void 0,s)},[f,n,r,s]),C=p(function(e){if(d&&d(e),!e.defaultPrevented)return _x(e,f.current,n,r,s)},[f,n,r,s,d]),g=zx(zx({},u),{},{ref:h,onChange:m,onKeyDown:C});return zx(zx({},g),{},c?{value:r(Dx(i)?"":i).text}:{defaultValue:r(Dx(o)?"":o).text})}function Dx(e){return null==e}var jx=["inputComponent","parse","format","value","defaultValue","onChange","controlled","onKeyDown","type"];function Zx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bx(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Px(e,t){var n=e.inputComponent,r=void 0===n?"input":n,o=e.parse,a=e.format,l=e.value,c=e.defaultValue,s=e.onChange,d=e.controlled,u=e.onKeyDown,f=e.type,h=Tx(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zx(Object(n),!0).forEach(function(t){Rx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({ref:t,parse:o,format:a,value:l,defaultValue:c,onChange:s,controlled:d,onKeyDown:u,type:void 0===f?"text":f},Bx(e,jx)));return i.createElement(r,h)}function Fx(e,t){e=e.split("-"),t=t.split("-");for(var n=e[0].split("."),r=t[0].split("."),i=0;i<3;i++){var o=Number(n[i]),a=Number(r[i]);if(o>a)return 1;if(a>o)return-1;if(!isNaN(o)&&isNaN(a))return 1;if(isNaN(o)&&!isNaN(a))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}(Px=i.forwardRef(Px)).propTypes={parse:xh.func.isRequired,format:xh.func.isRequired,inputComponent:xh.elementType,type:xh.string,value:xh.string,defaultValue:xh.string,onChange:xh.func,controlled:xh.bool,onKeyDown:xh.func,onCut:xh.func,onPaste:xh.func};var Ux={}.constructor;function qx(e){return null!=e&&e.constructor===Ux}function Wx(e){return Wx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wx(e)}function Qx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gx(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kx(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kx(e){var t=function(e,t){if("object"!=Wx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Wx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Wx(t)?t:t+""}var Yx=" ext. ",Xx=/^\d+$/,Jx=function(){return Gx(function e(t){Qx(this,e),ik(t),this.metadata=t,ck.call(this,t)},[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(e){return"001"!==e})}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&Xx.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new $x(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new $x(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var n=this.nonGeographic()[e];if(n)return n}else{var r=this.countryCallingCodes()[e];if(r&&1===r.length&&"001"===r[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}])}(),$x=function(){return Gx(function e(t,n){Qx(this,e),this.globalMetadataObject=n,this.metadata=t,ck.call(this,n.metadata)},[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map(function(t){return new ek(t,e)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&rk(this.types(),e))return new nk(rk(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?Yx:this.metadata[13]||Yx}}])}(),ek=function(){return Gx(function e(t,n){Qx(this,e),this._format=t,this.metadata=n},[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||tk.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}])}(),tk=/^\(?\$1\)?$/,nk=function(){return Gx(function e(t,n){Qx(this,e),this.type=t,this.metadata=n},[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}])}();function rk(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}function ik(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!qx(e)||!qx(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(qx(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+ok(e)+": "+e,"."))}var ok=function(e){return Wx(e)};function ak(e,t){if((t=new Jx(t)).hasCountry(e))return t.selectNumberingPlan(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function lk(e,t){return t.countries.hasOwnProperty(e)}function ck(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===Fx(t,"1.2.0")?this.v2=!0:-1===Fx(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}function sk(e,t,n){return function(e,t,n,r){t&&(r=new Jx(r.metadata)).selectNumberingPlan(t);var i=r.type(n),o=i&&i.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";var a=e.length,l=o[0];if(l===a)return"IS_POSSIBLE";if(l>a)return"TOO_SHORT";if(o[o.length-1]<a)return"TOO_LONG";return o.indexOf(a,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}(e,t,void 0,n)}function dk(e,t,n){return"IS_POSSIBLE"===sk(e,t,n)}function uk(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}function fk(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hk(e,t);var n={}.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)?hk(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pk=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function mk(e,t,n){if(t=t||{},e.country||e.countryCallingCode){(n=new Jx(n)).selectNumberingPlan(e.country,e.countryCallingCode);var r=t.v2?e.nationalNumber:e.phone;if(uk(r,n.nationalNumberPattern())){if(Ck(r,"FIXED_LINE",n))return n.type("MOBILE")&&""===n.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":n.type("MOBILE")?Ck(r,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var i,o=fk(pk);!(i=o()).done;){var a=i.value;if(Ck(r,a,n))return a}}}}function Ck(e,t,n){return!(!(t=n.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&uk(e,t.pattern()))}function gk(e,t,n){var r=new Jx(n).getCountryCodesForCallingCode(e);return r?r.filter(function(e){return function(e,t,n){var r=new Jx(n);if(r.selectNumberingPlan(t),r.numberingPlan.possibleLengths().indexOf(e.length)>=0)return!0;return!1}(t,e,n)}):[]}var vk="0-90-9٠-٩۰-۹",yk="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~"),wk=new RegExp("(["+vk+"])");function bk(e,t,n,r){if(t){var i=new Jx(r);i.selectNumberingPlan(t,n);var o=new RegExp(i.IDDPrefix());if(0===e.search(o)){var a=(e=e.slice(e.match(o)[0].length)).match(wk);if(!(a&&null!=a[1]&&a[1].length>0&&"0"===a[1]))return e}}}function Ek(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),r=n.exec(e);if(r){var i,o,a,l=r.length-1,c=l>0&&r[l];if(t.nationalPrefixTransformRule()&&c)i=e.replace(n,t.nationalPrefixTransformRule()),l>1&&(o=r[1]);else{var s=r[0];i=e.slice(s.length),c&&(o=r[1])}if(c){var d=e.indexOf(r[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(a=t.numberingPlan.nationalPrefix())}else a=r[0];return{nationalNumber:i,nationalPrefix:a,carrierCode:o}}}return{nationalNumber:e}}function Mk(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ak(e,t);var n={}.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)?Ak(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ak(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xk(e,t){var n=t.countries,r=t.metadata;r=new Jx(r);for(var i,o=Mk(n);!(i=o()).done;){var a=i.value;if(r.selectNumberingPlan(a),r.leadingDigits()){if(e&&0===e.search(r.leadingDigits()))return a}else if(mk({phone:e,country:a},void 0,r.metadata))return a}}function kk(e,t){var n=t.nationalNumber,r=t.metadata,i=r.getCountryCodesForCallingCode(e);if(i)return 1===i.length?i[0]:xk(n,{countries:i,metadata:r.metadata})}function Lk(e,t,n){var r=Ek(e,n),i=r.carrierCode,o=r.nationalNumber;if(o!==e){if(!function(e,t,n){if(uk(e,n.nationalNumberPattern())&&!uk(t,n.nationalNumberPattern()))return!1;return!0}(e,o,n))return{nationalNumber:e};if(n.numberingPlan.possibleLengths()&&(t||(t=kk(n.numberingPlan.callingCode(),{nationalNumber:o,metadata:n})),!function(e,t,n){switch(sk(e,t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}(o,t,n)))return{nationalNumber:e}}return{nationalNumber:o,carrierCode:i}}function Hk(e,t,n,r,i){var o=t||n?ak(t||n,i):r;if(0===e.indexOf(o)){(i=new Jx(i)).selectNumberingPlan(t||n,o);var a=e.slice(o.length),l=Lk(a,t,i).nationalNumber,c=Lk(e,t,i).nationalNumber;if(!uk(c,i.nationalNumberPattern())&&uk(l,i.nationalNumberPattern())||"TOO_LONG"===sk(c,t,i))return{countryCallingCode:o,number:a}}return{number:e}}function _k(e,t,n,r,i){if(!e)return{};var o;if("+"!==e[0]){var a=bk(e,t||n,r,i);if(!a||a===e){if(t||n||r){var l=Hk(e,t,n,r,i),c=l.countryCallingCode,s=l.number;if(c)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:c,number:s}}return{number:e}}o=!0,e="+"+a}if("0"===e[1])return{};i=new Jx(i);for(var d=2;d-1<=3&&d<=e.length;){var u=e.slice(1,d);if(i.hasCallingCode(u))return i.selectNumberingPlan(u),{countryCallingCodeSource:o?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:e.slice(d)};d++}return{}}function Sk(e){return e.replace(new RegExp("[".concat(yk,"]+"),"g")," ").trim()}var Vk=/(\$\d)/;function Ok(e,t,n){var r=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var o=e.replace(new RegExp(t.pattern()),r?t.internationalFormat():i&&t.nationalPrefixFormattingRule()?t.format().replace(Vk,t.nationalPrefixFormattingRule()):t.format());return r?Sk(o):o}var zk=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;var Nk=function(e){return"([".concat(vk,"]{1,").concat(e,"})")};function Ik(e){var t="[  \\t,]*",n="[:\\..]?[  \\t,-]*",r="#?",i="[  \\t]*";return";ext="+Nk("20")+"|"+(t+"(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)"+n+Nk("20")+r)+"|"+(t+"(?:[xx##~~]|int|int)"+n+Nk("9")+r)+"|"+("[- ]+"+Nk("6")+"#")+"|"+(i+"(?:,{2}|;)"+n+Nk("15")+r)+"|"+(i+"(?:,)+"+n+Nk("9")+r)}var Tk="["+vk+"]{2}",Dk="[++]{0,1}(?:["+yk+"]*["+vk+"]){3,}["+yk+vk+"]*",jk=new RegExp("^[++]{0,1}(?:["+yk+"]*["+vk+"]){1,2}$","i"),Zk=Dk+"(?:"+Ik()+")?",Rk=new RegExp("^"+Tk+"$|^"+Zk+"$","i");var Bk={formatExtension:function(e,t,n){return"".concat(e).concat(n.ext()).concat(t)}};function Pk(e,t,n,r){if(n=n?function(){for(var e=1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(;e<n.length;){if(n[e])for(var i in n[e])n[0][i]=n[e][i];e++}return n[0]}({},Bk,n):Bk,r=new Jx(r),e.country&&"001"!==e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)return e.phone||"";r.selectNumberingPlan(e.countryCallingCode)}var i,o=r.countryCallingCode(),a=n.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return a?Uk(i=Fk(a,e.carrierCode,"NATIONAL",r,n),e.ext,r,n.formatExtension):"";case"INTERNATIONAL":return a?(i=Fk(a,null,"INTERNATIONAL",r,n),Uk(i="+".concat(o," ").concat(i),e.ext,r,n.formatExtension)):"+".concat(o);case"E.164":return"+".concat(o).concat(a);case"RFC3966":return function(e){var t=e.number,n=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(n?";ext="+n:"")}({number:"+".concat(o).concat(a),ext:e.ext});case"IDD":if(!n.fromCountry)return;var l=function(e,t,n,r,i){var o=ak(r,i.metadata);if(o===n){var a=Fk(e,t,"NATIONAL",i);return"1"===n?n+" "+a:a}var l=function(e,t,n){var r=new Jx(n);return r.selectNumberingPlan(e,t),r.defaultIDDPrefix()?r.defaultIDDPrefix():zk.test(r.IDDPrefix())?r.IDDPrefix():void 0}(r,void 0,i.metadata);if(l)return"".concat(l," ").concat(n," ").concat(Fk(e,null,"INTERNATIONAL",i))}(a,e.carrierCode,o,n.fromCountry,r);return Uk(l,e.ext,r,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Fk(e,t,n,r,i){var o,a,l=(o=r.formats(),a=e,function(e,t){for(var n=0;n<e.length;){if(t(e[n]))return e[n];n++}}(o,function(e){if(e.leadingDigitsPatterns().length>0){var t=e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length-1];if(0!==a.search(t))return!1}return uk(a,e.pattern())}));return l?Ok(e,l,{useInternationalFormat:"INTERNATIONAL"===n,withNationalPrefix:!l.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!i||!1!==i.nationalPrefix,carrierCode:t,metadata:r}):e}function Uk(e,t,n,r){return t?r(e,t,n):e}function qk(e){return qk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qk(e)}function Wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wk(Object(n),!0).forEach(function(t){Gk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gk(e,t,n){return(t=Yk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kk(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yk(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yk(e){var t=function(e,t){if("object"!=qk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=qk(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==qk(t)?t:t+""}var Xk=function(){return Kk(function e(t,n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("First argument is required");if("string"!=typeof t)throw new TypeError("First argument must be a string");if("+"===t[0]&&!n)throw new TypeError("`metadata` argument not passed");if(qx(n)&&qx(n.countries)){r=n;var i=t;if(!$k.test(i))throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');var o=_k(i,void 0,void 0,void 0,r);if(t=o.countryCallingCode,!(n=o.number))throw new Error("Invalid `number` argument passed: too short")}if(!n)throw new TypeError("`nationalNumber` argument is required");if("string"!=typeof n)throw new TypeError("`nationalNumber` argument must be a string");ik(r);var a=function(e,t){var n,r,i=new Jx(t);Jk(e)?(n=e,i.selectNumberingPlan(n),r=i.countryCallingCode()):r=e;return{country:n,countryCallingCode:r}}(t,r),l=a.country,c=a.countryCallingCode;this.country=l,this.countryCallingCode=c,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return r}},[{key:"setExt",value:function(e){this.ext=e}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:gk(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return function(e,t,n){if(void 0===t&&(t={}),n=new Jx(n),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.selectNumberingPlan(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(e.countryCallingCode)}}if(n.possibleLengths())return dk(e.phone||e.nationalNumber,e.country,n);if(e.countryCallingCode&&n.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return function(e,t,n){return t=t||{},(n=new Jx(n)).selectNumberingPlan(e.country,e.countryCallingCode),n.hasTypes()?void 0!==mk(e,t,n.metadata):uk(t.v2?e.nationalNumber:e.phone,n.nationalNumberPattern())}(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){return new Jx(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return mk(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(e,t){return Pk(this,e,t?Qk(Qk({},t),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])}(),Jk=function(e){return/^[A-Z]{2}$/.test(e)};var $k=/^\+\d+$/;function eL(e){return eL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eL(e)}function tL(e,t,n){return t=oL(t),function(e,t){if(t&&("object"==eL(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rL()?Reflect.construct(t,n||[],oL(e).constructor):t.apply(e,n))}function nL(e){var t="function"==typeof Map?new Map:void 0;return nL=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(rL())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&iL(i,n.prototype),i}(e,arguments,oL(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),iL(n,e)},nL(e)}function rL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rL=function(){return!!e})()}function iL(e,t){return iL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iL(e,t)}function oL(e){return oL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oL(e)}var aL=function(){function e(t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=tL(this,e,[t]),Object.setPrototypeOf(n,e.prototype),n.name=n.constructor.name,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iL(e,t)}(e,nL(Error)),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(e)}(),lL=new RegExp("(?:"+Ik()+")$","i");function cL(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sL(e,t);var n={}.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)?sL(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function sL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var dL={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function uL(e){return dL[e]}function fL(e){for(var t,n="",r=cL(e.split(""));!(t=r()).done;){var i=uL(t.value);i&&(n+=i)}return n}function hL(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return pL(e,t);var n={}.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)?pL(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mL(e){for(var t,n="",r=hL(e.split(""));!(t=r()).done;){n+=CL(t.value,n)||""}return n}function CL(e,t,n){return"+"===e?t?void("function"==typeof n&&n("end")):"+":uL(e)}var gL="(["+vk+"]|[\\-\\.\\(\\)]?)",vL=new RegExp("^\\+"+gL+"*["+vk+"]"+gL+"*$","g"),yL=new RegExp("^("+("["+vk+"]+((\\-)*["+vk+"])*")+"\\.)*"+("[a-zA-Z]+((\\-)*["+vk+"])*")+"\\.?$","g"),wL="tel:",bL=";phone-context=";function EL(e,t){var n,r=t.extractFormattedPhoneNumber,i=function(e){var t=e.indexOf(bL);if(t<0)return null;var n=t+15;if(n>=e.length)return"";var r=e.indexOf(";",n);return r>=0?e.substring(n,r):e.substring(n)}(e);if(!function(e){return null===e||0!==e.length&&(vL.test(e)||yL.test(e))}(i))throw new aL("NOT_A_NUMBER");if(null===i)n=r(e)||"";else{n="","+"===i.charAt(0)&&(n+=i);var o,a=e.indexOf(wL);o=a>=0?a+4:0;var l=e.indexOf(bL);n+=e.substring(o,l)}var c=n.indexOf(";isub=");if(c>0&&(n=n.substring(0,c)),""!==n)return n}var ML=new RegExp("[++"+vk+"]"),AL=new RegExp("[^"+vk+"#]+$");function xL(e,t,n){if(t=t||{},n=new Jx(n),t.defaultCountry&&!n.hasCountry(t.defaultCountry)){if(t.v2)throw new aL("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var r=function(e,t,n){var r=EL(e,{extractFormattedPhoneNumber:function(e){return function(e,t,n){if(!e)return;if(e.length>250){if(n)throw new aL("TOO_LONG");return}if(!1===t)return e;var r=e.search(ML);if(r<0)return;return e.slice(r).replace(AL,"")}(e,n,t)}});if(!r)return{};if(!function(e){return e.length>=2&&Rk.test(e)}(r))return function(e){return jk.test(e)}(r)?{error:"TOO_SHORT"}:{};var i=function(e){var t=e.search(lL);if(t<0)return{};for(var n=e.slice(0,t),r=e.match(lL),i=1;i<r.length;){if(r[i])return{number:n,ext:r[i]};i++}}(r);if(i.ext)return i;return{number:r}}(e,t.v2,t.extract),i=r.number,o=r.ext,a=r.error;if(!i){if(t.v2){if("TOO_SHORT"===a)throw new aL("TOO_SHORT");throw new aL("NOT_A_NUMBER")}return{}}var l=function(e,t,n,r){var i,o=_k(mL(e),void 0,t,n,r.metadata),a=o.countryCallingCodeSource,l=o.countryCallingCode,c=o.number;if(l)r.selectNumberingPlan(l);else{if(!c||!t&&!n)return{};r.selectNumberingPlan(t,n),t&&(i=t),l=n||ak(t,r.metadata)}if(!c)return{countryCallingCodeSource:a,countryCallingCode:l};var s=Lk(mL(c),i,r),d=s.nationalNumber,u=s.carrierCode,f=kk(l,{nationalNumber:d,metadata:r});f&&(i=f,"001"===f||r.selectNumberingPlan(i));return{country:i,countryCallingCode:l,countryCallingCodeSource:a,nationalNumber:d,carrierCode:u}}(i,t.defaultCountry,t.defaultCallingCode,n),c=l.country,s=l.nationalNumber,d=l.countryCallingCode,u=l.countryCallingCodeSource,f=l.carrierCode;if(!n.hasSelectedNumberingPlan()){if(t.v2)throw new aL("INVALID_COUNTRY");return{}}if(!s||s.length<2){if(t.v2)throw new aL("TOO_SHORT");return{}}if(s.length>17){if(t.v2)throw new aL("TOO_LONG");return{}}if(t.v2){var h=new Xk(d,s,n.metadata);return c&&(h.country=c),f&&(h.carrierCode=f),o&&(h.ext=o),h.__countryCallingCodeSource=u,h}var p=!!(t.extended?n.hasSelectedNumberingPlan():c)&&uk(s,n.nationalNumberPattern());return t.extended?{country:c,countryCallingCode:d,carrierCode:f,valid:p,possible:!!p||!(!0!==t.extended||!n.possibleLengths()||!dk(s,c,n)),phone:s,ext:o}:p?function(e,t,n){var r={country:e,phone:t};n&&(r.ext=n);return r}(c,s,o):{}}function kL(e){return kL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kL(e)}function LL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LL(Object(n),!0).forEach(function(t){_L(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _L(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=kL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=kL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kL(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SL(e){return SL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SL(e)}function VL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=SL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=SL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==SL(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return NL(e,t);var n={}.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)?NL(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IL(e){var t,n,r,i=zL(Array.prototype.slice.call(e),4),o=i[0],a=i[1],l=i[2],c=i[3];if("string"!=typeof o)throw new TypeError("A text for parsing must be a string.");if(t=o,a&&"string"!=typeof a){if(!qx(a))throw new Error("Invalid second argument: ".concat(a));l?(n=a,r=l):r=a}else c?(n=l,r=c):(n=void 0,r=l),a&&(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VL(Object(n),!0).forEach(function(t){OL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({defaultCountry:a},n));return{text:t,options:n,metadata:r}}function TL(e){return TL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TL(e)}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DL(Object(n),!0).forEach(function(t){ZL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=TL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=TL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==TL(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RL(e,t,n){t&&t.defaultCountry&&!lk(t.defaultCountry,n)&&(t=jL(jL({},t),{},{defaultCountry:void 0}));try{return function(e,t,n){return xL(e,HL(HL({},t),{},{v2:!0}),n)}(e,t,n)}catch(e){if(!(e instanceof aL))throw e}}function BL(e){return BL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BL(e)}function PL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PL(Object(n),!0).forEach(function(t){UL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function UL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=BL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=BL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==BL(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qL(){var e=IL(arguments),t=e.text,n=e.options,r=e.metadata,i=RL(t,n=FL(FL({},n),{},{extract:!1}),r);return i&&i.isValid()||!1}function WL(e){return WL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WL(e)}function QL(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GL(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GL(e){var t=function(e,t){if("object"!=WL(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=WL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==WL(t)?t:t+""}var KL=function(){return QL(function e(t){var n=t.onCountryChange,r=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.onCountryChange=n,this.onCallingCodeChange=r},[{key:"reset",value:function(e){var t=e.country,n=e.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(t,n)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberIsModified=!1,this.nationalPrefix=void 0,this.carrierCode=void 0,this.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix=void 0}},{key:"update",value:function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];this[r]=e[r]}}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){this.callingCode=e,this.onCallingCodeChange(e,this.country)}},{key:"startInternationalNumber",value:function(e,t){this.international=!0,this.initCountryAndCallingCode(e,t)}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])}();function YL(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return XL(e,t);var n={}.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)?XL(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function XL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var JL="x",$L=new RegExp(JL);function eH(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function tH(e,t){return")"===e[t]&&t++,function(e){var t=[],n=0;for(;n<e.length;)"("===e[n]?t.push(n):")"===e[n]&&t.pop(),n++;var r=0,i="";t.push(e.length);for(var o=0,a=t;o<a.length;o++){var l=a[o];i+=e.slice(r,l),r=l+1}return i}(e.slice(0,t))}function nH(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,n){var r=n.metadata,i=n.shouldTryNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,i(t)){var a=rH(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:r});if(a)return a}return rH(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:r})}(e,t,{metadata:r,shouldTryNationalPrefixFormattingRule:i,getSeparatorAfterNationalPrefix:o})}function rH(e,t,n){var r=n.metadata,i=n.useNationalPrefixFormattingRule,o=n.getSeparatorAfterNationalPrefix,a=Ok(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:i,metadata:r});if(i||(e.nationalPrefix?a=e.nationalPrefix+o(t)+a:e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix&&(a=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix+" "+a)),function(e,t){return fL(e)===t.getNationalDigits()}(a,e))return a}function iH(e){return iH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iH(e)}function oH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aH(e){var t=function(e,t){if("object"!=iH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=iH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==iH(t)?t:t+""}var lH=function(){return oH(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],n=t.branches,r=t.instructions;if(n)return{op:"|",args:n.concat([uH(r)])};if(0===r.length)throw new Error("Pattern is required");return 1===r.length?r[0]:r}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(dH);if(t){var n=t[1],r=e.slice(0,t.index),i=e.slice(t.index+n.length);switch(n){case"(?:":r&&this.parsePattern(r),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(r&&this.parsePattern(r),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var o=this.getContext().branches;o.push(uH(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(r&&this.parsePattern(r),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(uH(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":r&&this.parsePattern(r),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:cH(r)});break;default:throw new Error("Unknown operator: ".concat(n))}i&&this.parsePattern(i)}else{if(sH.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}])}();function cH(e){for(var t=[],n=0;n<e.length;){if("-"===e[n]){if(0===n||n===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var r=e[n-1].charCodeAt(0)+1,i=e[n+1].charCodeAt(0)-1,o=r;o<=i;)t.push(String.fromCharCode(o)),o++}else t.push(e[n]);n++}return t}var sH=/[\(\)\[\]\?\:\|]/,dH=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function uH(e){return 1===e.length?e[0]:e}function fH(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hH(e,t);var n={}.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)?hH(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pH(e){return pH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pH(e)}function mH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CH(e){var t=function(e,t){if("object"!=pH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=pH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==pH(t)?t:t+""}var gH=function(){return mH(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.matchTree=(new lH).parse(t)},[{key:"match",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!e)throw new Error("String is required");var n=vH(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||t)return n}}])}();function vH(e,t,n){if("string"==typeof t){var r=e.join("");return 0===t.indexOf(r)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===r.indexOf(t)?n&&e.length>t.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var i=e.slice(),o=0;o<t.length;){var a=vH(i,t[o],n&&o===t.length-1);if(!a)return;if(a.overflow)return a;if(!a.match){if(a.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(a,null,2)))}if(0===(i=i.slice(a.matchedChars.length)).length)return o===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};o++}return n?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(t.op){case"|":for(var l,c,s=fH(t.args);!(c=s()).done;){var d=vH(e,c.value,n);if(d){if(d.overflow)return d;if(d.match)return{match:!0,matchedChars:d.matchedChars};if(!d.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(d,null,2)));l=!0}}return l?{partialMatch:!0}:void 0;case"[]":for(var u,f=fH(t.args);!(u=f()).done;){var h=u.value;if(e[0]===h)return 1===e.length?{match:!0,matchedChars:e}:n?{overflow:!0}:{match:!0,matchedChars:[h]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}function yH(e){return yH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yH(e)}function wH(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bH(e,t);var n={}.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)?bH(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function bH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MH(e){var t=function(e,t){if("object"!=yH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=yH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==yH(t)?t:t+""}var AH=eH("9",15),xH=/[- ]/,kH=new RegExp("["+yk+"]*\\$1["+yk+"]*(\\$\\d["+yk+"]*)*$"),LH=function(){return EH(function e(t){t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=n,this.resetFormat()},[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var n=this;if(function(e,t,n){return"IS_POSSIBLE"===sk(e,t,n)}(t.nationalSignificantNumber,t.country,this.metadata))for(var r,i=wH(this.matchingFormats);!(r=i()).done;){var o=r.value,a=nH(t,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return n.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:function(e){return n.getSeparatorAfterNationalPrefix(e)}});if(a)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(a.replace(/\d/g,JL),t),this.populatedNationalNumberTemplate=a,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(JL),a}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var n=this.chosenFormat,r=this.chooseFormat(t);if(r)return r===n?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,n=e.nationalSignificantNumber,r=e.nationalPrefix,i=e.international,o=n,a=o.length-3;a<0&&(a=0),this.matchingFormats=this.matchingFormats.filter(function(e){return t.formatSuits(e,i,r)&&t.formatMatches(e,o,a)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,n){return!(n&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat())&&!(!t&&!n&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,n){var r=e.leadingDigitsPatterns().length;if(0===r)return!0;n=Math.min(n,r-1);var i=e.leadingDigitsPatterns()[n];if(t.length<3)try{return void 0!==new gH(i).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(i,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){for(var t,n=this,r=function(){var r=t.value;return n.chosenFormat===r?0:kH.test(n.getFormatFormat(r,e.international))?n.createTemplateForFormat(r,e)?(n.chosenFormat=r,0):(n.matchingFormats=n.matchingFormats.filter(function(e){return e!==r}),1):1},i=wH(this.matchingFormats.slice());!(t=i()).done&&0!==r(););return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var n=this.getTemplateForFormat(e,t);return n?(this.setNationalNumberTemplate(n,t),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(e){return this.isNANP||e&&e.nationalPrefixFormattingRule()&&xH.test(e.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var n=e.IDDPrefix,r=e.missingPlus;return n?t&&!1===t.spacing?n:n+" ":r?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,n=0,r=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";n<r.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf(JL,t+1),n++;return tH(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,JL)+eH(JL,t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var n=t.nationalSignificantNumber,r=t.international,i=t.nationalPrefix,o=t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,a=e.pattern();a=a.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var l=AH.match(a)[0];if(!(n.length>l.length)){var c=new RegExp("^"+a+"$"),s=n.replace(/\d/g,"9");c.test(s)&&(l=s);var d,u=this.getFormatFormat(e,r);if(this.shouldTryNationalPrefixFormattingRule(e,{international:r,nationalPrefix:i})){var f=u.replace(Vk,e.nationalPrefixFormattingRule());if(fL(e.nationalPrefixFormattingRule())===(i||"")+fL("$1")&&(u=f,d=!0,i))for(var h=i.length;h>0;)u=u.replace(/\d/,JL),h--}var p=l.replace(new RegExp(a),u).replace(new RegExp("9","g"),JL);return d||(o?p=eH(JL,o.length)+" "+p:i&&(p=eH(JL,i.length)+this.getSeparatorAfterNationalPrefix(e)+p)),r&&(p=Sk(p)),p}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,n){for(var r,i=YL(n.split(""));!(r=i()).done;){var o=r.value;if(e.slice(t+1).search($L)<0)return;t=e.search($L),e=e.replace($L,o)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],tH(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(e,t){var n=t.international,r=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var i=e.usesNationalPrefix();if(i&&r||!i&&!n)return!0}}}])}();function HH(e){return HH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HH(e)}function _H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return SH(e,t);var n={}.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)?SH(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function VH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OH(e){var t=function(e,t){if("object"!=HH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=HH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==HH(t)?t:t+""}var zH=new RegExp("^"+("["+yk+vk+"]+")+"$","i"),NH="(?:[++]["+yk+vk+"]*|["+yk+vk+"]+)",IH=new RegExp("[^"+yk+vk+"]+.*$"),TH=/[^\d\[\]]/,DH=function(){return VH(function e(t){var n=t.defaultCountry,r=t.defaultCallingCode,i=t.metadata,o=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=o},[{key:"input",value:function(e,t){var n,r=function(e){var t=function(e){var t=function(e){var t,n=e.search(NH);if(n<0)return;e=e.slice(n),"+"===e[0]&&(t=!0,e=e.slice(1));e=e.replace(IH,""),t&&(e="+"+e);return e}(e)||"";if("+"===t[0])return[t.slice(1),!0];return[t]}(e),n=_H(t,2),r=n[0],i=n[1];zH.test(r)||(r="");return[r,i]}(e),i=_H(r,2),o=i[0],a=i[1],l=fL(o);return a&&(t.digits||(t.startInternationalNumber(void 0,void 0),l||(n=!0))),l&&this.inputDigits(l,t),{digits:l,justLeadingPlus:n}}},{key:"inputDigits",value:function(e,t){var n=t.digits,r=n.length<3&&n.length+e.length>=3;if(t.appendDigits(e),r&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,n=e.callingCode;return t&&!n}},{key:"extractCountryCallingCode",value:function(e){var t=_k("+"+e.getDigitsWithoutInternationalPrefix(),e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),n=t.countryCallingCode,r=t.number;if(n)return e.setCallingCode(n),e.update({nationalSignificantNumber:r}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&TH.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var n=Ek(e,this.metadata),r=n.nationalPrefix,i=n.nationalNumber,o=n.carrierCode;if(i!==e)return this.onExtractedNationalNumber(r,o,i,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,n){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,n);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var r=Ek(e,this.metadata),i=r.nationalPrefix,o=r.nationalNumber,a=r.carrierCode;if(o!==t)return this.onExtractedNationalNumber(i,a,o,e,n),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,n,r,i){var o,a=!1,l=r.lastIndexOf(n);if(l<0||l!==r.length-n.length)a=!0;else{var c=r.slice(0,l);c&&c!==e&&(o=c)}i({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:n,nationalSignificantNumberIsModified:a,prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,function(t){return e.update(t)})||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,n=e.IDDPrefix,r=e.digits;if(e.nationalSignificantNumber,!t&&!n){var i=bk(r,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==i&&i!==r?(e.update({IDDPrefix:r.slice(0,r.length-i.length)}),this.startInternationalNumber(e,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=Hk(e.digits,e.country,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(t)return e.update({missingPlus:!0}),this.startInternationalNumber(e,{country:e.country,callingCode:t}),!0}}},{key:"startInternationalNumber",value:function(e,t){var n=t.country,r=t.callingCode;e.startInternationalNumber(n,r),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}}])}();function jH(e){return jH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jH(e)}function ZH(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(c=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return RH(e,t);var n={}.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)?RH(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function RH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function BH(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PH(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PH(e){var t=function(e,t){if("object"!=jH(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=jH(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==jH(t)?t:t+""}var FH=function(){return BH(function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new Jx(n);var r=ZH(this.getCountryAndCallingCode(t),2),i=r[0],o=r[1];this.defaultCountry=i,this.defaultCallingCode=o,this.reset()},[{key:"getCountryAndCallingCode",value:function(e){var t,n;return e&&(qx(e)?(t=e.defaultCountry,n=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,n]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),n=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(n){var r;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(r=this.formatter.format(n,this.state)),void 0===r&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var i=this.state.getNationalDigits();i&&(r=this.formatter.format(i,this.state))}this.formattedOutput=r?this.getFullNumber(r):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new KL({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,n){e.metadata.selectNumberingPlan(n,t),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new LH({state:this.state,metadata:this.metadata}),this.parser=new DH({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var n=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},r=this.state.callingCode;return n(r?e?"".concat(r," ").concat(e):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,r=e.nationalPrefix,i=t,o=n||r;return o&&(i=o+i),i}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberIsModified;return this.getFullNumber(e?this.state.getNationalDigits():this.getNonFormattedNationalNumberWithPrefix())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,JL)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(kk(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,n=e.callingCode,r=e.country,i=e.nationalSignificantNumber;if(t)return this.isInternational()?n?"+"+n+i:"+"+t:r||n?"+"+(r?this.metadata.countryCallingCode():n)+i:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,n=e.carrierCode,r=e.callingCode,i=this._getCountry();if(t&&(i||r)){if(i&&i===this.defaultCountry){var o=new Jx(this.metadata.metadata);o.selectNumberingPlan(i);var a=o.numberingPlan.callingCode(),l=this.metadata.getCountryCodesForCallingCode(a);if(l.length>1){var c=xk(t,{countries:l,metadata:this.metadata.metadata});c&&(i=c)}}var s=new Xk(i||r,t,this.metadata.metadata);return n&&(s.carrierCode=n),s}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])}();function UH(e){return new Jx(e).getCountries()}function qH(e){var t=e.inputFormat,n=e.country,r=e.metadata;return"NATIONAL_PART_OF_INTERNATIONAL"===t?"+".concat(ak(n,r)):""}function WH(e,t){return t&&" "===(e=e.slice(t.length))[0]&&(e=e.slice(1)),e}function QH(e,t,n){if(!n||!n.ignoreRest){return CL(e,t,function(e){if(n&&"end"===e)n.ignoreRest=!0})}}function GH(e){var t=e.onKeyDown,n=e.inputFormat;return p(function(e){e.keyCode===KH&&"INTERNATIONAL"===n&&e.target instanceof HTMLInputElement&&e.target.selectionStart===YH.length?e.preventDefault():t&&t(e)},[t,n])}var KH=8,YH="+",XH=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function JH(){return JH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JH.apply(this,arguments)}function $H(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var e_=function(e){function t(t,n){var r=t.onKeyDown,o=t.country,a=t.inputFormat,l=t.metadata,c=void 0===l?e:l;t.international,t.withCountryCallingCode;var s=$H(t,XH),d=p(function(e){var t=new FH(o,c),n=qH({inputFormat:a,country:o,metadata:c}),r=t.input(n+e),i=t.getTemplate();return n&&(r=WH(r,n),i&&(i=WH(i,n))),{text:r,template:i}},[o,c]),u=GH({onKeyDown:r,inputFormat:a});return i.createElement(Px,JH({},s,{ref:n,parse:QH,format:d,onKeyDown:u}))}return(t=i.forwardRef(t)).propTypes={value:xh.string.isRequired,onChange:xh.func.isRequired,onKeyDown:xh.func,country:xh.string,inputFormat:xh.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:xh.object},t}(),t_=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function n_(){return n_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n_.apply(this,arguments)}function r_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var i_=function(e){function t(t,n){var r=t.value,o=t.onChange,a=t.onKeyDown,l=t.country,c=t.inputFormat,s=t.metadata,d=void 0===s?e:s,u=t.inputComponent,f=void 0===u?"input":u;t.international,t.withCountryCallingCode;var h=r_(t,t_),m=qH({inputFormat:c,country:l,metadata:d}),C=p(function(e){var t=mL(e.target.value);t===r&&(0===o_(m,t,l,d).indexOf(e.target.value)&&(t=t.slice(0,-1)));o(t)},[m,r,o,l,d]),g=GH({onKeyDown:a,inputFormat:c});return i.createElement(f,n_({},h,{ref:n,value:o_(m,r,l,d),onChange:C,onKeyDown:g}))}return(t=i.forwardRef(t)).propTypes={value:xh.string.isRequired,onChange:xh.func.isRequired,onKeyDown:xh.func,country:xh.string,inputFormat:xh.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:xh.object,inputComponent:xh.elementType},t}();function o_(e,t,n,r){return WH(function(e,t,n){return n||(n=t,t=void 0),new FH(t,n).input(e)}(e+t,n,r),e)}function a_(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}var l_=["value","onChange","options","disabled","readOnly"],c_=["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"];function s_(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d_(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u_(){return u_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u_.apply(this,arguments)}function f_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function h_(e){var t=e.value,n=e.onChange,r=e.options,o=e.disabled,a=e.readOnly,l=f_(e,l_),c=p(function(e){var t=e.target.value;n("ZZ"===t?void 0:t)},[n]);return h(function(){return g_(r,t)},[r,t]),i.createElement("select",u_({},l,{disabled:o||a,readOnly:a,value:t||"ZZ",onChange:c}),r.map(function(e){var t=e.value,n=e.label,r=e.divider;return i.createElement("option",{key:r?"|":t||"ZZ",value:r?"|":t||"ZZ",disabled:!!r,style:r?p_:void 0},n)}))}h_.propTypes={value:xh.string,onChange:xh.func.isRequired,options:xh.arrayOf(xh.shape({value:xh.string,label:xh.string,divider:xh.bool})).isRequired,disabled:xh.bool,readOnly:xh.bool};var p_={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function m_(e){var t=e.value,n=e.options,r=e.className,o=e.iconComponent;e.getIconAspectRatio;var a,l=e.arrowComponent,c=void 0===l?C_:l,s=e.unicodeFlags,d=f_(e,c_),u=h(function(){return g_(n,t)},[n,t]);return i.createElement("div",{className:"PhoneInputCountry"},i.createElement(h_,u_({},d,{value:t,options:n,className:z("PhoneInputCountrySelect",r)})),u&&(s&&t?i.createElement("div",{className:"PhoneInputCountryIconUnicode"},a_((a=t)[0])+a_(a[1])):i.createElement(o,{"aria-hidden":!0,country:t,label:u.label,aspectRatio:s?1:void 0})),i.createElement(c,null))}function C_(){return i.createElement("div",{className:"PhoneInputCountrySelectArrow"})}function g_(e,t){for(var n,r=s_(e);!(n=r()).done;){var i=n.value;if(!i.divider&&v_(i.value,t))return i}}function v_(e,t){return null==e?null==t:e===t}m_.propTypes={iconComponent:xh.elementType,arrowComponent:xh.elementType,unicodeFlags:xh.bool};var y_=["country","countryName","flags","flagUrl"];function w_(){return w_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w_.apply(this,arguments)}function b_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E_(e){var t=e.country,n=e.countryName,r=e.flags,o=e.flagUrl,a=b_(e,y_);return r&&r[t]?r[t]({title:n}):i.createElement("img",w_({},a,{alt:n,role:n?void 0:"presentation",src:o.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}E_.propTypes={country:xh.string.isRequired,countryName:xh.string.isRequired,flags:xh.objectOf(xh.elementType),flagUrl:xh.string.isRequired};var M_=["aspectRatio"],A_=["title"],x_=["title"];function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}function L_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H_(e){var t=e.aspectRatio,n=L_(e,M_);return 1===t?i.createElement(S_,n):i.createElement(__,n)}function __(e){var t=e.title,n=L_(e,A_);return i.createElement("svg",k_({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),i.createElement("title",null,t),i.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},i.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),i.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),i.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),i.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),i.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),i.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),i.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}function S_(e){var t=e.title,n=L_(e,x_);return i.createElement("svg",k_({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),i.createElement("title",null,t),i.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},i.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),i.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),i.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),i.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),i.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),i.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),i.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}function V_(e){(function(e){if(e.length<2)return!1;if("+"!==e[0])return!1;for(var t=1;t<e.length;){var n=e.charCodeAt(t);if(!(n>=48&&n<=57))return!1;t++}return!0})(e)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",e)}function O_(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return z_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z_(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N_(e,t){return!!lk(e,t)||(console.error("Country not found: ".concat(e)),!1)}function I_(e,t){return e&&0===(e=e.filter(function(e){return N_(e,t)})).length&&(e=void 0),e}H_.propTypes={title:xh.string.isRequired,aspectRatio:xh.number},__.propTypes={title:xh.string.isRequired},S_.propTypes={title:xh.string.isRequired};var T_=["country","label","aspectRatio"];function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D_.apply(this,arguments)}function j_(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Z_(e){var t=e.flags,n=e.flagUrl,r=e.flagComponent,o=e.internationalIcon;function a(e){var a=e.country,l=e.label,c=e.aspectRatio,s=j_(e,T_),d=o===H_?c:void 0;return i.createElement("div",D_({},s,{className:z("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":1===d,"PhoneInputCountryIcon--border":a})}),a?i.createElement(r,{country:a,countryName:l,flags:t,flagUrl:n,className:"PhoneInputCountryIconImg"}):i.createElement(o,{title:l,aspectRatio:d,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:xh.string,label:xh.string.isRequired,aspectRatio:xh.number},a}function R_(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return B_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B_(e,t)}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P_(e,t){"function"==typeof e?e(t):e.current=t}Z_({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:E_,internationalIcon:H_});var F_=xh.shape({country_calling_codes:xh.object.isRequired,countries:xh.object.isRequired}),U_=xh.objectOf(xh.string);function q_(e,t){return"+"+ak(e,t)}function W_(e,t){return function(){var e=IL(arguments);return RL(e.text,e.options,e.metadata)}(e||"",t)}function Q_(e,t){var n=t.prevCountry,r=t.newCountry,i=t.metadata,o=t.useNationalFormat;if(n===r)return e;if(!e)return o?"":r?q_(r,i):"";if(r){if("+"===e[0]){if(o)return 0===e.indexOf("+"+ak(r,i))?function(e,t,n){if(t){var r="+"+ak(t,n);if(e.length<r.length){if(0===r.indexOf(e))return""}else if(0===e.indexOf(r))return e.slice(r.length)}for(var i=0,o=Object.keys(n.country_calling_codes);i<o.length;i++){var a=o[i];if(1===e.indexOf(a))return e.slice(1+a.length)}return""}(e,r,i):"";if(n){var a=q_(r,i);return 0===e.indexOf(a)?e:a}var l=q_(r,i);return 0===e.indexOf(l)?e:l}}else if("+"!==e[0])return G_(e,n,i)||"";return e}function G_(e,t,n){if(e){if("+"===e[0]){if("+"===e)return;var r=new FH(t,n);return r.input(e),r.getNumberValue()}if(t){var i=$_(e,t,n);return"+".concat(ak(t,n)).concat(i||"")}}}function K_(e,t,n){var r=$_(e,t,n);if(r){var i=r.length-function(e,t){return t=new Jx(t),t.selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}(t,n);if(i>0)return e.slice(0,e.length-i)}return e}function Y_(e,t){var n=t.country,r=t.countries,i=t.defaultCountry,o=t.latestCountrySelectedByUser,a=t.required,l=t.metadata;if("+"===e)return n;var c=function(e,t){var n=new FH(null,t);return n.input(e),n.getCountry()}(e,l);if(c)return!r||r.indexOf(c)>=0?c:void 0;if(n)if(eS(e,n,l)){if(o&&eS(e,o,l))return o;if(i&&eS(e,i,l))return i;if(!a)return}else if(!a)return;return n}function X_(e,t,n){if(0===e.indexOf(q_(t,n))){var r=new FH(t,n);r.input(e);var i=r.getNumber();return i?i.formatNational().replace(/\D/g,""):""}return e.replace(/\D/g,"")}function J_(e,t,n){return String.prototype.localeCompare?e.localeCompare(t,n):e<t?-1:e>t?1:0}function $_(e,t,n){var r=new FH(t,n);r.input(e);var i=r.getNumber();return i&&i.nationalNumber}function eS(e,t,n){for(var r=q_(t,n),i=0;i<e.length&&i<r.length;){if(e[i]!==r[i])return!1;i++}return!0}function tS(e){var t=e.value,n=e.phoneNumber,r=e.defaultCountry,i=e.international,o=e.useNationalFormat,a=e.metadata;return(!1===i||o)&&n&&n.country?function(e){return e.formatNational().replace(/\D/g,"")}(n):!t&&i&&r?q_(r,a):t}function nS(e){return nS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nS(e)}function rS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rS(Object(n),!0).forEach(function(t){oS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oS(e,t,n){var r;return r=function(e,t){if("object"!=nS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=nS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==nS(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aS(e,t){return null===e&&(e=void 0),null===t&&(t=void 0),e===t}var lS=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function cS(e){return cS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cS(e)}function sS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sS(Object(n),!0).forEach(function(t){vS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uS.apply(this,arguments)}function fS(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yS(r.key),r)}}function pS(e,t,n){return t=CS(t),function(e,t){if(t&&("object"===cS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mS()?Reflect.construct(t,n||[],CS(e).constructor):t.apply(e,n))}function mS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mS=function(){return!!e})()}function CS(e){return CS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CS(e)}function gS(e,t){return gS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gS(e,t)}function vS(e,t,n){return(t=yS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yS(e){var t=function(e,t){if("object"!=cS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=cS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cS(t)?t:t+""}var wS=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),vS(n=pS(this,e,[t]),"setInputRef",function(e){!function(e,t){for(var n,r=R_(e);!(n=r()).done;){var i=n.value;i&&P_(i,t)}}([n.props.inputRef,n.inputRef],e)}),vS(n,"isCountrySupportedWithError",function(e){return N_(e,n.props.metadata)}),vS(n,"onCountryChange",function(e){var t=n.props,r=t.international,i=t.metadata,o=t.onChange,a=t.focusInputOnCountrySelection,l=n.state,c=Q_(l.phoneDigits,{prevCountry:l.country,newCountry:e,metadata:i,useNationalFormat:!r}),s=G_(c,e,i);a&&n.inputRef.current.focus(),n.setState({country:e,latestCountrySelectedByUser:e,hasUserSelectedACountry:!0,phoneDigits:c,value:s},function(){o(s)})}),vS(n,"onChange",function(e){var t=n.props,r=t.defaultCountry,i=t.onChange,o=t.addInternationalOption,a=t.international,l=t.limitMaxLength,c=t.countryCallingCodeEditable,s=t.metadata,d=n.state,u=d.countries,f=d.phoneDigits,h=d.country,p=d.latestCountrySelectedByUser,m=function(e,t){var n,r=t.prevPhoneDigits,i=t.country,o=t.defaultCountry,a=t.latestCountrySelectedByUser,l=t.countryRequired,c=t.getAnyCountry,s=t.countries,d=t.international,u=t.limitMaxLength,f=t.countryCallingCodeEditable,h=t.metadata;if(d&&!1===f&&i){var p,m=q_(i,h);if(0!==e.indexOf(m))return e&&"+"!==e[0]?p=G_(e=m+e,i,h):e=m,{phoneDigits:e,value:p,country:i}}return!1===d&&i&&e&&"+"===e[0]&&(e=X_(e,i,h)),e&&i&&u&&(e=K_(e,i,h)),!e||"+"===e[0]||i&&!d||(e="+"+e),!e&&r&&"+"===r[0]&&(i=d?void 0:o),"+"===e&&r&&"+"===r[0]&&r.length>1&&(i=void 0),e&&(n="+"===e[0]&&("+"===e||i&&0===q_(i,h).indexOf(e))?void 0:G_(e,i,h)),n&&(i=Y_(n,{country:i,countries:s,defaultCountry:o,latestCountrySelectedByUser:a,required:!1,metadata:h}),!1===d&&i&&e&&"+"===e[0]&&(n=G_(e=X_(e,i,h),i,h))),!i&&l&&(i=o||c()),{phoneDigits:e,country:i,value:n}}(e,{prevPhoneDigits:f,country:h,countryRequired:!o,defaultCountry:r,latestCountrySelectedByUser:p,getAnyCountry:function(){return n.getFirstSupportedCountry({countries:u})},countries:u,international:a,limitMaxLength:l,countryCallingCodeEditable:c,metadata:s}),C=m.phoneDigits,g=m.country,v=m.value,y={phoneDigits:C,value:v,country:g};p&&v&&!eS(v,p,s)&&(y.latestCountrySelectedByUser=void 0),!1===c&&(v||C!==n.state.phoneDigits||(y.forceRerender={})),n.setState(y,function(){return i(v)})}),vS(n,"_onFocus",function(){return n.setState({isFocused:!0})}),vS(n,"_onBlur",function(){return n.setState({isFocused:!1})}),vS(n,"onFocus",function(e){n._onFocus();var t=n.props.onFocus;t&&t(e)}),vS(n,"onBlur",function(e){var t=n.props.onBlur;n._onBlur(),t&&t(e)}),vS(n,"onCountryFocus",function(e){n._onFocus();var t=n.props.countrySelectProps;if(t){var r=t.onFocus;r&&r(e)}}),vS(n,"onCountryBlur",function(e){n._onBlur();var t=n.props.countrySelectProps;if(t){var r=t.onBlur;r&&r(e)}}),n.inputRef=i.createRef();var r=n.props,o=r.value;r.labels;var a=r.international,l=r.addInternationalOption,c=r.displayInitialValueAsLocalNumber,s=r.initialValueFormat,d=r.metadata,u=n.props,f=u.defaultCountry,h=u.countries;f&&(n.isCountrySupportedWithError(f)||(f=void 0)),o&&V_(o),h=I_(h,d);var p=W_(o,d);n.CountryIcon=Z_(n.props);var m=function(e){var t,n=e.value,r=e.phoneNumber,i=e.defaultCountry,o=e.getAnyCountry,a=e.countries,l=e.required,c=e.metadata;return r&&r.country?t=r.country:i&&(n&&!eS(n,i,c)||(t=i)),a&&a.indexOf(t)<0&&(t=void 0),!t&&l&&a&&a.length>0&&(t=o()),t}({value:o,phoneNumber:p,defaultCountry:f,required:!l,countries:h||UH(d),getAnyCountry:function(){return n.getFirstSupportedCountry({countries:h})},metadata:d});return n.state={props:n.props,country:m,countries:h,phoneDigits:tS({value:o,phoneNumber:p,defaultCountry:f,international:a,useNationalFormat:c||"national"===s,metadata:d}),value:o},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gS(e,t)}(e,i.PureComponent),t=e,n=[{key:"componentDidMount",value:function(){var e=this.props.onCountryChange,t=this.props.defaultCountry,n=this.state.country;e&&(t&&(this.isCountrySupportedWithError(t)||(t=void 0)),n!==t&&e(n))}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.onCountryChange,r=this.state.country;n&&r!==t.country&&n(r)}},{key:"getCountrySelectOptions",value:function(e){var t=e.countries,n=this.props,r=n.international,i=n.countryCallingCodeEditable,o=n.countryOptionsOrder,a=n.addInternationalOption,l=n.labels,c=n.locales,s=n.metadata;return this.useMemoCountrySelectOptions(function(){return function(e,t){if(!t)return e;for(var n,r=[],i=[],o=r,a=function(){var t=n.value;if("|"===t)o.push({divider:!0});else if("..."===t||"…"===t)o=i;else{var r;r="🌐"===t?void 0:t;var a=e.indexOf(e.filter(function(e){return e.value===r})[0]),l=e[a];e.splice(a,1),o.push(l)}},l=O_(t);!(n=l()).done;)a();return r.concat(e).concat(i)}(function(e){var t=e.countries,n=e.countryNames,r=e.addInternationalOption,i=e.compareStringsLocales,o=e.compareStrings;o||(o=J_);var a=t.map(function(e){return{value:e,label:n[e]||e}});return a.sort(function(e,t){return o(e.label,t.label,i)}),r&&a.unshift({label:n.ZZ}),a}({countries:t||UH(s),countryNames:l,addInternationalOption:(!r||!1!==i)&&a,compareStringsLocales:c}),function(e,t){if(e&&(e=e.filter(function(e){switch(e){case"🌐":case"|":case"...":case"…":return!0;default:return N_(e,t)}})).length>0)return e}(o,s))},[t,o,a,l,s])}},{key:"useMemoCountrySelectOptions",value:function(e,t){return this.countrySelectOptionsMemoDependencies&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;){if(e[n]!==t[n])return!1;n++}return!0}(t,this.countrySelectOptionsMemoDependencies)||(this.countrySelectOptionsMemo=e(),this.countrySelectOptionsMemoDependencies=t),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(e){var t=e.countries;return this.getCountrySelectOptions({countries:t})[0].value}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.disabled,r=e.readOnly,o=e.autoComplete,a=e.style,l=e.className;e.inputRef;var c=e.inputComponent,s=e.numberInputProps,d=e.smartCaret,u=e.countrySelectComponent,f=e.countrySelectProps,h=e.containerComponent,p=e.containerComponentProps;e.defaultCountry,e.countries,e.countryOptionsOrder;var m=e.labels;e.flags,e.flagComponent,e.flagUrl,e.addInternationalOption,e.internationalIcon,e.displayInitialValueAsLocalNumber,e.initialValueFormat,e.onCountryChange,e.limitMaxLength,e.countryCallingCodeEditable,e.focusInputOnCountrySelection,e.reset;var C=e.metadata,g=e.international;e.locales;var v=fS(e,lS),y=this.state,w=y.country,b=y.countries,E=y.phoneDigits,M=y.isFocused,A=d?e_:i_,x=this.getCountrySelectOptions({countries:b});return i.createElement(h,uS({style:a,className:z(l,"PhoneInput",{"PhoneInput--focus":M,"PhoneInput--disabled":n,"PhoneInput--readOnly":r})},p),i.createElement(u,uS({name:t?"".concat(t,"Country"):void 0,"aria-label":m.country},f,{value:w,options:x,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:n||f&&f.disabled,readOnly:r||f&&f.readOnly,iconComponent:this.CountryIcon})),i.createElement(A,uS({ref:this.setInputRef,type:"tel",autoComplete:o},s,v,{inputFormat:!0===g?"INTERNATIONAL":!1===g?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:!!g||void 0,withCountryCallingCode:!!g||void 0,name:t,metadata:C,country:w,value:E||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:n,readOnly:r,inputComponent:c,className:z("PhoneInputInput",s&&s.className,v.className)})))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return dS({props:e},function(e,t,n){var r=e.metadata,i=e.countries,o=e.defaultCountry,a=e.value,l=e.reset,c=e.international,s=e.displayInitialValueAsLocalNumber,d=e.initialValueFormat,u=t.defaultCountry,f=t.value,h=t.reset;n.country;var p=n.value,m=n.hasUserSelectedACountry,C=n.latestCountrySelectedByUser,g=function(e){return tS(iS(iS({},e),{},{international:c,useNationalFormat:s||"national"===d,metadata:r}))};if(l!==h)return{phoneDigits:g({value:void 0,defaultCountry:o}),value:void 0,country:o,latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0};if(o!==u){var v=!o||N_(o,r),y=!p||c&&p===g({value:void 0,defaultCountry:u});if(!m&&v&&!a&&y)return{country:o,phoneDigits:g({value:void 0,defaultCountry:o}),value:void 0}}if(!aS(a,f)&&!aS(a,p)){var w,b,E;if(a){a&&V_(a),w=W_(a,r);var M=I_(i,r);w&&w.country?(!M||M.indexOf(w.country)>=0)&&(b=w.country):(b=Y_(a,{country:void 0,countries:M,metadata:r}))||o&&0===a.indexOf(q_(o,r))&&(b=o)}return a?C&&((b?C===b:eS(a,C,r))?b||(b=C):E={latestCountrySelectedByUser:void 0}):E={latestCountrySelectedByUser:void 0,hasUserSelectedACountry:void 0},iS(iS({},E),{},{phoneDigits:g({phoneNumber:w,value:a,defaultCountry:o}),value:a,country:a?b:o})}}(e,t.props,t))}}],n&&hS(t.prototype,n),r&&hS(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),bS=i.forwardRef(function(e,t){return i.createElement(wS,uS({},function(e){for(var t in e=dS({},e),ES)void 0===e[t]&&(e[t]=ES[t]);return e}(e),{inputRef:t}))});bS.propTypes={value:xh.string,onChange:xh.func.isRequired,onFocus:xh.func,onBlur:xh.func,disabled:xh.bool,readOnly:xh.bool,autoComplete:xh.string,initialValueFormat:xh.oneOf(["national"]),displayInitialValueAsLocalNumber:xh.bool,defaultCountry:xh.string,countries:xh.arrayOf(xh.string),labels:U_,locales:xh.oneOfType([xh.string,xh.arrayOf(xh.string)]),flagUrl:xh.string,flags:xh.objectOf(xh.elementType),flagComponent:xh.elementType,addInternationalOption:xh.bool,internationalIcon:xh.elementType,countryOptionsOrder:xh.arrayOf(xh.string),style:xh.object,className:xh.string,countrySelectComponent:xh.elementType,countrySelectProps:xh.object,inputComponent:xh.elementType,numberInputProps:xh.object,containerComponent:xh.elementType,containerComponentProps:xh.object,smartCaret:xh.bool,international:xh.bool,limitMaxLength:xh.bool,countryCallingCodeEditable:xh.bool,metadata:F_,onCountryChange:xh.func,focusInputOnCountrySelection:xh.bool};var ES={autoComplete:"tel",countrySelectComponent:m_,flagComponent:E_,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:H_,inputComponent:"input",containerComponent:"div",reset:xh.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};var MS={ext:"ext.",country:"Phone number country",phone:"Phone",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XA:"Abkhazia",XK:"Kosovo",XO:"South Ossetia",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"},AS=["metadata","labels"];function xS(){return xS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xS.apply(this,arguments)}function kS(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function LS(e){var t=i.forwardRef(function(t,n){var r=t.metadata,o=void 0===r?e:r,a=t.labels,l=void 0===a?MS:a,c=kS(t,AS);return i.createElement(bS,xS({},c,{ref:n,metadata:o,labels:l}))});return t.propTypes={metadata:F_,labels:U_},t}function HS(){return function(e,t){var n=Array.prototype.slice.call(t);return n.push(vx),e.apply(this,n)}(qL,arguments)}LS(),LS(vx);const _S=({country:t,value:r,onChange:i,width:o="100%",placeholder:a="Enter phone number",onFocus:c,onBlur:d,id:u,dropdownStyle:f={},enableAreaCodeStretch:h=!1,disabled:p=!1,isValid:m=!0,isVerified:C=!1,isVerifyDisplay:g=!1,onVerifyClick:v=()=>{},onValidationChange:y=()=>{}})=>{const[w,b]=s(r),[E,M]=s(!1),[A,x]=s(m),[k,L]=s(t);l(()=>{if(r){let e=r;e.startsWith("+")||(e=`+${e}`),b(e)}},[r]);const H=e=>{const t=HS(e),n=!!e&&e.replace(/[^\d]/g,"").length<=3,r=t||n;x(r),y(r)};return n("div",{id:u,children:[e(gx,{specialLabel:"",countryCodeEditable:!1,country:t,value:w,onChange:(e,t)=>{const n=t?.countryCode?.toLowerCase(),r=e.replace(/[^0-9+]/g,"");if(k?.toLowerCase()!==n)return b(t?.dialCode),i(t?.dialCode),L(n),void x(!0);let o=r;o.startsWith("+")||(o=`+${o}`),b(o),i(o),H(o)},inputStyle:{width:o,height:"32px",border:E?"1px solid var(--brand-color)":A?"1px solid var(--default-color)":"1px solid var(--error_light)",borderRadius:"4px",fontSize:"14px",transition:"border-color 0.3s ease"},enableSearch:!0,placeholder:a,onFocus:e=>{M(!0),c&&c(e)},onBlur:e=>{M(!1),d&&d(e),H(w)},dropdownStyle:f,enableAreaCodeStretch:h,disabled:p}),!A&&!E&&e(F,{color:"var(--error_light)",className:"error",fontSize:10,children:"Invalid phone number format"}),C?e(F,{color:"var(--phone-number-verified-color)",children:"Verified"}):HS(w)&&g&&!C&&e(F,{color:"var(--brand-color)",className:"cursor_pointer",onClick:v,children:"Verify"})]})},SS=(e,t,n)=>{const r=[...e],i=r[t];let o;o=r[n+1]?r[n-1]?n>t?(r[n].executionOrder+r[n+1].executionOrder)/2:(r[n].executionOrder+r[n-1].executionOrder)/2:r[n].executionOrder/2:r[n].executionOrder+1;const a={...i,executionOrder:o,...i._id?{id:i._id}:{}};return r.splice(t,1),r.splice(n,0,a),r},VS=(e,t)=>{if(!e)return"";const n=new Date(e),r=n.getDate().toString().padStart(2,"0"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n.getMonth()],o=n.getFullYear(),a=(n.getMonth()+1).toString().padStart(2,"0");switch(t){case"dd MMM yyyy":default:return`${r} ${i} ${o}`;case"MMM dd yyyy":return`${i} ${r} ${o}`;case"yyyy dd MM":return`${o} ${r} ${a}`}},OS=e=>{const t={};return e.forEach((e,n)=>{t[n]?t[n]=Array.isArray(t[n])?[...t[n],e]:[t[n],e]:t[n]=e}),t},zS=(e,t,n,r)=>{let i,o;const a=()=>{if(r){const e=((e,t)=>e.findIndex(e=>e.key===t))(t,r);if(-1===e)throw new Error(`Key "${r}" not found in oldData.`);return e}return 0},l=[...n];switch(e){case"above":i=[...l,...t].slice(0,100);break;case"below":i=[...t,...l].slice(-100);break;case"expand":case"expandAll":case"collapseAll":case"collapse":const n=a();if(void 0===n)throw new Error("Both sourceId and index are required for 'expand' or 'collapse' actions.");0!==n||["above","below"].includes(e)||G(l)||!l[0]||(l[0]={...l[0],lastResource:!0}),i=[...t.slice(0,n),...l].slice(-40);break;case"addAbove":const r=a();if(void 0===r)throw new Error("Both sourceId and index are required for 'addAbove' action.");i=[...t.slice(0,r),...l,...t.slice(r)];break;case"addBelow":const c=a();if(void 0===c)throw new Error("Both sourceId and index are required for 'addBelow' action.");i=[...t.slice(0,c+1),...l,...t.slice(c+1)];break;case"start":case"show":case"hide":case"clone":case"create":case"refresh":case"delete":if(G(l))throw new Error("Tree data list is empty, cannot determine root.");o=l[0],i=l.slice(1);break;default:throw new Error(`Invalid action: ${e}`)}if(G(i)&&!["start","delete","hide","refresh"].includes(e))throw new Error("Tree data list is empty.");const c=i[0]||o,s=i[i.length-1]||{lastResource:!0,key:""};return{treeDataList:i,next:!s?.lastResource,previous:!c?.lastResource,startId:c?.key,endId:s?.key,root:o}},NS=(e,t)=>{const n=t.searchKey?.split("/")||[];return G(n)||e.map(e=>(n.includes(e.key)&&(e.state=t.state),e)),e},IS=e=>{l(()=>{const t=t=>{e&&t.preventDefault()};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},[e])},TS=(e,t,n,r)=>{if(!t)throw new Error("Key is required");const i=new Map,o=new Map,a=new Set;let l=[...e];n&&!G(n)&&(l=[n,...e]),l.forEach(e=>{i.set(e.key,e),e.parentId&&(o.has(e.parentId)||o.set(e.parentId,[]),o.get(e.parentId).push(e))});const c=i.get(t);return c&&(c.selectedStatus=r?"completely":"none",function e(t,n){if(a.has(t))throw new Error(`Cycle detected at node: ${t}`);a.add(t),(o.get(t)||[]).forEach(t=>{t.selectedStatus=n,e(t.key,n)}),a.delete(t)}(t,c.selectedStatus),function e(t){if(a.has(t))throw new Error(`Cycle detected at node: ${t}`);a.add(t);const n=i.get(t);if(n&&n.parentId){const t=i.get(n.parentId);t&&(t.selectedStatus=function(e){const t=i.get(e);if(!t)return"none";const n=(t.resourceCount??0)+(t.subContainerCount??0)+(t.conditionCount??0);if(0===n)return t.selectedStatus??"none";const r=o.get(e)||[];let a=0,l=!1;for(const e of r)"completely"===e.selectedStatus?a++:"partially"===e.selectedStatus&&(l=!0);return a===n?"completely":l||a>0?"partially":"none"}(t.key),e(t.key))}a.delete(t)}(t)),G(n)?{data:l}:{rootNode:l[0],data:l.slice(1)}};function DS(e,t){const n=t?new Map(t.map(e=>[e.key,e])):null;return e.map(e=>{const t=n?.get(e.key);return{...e,...t||{},selectedStatus:"none"}})}const jS=(e,t,n,r,i=!1)=>{if(!t)throw new Error("Key is required");const o=new Map,a=new Map,l=new Set;let c=[...e];n&&!G(n)&&(c=[n,...e]),c.forEach(e=>{o.set(e.key,e),e.parentId&&(a.has(e.parentId)||a.set(e.parentId,[]),a.get(e.parentId).push(e))});const s=o.get(t);if(s)if(s.expanded=r,r){(a.get(t)||[]).forEach(e=>e.hide=!!i)}else s.expandedAll=!1,function e(t,n){if(l.has(t))throw new Error(`Cycle detected at node: ${t}`);l.add(t),(a.get(t)||[]).forEach(t=>{t.hide=n,t.expanded=!1,e(t.key,!0)}),l.delete(t)}(t,!0);return G(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}},ZS=e=>`${e.getDate().toString().padStart(2,"0")}/${(e.getMonth()+1).toString().padStart(2,"0")}/${e.getFullYear()}`,RS=(e,t,n)=>{
33
33
  //!Note : This function is used to override the stepId because in some step Groups we are using the same stepId for multiple steps. So we need to override the stepId for the new steps.
34
- let r=n?.map(e=>({...e,stepId:Yh()}));return e.map(e=>e.stepId===t&&["Group","PRE","POST","Script"].includes(e.type)?{...e,data:[...r||[]]}:e.data?{...e,data:RS(e.data,t,r)}:e)},BS=(e,t,n,r)=>e.map(e=>e.title===t?{...e,data:RS(e.data,n,r)}:e),PS=e=>{let t;if(e.includes("T"))t=new Date(e);else{const[n,r]=e.split(" ");if(!n||!r)throw new Error("Invalid input format. Expected 'DD-MM-YYYY HH:mm'");const[i,o,a]=n.split("-"),[l,c]=r.split(":");t=new Date(parseInt(a||"",10),parseInt(o||"",10)-1,parseInt(i||"",10),parseInt(l||"",10),parseInt(c||"",10))}const n=`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}`,r=`${("0"+t.getHours()).slice(-2)}:${("0"+t.getMinutes()).slice(-2)}:00`;return new Date(`${n}T${r}`)},FS=e=>{const t=new Date;return new Intl.DateTimeFormat("en-US",{timeZone:e,weekday:"long",year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).format(t)},US=({data:r,level:i=0,columnCount:o=1,viewModeId:a,ViewComponent:l,handleClick:c,handleStepGroupExpand:s,isStepGroupExpanded:d})=>{const u=0===i?26:i+8,h=p(e=>["PRE","POST","Group"].includes(e)?"6px 8px":"7px 8px",[]);return e(t,{children:r?.map(t=>{const r=a===t.stepId,i=d?.(t.stepId),p=h(t.type);return n(f,{children:[e("tr",r?{className:"pre-edit-row",id:"getInFocus",children:e("td",{colSpan:o,children:e("div",{style:{marginLeft:u},children:l&&e(l,{})})})}:{children:e("td",{colSpan:o,style:{padding:p},children:n("div",{style:{marginLeft:u,display:"flex",alignItems:"center"},children:[e(K,{title:t?.name,children:n(F,{as:"div",color:"var(--brand-color)",lineHeight:"18px",onClick:()=>c?.(t),children:[t.displayOrder,".",ie(t.name,40)]})}),["PRE","POST","Group"].includes(t.type)&&e("div",{className:"pre-accordion-arrow "+(i?"expanded":""),children:e(P,{name:"arrow_right",className:"pre-arrow-svg",color:i?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>s?.(t)})})]})})}),i&&e(US,{data:t.data,level:u,columnCount:o,viewModeId:a,handleClick:c,ViewComponent:l,handleStepGroupExpand:s,isStepGroupExpanded:d})]},t.stepId)})})};var qS=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:a,tableDataTextColor:l,withCheckbox:c,onSelectClick:s,draggable:d,indexNumber:u=0,dataLength:f=0,viewModeId:p,ViewComponent:m,handleClick:C,handleStepGroupExpand:g,isStepGroupExpanded:v,scriptType:y})=>{const w=r?.isDisabled,b=r?._id||r?.stepId,E=!!y&&"cascaded"===r.cascaded,M=w||f<=1||E;let A=(u+1).toString();const{attributes:x,listeners:k,setNodeRef:L,transform:H,transition:_}=ha({id:b,disabled:M}),S=h(()=>({transform:Rr.Transform.toString(H),transition:_}),[H,_]),V=v?.(r.stepId);return n(t,{children:[e("tr",{ref:L,style:S,className:z(o,{"disabled-row":w}),children:i.map((t,i)=>{const o=0===i;return e("td",{style:{paddingLeft:o&&d?"0px":"8px"},onClick:()=>a(t,r,i),className:z(t.className,{"clickable-cell":t.onClick}),children:n(F,{as:"div",color:l,className:"ff-data-checkbox-container",children:[o&&c&&e("span",{className:"ff-table-pre-post-checkbox",children:e(te,{onChange:e=>s(e,r),checked:r.checked,disabled:!!w})}),o&&d&&e("div",{className:w?"ff-table-drag":"ff-table-drag-icon",...k,...x,children:e(P,{name:"drag",className:M?"drag-icon-disabled":"drag-icon"})}),pr(r,t,u),o&&["PRE","POST","Group"].includes(r.type)&&e("div",{className:"pre-accordion-arrow "+(V?"expanded":""),children:e(P,{name:"arrow_right",color:V?"var(--brand-color)":"var(--default-color)",width:12,height:12,className:"pre-arrow-svg",onClick:()=>{g?.({...r,serialNumber:A})}})}),t.extraInfo&&t.extraInfo({row:r,indexNumber:u})]})},`${t.accessor}${i}`)})},b),V&&e(US,{data:r.data,columnCount:i.length,viewModeId:p,ViewComponent:m,handleClick:C,handleStepGroupExpand:g,isStepGroupExpanded:v})]})});const WS=(e,t)=>{const{action:n,sourceIndex:r,nlpName:i,id:o}=t;if(!n)return e;const a=[...e];let l={stepId:"stepId-9745-9745",isNew:!0,disabled:!1,...i&&{name:i},...o&&{id:o}};switch(n){case"addBelow":void 0!==r&&a.splice(r+1,0,l);break;case"replaceNlp":void 0!==r&&a.splice(r,0,l);break;case"EditNlp":void 0!==r&&(a.splice(r,1),a.splice(r,0,l));break;case"addLast":a.push(l)}return a},QS=(e,t="nearest",n=5)=>{if(!e)return;const r=document.getElementById(e);r?r.scrollIntoView({behavior:"smooth",block:t}):n>0?setTimeout(()=>{QS(e,t,n-1)},300):console.warn(`Element with id - "${e}" not found after multiple retries.`)},GS=o(({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:c,allSelected:d,partialSelected:u=!1,withFixedHeader:f=!0,borderWithRadius:h=!1,headerCheckboxDisabled:p=!1,noDataContent:m,height:C="100%",className:g="",tableHeadClass:v="",tableBodyRowClass:E="",headerTextColor:M,tableDataTextColor:A,draggable:x=!1,onDragEnd:k,loadMore:L=()=>{},editMode:H="",editComponent:_,NlpComponent:S,AddNlp:V,handleDragStart:O,handleViewComponent:N,handleAccordion:I,loading:T,scriptType:D=!1},j)=>{const Z=a(null),[R,B]=s(null),[P,U]=s(null),q=e=>{U(t=>t===e?.stepId?null:e?.stepId)},W=e=>{q(e);const t=N?.(e,q);t?B(()=>t):q(null)},[Q,K]=s(new Map),Y=e=>Q.has(e),X=e=>{Y(e?.stepId)||(P&&q(null),I?.(e)),T||K(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})};l(()=>{const e=document.getElementById("ff-table-scroll-container"),n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return Z.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";L(t)}})},{root:e,rootMargin:"8px",threshold:.1}),Z.current.observe(n),Z.current.observe(r),()=>{Z.current?.disconnect()}},[t,L]);const J=(e,t,n)=>{let{onClick:r,accessor:i}=e;r&&ur(r)&&r(i,t,n)},$=(e,t)=>{c&&c(e,t)};return l(()=>{QS("getInFocus")},[V,P]),j&&b(j,()=>({resetStepGroupAccordion:()=>{K(new Map)}})),e(Vo,{collisionDetection:ci,onDragStart:()=>{O?.(),Q.clear()},onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&k&&k(i,o)},modifiers:[zf],children:e(aa,{disabled:!x,items:t?.map(e=>e.stepId||e._id),strategy:ra,children:n("div",{style:{height:C},id:"ff-table-scroll-container",className:z(g,{"pre-fixed-header-table":f,"pre-border-borderRadius":h}),children:[n("table",{className:z("ff-table-pre-post"),cellSpacing:0,children:[e("thead",{className:z({"pre-table-thead":f},v),children:e("tr",{children:r.map((t,r)=>e("th",{className:z(`${i&&`${i}-bg`}`,`${M&&`${M}-color`}`),style:{width:t?.width},children:n(F,{as:"div",fontWeight:"semi-bold",className:"ff-label-checkbox-container",lineHeight:"18px",color:"var(--drawer-title-color)",children:[0===r&&o&&e("span",{className:"ff-table-pre-post-checkbox",children:e(te,{onChange:e=>{$(e,{allSelected:e.target.checked})},checked:void 0!==d&&d,partial:!!u,disabled:p})}),t.header]})},t.header))})}),n("tbody",{className:"pre-table-tbody",children:[e("tr",{id:"ff-table-first-node"}),WS(t,V??{})?.map((i,a)=>{const l=H===i.stepId;return l||i.isNew?n("tr",{id:"getInFocus",className:"pre-edit-row",children:[l&&w(_)&&e("td",{colSpan:r.length,children:y(_,{rowData:i,rowIndex:a+1})}),i.isNew&&!l&&w(S)&&e("td",{colSpan:r.length,children:y(S,{rowIndex:a,rowData:i})})]},i.stepId||a):e(qS,{row:i,indexNumber:a,columns:r,tableBodyRowClass:E,handleOnclick:J,tableDataTextColor:A,withCheckbox:o,onSelectClick:$,draggable:x,dataLength:t?.length,viewModeId:P,ViewComponent:R,handleClick:W,handleStepGroupExpand:X,isStepGroupExpanded:Y,scriptType:D})}),e("tr",{id:"ff-table-last-node"})]})]}),G(t)&&G(V)&&e("div",{className:"ff-no-data-content",style:{height:`calc(${C} - 50px)`},children:m})]})})})}),KS=g(({data:r=[],level:o=0,columnCount:c=1,viewModeId:s,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:m,columns:C=[],parentIndex:g,updateRowHeight:v})=>{const y=a([]),w=new Set(["Group","PRE","POST","Script"]),b=o+8,E=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const o=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...o&&{refId:o}})}return t.accessor||i&&"object"!=typeof i?i:"--"};return l(()=>{if(!v)return;const e=new ResizeObserver(()=>{let e=0;y.current.forEach(t=>{t&&(e+=t.getBoundingClientRect().height)}),e>0&&v(g??0,e)});return y.current.forEach(t=>{t&&e.observe(t)}),()=>e.disconnect()},[r,v,g,p]),e(t,{children:r?.map((t,r)=>{const o=g??0+r+1;return n(i.Fragment,{children:[e("tr",s===t?.stepId?{ref:e=>y.current[r]=e,className:"steps-edit-row",id:"getInFocus",children:e("td",{colSpan:c,children:e("div",{style:{marginLeft:`${b}px`},children:d&&e(d,{})})})}:{ref:e=>y.current[r]=e,children:C.map((r,i)=>{return e("td",{style:{maxWidth:r.width,padding:(o=t.type,w.has(o)?"6px 8px":"7px 8px")},children:n(F,{as:"div",className:"ff-data-checkbox-container",children:[n("div",{className:"ff-data-checkbox-container-content",style:{marginLeft:0===i?`${b}px`:0},onClick:()=>{0===i&&!t?.displayName?.includes("End")&&!t?.isDisabled&&u?.({...t,tableType:f})},children:[!m&&0===i&&e("div",{style:{padding:"4px 18px"}}),E({...t,marginLeft:b},r)]}),0===i&&["Group","PRE","POST","Script"].includes(t.type)&&e("div",{className:"ff-accordion-arrow "+(p?.(t.stepId)?"expanded":""),children:e(P,{name:"arrow_right",color:p?.(t.stepId)?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12,onClick:()=>h?.({...t,tableType:f})})})]})},`${t.stepId}-${i}`);var o})}),p?.(t.stepId)&&e(KS,{data:t.data,level:b,columnCount:c,viewModeId:s,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:m,columns:C,parentIndex:o,updateRowHeight:v})]},t.stepId)})})});KS.displayName="StepGroupAccordions";const YS=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:c,tableDataTextColor:s,withCheckbox:d,onSelectClick:u,draggable:f,indexNumber:p=0,tableType:m="",viewModeId:C,ViewComponent:g,handleClick:v,selectedRows:y,handleStepGroupExpand:w,isStepGroupExpanded:b,dataLength:E,stepPartialSelect:M,isViewPrivilegeMode:A,isClientSide:x,updateRowHeight:k,rowId:L})=>{const H=a(null),_=h(()=>r?.isDisabled||(E??0)<=1||r.isSpecialNlp,[r,E]),S=(p+1).toString(),{attributes:V,listeners:O,setNodeRef:N,transform:I,transition:T}=ha({id:r?._id||r?.stepId,disabled:_}),D=h(()=>({transform:Rr.Transform.toString(I),transition:T}),[I,T]),j=r?._id||r?.stepId;l(()=>{if(H.current&&k){const e=H.current.getBoundingClientRect().height;k(p,e)}},[r,k,p,b?.(r?.stepId)]);const Z=e=>A||x?["Group","PRE","POST","Script"].includes(r.type)&&0===e?"4px 8px":"7px 8px":0!==e?"Steps"===m?"4px 8px":"7px 8px":"Steps"===m&&f?"4px 8px 4px 0px":"4px 8px 4px 24px";return n(t,{children:[e("tr",{"data-rowid":L,ref:e=>{H.current=e,N(e)},style:D,className:z(o,{"disabled-inner-row":_}),id:j,children:i?.map((i,o)=>e(t,{children:e("td",{style:{padding:Z(o),maxWidth:i.width},onClick:()=>c(i,r,p),children:n(F,{as:"div",color:s,className:"ff-data-checkbox-container",children:[0===o&&!x&&f&&e("div",{className:_?"ff-table-drag":"ff-table-drag-icon",...O,...V,children:e(P,{name:"drag",className:_?"drag-icon-disabled":"drag-icon"})}),0===o&&!x&&d&&e("span",{className:m&&y[m]?.has(r.stepId)||M?.has(r.stepId)?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(te,{onChange:e=>u(m,r,e.target.checked),checked:!!y[m]?.has(r.stepId),partial:M?.has(r.stepId),disabled:r?.isSpecialNlp&&r?.name?.includes("End")})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===o?r.marginLeft:0},children:[pr(r,i,p,m),["Group","PRE","POST","Script"].includes(r.type)&&0===o&&!x&&e("div",{className:"ff-accordion-arrow "+(b?.(r?.stepId)?"expanded":""),children:e(P,{name:"arrow_right",className:"steps-arrow-svg",color:b?.(r?.stepId)?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>w?.({...r,tableType:m,serialNumber:S})})}),i.extraInfo?.({row:r,indexNumber:p,tableType:m})]})]})},`${i.accessor}-${Yh()}`)}))},j),b?.(r?.stepId)&&e(KS,{data:r.data||r?.stepResults,columnCount:i.length,viewModeId:C,ViewComponent:g,handleClick:v,tableType:m,handleStepGroupExpand:w,isStepGroupExpanded:b,level:r?.marginLeft,isViewPrivilegeMode:A,columns:i,parentIndex:p,updateRowHeight:k})]})});YS.displayName="StepTableMainRow";const XS=({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:c,withFixedHeader:d=!0,borderWithRadius:u=!1,noDataContent:f,height:m="100%",className:C="",tableBodyRowClass:g="",headerTextColor:v,tableDataTextColor:b,draggable:E=!1,onDragEnd:M,loadMore:A=()=>{},editMode:x="",editComponent:k,NlpComponent:L,AddNlp:H,handleDragStart:_,tableType:S,viewModeId:V,ViewComponent:O,handleClick:N,selectedRows:I,handleStepGroupExpand:T,isStepGroupExpanded:D,stepPartialSelect:j,isViewPrivilegeMode:Z,isClientSide:R,highlightKey:B,onHighlightComplete:P})=>{const F=a(null),U=a(null),[q,W]=s(0),[Q,K]=s(0),[Y,X]=s([]),[J,$]=s(null),ee=50,te=a(0);l(()=>{U.current&&K(U.current.clientHeight);const e=WS(t,H??{});X(t=>{const n=[...t];for(;n.length<e.length;)n.push(ee);return n.length>e.length&&(n.length=e.length),n})},[t,H]),l(()=>{te.current>0&&U.current&&(U.current.scrollTop=te.current,te.current=0)},[Y]),l(()=>{if(G(B))if(x)$(x);else if(H&&Object.keys(H).length>0){const e=WS(t,H).find(e=>e.isNew);e&&$(e.stepId||"new-row")}else $(null);else $(B)},[x,H,t,B]),l(()=>{if(J&&U.current){const e=setTimeout(()=>{const e=U.current?.querySelector(`[data-rowid="${J}"]`);e&&(e.scrollIntoView({behavior:"smooth",block:"nearest"}),setTimeout(()=>{G(B)||P?.()},300))},100);return()=>clearTimeout(e)}},[J,Y,B,P]);const ne=p(e=>{const t=e.currentTarget.scrollTop;W(t)},[]),re=p((e,t)=>{X(n=>{const r=[...n];return e<r.length&&r[e]!==t?(r[e]=t,r):n})},[]),ie=h(()=>WS(t,H??{}),[t,H]),oe=ie.length,{startIndex:ae,paddingTop:le,paddingBottom:ce,visibleRows:se}=h(()=>{let e=0,t=oe-1,n=0,r=0;if(Y.length===oe&&Q>0){let i=0;for(let t=0;t<oe;t++)i<=q&&(e=t),i+=Y[t]??0;i=0;for(let e=0;e<oe;e++)if(i+=Y[e]??0,i>=q+Q&&t===oe-1){t=e;break}if(e=Math.max(0,e-5),t=Math.min(oe-1,t+5),J){const n=ie.findIndex(e=>e.stepId===J||e.isNew&&"new-row"===J);n>=0&&(n<e?e=n:n>t&&(t=n))}n=Y.slice(0,e).reduce((e,t)=>e+t,0),r=Y.slice(t+1).reduce((e,t)=>e+t,0)}else{if(e=Math.max(0,Math.floor(q/ee)-5),t=Math.min(oe-1,e+Math.ceil(Q/ee)+5),J){const n=ie.findIndex(e=>e.stepId===J||e.isNew&&"new-row"===J);n>=0&&(n<e?e=n:n>t&&(t=n))}n=e*ee,r=(oe-t-1)*ee}return{startIndex:e,endIndex:t,paddingTop:n,paddingBottom:r,visibleRows:ie.slice(e,t+1)}},[ie,oe,Y,Q,q,5,J,ee]);l(()=>{const e=U.current,n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return F.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";A(t)}})},{root:e,rootMargin:"8px",threshold:.1}),F.current.observe(n),F.current.observe(r),()=>{F.current?.disconnect()}},[t?.length,A]);const de=(e,t,n)=>{const{onClick:r,accessor:i}=e;r&&ur(r)&&r(i,t,n)},ue=(e,t,n)=>{c&&c(e,t,n)};return e(Vo,{collisionDetection:ci,onDragStart:_,onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&M&&M(i,o)},modifiers:[zf],children:e(aa,{disabled:!E,items:t?.map(e=>e._id||e.stepId),strategy:ra,children:n("div",{ref:U,style:{height:m,position:"relative",overflowY:G(H)&&G(x)?"auto":"unset"},id:"ff-table-scroll-container",className:z(C,{"ff-fixed-header-steps-table":d,"steps-border-borderRadius":u}),onScroll:ne,children:[n("table",{className:z("ff-table-steps"),cellSpacing:0,children:[e("thead",{className:"steps-inner-thead",children:e("tr",{children:r?.map(t=>e("th",{className:z(`${i&&`${i}-bg`}`,`${v&&`${v}-color`}`),style:{width:t?.width}},`${t.header}-${Yh()}`))})}),n("tbody",{className:"ff-steps-tbody",children:[e("tr",{id:"ff-table-first-node",style:{display:"none"}}),le>0&&e("tr",{children:e("td",{style:{height:le,padding:0},colSpan:r.length})}),se.map((i,a)=>{const l=ae+a,c=x===i.stepId,s=c||i.isNew,d=c&&i.stepId===J||i.isNew&&"new-row"===J;return s?n("tr",{className:"steps-edit-row",id:d?"getInFocus":void 0,"data-rowid":i.stepId||"new-row",children:[c&&w(k)&&e("td",{colSpan:r.length,children:y(k,{rowData:i,rowIndex:l+1})}),i.isNew&&!c&&w(L)&&e("td",{colSpan:r.length,children:y(L,{rowIndex:l,rowData:i})})]},i.stepId||l):e(YS,{rowId:i.stepId,row:i,indexNumber:l,columns:r,tableBodyRowClass:g,handleOnclick:de,tableDataTextColor:b,withCheckbox:o,onSelectClick:ue,draggable:E,tableType:S,viewModeId:V,ViewComponent:O,handleClick:N,selectedRows:I,handleStepGroupExpand:T,isStepGroupExpanded:D,dataLength:t?.length,stepPartialSelect:j,isViewPrivilegeMode:Z,isClientSide:R,updateRowHeight:re})}),ce>0&&e("tr",{children:e("td",{style:{height:ce,padding:0},colSpan:r.length})}),e("tr",{id:"ff-table-last-node",style:{display:"none"}})]})]}),t?.length<=0&&e("div",{className:"steps-no-data-content",style:{height:`calc(${m} - 50px)`},children:f})]})})})},JS=e=>["ElseIfCondition","ElseCondition"].includes(e?.nlpName);let $S=null,eV=null;const tV=e=>{if(eV===e&&$S)return $S;const t=((e,t="Steps")=>{const n=e.find(e=>e?.title===t);return n?.data??[]})(e),n=new Map,r=(e,n,r)=>{const i=t,o=i.findIndex(t=>t.stepId===e?.stepId),a=i.findIndex(e=>e.stepId===n?.stepId);return r?i.slice(o+1,a).map(e=>e.stepId):i.slice(o,a+1).map(e=>e.stepId)};return t?.forEach(e=>{const i=(e=>e.specialNlpId??e.conditionSearchKey??null)(e);if(!i)return;const o=n.get(i)||{start:null,end:null,childIds:[],allIds:[]};if(e?.isSpecialNlp&&e.name?.startsWith("Start")){o.start=e;const n=(e=>{const n=(e=>({IfCondition:"EndIfCondition",StartForLoop:"EndForLoop",StartIteration:"EndIteration",ElseIfCondition:"EndElseIfCondition",ElseCondition:"EndElseCondition"}[e.nlpName]||e.nlpName))(e),r=t;if(void 0!==e?.conditionId&&void 0!==e?.conditionSearchKey&&!e.specialNlpId){const t=e.conditionId===e.conditionSearchKey?e.conditionId:e.conditionSearchKey;return r.find(e=>e.conditionSearchKey===t&&e.nlpName===n)||null}return e.specialNlpId&&r.find(t=>t.specialNlpId===e.specialNlpId&&t.nlpName===n)||null})(e);n&&(o.end=n,o.childIds=r(e,n,!0),o.allIds=r(e,n,!1))}n.set(i,o)}),$S=n,eV=e,n},nV=e=>e.includes("/")?e.split("/").slice(0,-1).join("/"):e;const rV=e=>{if(!e)return!1;for(const t of Object.values(e))if(t&&t.size>0)return!0;return!1},iV=e=>{switch(e){case"PASS":return"var(--status-button-text-passed)";case"FAIL":return"var(--status-button-text-failed)";case"SKIP":return"var(--status-button-text-skipped)";case"WARNING":return"var(--status-warning-text-color)";default:return"var(--status-button-text-notExecuted)"}},oV=e=>{switch(e){case"PASS":return"Passed";case"FAIL":return"Failed";case"SKIP":return"Skipped";case"WARNING":return"Warning";default:return e}},aV=e=>{switch(e){case"PASS":return"passed";case"FAIL":return"failed";case"SKIP":return"skipped";case"WARNING":return"warning";case"Running":return"running";case"Partially Executed":return"partially-executed";case"Aborted":return"aborted";case"Terminated":return"terminated";default:return"default"}},lV=({metaData:t,width:n=0})=>{const r=t?.total||0,i=[{name:"Passed",count:t?.totalPassed,color:"var(--status-approved-text-color)"},{name:"Failed",count:t?.totalFailed,color:"var(--status-rejected-text-color)"},{name:"Warning",count:t?.totalWarning,color:"var(--status-warning-text-color)"},{name:"Skipped",count:t?.totalSkipped,color:"var(--status-skipped-text-color)"},{name:"Terminated",count:t?.totalTerminated,color:"var(--status-skipped-text-color)"},{name:"Aborted",count:t?.totalAborted,color:"var(--status-skipped-text-color)"}].filter(e=>e.count>0),o=i.map(({count:e,name:t})=>`${e}/${r} ${t}`).join(" "),a=n?ie(o,n,"pixel"):o,l=[];let c=0;for(const{count:e,name:t,color:n}of i){const i=`${e}/${r} ${t}`;if(!(c+i.length<=a.length)){const e=a.slice(c).trim();e&&l.push({text:e,color:n});break}l.push({text:i,color:n}),c+=i.length+1}return e("div",{className:"ff-stepResultStats",children:e(K,{title:o,children:e(F,{as:"div",className:"status-inline-text",fontWeight:"semi-bold",children:l.map(({text:t,color:n},r)=>e(F,{as:"span",fontWeight:"semi-bold",style:{color:n,whiteSpace:"nowrap"},children:t+" "},r))})})})},cV=({isHeaderRequired:r,isViewPrivilegeMode:i,onAccordionClick:o,isBulkEnable:a,showActionCell:l,handleMainCheckbox:c,isAllSelected:s,isPartialSelected:d,tableMeta:u=[],title:f,totalRows:h,expanded:p,actionCell:m,row:C,metaData:g,isClientSide:v})=>{const y=u?.map(e=>e.width),w=e=>{const t=y[e]??0;switch(e){case 0:return t+110;case 1:return t+(t>300?60:70);case 2:return t+20;default:return 0}};return n("article",{className:"step-title-article",style:{...!r&&!v&&{backgroundColor:"var(--hover-color)"}},children:[e("div",{style:{width:`${w(0)}px`},children:n("div",{className:"accordion-header",style:{paddingLeft:i||v?"8px":"24px"},children:[!i&&!v&&e(te,{onChange:e=>c(f,e.target.checked),checked:s(f,h),partial:d(f,h),disabled:0===h}),e("div",{className:"header-title",children:e(F,{as:"div",fontWeight:"semi-bold",color:v?"var(--brand-color)":"var(--nlp-option-color)",cursor:"default",lineHeight:"18px",children:f})}),e("div",v?{style:{padding:"12px"}}:{className:"accordion-arrow "+(p?"expanded":""),onClick:()=>o(f),children:e(P,{name:"arrow_right",color:p?"var(--brand-color)":"var(--default-color)",width:16,height:16,className:"steps-arrow-svg"})}),n("div",{className:"ff_action_container",children:[g&&e(lV,{metaData:g}),l&&!a&&e(t,{children:m(C)})]})]})}),g?.message&&e("div",{className:"step-result",style:{width:`${w(1)}px`},children:e(K,{title:g?.message,placement:"bottom-start",children:e(F,{lineHeight:"18px",as:"div",className:"step-result-text",color:iV(g?.status),children:g?.message})})}),g?.status&&e("div",{className:"step-result",style:{width:`${w(2)}px`},children:e(lr,{label:oV(g?.status),status:aV(g?.status),children:g?.status})})]})},sV=i.memo(i.forwardRef(({tableMeta:t=[],tableData:r=[],noDataContent:i,height:o="100%",withFixedHeader:a=!1,headerType:c,handleDragStart:d,onDragEnd:u,editMode:f,editComponent:m,NlpComponent:C,AddNlp:g,handleAccordion:v,handleViewComponent:y,onSelectClick:w,loading:E=!1,isViewPrivilegeMode:M=!1,defaultExpanded:A="Steps",isHeaderRequired:x=!0,isClientSide:k=!1,highlightKey:L,onHighlightComplete:H,isDraggable:_=!0},S)=>{const[V,O]=s(null),[N,I]=s(null),[T,D]=s({}),[j,Z]=s(new Map),[R,B]=s(!1),P=p((e,t)=>{const n=r.find(t=>t.title===e);n&&n.data&&0!==n.data.length&&D(n=>({...n,[e]:"open"===t||!n[e]}))},[r]),U=h(()=>e=>T[e]??!1,[T]),q=p(e=>{I(t=>t===e?.stepId?null:e?.stepId)},[]),W=p(e=>{q(e);const t=y?.(e,q);t?O(()=>t):q(null)},[y,q]),[Q,K]=s(Object.fromEntries(r.map(e=>[e.title,new Set]))),[Y,X]=s(new Set);l(()=>{if(K(e=>function(e,t){const n={};return e.forEach(e=>{const r=e.data.map(e=>e.stepId),i=t[e.title]||new Set,o=new Set([...i].filter(e=>r.includes(e)));n[e.title]=o}),n}(r,e)),X(e=>function(e,t){const n=e.reduce((e,t)=>(t.data.forEach(t=>e.add(t.stepId)),e),new Set);return new Set([...t].filter(e=>n.has(e)))}(r,e)),D(e=>function(e,t,n){const r={Steps:"Steps",Depends:"Depends on Scripts",PRE:"Pre Conditions",POST:"Post Conditions"},i={};return e.forEach(e=>{const o=e.title,a=o in t,l="All"===n?Object.values(r).includes(o):o===r[n];i[o]=a?t[o]??!1:l}),i}(r,e,A)),Q&&!rV(Q))return;const{updateSelectRow:e,updateStepPartialSelect:t}=((e,t,n)=>{const r=tV(e),i=new Set(t.Steps),o=new Set(n);return r?.forEach(e=>{const t=e?.childIds;if(0===t?.length)return;const n=t.every(e=>i.has(e)),a=t.some(e=>i.has(e));if(n?(i.add(e.start.stepId),i.add(e.end.stepId)):(i.delete(e.start.stepId),i.delete(e.end.stepId)),JS(e?.start)&&(a||n)){const t=e?.start?.conditionSearchKey,n=nV(t),a=r?.get(n)?.allIds;if(0===a?.length)return;a?.forEach(e=>{i.add(e),o.delete(e)})}a&&!n?(o.add(e.start.stepId),o.add(e.end.stepId)):(o.delete(e.start.stepId),o.delete(e.end.stepId))}),{updateSelectRow:{...t,Steps:i},updateStepPartialSelect:o}})(r,Q,Y);t&&X(t),e&&K(e)},[r]),l(()=>{if(rV(Q)){const e={...Q,partialSelected:Y};w?.(e)}else w?.(Q)},[Q]);const J=p((e,t)=>{const n=r.find(t=>t.title===e)?.data.map(e=>e.stepId);n&&(K(r=>({...r,[e]:t?new Set(n):new Set})),t||X(new Set))},[r]),$=p((e,t,n,r)=>{const{updateSelectRow:i,updateStepPartialSelect:o}=((e,t,n,r,i,o="Steps")=>{const a=new Set(r[o]);if("Steps"===o&&(t?.isSpecialNlp||t?.conditionId||t?.parentSpecialNlpId)){const{updateStepPartialSelect:l}=function(r){const o=new Set(i),l=tV(e),c=e=>{const t=e?.conditionSearchKey,n=nV(t),r=l.get(n);r&&(s(r.start),r.start?.conditionSearchKey?.includes("/")&&"IfCondition"!==r.start.nlpName&&c(r.start))},s=e=>{if(e?.isSpecialNlp){const t=e?.specialNlpId||e?.conditionSearchKey,r=t&&l.get(t);r&&Array.isArray(r.allIds)&&r.allIds.forEach(e=>{o.delete(e),n?a.add(e):a.delete(e)})}else n?a.add(e?.stepId):a.delete(e?.stepId)},d=e=>{let i=!0;const s=e=>{const t=e?.childIds;if(JS(e?.start)&&n&&c(r),0===t?.length)return;const d=t.every(e=>a.has(e)),u=t.some(e=>a.has(e));if(d?(a.add(e.start?.stepId),a.add(e.end?.stepId)):(a.delete(e.start?.stepId),a.delete(e.end?.stepId)),u&&!d?(o.add(e.start?.stepId),o.add(e.end?.stepId)):(o.delete(e.start?.stepId),o.delete(e.end?.stepId)),e?.start?.parentSpecialNlpId){const t=l.get(e.start.parentSpecialNlpId);t&&s(t)}if(e?.start?.conditionSearchKey){const t=nV(e?.start?.conditionSearchKey),n=e?.start?.conditionSearchKey,r=e?.start?.conditionId;if(n===r&&i){i=!1;const e=l.get(t);return void(e&&s(e))}if(n===r)return;const o=l.get(t);return void(o&&s(o))}};if(e?.conditionSearchKey===e?.conditionId&&!e?.parentSpecialNlpId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);return void(t&&s(t))}if(e?.conditionSearchKey||e?.conditionId||!e?.specialNlpId||e?.parentSpecialNlpId){if(e?.conditionSearchKey&&e?.conditionSearchKey===e?.conditionId&&e?.conditionId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);t&&s(t)}if(e?.parentSpecialNlpId){const t=l.get(e?.parentSpecialNlpId);t&&s(t)}if(e?.conditionSearchKey){const n=!t?.isSpecialNlp||JS(e)||t?.specialNlpId?e.conditionSearchKey:nV(e.conditionSearchKey);i=!0;const r=l.get(n);if(r)return void s(r)}}};return s(r),d(r),{updateStepPartialSelect:o}}(t);return{updateSelectRow:{...r,[o]:a},updateStepPartialSelect:l}}return n?a.add(t.stepId):a.delete(t.stepId),{updateSelectRow:{...r,[o]:a}}})(e,t,n,Q,Y,r);o&&X(o),i&&K(i)},[Q,Y]),ee=p((e,t,n)=>{$(r,t,n,e)},[r,$]),te=p((e,t)=>{const n=t>0&&Q[e]?.size===t;return e.includes("Script")&&B(n),n},[Q]),ne=p((e,t)=>{const n=Q[e]?.size||0;return n>0&&n<t},[Q]),re=p(e=>j.has(e),[j]),ie=p(e=>{re(e?.stepId)||(N&&q(null),v?.(e)),E||Z(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})},[re,N,q,v,E]),oe=p(n=>"Steps"!==n.title||M?e(XS,{onHighlightComplete:H,highlightKey:L,draggable:!1,editMode:f,withCheckbox:!M,editComponent:m,columns:t,data:n.data,headerType:c,noDataContent:i,tableType:n.title,onSelect:ee,selectedRows:Q,viewModeId:N,ViewComponent:V,handleClick:W,handleStepGroupExpand:ie,isStepGroupExpanded:re,isViewPrivilegeMode:M,height:n?.data?.length<=15?"auto":o,isClientSide:k}):e(XS,{onHighlightComplete:H,highlightKey:L,draggable:_,columns:t,onDragEnd:u,data:n.data,headerType:c,withCheckbox:!0,editMode:f,editComponent:m,noDataContent:i,NlpComponent:C,AddNlp:g,tableType:n.title,handleDragStart:()=>{j.clear(),d?.()},onSelect:ee,selectedRows:Q,viewModeId:N,ViewComponent:V,handleClick:W,handleStepGroupExpand:ie,isStepGroupExpanded:re,stepPartialSelect:Y,height:0===n?.data?.length?"300px":n?.data?.length<=15?"auto":o,isClientSide:k}),[M,H,L,_,t,u,c,f,m,i,C,g,j,d,ee,Q,N,V,W,ie,re,Y,r.length,o,k]);return b(S,()=>({resetSelection:()=>{K(Object.fromEntries(r.map(e=>[e.title,new Set]))),X(new Set)},handleUpdateCheckbox:(e,t)=>{const n=e?.parentSpecialNlpId,i=e?.conditionSearchKey;(n||i)&&$(t||r,e,!1)},deleteRow:e=>{K(t=>Object.fromEntries(Object.entries(t)?.map(([t,n])=>[t,new Set([...n].filter(t=>t!==e?.stepId))])))},resetStepGroupAccordion:()=>{Z(new Map)}}),[r,$]),l(()=>{G(g)||(O(()=>null),I(null),"addLast"===g?.action&&P("Steps","open"))},[g]),n("div",{className:z("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":a}),children:[x&&!k&&e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":a}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:t.map((t,n)=>e("th",{style:{width:t?.width},className:z("ff-table-header",c&&`ff-accordion-table--${c}-bg`),children:e(F,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:t.header})},`${t.header}-${n}`))})})}),e("div",{className:"ff-accordion-table-body",style:{height:o,overflowY:"auto"},children:r?.map(r=>{const{title:i,data:o,actionCell:a,metaData:l}=r,c=o.length,s=U(i),d=Q[i]?.size??0;return n("div",{className:"column-table-accordion",children:[e(cV,{isViewPrivilegeMode:M,onAccordionClick:P,showActionCell:d>0&&c>0&&a,handleMainCheckbox:J,isAllSelected:te,isPartialSelected:ne,title:i,totalRows:c,expanded:s,metaData:l,actionCell:a,row:r,tableMeta:t,isHeaderRequired:x,isBulkEnable:R,isClientSide:k}),s&&oe(r)]},i)})})]})}));sV.displayName="StepLandingTable";var dV,uV,fV,hV,pV,mV,CV,gV,vV,yV,wV,bV,EV,MV,AV,xV,kV,LV,HV,_V,SV,VV,OV,zV,NV,IV,TV,DV,jV,ZV,RV,BV,PV,FV,UV,qV,WV,QV,GV,KV,YV,XV,JV,$V,eO,tO,nO,rO,iO,oO,aO,lO,cO,sO,dO,uO,fO,hO,pO,mO,CO,gO,vO,yO,wO,bO,EO,MO,AO,xO,kO,LO,HO,_O,SO,VO,OO,zO,NO,IO,TO,DO,jO,ZO,RO,BO,PO,FO,UO,qO,WO,QO={exports:{}};function GO(){return dV||(dV=1,QO.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:Q(e)}function r(e){return l(e)?e:G(e)}function i(e){return c(e)?e:K(e)}function o(e){return a(e)&&!s(e)?e:Y(e)}function a(e){return!(!e||!e[u])}function l(e){return!(!e||!e[f])}function c(e){return!(!e||!e[h])}function s(e){return l(e)||c(e)}function d(e){return!(!e||!e[p])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=l,n.isIndexed=c,n.isAssociative=s,n.isOrdered=d,n.Keyed=r,n.Indexed=i,n.Set=o;var u="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",p="@@__IMMUTABLE_ORDERED__@@",m="delete",C=5,g=1<<C,v=g-1,y={},w={value:!1},b={value:!1};function E(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function A(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function k(e){return void 0===e.size&&(e.size=e.__iterate(H)),e.size}function L(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?k(e)+t:t}function H(){return!0}function _(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function S(e,t){return O(e,t,0)}function V(e,t){return O(e,t,t)}function O(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var z=0,N=1,I=2,T="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",j=T||D;function Z(e){this.next=e}function R(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function P(e){return!!q(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=q(e);return t&&t.call(e)}function q(e){var t=e&&(T&&e[T]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function Q(e){return null==e?ae():a(e)?e.toSeq():se(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?l(e)?e.toSeq():e.fromEntrySeq():le(e)}function K(e){return null==e?ae():a(e)?l(e)?e.entrySeq():e.toIndexedSeq():ce(e)}function Y(e){return(null==e?ae():a(e)?l(e)?e.entrySeq():e:ce(e)).toSetSeq()}Z.prototype.toString=function(){return"[Iterator]"},Z.KEYS=z,Z.VALUES=N,Z.ENTRIES=I,Z.prototype.inspect=Z.prototype.toSource=function(){return this.toString()},Z.prototype[j]=function(){return this},t(Q,n),Q.of=function(){return Q(arguments)},Q.prototype.toSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq {","}")},Q.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Q.prototype.__iterate=function(e,t){return ue(this,e,t,!0)},Q.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(G,Q),G.prototype.toKeyedSeq=function(){return this},t(K,Q),K.of=function(){return K(arguments)},K.prototype.toIndexedSeq=function(){return this},K.prototype.toString=function(){return this.__toString("Seq [","]")},K.prototype.__iterate=function(e,t){return ue(this,e,t,!1)},K.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(Y,Q),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},Q.isSeq=oe,Q.Keyed=G,Q.Set=Y,Q.Indexed=K;var X,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function le(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new ie(e).fromEntrySeq():P(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ce(e){var t=de(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function se(e){var t=de(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function de(e){return W(e)?new te(e):F(e)?new ie(e):P(e)?new re(e):void 0}function ue(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var l=i[n?o-a:a];if(!1===t(l[1],r?l[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new Z(function(){var e=i[n?o-a:a];return a++>o?B():R(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function he(e,t){return t?pe(t,e,"",{"":e}):me(e)}function pe(e,t,n,r){return Array.isArray(t)?e.call(r,n,K(t).map(function(n,r){return pe(e,n,r,t)})):Ce(t)?e.call(r,n,G(t).map(function(n,r){return pe(e,n,r,t)})):t}function me(e){return Array.isArray(e)?K(e).map(me).toList():Ce(e)?G(e).map(me).toMap():e}function Ce(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||l(e)!==l(t)||c(e)!==c(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!s(e);if(d(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ge(i[1],e)&&(n||ge(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var u=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!ge(t,e.get(r,y)):!ge(e.get(r,y),t))return u=!1,!1});return u&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function we(e,t){if(!e)throw new Error(t)}function be(e,t,n){if(!(this instanceof be))return new be(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function Ee(){throw TypeError("Abstract")}function Me(){}function Ae(){}function xe(){}Q.prototype[ee]=!0,t(te,K),te.prototype.get=function(e,t){return this.has(e)?this._array[L(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new Z(function(){return i>r?B():R(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new Z(function(){var a=r[t?i-o:o];return o++>i?B():R(e,a,n[a])})},ne.prototype[p]=!0,t(re,K),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!F(n))return new Z(B);var r=0;return new Z(function(){var t=n.next();return t.done?t:R(e,r++,t.value)})},t(ie,K),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new Z(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return R(e,i,r[i++])})},t(ye,K),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ge(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return _(e,t,n)?this:new ye(this._value,V(t,n)-S(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new Z(function(){return r<n.size?R(e,r++,n._value):B()})},ye.prototype.equals=function(e){return e instanceof ye?ge(this._value,e._value):ve(e)},t(be,K),be.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},be.prototype.get=function(e,t){return this.has(e)?this._start+L(this,e)*this._step:t},be.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},be.prototype.slice=function(e,t){return _(e,t,this.size)?this:(e=S(e,this.size),(t=V(t,this.size))<=e?new be(0,0):new be(this.get(e,this._end),this.get(t,this._end),this._step))},be.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},be.prototype.lastIndexOf=function(e){return this.indexOf(e)},be.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},be.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new Z(function(){var a=i;return i+=t?-r:r,o>n?B():R(e,o++,a)})},be.prototype.equals=function(e){return e instanceof be?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(Ee,n),t(Me,Ee),t(Ae,Ee),t(xe,Ee),Ee.Keyed=Me,Ee.Indexed=Ae,Ee.Set=xe;var ke="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Le(e){return e>>>1&1073741824|3221225471&e}function He(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Le(n)}if("string"===t)return e.length>Ze?_e(e):Se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ve(e);if("function"==typeof e.toString)return Se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function _e(e){var t=Pe[e];return void 0===t&&(t=Se(e),Be===Re&&(Be=0,Pe={}),Be++,Pe[e]=t),t}function Se(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Le(t)}function Ve(e){var t;if(Te&&void 0!==(t=Ie.get(e)))return t;if(void 0!==(t=e[je]))return t;if(!ze){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[je]))return t;if(void 0!==(t=Ne(e)))return t}if(t=++De,1073741824&De&&(De=0),Te)Ie.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ze)Object.defineProperty(e,je,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[je]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[je]=t}}return t}var Oe=Object.isExtensible,ze=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ne(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Ie,Te="function"==typeof WeakMap;Te&&(Ie=new WeakMap);var De=0,je="__immutablehash__";"function"==typeof Symbol&&(je=Symbol(je));var Ze=16,Re=255,Be=0,Pe={};function Fe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():qe(e)&&!d(e)?e:it().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function qe(e){return!(!e||!e[Qe])}t(Ue,Me),Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Ct(this,En(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ft(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ft(this,ht,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,pt(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Pt(un(this,e))},Ue.prototype.sortBy=function(e,t){return Pt(un(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new A)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var We,Qe="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ke(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return We||(We=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=E(w),a=E(b);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===y?-1:1:0)}else{if(n===y)return e;i=1,r=new Ke(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===y?e:(M(l),M(a),new $e(t,r,[i,o]))}function lt(e){return e.constructor===$e||e.constructor===Je}function ct(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,l=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<l,a===l?[ct(e,t,n+C,r,i)]:(o=new $e(t,r,i),a<l?[e,o]:[o,e]))}function st(e,t,n,r){e||(e=new A);for(var i=new $e(e,He(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function dt(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,c=1,s=t.length;l<s;l++,c<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=c,a[o++]=d)}return new Ye(e,i,a)}function ut(e,t,n,r,i){for(var o=0,a=new Array(g),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new Xe(e,o+1,a)}function ft(e,t,n){for(var i=[],o=0;o<n.length;o++){var l=n[o],c=r(l);a(l)||(c=c.map(function(e){return he(e)})),i.push(c)}return mt(e,t,i)}function ht(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ge(e,t)?e:t}function pt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ge(t,i)?t:i}}function mt(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function Ct(e,t,n,r){var i=e===y,o=t.next();if(o.done){var a=i?n:e,l=r(a);return l===a?e:l}we(i||e&&e.set,"invalid keyPath");var c=o.value,s=i?y:e.get(c,y),d=Ct(s,t,n,r);return d===s?e:d===y?e.remove(c):(i?it():e).set(c,d)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:x(e);return i[t]=n,i}function yt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[Qe]=!0,Ge[m]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Ke.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===y,c=this.entries,s=0,d=c.length;s<d&&!ge(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(M(a),(l||!u)&&M(o),!l||1!==c.length){if(!u&&!l&&c.length>=bt)return st(e,c,r,i);var f=e&&e===this.ownerID,h=f?c:x(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Ke(e,h)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[gt(o&i-1)].get(e+C,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,c=1<<l,s=this.bitmap,d=0!==(s&c);if(!d&&i===y)return this;var u=gt(s&c-1),f=this.nodes,h=d?f[u]:void 0,p=at(h,e,t+C,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=Et)return ut(e,f,s,l,p);if(d&&!p&&2===f.length&&lt(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&lt(p))return p;var m=e&&e===this.ownerID,g=d?p?s:s^c:s|c,w=d?p?vt(f,u,p,m):wt(f,u,m):yt(f,u,p,m);return m?(this.bitmap=g,this.nodes=w,this):new Ye(e,g,w)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+C,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,c=i===y,s=this.nodes,d=s[l];if(c&&!d)return this;var u=at(d,e,t+C,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<Mt)return dt(e,s,f,l)}else f++;var h=e&&e===this.ownerID,p=vt(s,l,u,h);return h?(this.count=f,this.nodes=p,this):new Xe(e,f,p)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=i===y;if(n!==this.keyHash)return l?this:(M(a),M(o),ct(this,e,t,n,[r,i]));for(var c=this.entries,s=0,d=c.length;s<d&&!ge(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(M(a),(l||!u)&&M(o),l&&2===d)return new $e(e,this.keyHash,c[1^s]);var f=e&&e===this.ownerID,h=f?c:x(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Je(e,this.keyHash,h)},$e.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,o,a){var l=i===y,c=ge(r,this.entry[0]);return(c?i===this.entry[1]:l)?this:(M(a),l?void M(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(M(o),ct(this,e,t,He(r),[r,i])))},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,Z),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return B()};var bt=g/4,Et=g/2,Mt=g/4;function At(e){var t=Nt();if(null==e)return t;if(xt(e))return e;var n=i(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<g?zt(0,r,C,null,new Ht(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function xt(e){return!(!e||!e[kt])}t(At,Ae),At.of=function(){return this(arguments)},At.prototype.toString=function(){return this.__toString("List [","]")},At.prototype.get=function(e,t){if((e=L(this,e))>=0&&e<this.size){var n=jt(this,e+=this._origin);return n&&n.array[e&v]}return t},At.prototype.set=function(e,t){return It(this,e,t)},At.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},At.prototype.insert=function(e,t){return this.splice(e,0,t)},At.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=C,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Nt()},At.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Zt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},At.prototype.pop=function(){return Zt(this,0,-1)},At.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Zt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},At.prototype.shift=function(){return Zt(this,1)},At.prototype.merge=function(){return Rt(this,void 0,arguments)},At.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},At.prototype.mergeDeep=function(){return Rt(this,ht,arguments)},At.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,pt(t),n)},At.prototype.setSize=function(e){return Zt(this,0,e)},At.prototype.slice=function(e,t){var n=this.size;return _(e,t,n)?this:Zt(this,S(e,n),V(t,n))},At.prototype.__iterator=function(e,t){var n=0,r=Ot(this,t);return new Z(function(){var t=r();return t===Vt?B():R(e,n++,t)})},At.prototype.__iterate=function(e,t){for(var n,r=0,i=Ot(this,t);(n=i())!==Vt&&!1!==e(n,r++,this););return r},At.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},At.isList=xt;var kt="@@__IMMUTABLE_LIST__@@",Lt=At.prototype;function Ht(e,t){this.array=e,this.ownerID=t}Lt[kt]=!0,Lt[m]=Lt.remove,Lt.setIn=Ge.setIn,Lt.deleteIn=Lt.removeIn=Ge.removeIn,Lt.update=Ge.update,Lt.updateIn=Ge.updateIn,Lt.mergeIn=Ge.mergeIn,Lt.mergeDeepIn=Ge.mergeDeepIn,Lt.withMutations=Ge.withMutations,Lt.asMutable=Ge.asMutable,Lt.asImmutable=Ge.asImmutable,Lt.wasAltered=Ge.wasAltered,Ht.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new Ht([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-C,n))===a&&o)return this}if(o&&!i)return this;var l=Dt(this,e);if(!o)for(var c=0;c<r;c++)l.array[c]=void 0;return i&&(l.array[r]=i),l},Ht.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-C,n))===o&&i===this.array.length-1)return this}var a=Dt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var _t,St,Vt={};function Ot(e,t){var n=e._origin,r=e._capacity,i=Bt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?l(e,n):c(e,t,n)}function l(e,a){var l=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,s=r-a;return s>g&&(s=g),function(){if(c===s)return Vt;var e=t?--s:c++;return l&&l[e]}}function c(e,i,o){var l,c=e&&e.array,s=o>n?0:n-o>>i,d=1+(r-o>>i);return d>g&&(d=g),function(){for(;;){if(l){var e=l();if(e!==Vt)return e;l=null}if(s===d)return Vt;var n=t?--d:s++;l=a(c&&c[n],i-C,o+(n<<i))}}}}function zt(e,t,n,r,i,o,a){var l=Object.create(Lt);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function Nt(){return _t||(_t=zt(0,0,C))}function It(e,t,n){if((t=L(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Zt(e,t).set(0,n):Zt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=E(b);return t>=Bt(e._capacity)?r=Tt(r,e.__ownerID,0,t,n,o):i=Tt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):zt(e._origin,e._capacity,e._level,i,r):e}function Tt(e,t,n,r,i,o){var a,l=r>>>n&v,c=e&&l<e.array.length;if(!c&&void 0===i)return e;if(n>0){var s=e&&e.array[l],d=Tt(s,t,n-C,r,i,o);return d===s?e:((a=Dt(e,t)).array[l]=d,a)}return c&&e.array[l]===i?e:(M(o),a=Dt(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Dt(e,t){return t&&e&&t===e.ownerID?e:new Ht(e?e.array.slice():[],t)}function jt(e,t){if(t>=Bt(e._capacity))return e._tail;if(t<1<<e._level+C){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=C;return n}}function Zt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new A,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var c=e._level,s=e._root,d=0;a+d<0;)s=new Ht(s&&s.array.length?[void 0,s]:[],r),d+=1<<(c+=C);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Bt(o),f=Bt(l);f>=1<<c+C;)s=new Ht(s&&s.array.length?[s]:[],r),c+=C;var h=e._tail,p=f<u?jt(e,l-1):f>u?new Ht([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var m=s=Dt(s,r),g=c;g>C;g-=C){var y=u>>>g&v;m=m.array[y]=Dt(m.array[y],r)}m.array[u>>>C&v]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,c=C,s=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;s;){var w=a>>>c&v;if(w!==f>>>c&v)break;w&&(d+=(1<<c)*w),c-=C,s=s.array[w]}s&&a>i&&(s=s.removeBefore(r,c,a-d)),s&&f<u&&(s=s.removeAfter(r,c,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=c,e._root=s,e._tail=p,e.__hash=void 0,e.__altered=!0,e):zt(a,l,c,s,p)}function Rt(e,t,n){for(var r=[],o=0,l=0;l<n.length;l++){var c=n[l],s=i(c);s.size>o&&(o=s.size),a(c)||(s=s.map(function(e){return he(e)})),r.push(s)}return o>e.size&&(e=e.setSize(o)),mt(e,t,r)}function Bt(e){return e<g?0:e-1>>>C<<C}function Pt(e){return null==e?qt():Ft(e)?e:qt().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ft(e){return qe(e)&&d(e)}function Ut(e,t,n,r){var i=Object.create(Pt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function qt(){return St||(St=Ut(it(),Nt()))}function Wt(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),c=void 0!==l;if(n===y){if(!c)return e;a.size>=g&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(c){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Qt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===I){var r=e.__iterator(t,n);return new Z(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===N?z:N,n)},t}function Jt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,y);return o===y?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(I,i);return new Z(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return R(r,l,t.call(n,a[1],l,e),i)})},r}function $t(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=yn(e);return r&&(i.has=function(r){var i=e.get(r,y);return i!==y&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,y);return o!==y&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,c){if(t.call(n,e,o,c))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(I,o),l=0;return new Z(function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,s=c[0],d=c[1];if(t.call(n,d,s,e))return R(i,r?s:l++,d,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=l(e),i=(d(e)?Pt():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return mn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),_(t,n,i))return e;var o=S(t,i),a=V(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var l,c=a-o;c==c&&(l=c<0?0:c);var s=yn(e);return s.size=0===l?l:e.size&&l||void 0,!r&&oe(e)&&l>=0&&(s.get=function(t,n){return(t=L(this,t))>=0&&t<l?e.get(t+o,n):n}),s.__iterateUncached=function(t,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,c=!0,s=0;return e.__iterate(function(e,n){if(!c||!(c=a++<o))return s++,!1!==t(e,r?n:s-1,i)&&s!==l}),s},s.__iteratorUncached=function(t,n){if(0!==l&&n)return this.cacheResult().__iterator(t,n);var i=0!==l&&e.__iterator(t,n),a=0,c=0;return new Z(function(){for(;a++<o;)i.next();if(++c>l)return B();var e=i.next();return r||t===N?e:R(t,c-1,t===z?void 0:e.value[1],e)})},s}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(I,i),l=!0;return new Z(function(){if(!l)return B();var e=a.next();if(e.done)return e;var i=e.value,c=i[0],s=i[1];return t.call(n,s,c,o)?r===I?e:R(r,c,s,e):(l=!1,B())})},r}function an(e,t,n,r){var i=yn(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,c=0;return e.__iterate(function(e,o,s){if(!l||!(l=t.call(n,e,o,s)))return c++,i(e,r?o:c-1,a)}),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(I,o),c=!0,s=0;return new Z(function(){var e,o,d;do{if((e=l.next()).done)return r||i===N?e:R(i,s++,i===z?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],c&&(c=t.call(n,d,o,a))}while(c);return i===I?e:R(i,o,d,e)})},i}function ln(e,t){var n=l(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?le(e):ce(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&l(o)||c(e)&&c(o))return o}var s=new te(i);return n?s=s.toKeyedSeq():c(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}function cn(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=0,l=!1;function c(e,s){var d=this;e.__iterate(function(e,i){return(!t||s<t)&&a(e)?c(e,s+1):!1===r(e,n?i:o++,d)&&(l=!0),!l},i)}return c(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),l=[],c=0;return new Z(function(){for(;o;){var e=o.next();if(!1===e.done){var s=e.value;if(r===I&&(s=s[1]),t&&!(l.length<t)||!a(s))return n?e:R(r,c++,s,e);l.push(o),o=s.__iterator(r,i)}else o=l.pop()}return B()})},r}function sn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function dn(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(N,r),a=0;return new Z(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?R(n,a++,t):R(n,a++,i.value,i)})},n}function un(e,t,n){t||(t=bn);var r=l(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):c(e)?K(o):Y(o)}function fn(e,t,n){if(t||(t=bn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return hn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return hn(t,e,n)?n:e})}function hn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function pn(e,t,r){var i=yn(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(N,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,l=!1;return new Z(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=n.some(function(e){return e.done})),l?B():R(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function mn(e,t){return oe(e)?t:e.constructor(t)}function Cn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Fe(e.size),k(e)}function vn(e){return l(e)?r:c(e)?i:o}function yn(e){return Object.create((l(e)?G:c(e)?K:Y).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Q.prototype.cacheResult.call(this)}function bn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=U(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function Mn(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);Ln(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(An);return i.constructor=r,r}t(Pt,Ue),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Pt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):qt()},Pt.prototype.set=function(e,t){return Wt(this,e,t)},Pt.prototype.remove=function(e){return Wt(this,e,y)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Pt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Pt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Pt.isOrderedMap=Ft,Pt.prototype[p]=!0,Pt.prototype[m]=Pt.prototype.remove,t(Qt,G),Qt.prototype.get=function(e,t){return this._iter.get(e,t)},Qt.prototype.has=function(e){return this._iter.has(e)},Qt.prototype.valueSeq=function(){return this._iter.valueSeq()},Qt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Qt.prototype.map=function(e,t){var n=this,r=Jt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Qt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Qt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(N,t),r=t?gn(this):0;return new Z(function(){var i=n.next();return i.done?i:R(e,t?--r:r++,i.value,i)})},Qt.prototype[p]=!0,t(Gt,K),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t),r=0;return new Z(function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)})},t(Kt,Y),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new Z(function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Cn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new Z(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Cn(r);var i=a(r);return R(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Qt.prototype.cacheResult=Kt.prototype.cacheResult=Yt.prototype.cacheResult=wn,t(Mn,Me),Mn.prototype.toString=function(){return this.__toString(kn(this)+" {","}")},Mn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Mn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Mn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=xn(this,it()))},Mn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+kn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:xn(this,n)},Mn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:xn(this,t)},Mn.prototype.wasAltered=function(){return this._map.wasAltered()},Mn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Mn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Mn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?xn(this,t,e):(this.__ownerID=e,this._map=t,this)};var An=Mn.prototype;function xn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function kn(e){return e._name||e.constructor.name||"Record"}function Ln(e,t){try{t.forEach(Hn.bind(void 0,e))}catch(e){}}function Hn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function _n(e){return null==e?Tn():Sn(e)&&!d(e)?e:Tn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function Sn(e){return!(!e||!e[On])}An[m]=An.remove,An.deleteIn=An.removeIn=Ge.removeIn,An.merge=Ge.merge,An.mergeWith=Ge.mergeWith,An.mergeIn=Ge.mergeIn,An.mergeDeep=Ge.mergeDeep,An.mergeDeepWith=Ge.mergeDeepWith,An.mergeDeepIn=Ge.mergeDeepIn,An.setIn=Ge.setIn,An.update=Ge.update,An.updateIn=Ge.updateIn,An.withMutations=Ge.withMutations,An.asMutable=Ge.asMutable,An.asImmutable=Ge.asImmutable,t(_n,xe),_n.of=function(){return this(arguments)},_n.fromKeys=function(e){return this(r(e).keySeq())},_n.prototype.toString=function(){return this.__toString("Set {","}")},_n.prototype.has=function(e){return this._map.has(e)},_n.prototype.add=function(e){return Nn(this,this._map.set(e,!0))},_n.prototype.remove=function(e){return Nn(this,this._map.remove(e))},_n.prototype.clear=function(){return Nn(this,this._map.clear())},_n.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},_n.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},_n.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},_n.prototype.merge=function(){return this.union.apply(this,arguments)},_n.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},_n.prototype.sort=function(e){return Dn(un(this,e))},_n.prototype.sortBy=function(e,t){return Dn(un(this,t,e))},_n.prototype.wasAltered=function(){return this._map.wasAltered()},_n.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},_n.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},_n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},_n.isSet=Sn;var Vn,On="@@__IMMUTABLE_SET__@@",zn=_n.prototype;function Nn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function In(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Tn(){return Vn||(Vn=In(it()))}function Dn(e){return null==e?Pn():jn(e)?e:Pn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function jn(e){return Sn(e)&&d(e)}zn[On]=!0,zn[m]=zn.remove,zn.mergeDeep=zn.merge,zn.mergeDeepWith=zn.mergeWith,zn.withMutations=Ge.withMutations,zn.asMutable=Ge.asMutable,zn.asImmutable=Ge.asImmutable,zn.__empty=Tn,zn.__make=In,t(Dn,_n),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Dn.isOrderedSet=jn;var Zn,Rn=Dn.prototype;function Bn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Pn(){return Zn||(Zn=Bn(qt()))}function Fn(e){return null==e?Kn():Un(e)?e:Kn().unshiftAll(e)}function Un(e){return!(!e||!e[Wn])}Rn[p]=!0,Rn.__empty=Pn,Rn.__make=Bn,t(Fn,Ae),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=L(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Kn()},Fn.prototype.slice=function(e,t){if(_(e,t,this.size))return this;var n=S(e,this.size);if(V(t,this.size)!==this.size)return Ae.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gn(r,i)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new Z(function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return B()})},Fn.isStack=Un;var qn,Wn="@@__IMMUTABLE_STACK__@@",Qn=Fn.prototype;function Gn(e,t,n,r){var i=Object.create(Qn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kn(){return qn||(qn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Qn[Wn]=!0,Qn.withMutations=Ge.withMutations,Qn.asMutable=Ge.asMutable,Qn.asImmutable=Ge.asImmutable,Qn.wasAltered=Ge.wasAltered,n.Iterator=Z,Yn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Qt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Pt(this.toKeyedSeq())},toOrderedSet:function(){return Dn(l(this)?this.valueSeq():this)},toSet:function(){return _n(l(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(l(this)?this.valueSeq():this)},toList:function(){return At(l(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,ln(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ge(t,e)})},entries:function(){return this.__iterator(I)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(z)},map:function(e,t){return mn(this,Jt(this,e,t))},reduce:function(e,t,n){var r,i;return Fe(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,$t(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,un(this,e))},values:function(){return this.__iterator(N)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return k(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(H)},flatMap:function(e,t){return mn(this,sn(this,e,t))},flatten:function(e){return mn(this,cn(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ge(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=En(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):or)},minBy:function(e,t){return fn(this,t?nr(t):or,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,un(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[u]=!0,Xn[j]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Yn(r,{flip:function(){return mn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey(function(t){return ge(t,e)})},lastKeyOf:function(e){return this.findLastKey(function(t){return ge(t,e)})},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Jn=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function ir(){return x(arguments)}function or(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=d(e),n=l(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+cr(He(e),He(t))|0}:function(e,t){r=r+cr(He(e),He(t))|0}:t?function(e){r=31*r+He(e)|0}:function(e){r=r+He(e)|0});return lr(i,r)}function lr(e,t){return t=ke(t,3432918353),t=ke(t<<15|t>>>-15,461845907),t=ke(t<<13|t>>>-13,5),t=ke((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Le((t=ke(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Jn[f]=!0,Jn[j]=Xn.entries,Jn.__toJS=Xn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Yn(i,{toKeyedSeq:function(){return new Qt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,$t(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=S(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return mn(this,cn(this,e,!1))},get:function(e,t){return(e=L(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=L(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,dn(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=pn(this.toSeq(),K.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,an(this,e,t,!1))},zip:function(){return mn(this,pn(this,ir,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,mn(this,pn(this,e,t))}}),i.prototype[h]=!0,i.prototype[p]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Xn.includes,Yn(G,r.prototype),Yn(K,i.prototype),Yn(Y,o.prototype),Yn(Me,r.prototype),Yn(Ae,i.prototype),Yn(xe,o.prototype);var sr={Iterable:n,Seq:Q,Collection:Ee,Map:Ue,OrderedMap:Pt,List:At,Stack:Fn,Set:_n,OrderedSet:Dn,Record:Mn,Range:be,Repeat:ye,is:ge,fromJS:he};return sr}()),QO.exports}function KO(){if(fV)return uV;fV=1;var e=GO().OrderedMap;return uV={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function YO(){if(pV)return hV;pV=1;var e=GO(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var s=a.prototype;return s.getStyle=function(){return this.get("style")},s.getEntity=function(){return this.get("entity")},s.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return l;var n=t({style:i,entity:null}).merge(e),r=c.get(n);if(r)return r;var o=new a(n);return c=c.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),l=new a,c=t([[t(o),l]]);return a.EMPTY=l,hV=a}function XO(){if(CV)return mV;return CV=1,mV=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function JO(){if(vV)return gV;vV=1;var e=YO(),t=XO(),n=GO(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,c=o(),s=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),d=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var s=a.prototype;return s.getKey=function(){return this.get("key")},s.getType=function(){return this.get("type")},s.getText=function(){return this.get("text")},s.getCharacterList=function(){return this.get("characterList")},s.getLength=function(){return this.getText().length},s.getDepth=function(){return this.get("depth")},s.getData=function(){return this.get("data")},s.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():c},s.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},s.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},s.findEntityRanges=function(e,n){t(this.getCharacterList(),f,e,n)},a}(s);function u(e,t){return e.getStyle()===t.getStyle()}function f(e,t){return e.getEntity()===t.getEntity()}return gV=d}function $O(){if(wV)return yV;wV=1;var e=YO(),t=XO(),n=GO(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,c=o(),s={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},d=function(e,t){return e.getStyle()===t.getStyle()},u=function(e,t){return e.getEntity()===t.getEntity()},f=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var f=a.prototype;return f.getKey=function(){return this.get("key")},f.getType=function(){return this.get("type")},f.getText=function(){return this.get("text")},f.getCharacterList=function(){return this.get("characterList")},f.getLength=function(){return this.getText().length},f.getDepth=function(){return this.get("depth")},f.getData=function(){return this.get("data")},f.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():c},f.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},f.getChildKeys=function(){return this.get("children")},f.getParentKey=function(){return this.get("parent")},f.getPrevSiblingKey=function(){return this.get("prevSibling")},f.getNextSiblingKey=function(){return this.get("nextSibling")},f.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},f.findEntityRanges=function(e,n){t(this.getCharacterList(),u,e,n)},a}(a(s));return yV=f}function ez(){if(kV)return xV;kV=1;var e=function(){if(AV)return MV;AV=1;var e=YO();return MV=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=GO();return xV=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),l=r.getStartOffset(),c=r.getEndKey(),s=r.getEndOffset(),d=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===c}).toOrderedMap().merge(t.OrderedMap([[c,o.get(c)]])).map(function(t,n){var r=n===a?l:0,o=n===c?s:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(d),selectionBefore:r,selectionAfter:r})},xV}function tz(){if(SV)return _V;SV=1;var e="production"!==process.env.NODE_ENV?function(e){if(void 0===e)throw new Error("invariant(...): Second argument must be a string.")}:function(e){};return _V=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(e(n),!t){var a;if(void 0===n)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;(a=new Error(n.replace(/%s/g,function(){return String(i[l++])}))).name="Invariant Violation"}throw a.framesToPop=1,a}},_V}function nz(){if(NV)return zV;NV=1;var e=HV?LV:(HV=1,LV={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,l=r,c=null,s=null,d=0;d<o.length;d++){if(e<(a=l+o[d].length)&&l<t)null!==c||(c=l),s=a;else if(null!==c)break;l=a}var u=r+n.length,f=c===r,h=s===u;return(!f&&h||f&&!h)&&("forward"===i?s!==u&&s++:c!==r&&c--),{start:c,end:s}}}),t=function(){if(OV)return VV;OV=1;var e=tz();return VV=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||("production"!==process.env.NODE_ENV?e(!1,"Entity key not found in this range."):e(!1)),r},VV}(),n=tz();function r(r,i,o,a,l,c,s){var d=o.getStartOffset(),u=o.getEndOffset(),f=r.__get(l).getMutability(),h=s?d:u;if("MUTABLE"===f)return o;var p=t(i,l).filter(function(e){return h<=e.end&&h>=e.start});1!=p.length&&("production"!==process.env.NODE_ENV?n(!1,"There should only be one entity range within this removal range."):n(!1));var m=p[0];if("IMMUTABLE"===f)return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1});c||(s?u=m.end:d=m.start);var C=e.getRemovalRange(d,u,i.getText().slice(m.start,m.end),m.start,a);return o.merge({anchorOffset:C.start,focusOffset:C.end,isBackward:!1})}return zV=function(e,t,n,i,o){var a=i.getStartOffset(),l=i.getEndOffset(),c=t.getEntityAt(a),s=n.getEntityAt(l-1);if(!c&&!s)return i;var d=i;if(c&&c===s)d=r(e,t,d,o,c,!0,!0);else if(c&&s){var u=r(e,t,d,o,c,!1,!0),f=r(e,n,d,o,s,!1,!1);d=d.merge({anchorOffset:u.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(c){var h=r(e,t,d,o,c,!1,!0);d=d.merge({anchorOffset:h.getStartOffset(),isBackward:!1})}else if(s){var p=r(e,n,d,o,s,!1,!1);d=d.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return d}}function rz(){if(TV)return IV;TV=1;var e={},t=Math.pow(2,24);return IV=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n},IV}function iz(){if(jV)return DV;jV=1;var e=$O(),t=rz(),n=GO().OrderedMap;return DV=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),l=n.getNextSiblingKey(),c=n.getPrevSiblingKey(),s=n.getChildKeys(),d=n.getParentKey(),u=t();if(i[a]=u,l&&(e.get(l)?e.setIn([l,"prevSibling"],u):e.setIn([a,"nextSibling"],null)),c&&(e.get(c)?e.setIn([c,"nextSibling"],u):e.setIn([a,"prevSibling"],null)),d&&e.get(d)){var f=e.get(d).getChildKeys();e.setIn([d,"children"],f.set(f.indexOf(n.getKey()),u))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],u),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);s.forEach(function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)},DV}function oz(){if(RV)return ZV;RV=1;var e=YO(),t=XO(),n=tz();function r(r,i,o){var a=i.getCharacterList(),l=o>0?a.get(o-1):void 0,c=o<a.count()?a.get(o):void 0,s=l?l.getEntity():void 0,d=c?c.getEntity():void 0;if(d&&d===s&&"MUTABLE"!==r.__get(d).getMutability()){for(var u,f=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&("production"!==process.env.NODE_ENV?n(!1,"Removal range must exist within character list."):n(!1)),o}(a,d,o),h=f.start,p=f.end;h<p;)u=a.get(h),a=a.set(h,e.applyEntity(u,null)),h++;return i.set("characterList",a)}return i}return ZV=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),l=t.getStartOffset(),c=n.get(a),s=r(i,c,l);s!==c&&(o[a]=s);var d=t.getEndKey(),u=t.getEndOffset(),f=n.get(d);a===d&&(f=s);var h=r(i,f,u);return h!==f&&(o[d]=h),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function az(){if(PV)return BV;PV=1;var e=iz(),t=oz();return BV=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),l=r.getEndOffset(),c=t(n,r).getBlockMap(),s=c.keySeq(),d=s.indexOf(i),u=s.indexOf(a)+1;return e(c.slice(d,u).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,l),characterList:r.slice(o,l)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,l),characterList:r.slice(0,l)}):e}))}}function lz(){if(UV)return FV;return UV=1,FV=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function cz(){if(WV)return qV;WV=1;var e=KO(),t=$O(),n=GO(),r=lz(),i=tz(),o=iz(),a=n.List,l=function(n,r,i,o,l,c){var s=i.first()instanceof t,d=[],u=o.size,f=i.get(l),h=o.first(),p=o.last(),m=p.getLength(),C=p.getKey(),g=s&&(!f.getChildKeys().isEmpty()||!h.getChildKeys().isEmpty());i.forEach(function(e,t){t===l?(g?d.push(e):d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),l=n.first();return e.merge({text:o+l.getText(),characterList:a.concat(l.getCharacterList()),type:o?e.getType():l.getType(),data:l.getData()})}(e,c,o)),o.slice(g?0:1,u-1).forEach(function(e){return d.push(e)}),d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),l=i.slice(t,o),c=n.last();return c.merge({text:c.getText()+a,characterList:c.getCharacterList().concat(l),data:c.getData()})}(e,c,o))):d.push(e)});var v=e.createFromArray(d);return s&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),l=n.getNextSiblingKey(),c=n.getParentKey(),s=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),d=s[s.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([d,"nextSibling"],l),l&&t.setIn([l,"prevSibling"],d),s.forEach(function(e){return t.setIn([e,"parent"],c)}),c){var u=e.get(c).getChildKeys(),f=u.indexOf(i)+1,h=u.toArray();h.splice.apply(h,[f,0].concat(s)),t.setIn([c,"children"],a(h))}})}(v,0,f,h)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:C,anchorOffset:m,focusKey:C,focusOffset:m,isBackward:!1})})};return qV=function(e,n,a){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should only be called with a collapsed selection state."):i(!1));var s=e.getBlockMap(),d=o(a),u=n.getStartKey(),f=n.getStartOffset(),h=s.get(u);return h instanceof t&&(h.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should not be called when a container node is selected."):i(!1))),1===d.size?function(e,t,n,i,o,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",c=n.get(o),s=c.getText(),d=c.getCharacterList(),u=o,f=a+i.getText().length,h=null;switch(l){case"MERGE_OLD_DATA_TO_NEW_DATA":h=i.getData().merge(c.getData());break;case"REPLACE_WITH_NEW_DATA":h=i.getData()}var p=c.getType();s&&"unstyled"===p&&(p=i.getType());var m=c.merge({text:s.slice(0,a)+i.getText()+s.slice(a),characterList:r(d,i.getCharacterList(),a),type:p,data:h});return e.merge({blockMap:n.set(o,m),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:f,focusKey:u,focusOffset:f,isBackward:!1})})}(e,n,s,d.first(),u,f,c):l(e,n,s,d,u,f)},qV}function sz(){if(YV)return KV;YV=1;var e=GO().Map;return KV=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(l),selectionBefore:n,selectionAfter:n})},KV}function dz(){if(JV)return XV;JV=1;var e=$O();return XV=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function uz(){if(eO)return $V;eO=1;var e=$O(),t=dz(),n=GO();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},c=function(e,n,r,c){return e.withMutations(function(s){if(i(n.getKey(),s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})}),i(r.getKey(),s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})}),o(n.getKey(),c).forEach(function(e){return i(e,s,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return s.get(e)}),nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),i(n.getNextSiblingKey(),s,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),s,function(e){return e.merge({nextSibling:a(e,s,c)})}),i(r.getNextSiblingKey(),s,function(e){return e.merge({prevSibling:l(e,s,c)})}),i(r.getPrevSiblingKey(),s,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),c).forEach(function(e){i(e,s,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return s.get(e)}),nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,c).forEach(function(e){return i(e,s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var d=n.getPrevSiblingKey();i(r.getKey(),s,function(e){return e.merge({prevSibling:d})}),i(d,s,function(e){return e.merge({nextSibling:r.getKey()})});var u=d?e.get(d):null,f=u?u.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,s,function(e){return e.merge({parent:f})})}),null!=f){var h=e.get(f);i(f,s,function(e){return e.merge({children:h.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),s,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},s=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return $V=function(n,i){if(i.isCollapsed())return n;var a,l=n.getBlockMap(),d=i.getStartKey(),u=i.getStartOffset(),f=i.getEndKey(),h=i.getEndOffset(),p=l.get(d),m=l.get(f),C=p instanceof e,g=[];if(C){var v=m.getChildKeys(),y=o(f,l);m.getNextSiblingKey()&&(g=g.concat(y)),v.isEmpty()||(g=g.concat(y.concat([f]))),g=g.concat(o(t(m,l),l))}a=p===m?s(p.getCharacterList(),u,h):p.getCharacterList().slice(0,u).concat(m.getCharacterList().slice(h));var w=p.merge({text:p.getText().slice(0,u)+m.getText().slice(h),characterList:a}),b=C&&0===u&&0===h&&m.getParentKey()===d&&null==m.getPrevSiblingKey()?r([[d,null]]):l.toSeq().skipUntil(function(e,t){return t===d}).takeUntil(function(e,t){return t===f}).filter(function(e,t){return-1===g.indexOf(t)}).concat(r([[f,null]])).map(function(e,t){return t===d?w:null}),E=l.merge(b).filter(function(e){return!!e});return C&&p!==m&&(E=c(E,p,m,l)),n.merge({blockMap:E,selectionBefore:i,selectionAfter:i.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})},$V}function fz(){if(nO)return tO;nO=1;var e=$O(),t=rz(),n=GO(),r=tz(),i=sz(),o=n.List,a=n.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return tO=function(n,c){c.isCollapsed()||("production"!==process.env.NODE_ENV?r(!1,"Selection range must be collapsed."):r(!1));var s=c.getAnchorKey(),d=n.getBlockMap(),u=d.get(s),f=u.getText();if(!f){var h=u.getType();if("unordered-list-item"===h||"ordered-list-item"===h)return i(n,c,function(e){return e.merge({type:"unstyled",depth:0})})}var p=c.getAnchorOffset(),m=u.getCharacterList(),C=t(),g=u instanceof e,v=u.merge({text:f.slice(0,p),characterList:m.slice(0,p)}),y=v.merge({key:C,text:f.slice(p),characterList:m.slice(p),data:a()}),w=d.toSeq().takeUntil(function(e){return e===u}),b=d.toSeq().skipUntil(function(e){return e===u}).rest(),E=w.concat([[s,v],[C,y]],b).toOrderedMap();return g&&(u.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?r(!1,"ContentBlockNode must not have children"):r(!1)),E=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();l(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),l(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),l(r,e,function(e){return e.merge({nextSibling:i})}),l(i,e,function(e){return e.merge({prevSibling:r})})})}(E,v,y)),n.merge({blockMap:E,selectionBefore:c,selectionAfter:c.merge({anchorKey:C,anchorOffset:0,focusKey:C,focusOffset:0,isBackward:!1})})},tO}function hz(){if(iO)return rO;iO=1;var e=YO(),t=function(){if(EV)return bV;EV=1;var e=YO(),t=GO().Map;function n(n,r,i,o){var a=n.getBlockMap(),l=r.getStartKey(),c=r.getStartOffset(),s=r.getEndKey(),d=r.getEndOffset(),u=a.skipUntil(function(e,t){return t===l}).takeUntil(function(e,t){return t===s}).concat(t([[s,a.get(s)]])).map(function(t,n){var r,a;l===s?(r=c,a=d):(r=n===l?c:0,a=n===s?d:t.getLength());for(var u,f=t.getCharacterList();r<a;)u=f.get(r),f=f.set(r,o?e.applyStyle(u,i):e.removeStyle(u,i)),r++;return t.set("characterList",f)});return n.merge({blockMap:a.merge(u),selectionBefore:r,selectionAfter:r})}return bV={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=ez(),r=nz(),i=az(),o=GO(),a=cz(),l=function(){if(GV)return QV;GV=1;var e=GO(),t=lz(),n=tz(),r=e.Repeat;return QV=function(e,i,o,a){i.isCollapsed()||("production"!==process.env.NODE_ENV?n(!1,"`insertText` should only be called with a collapsed range."):n(!1));var l=null;if(null!=o&&(l=o.length),null==l||0===l)return e;var c=e.getBlockMap(),s=i.getStartKey(),d=i.getStartOffset(),u=c.get(s),f=u.getText(),h=u.merge({text:f.slice(0,d)+o+f.slice(d,u.getLength()),characterList:t(u.getCharacterList(),r(a,l).toList(),d)}),p=d+l;return e.merge({blockMap:c.set(s,h),selectionAfter:i.merge({anchorOffset:p,focusOffset:p})})},QV}(),c=tz(),s=sz(),d=oz(),u=uz(),f=fz(),h=o.OrderedSet,p={replaceText:function(t,n,r,i,o){var a=d(t,n),c=u(a,n),s=e.create({style:i||h(),entity:o||null});return l(c,c.getSelectionAfter(),r,s)},insertText:function(e,t,n,r,i){return t.isCollapsed()||("production"!==process.env.NODE_ENV?c(!1,"Target range must be collapsed for `insertText`."):c(!1)),p.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=p.removeRange(e,t,"backward");return p.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(e,t),o=u(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,l;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),l=e.getBlockForKey(o);var c=t.getStartOffset(),s=t.getEndOffset(),f=a.getEntityAt(c),h=l.getEntityAt(s-1);if(i===o&&f&&f===h){var p=r(e.getEntityMap(),a,l,t,n);return u(e,p)}var m=d(e,t);return u(m,t)},splitBlock:function(e,t){var n=d(e,t),r=u(n,t);return f(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return s(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return s(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return s(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=d(e,t);return n(i,t,r)}};return rO=p}function pz(){if(aO)return oO;return aO=1,oO=function(e){return Object.keys(e).map(function(t){return e[t]})},oO}function mz(){if(cO)return lO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cO=1;var t=XO(),n=pz(),r=GO(),i=r.List,o=r.Repeat,a=r.Record,l=function(){return!0},c=a({start:null,end:null}),s=a({start:null,end:null,decoratorKey:null,leaves:null}),d={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new s({start:0,end:0,decoratorKey:null,leaves:i.of(new c({start:0,end:0}))}));var d=[],h=r?r.getDecorations(n,e):i(o(null,a)),p=n.getCharacterList();return t(h,f,l,function(e,t){d.push(new s({start:e,end:t,decoratorKey:h.get(e),leaves:u(p.slice(e,t).toList(),e)}))}),i(d)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new s(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return c(e)}):null}))}};function u(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,f,l,function(e,t){r.push(new c({start:e+n,end:t+n}))}),i(r)}function f(e,t){return e===t}return lO=d}function Cz(){if(dO)return sO;dO=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,GO().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return sO=e}function gz(){if(pO)return hO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pO=1;var t=Cz(),n=GO(),r=tz(),i=(fO||(fO=1,uO=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),uO),o=(0,n.Map)(),a=i();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var c={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),c.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),c.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),c.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),c.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),c.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),c.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return c.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||("production"!==process.env.NODE_ENV?r(!1,"Unknown DraftEntity key: %s.",e):r(!1)),t},__mergeData:function(t,n){var r=c.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=c.__get(e).set("data",t);return o=o.set(e,n),n}};return hO=c}function vz(){if(CO)return mO;CO=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var l=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=l&&n>=l},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,GO().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return mO=e}function yz(){return vO?gO:(vO=1,gO=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function wz(){if(wO)return yO;wO=1;var e=new RegExp("\r","g");return yO=function(t){return t.replace(e,"")}}function bz(){if(EO)return bO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}EO=1;var n=KO(),r=YO(),i=JO(),o=$O(),a=gz(),l=vz(),c=rz(),s=pz(),d=yz(),u=GO(),f=wz(),h=u.List,p=u.Record,m=u.Repeat,C=u.Map,g=u.OrderedMap,v=p({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),y=d("draft_tree_data_support")?o:i,w=function(t){var i,o;function d(){return t.apply(this,arguments)||this}o=t,(i=d).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var u=d.prototype;return u.getEntityMap=function(){return a},u.getBlockMap=function(){return this.get("blockMap")},u.getSelectionBefore=function(){return this.get("selectionBefore")},u.getSelectionAfter=function(){return this.get("selectionAfter")},u.getBlockForKey=function(e){return this.getBlockMap().get(e)},u.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlocksAsArray=function(){return this.getBlockMap().toArray()},u.getFirstBlock=function(){return this.getBlockMap().first()},u.getLastBlock=function(){return this.getBlockMap().last()},u.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},u.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},u.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},u.createEntity=function(e,t,n){return a.__create(e,t,n),this},u.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},u.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},u.addEntity=function(e){return a.__add(e),this},u.getEntity=function(e){return a.__get(e)},u.getAllEntities=function(){return a.__getAll()},u.loadWithEntities=function(e){return a.__loadWithEntities(e)},d.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new l:l.createEmpty(i.first().getKey());return new d({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},d.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=f(e),new y({key:c(),text:e,type:"unstyled",characterList:h(m(r.EMPTY,e.length))})});return d.createFromBlockArray(n)},d.fromJS=function(t){return new d(e({},t,{blockMap:g(t.blockMap).map(d.createContentBlockFromJS),selectionBefore:new l(t.selectionBefore),selectionAfter:new l(t.selectionAfter)}))},d.createContentBlockFromJS=function(t){var n=t.characterList;return new y(e({},t,{data:C(t.data),characterList:null!=n?h((Array.isArray(n)?n:s(n)).map(function(e){return r.fromJS(e)})):void 0}))},d}(v);return bO=w}function Ez(){if(AO)return MO;AO=1;var e=tz(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),n===t?"ltr":"rtl"}function o(e){n=e}return MO={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),r(n)||("production"!==process.env.NODE_ENV?e(!1,"`otherDir` must be a strong direction to be converted to HTML Direction"):e(!1)),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||("production"!==process.env.NODE_ENV?e(!1,"Global direction not set."):e(!1)),n}}}function Mz(){if(kO)return xO;kO=1;var e=Ez(),t=tz(),n="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",r="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function l(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function c(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=l(t);return r===e.NEUTRAL?n:r}function s(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||("production"!==process.env.NODE_ENV?t(!1,"Fallback direction must be a strong direction"):t(!1)),c(n,r)}return xO={firstStrongChar:a,firstStrongCharDir:l,resolveBlockDir:c,getDirection:s,isDirectionLTR:function(t,n){return s(t,n)===e.LTR},isDirectionRTL:function(t,n){return s(t,n)===e.RTL}}}function Az(){if(SO)return _O;SO=1;return _O=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}}function xz(){if(OO)return VO;OO=1;var e,t=function(){if(HO)return LO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HO=1;var t=Mz(),n=Ez(),r=tz();return LO=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||("production"!==process.env.NODE_ENV?r(!1,"Default direction must be a strong direction (LTR or RTL)"):r(!1)):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=GO(),r=Az(),i=n.OrderedMap;return VO={getDirectionMap:function(o,a){e?e.reset():e=new t;var l=o.getBlockMap(),c=l.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),s=i(l.keySeq().zip(c));return null!=a&&n.is(a,s)?a:s}}}function kz(){if(NO)return zO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}NO=1;var n=mz(),r=bz(),i=xz(),o=vz(),a=GO(),l=a.OrderedSet,c=a.Record,s=a.Stack,d=a.OrderedMap,u=a.List,f=c({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:s(),selection:null,treeMap:null,undoStack:s()}),h=function(){c.createEmpty=function(e){return this.createWithText("",e)},c.createWithText=function(e,t){return c.createWithContent(r.createFromText(e),t)},c.createWithContent=function(e,t){if(0===e.getBlockMap().count())return c.createEmpty(t);var n=e.getBlockMap().first().getKey();return c.create({currentContent:e,undoStack:s(),redoStack:s(),decorator:t||null,selection:o.createEmpty(n)})},c.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:m(n,t.decorator),directionMap:i.getDirectionMap(n)});return new c(new f(r))},c.fromJS=function(t){return new c(new f(e({},t,{directionMap:null!=t.directionMap?d(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?l(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?s(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?d(t.treeMap).map(function(e){return u(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?s(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},c.set=function(e,t){var r=e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var l,c=r.get("treeMap");return l=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),c,o,i):m(a,o),void r.merge({decorator:o,treeMap:l,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),l=e.getImmutable().get("treeMap");return l.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)});return new c(r)};var a=c.prototype;function c(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},c.setInlineStyleOverride=function(e,t){return c.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return C(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return C(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},c.acceptSelection=function(e,t){return p(e,t,!1)},c.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),p(e,t,!0)},c.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return c.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},c.moveFocusToEnd=function(e){var t=c.moveSelectionToEnd(e);return c.forceSelection(t,t.getSelection())},c.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return c.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),l=e.getCurrentContent(),d=e.getUndoStack(),u=t;a!==l.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(d=d.push(l),u=u.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(u=u.set("selectionBefore",l.getSelectionBefore()));var f=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(f=null);var h={currentContent:u,directionMap:o,undoStack:d,redoStack:s(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:f};return c.set(e,h)},c.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return c.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},c.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return c.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},c}();function p(e,t,n){return h.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function C(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}return zO=h}function Lz(){if(jO)return DO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jO=1;var n=KO(),r=YO(),i=JO(),o=$O(),a=hz(),l=kz(),c=rz(),s=yz(),d=GO(),u=function(){if(TO)return IO;TO=1;var e=$O(),t=dz(),n=GO(),r=tz(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},l=function(e,t,n,r,i){if(!i)return e;var l="after"===r,c=t.getKey(),s=n.getKey(),d=t.getParentKey(),u=t.getNextSiblingKey(),f=t.getPrevSiblingKey(),h=n.getParentKey(),p=l?n.getNextSiblingKey():s,m=l?s:n.getPrevSiblingKey();return e.withMutations(function(e){a(d,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(c))})}),a(f,e,function(e){return e.merge({nextSibling:u})}),a(u,e,function(e){return e.merge({prevSibling:f})}),a(p,e,function(e){return e.merge({prevSibling:c})}),a(m,e,function(e){return e.merge({nextSibling:c})}),a(h,e,function(e){var t=e.getChildKeys(),n=t.indexOf(s),r=l?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,c),e.merge({children:o(i)})}),a(c,e,function(e){return e.merge({nextSibling:p,prevSibling:m,parent:h})})})};return IO=function(n,o,a,c){"replace"===c&&("production"!==process.env.NODE_ENV?r(!1,"Replacing blocks is not supported."):r(!1));var s=a.getKey(),d=o.getKey();d===s&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1));var u=n.getBlockMap(),f=o instanceof e,h=[o],p=u.delete(d);f&&(h=[],p=u.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===d}).takeWhile(function(e){var t=e.getKey(),i=t===d,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){h.push(t),e.delete(t.getKey())})}));var m=p.toSeq().takeUntil(function(e){return e===a}),C=p.toSeq().skipUntil(function(e){return e===a}).skip(1),g=h.map(function(e){return[e.getKey(),e]}),v=i();if("before"===c){var y=n.getBlockBefore(s);y&&y.getKey()===o.getKey()&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=m.concat([].concat(g,[[s,a]]),C).toOrderedMap()}else if("after"===c){var w=n.getBlockAfter(s);w&&w.getKey()===d&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=m.concat([[s,a]].concat(g),C).toOrderedMap()}return n.merge({blockMap:l(v,o,a,c,f),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:d,focusKey:d})})},IO}(),f=s("draft_tree_data_support"),h=f?o:i,p=d.List,m=d.Repeat;return DO={insertAtomicBlock:function(t,i,o){var s=t.getCurrentContent(),d=t.getSelection(),u=a.removeRange(s,d,"backward"),C=u.getSelectionAfter(),g=a.splitBlock(u,C),v=g.getSelectionAfter(),y=a.setBlockType(g,v,"atomic"),w=r.create({entity:i}),b={key:c(),type:"atomic",text:o,characterList:p(m(w,o.length))},E={key:c(),type:"unstyled"};f&&(b=e({},b,{nextSibling:E.key}),E=e({},E,{prevSibling:b.key}));var M=[new h(b),new h(E)],A=n.createFromArray(M),x=a.replaceWithFragment(y,v,A),k=x.merge({selectionBefore:d,selectionAfter:x.getSelectionAfter().set("hasFocus",!0)});return l.push(t,k,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),c=e.getSelection();if("before"===r||"after"===r){var s=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=u(o,t,s,r)}else{var d=a.removeRange(o,n,"backward"),f=d.getSelectionAfter(),h=d.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=u(d,t,h,"before");else if(f.getEndOffset()===h.getLength())i=u(d,t,h,"after");else{var p=a.splitBlock(d,f),m=p.getSelectionAfter(),C=p.getBlockForKey(m.getFocusKey());i=u(p,t,C,"before")}}var g=i.merge({selectionBefore:c,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(e,g,"move-block")}}}function Hz(){if(RO)return ZO;RO=1;var e=GO().List,t=function(){function t(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_decorators",void 0),this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return ZO=t}function _z(){if(PO)return BO;function e(e){return e.replace(/\//g,"-")}return PO=1,BO=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},BO}function Sz(){if(UO)return FO;UO=1;var e=i,t=_z(),n=(0,GO().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:e.createElement("ul",{className:t("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:e.createElement("ol",{className:t("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:e.createElement("pre",{className:t("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return FO=n}function Vz(){return WO?qO:(WO=1,qO={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}var Oz,zz,Nz,Iz,Tz,Dz,jz,Zz,Rz,Bz,Pz,Fz,Uz,qz,Wz,Qz,Gz,Kz,Yz,Xz,Jz,$z,eN,tN,nN,rN,iN,oN,aN,lN,cN,sN,dN,uN,fN,hN,pN,mN,CN,gN,vN,yN,wN,bN,EN,MN,AN,xN,kN,LN,HN,_N,SN,VN,ON,zN,NN,IN,TN,DN,jN,ZN,RN,BN,PN,FN,UN,qN,WN,QN,GN,KN,YN,XN,JN,$N,eI,tI,nI,rI,iI,oI,aI,lI,cI,sI,dI,uI,fI,hI,pI,mI,CI,gI,vI,yI,wI,bI,EI,MI,AI,xI,kI,LI,HI,_I,SI,VI,OI,zI,NI,II,TI,DI,jI,ZI,RI,BI,PI,FI={exports:{}},UI=FI.exports;function qI(){return Oz||(Oz=1,function(e,t){!function(n,r){var i="function",o="undefined",a="object",l="string",c="major",s="model",d="name",u="type",f="vendor",h="version",p="architecture",m="console",C="mobile",g="tablet",v="smarttv",y="wearable",w="embedded",b="Amazon",E="Apple",M="ASUS",A="BlackBerry",x="Browser",k="Chrome",L="Firefox",H="Google",_="Honor",S="Huawei",V="LG",O="Microsoft",z="Motorola",N="Nvidia",I="OnePlus",T="Opera",D="OPPO",j="Samsung",Z="Sharp",R="Sony",B="Xiaomi",P="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",W=" Browser",Q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===l&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},X=function(e,t){for(var n,o,l,c,s,d,u=0;u<t.length&&!s;){var f=t[u],h=t[u+1];for(n=o=0;n<f.length&&!s&&f[n];)if(s=f[n++].exec(e))for(l=0;l<h.length;l++)d=s[++o],typeof(c=h[l])===a&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=d?d.replace(c[1],c[2]):r:this[c[0]]=d?c[1].call(this,d,c[2]):r:4===c.length&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):r):this[c]=d||r;u+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,h],[/opios[\/ ]+([\w\.]+)/i],[h,[d,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[d,T+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[d,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[d,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[d,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[d,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[d,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[d,"MIUI"+W]],[/fxios\/([\w\.-]+)/i],[h,[d,L]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+W],h],[/samsungbrowser\/([\w\.]+)/i],[h,[d,j+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[d,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,k+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[h,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[d,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[f,j],[u,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[f,j],[u,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[f,E],[u,C]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[f,E],[u,g]],[/(macintosh);/i],[s,[f,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[f,Z],[u,C]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[s,[f,_],[u,g]],[/honor([-\w ]+)[;\)]/i],[s,[f,_],[u,C]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[s,[f,S],[u,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[f,S],[u,C]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[s,/_/g," "],[f,B],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[s,/_/g," "],[f,B],[u,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[f,D],[u,C]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[s,[f,J,{OnePlus:["304","403","203"],"*":D}],[u,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[f,"Vivo"],[u,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[f,"Realme"],[u,C]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[f,z],[u,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[f,z],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[f,V],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[f,V],[u,C]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[s,[f,"Lenovo"],[u,g]],[/(nokia) (t[12][01])/i],[f,s,[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[s,/_/g," "],[u,C],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[s,[f,H],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[f,H],[u,C]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[f,R],[u,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[f,R],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[f,I],[u,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[f,b],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[f,b],[u,C]],[/(playbook);[-\w\),; ]+(rim)/i],[s,f,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[f,A],[u,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[f,M],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[f,M],[u,C]],[/(nexus 9)/i],[s,[f,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[s,/_/g," "],[u,C]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[f,"TCL"],[u,g]],[/(itel) ((\w+))/i],[[f,K],s,[u,J,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[f,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[f,"Meizu"],[u,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[f,"Ulefone"],[u,C]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[s,[f,"Energizer"],[u,C]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[s,[f,"Cat"],[u,C]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[s,[f,"Smartfren"],[u,C]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[f,"Nothing"],[u,C]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[s,[f,"Archos"],[u,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[s,[f,"Archos"],[u,C]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,s,[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[f,s,[u,C]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,s,[u,g]],[/(surface duo)/i],[s,[f,O],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[f,"Fairphone"],[u,C]],[/(u304aa)/i],[s,[f,"AT&T"],[u,C]],[/\bsie-(\w*)/i],[s,[f,"Siemens"],[u,C]],[/\b(rct\w+) b/i],[s,[f,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[f,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[f,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[f,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[s,[f,"NuVision"],[u,g]],[/\b(k88) b/i],[s,[f,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[s,[f,"ZTE"],[u,C]],[/\b(gen\d{3}) b.+49h/i],[s,[f,"Swiss"],[u,C]],[/\b(zur\d{3}) b/i],[s,[f,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[s,[f,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],s,[u,g]],[/\b(ns-?\w{0,9}) b/i],[s,[f,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[f,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],s,[u,C]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],s,[u,C]],[/\b(ph-1) /i],[s,[f,"Essential"],[u,C]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[f,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[s,[f,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[s,[f,"Rotor"],[u,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[s,[f,N],[u,g]],[/(sprint) (\w+)/i],[f,s,[u,C]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[f,O],[u,C]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[f,P],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[f,P],[u,C]],[/smart-tv.+(samsung)/i],[f,[u,v]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[f,j],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,V],[u,v]],[/(apple) ?tv/i],[f,[s,E+" TV"],[u,v]],[/crkey/i],[[s,k+"cast"],[f,H],[u,v]],[/droid.+aft(\w+)( bui|\))/i],[s,[f,b],[u,v]],[/(shield \w+ tv)/i],[s,[f,N],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[f,Z],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[s,[f,R],[u,v]],[/(mi(tv|box)-?\w+) bui/i],[s,[f,B],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[f,s,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[s,Y],[u,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[s,[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,s,[u,m]],[/droid.+; (shield)( bui|\))/i],[s,[f,N],[u,m]],[/(playstation \w+)/i],[s,[f,R],[u,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[f,O],[u,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[s,[f,j],[u,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,s,[u,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[s,[f,D],[u,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[f,E],[u,y]],[/(opwwe\d{3})/i],[s,[f,I],[u,y]],[/(moto 360)/i],[s,[f,z],[u,y]],[/(smartwatch 3)/i],[s,[f,R],[u,y]],[/(g watch r)/i],[s,[f,V],[u,y]],[/droid.+; (wt63?0{2,3})\)/i],[s,[f,P],[u,y]],[/droid.+; (glass) \d/i],[s,[f,H],[u,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,s,[u,y]],[/; (quest( \d| pro)?)/i],[s,[f,F],[u,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[u,w]],[/(aeobc)\b/i],[s,[f,b],[u,w]],[/(homepod).+mac os/i],[s,[f,E],[u,w]],[/windows iot/i],[[u,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[u,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,C]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[s,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,h],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[h,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,J,$],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,h],[/\(bb(10);/i],[h,[d,A]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[d,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[d,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,h],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var m=typeof n!==o&&n.navigator?n.navigator:r,v=e||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:r,w=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,b=m&&m.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.browser),e[c]=function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[h]),b&&m&&m.brave&&typeof m.brave.isBrave==i&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[p]=r,X.call(e,v,w.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[s]=r,e[u]=r,X.call(e,v,w.device),b&&!e[u]&&y&&y.mobile&&(e[u]=C),b&&"Macintosh"==e[s]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[s]="iPad",e[u]=g),e},this.getEngine=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.engine),e},this.getOS=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.os),b&&!e[d]&&y&&y.platform&&"Unknown"!=y.platform&&(e[d]=y.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===l&&e.length>500?Y(e,500):e,this},this.setUA(v),this};te.VERSION="0.7.41",te.BROWSER=Q([d,h,c]),te.CPU=Q([p]),te.DEVICE=Q([s,f,u,m,C,v,g,y,w]),te.ENGINE=te.OS=Q([d,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==o&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:UI)}(FI,FI.exports)),FI.exports}function WI(){if(Nz)return zz;Nz=1;var e=qI(),t="Unknown",n={"Mac OS":"Mac OS X"};var r,i=(new e).getResult(),o=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(i.browser.version),a={browserArchitecture:i.cpu.architecture||t,browserFullVersion:i.browser.version||t,browserMinorVersion:o.minor||t,browserName:i.browser.name||t,browserVersion:i.browser.major||t,deviceName:i.device.model||t,engineName:i.engine.name||t,engineVersion:i.engine.version||t,platformArchitecture:i.cpu.architecture||t,platformName:(r=i.os.name,n[r]||r||t),platformVersion:i.os.version||t,platformFullVersion:i.os.version||t};return zz=a}function QI(){if(Tz)return Iz;Tz=1;var e=tz(),t=/\./,n=/\|\|/,r=/\s+\-\s+/,i=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,o=/^(\d*)(.*)/;function a(t,i){var o=t.split(n);return o.length>1?o.some(function(e){return g.contains(e,i)}):function(t,n){var i=t.split(r);if(i.length>0&&i.length<=2||("production"!==process.env.NODE_ENV?e(!1,'the "-" operator expects exactly 2 operands'):e(!1)),1===i.length)return l(i[0],n);var o=i[0],a=i[1];return f(o)&&f(a)||("production"!==process.env.NODE_ENV?e(!1,'operands to the "-" operator must be simple (no modifiers)'):e(!1)),l(">="+o,n)&&l("<="+a,n)}(t=o[0].trim(),i)}function l(e,n){if(""===(e=e.trim()))return!0;var r=n.split(t),i=d(e),o=i.modifier,a=i.rangeComponents;switch(o){case"<":return c(r,a);case"<=":return function(e,t){var n=C(e,t);return-1===n||0===n}(r,a);case">=":return s(r,a);case">":return 1===C(r,a);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var i=r.length-1,o=parseInt(r[i],10);u(o)&&(r[i]=o+1+"");return s(e,n)&&c(e,r)}(r,a);default:return function(e,t){return 0===C(e,t)}(r,a)}}function c(e,t){return-1===C(e,t)}function s(e,t){var n=C(e,t);return 1===n||0===n}function d(n){var r=n.split(t),o=r[0].match(i);return o||("production"!==process.env.NODE_ENV?e(!1,"expected regex to match but it did not"):e(!1)),{modifier:o[1],rangeComponents:[o[2]].concat(r.slice(1))}}function u(e){return!isNaN(e)&&isFinite(e)}function f(e){return!d(e).modifier}function h(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function p(e,t){var n=e.match(o)[1],r=t.match(o)[1],i=parseInt(n,10),a=parseInt(r,10);return u(i)&&u(a)&&i!==a?m(i,a):m(e,t)}function m(t,n){return typeof t!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,'"a" and "b" must be of the same type'):e(!1)),t>n?1:t<n?-1:0}function C(e,t){for(var n=function(e,t){h(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var i=n;i<e.length;i++)e[i]="0"}return h(t,e.length),[e,t]}(e,t),r=n[0],i=n[1],o=0;o<i.length;o++){var a=p(r[o],i[o]);if(a)return a}return 0}var g={contains:function(e,t){return a(e.trim(),t.trim())}};return Iz=g}function GI(){if(Pz)return Bz;Pz=1;var e=WI(),t=QI(),n=function(){if(jz)return Dz;jz=1;var e=Object.prototype.hasOwnProperty;return Dz=function(t,n,r){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=n.call(r,t[o],o,t));return i},Dz}(),r=Rz?Zz:(Rz=1,Zz=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}});function i(e,n,r,i){if(e===r)return!0;if(!r.startsWith(e))return!1;var o=r.slice(e.length);return!!n&&(o=i?i(o):o,t.contains(o,n))}function o(t){return"Windows"===e.platformName?t.replace(/^\s*NT/,""):t}return Bz=n({isBrowser:function(t){return i(e.browserName,e.browserFullVersion,t)},isBrowserArchitecture:function(t){return i(e.browserArchitecture,null,t)},isDevice:function(t){return i(e.deviceName,null,t)},isEngine:function(t){return i(e.engineName,e.engineVersion,t)},isPlatform:function(t){return i(e.platformName,e.platformFullVersion,t,o)},isPlatformArchitecture:function(t){return i(e.platformArchitecture,null,t)}},r)}function KI(){if(Uz)return Fz;return Uz=1,Fz=function(e){return e&&e.ownerDocument?e.ownerDocument:document}}function YI(){if(Wz)return qz;return Wz=1,qz=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}}function XI(){if(Gz)return Qz;Gz=1;var e=YI();return Qz=function t(n){if(e(n)){var r=n,i=r.getAttribute("data-offset-key");if(i)return i;for(var o=0;o<r.childNodes.length;o++){var a=t(r.childNodes[o]);if(a)return a}}return null},Qz}function JI(){if(Yz)return Kz;Yz=1;var e=KI(),t=XI();return Kz=function(n){for(var r=n;r&&r!==e(n).documentElement;){var i=t(r);if(null!=i)return i;r=r.parentNode}return null},Kz}function $I(){if(Jz)return Xz;return Jz=1,Xz=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}}function eT(){if(nN)return tN;nN=1;var e="-";return tN={encode:function(t,n,r){return t+e+n+e+r},decode:function(t){var n=t.split(e).reverse(),r=n[0],i=n[1];return{blockKey:n.slice(2).reverse().join(e),decoratorKey:parseInt(i,10),leafKey:parseInt(r,10)}}}}function tT(){return iN?rN:(iN=1,rN={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105})}function nT(){return aN?oN:(aN=1,oN={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}})}function rT(){if(cN)return lN;return cN=1,lN=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}}function iT(){if(dN)return sN;dN=1;var e=tz(),t=rT();return sN=function(n){var r=n.editorContainer;return r||("production"!==process.env.NODE_ENV?e(!1,"Missing editorNode"):e(!1)),t(r.firstChild)||("production"!==process.env.NODE_ENV?e(!1,"editorNode.firstChild is not an HTMLElement"):e(!1)),r.firstChild}}function oT(){if(fN)return uN;fN=1;var e=eT(),t=Az();return uN=function(n,r,i,o,a){var l=t(n.getSelection());if(!r||!o)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var c=e.decode(r),s=c.blockKey,d=n.getBlockTree(s),u=d&&d.getIn([c.decoratorKey,"leaves",c.leafKey]),f=e.decode(o),h=f.blockKey,p=n.getBlockTree(h),m=p&&p.getIn([f.decoratorKey,"leaves",f.leafKey]);if(!u||!m)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var C=u.get("start"),g=m.get("start"),v=u?C+i:null,y=m?g+a:null;if(l.getAnchorKey()===s&&l.getAnchorOffset()===v&&l.getFocusKey()===h&&l.getFocusOffset()===y)return l;var w=!1;if(s===h){var b=u.get("end"),E=m.get("end");w=g===C&&E===b?a<i:g<C}else{var M=n.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===s||e===h}).first();w=M===h}return l.merge({anchorKey:s,anchorOffset:v,focusKey:h,focusOffset:y,isBackward:w})},uN}function aT(){if(pN)return hN;pN=1;var e=JI(),t=XI(),n=oT(),r=tz(),i=YI(),o=Az();function a(n,a,c){var s=a,d=e(s);(null!=d||n&&(n===s||n.firstChild===s)||("production"!==process.env.NODE_ENV?r(!1,"Unknown node in selection range."):r(!1)),n===s)&&(s=s.firstChild,i(s)||("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents node."):r(!1)),"true"!==(s=s).getAttribute("data-contents")&&("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents structure."):r(!1)),c>0&&(c=s.childNodes.length));if(0===c){var u=null;if(null!=d)u=d;else{var f=function(e){for(;e.firstChild&&(i(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||t(e.firstChild));)e=e.firstChild;return e}(s);u=o(t(f))}return{key:u,offset:0}}var h=s.childNodes[c-1],p=null,m=null;if(t(h)){var C=function(e){for(;e.lastChild&&(i(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||t(e.lastChild));)e=e.lastChild;return e}(h);p=o(t(C)),m=l(C)}else p=o(d),m=l(h);return{key:p,offset:m}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}return hN=function(t,r,i,l,c,s){var d=i.nodeType===Node.TEXT_NODE,u=c.nodeType===Node.TEXT_NODE;if(d&&u)return{selectionState:n(t,o(e(i)),l,o(e(c)),s),needsRecovery:!1};var f=null,h=null,p=!0;return d?(f={key:o(e(i)),offset:l},h=a(r,c,s)):u?(h={key:o(e(c)),offset:s},f=a(r,i,l)):(f=a(r,i,l),h=a(r,c,s),i===c&&l===s&&(p=!!i.firstChild&&"BR"!==i.firstChild.nodeName)),{selectionState:n(t,f.key,f.offset,h.key,h.offset),needsRecovery:p}}}function lT(){if(CN)return mN;CN=1;var e=aT();return mN=function(t,n){var r=n.ownerDocument.defaultView.getSelection(),i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,l=r.focusOffset;return 0===r.rangeCount||null==i||null==a?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:e(t,n,i,o,a,l)}}function cT(){if(vN)return gN;vN=1;var e=nT(),t=kz(),n=iT(),r=lT();return gN=function(i){if(i._blockSelectEvents||i._latestEditorState!==i.props.editorState){if(i._blockSelectEvents){var o=i.props.editorState.getSelection();e.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(o.toJS())})}}else{var a=i.props.editorState,l=r(a,n(i)),c=l.selectionState;c!==a.getSelection()&&(a=l.needsRecovery?t.forceSelection(a,c):t.acceptSelection(a,c),i.update(a))}}}function sT(){if(wN)return yN;return wN=1,yN={notEmptyKey:function(e){return null!=e&&""!=e}},yN}function dT(){if(EN)return bN;EN=1;var e=sT().notEmptyKey;function t(t,n){return e(n)&&"MUTABLE"===t.__get(n).getMutability()?n:null}return bN=function(e,n){var r;if(n.isCollapsed()){var i=n.getAnchorKey(),o=n.getAnchorOffset();return o>0?(r=e.getBlockForKey(i).getEntityAt(o-1))!==e.getBlockForKey(i).getEntityAt(o)?null:t(e.getEntityMap(),r):null}var a=n.getStartKey(),l=n.getStartOffset(),c=e.getBlockForKey(a);return r=l===c.getLength()?null:c.getEntityAt(l),t(e.getEntityMap(),r)},bN}function uT(){if(AN)return MN;AN=1;var e=function(){if(eN)return $z;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}eN=1;var t=GI(),n=JI(),r=$I(),i=GO(),o=tz(),a=Az(),l=i.Map,c={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},s=t.isBrowser("IE <= 11"),d=function(){function t(t){var n=this;e(this,"observer",void 0),e(this,"container",void 0),e(this,"mutations",void 0),e(this,"onCharData",void 0),this.container=t,this.mutations=l();var i=r(t);i.MutationObserver&&!s?this.observer=new i.MutationObserver(function(e){return n.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||("production"!==process.env.NODE_ENV?o(!1,"Expected target to be an instance of Node"):o(!1)),n.registerMutation({type:"characterData",target:e.target})}}var i=t.prototype;return i.start=function(){this.observer?this.observer.observe(this.container,c):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},i.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=l(),t},i.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},i.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return s?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},i.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var r=a(n(e.target));this.mutations=this.mutations.set(r,t)}},t}();return $z=d}(),t=hz(),n=eT(),r=kz(),i=tT(),o=GI(),a=cT(),l=iT(),c=lT(),s=dT(),d=Az(),u=o.isBrowser("IE"),f=!1,h=!1,p=null;var m={onCompositionStart:function(t){h=!0,function(t){p||(p=new e(l(t))).start()}(t)},onCompositionEnd:function(e){f=!1,h=!1,setTimeout(function(){f||m.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){if(!h)return m.resolveComposition(e),void e._onKeyDown(t);t.which!==i.RIGHT&&t.which!==i.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===i.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!h){var i=d(p).stopAndFlushMutations();p=null,f=!0;var o=r.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),i.size){var a=o.getCurrentContent();i.forEach(function(e,i){var l=n.decode(i),c=l.blockKey,d=l.decoratorKey,u=l.leafKey,f=o.getBlockTree(c).getIn([d,"leaves",u]),h=f.start,p=f.end,m=o.getSelection().merge({anchorKey:c,focusKey:c,anchorOffset:h,focusOffset:p,isBackward:!1}),C=s(a,m),g=a.getBlockForKey(c).getInlineStyleAt(h);a=t.replaceText(a,m,e,g,C),o=r.set(o,{currentContent:a})});var m=c(o,l(e)).selectionState;e.restoreEditorDOM();var C=u?r.forceSelection(o,m):r.acceptSelection(o,m);e.update(r.push(C,a,"insert-characters"))}else e.update(o)}}};return MN=m}function fT(){if(kN)return xN;kN=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=eT(),r=i,o=Mz(),a=Ez(),l=function(e){var i,l;function c(){return e.apply(this,arguments)||this}return l=e,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,c.prototype.render=function(){var e=this.props,i=e.block,l=e.children,c=e.contentState,s=e.decorator,d=e.decoratorKey,u=e.direction,f=e.leafSet,h=e.text,p=i.getKey(),m=f.get("leaves"),C=s.getComponentForKey(d),g=s.getPropsForKey(d),v=n.encode(p,parseInt(d,10),0),y=h.slice(m.first().get("start"),m.last().get("end")),w=a.getHTMLDirIfDifferent(o.getDirection(y),u);return r.createElement(C,t({},g,{contentState:c,decoratedText:y,dir:w,key:v,entityKey:i.getEntityAt(f.get("start")),offsetKey:v}),l)},c}(r.Component);return xN=l}function hT(){if(HN)return LN;function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HN=1;var n=i,r=GI(),o=tz(),a=YI(),l=r.isBrowser("IE <= 11");var c=function(r){var i,c;function s(n){var i;return t(e(i=r.call(this,n)||this),"_forceFlag",void 0),t(e(i),"_node",void 0),i._forceFlag=!1,i}c=r,(i=s).prototype=Object.create(c.prototype),i.prototype.constructor=i,i.__proto__=c;var d=s.prototype;return d.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;a(t)||("production"!==process.env.NODE_ENV?o(!1,"node is not an Element"):o(!1));var r=t;return n?!function(e){return l?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},d.componentDidMount=function(){this._forceFlag=!this._forceFlag},d.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},d.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},l?n.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"A","data-text":"true",ref:e})):function(e){return l?n.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"B","data-text":"true",ref:e})}(function(e){return t._node=e}):n.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},s}(n.Component);return LN=c}function pT(){if(SN)return _N;SN=1;var e=YI();return _N=function(t){return!(!t||!t.ownerDocument)&&(e(t)&&"BR"===t.nodeName)}}function mT(){return ON?VN:(ON=1,VN={initODS:function(){},handleExtensionCausedError:function(){}})}function CT(){if(TN)return IN;TN=1;var e=NN?zN:(NN=1,zN=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))});return IN=function(t){return e(t)&&3==t.nodeType}}function gT(){if(jN)return DN;jN=1;var e=CT();return DN=function t(n,r){return!(!n||!r)&&(n===r||!e(n)&&(e(r)?t(n,r.parentNode):"contains"in n?n.contains(r):!!n.compareDocumentPosition&&!!(16&n.compareDocumentPosition(r))))},DN}function vT(){if(RN)return ZN;return RN=1,ZN=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}}function yT(){if(PN)return BN;PN=1;var e=mT(),t=nT(),n=GI(),r=gT(),i=vT(),o=KI(),a=tz(),l=YI(),c=n.isBrowser("IE");function s(e,t){if(!e)return"[empty]";var n=d(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(l(n)||("production"!==process.env.NODE_ENV?a(!1,"Node must be an Element if it is not a text node."):a(!1)),n.outerHTML)}function d(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return o(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var i=e.cloneNode();1===i.nodeType&&n.length&&i.setAttribute("data-labels",n.join(", "));for(var a=e.childNodes,l=0;l<a.length;l++)i.appendChild(d(a[l],t));return i}function u(e,t){for(var n=e,r=n;n;){if(l(n)&&r.hasAttribute("contenteditable"))return s(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function f(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function h(e,n,o,a){var l=i();if(e.extend&&null!=n&&r(l,n)){o>f(n)&&t.logSelectionStateFailure({anonymizedDom:u(n),extraParams:JSON.stringify({offset:o}),selectionState:JSON.stringify(a.toJS())});var c=n===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(n,o)}catch(r){throw t.logSelectionStateFailure({anonymizedDom:u(n,function(t){var n=[];return t===l&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n}),extraParams:JSON.stringify({activeElementName:l?l.nodeName:null,nodeIsFocus:n===e.focusNode,nodeWasFocus:c,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:r?""+r:null,offset:o},null,2),selectionState:JSON.stringify(a.toJS(),null,2)}),r}}else if(n&&e.rangeCount>0){var s=e.getRangeAt(0);s.setEnd(n,o),e.addRange(s.cloneRange())}}function p(n,r,i,a){var l=o(r).createRange();if(i>f(r)&&(t.logSelectionStateFailure({anonymizedDom:u(r),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(a.toJS())}),e.handleExtensionCausedError()),l.setStart(r,i),c)try{n.addRange(l)}catch(e){"production"!==process.env.NODE_ENV&&console.warn("Call to selection.addRange() threw exception: ",e)}else n.addRange(l)}return BN={setDraftEditorSelection:function(e,t,n,i,a){var l=o(t);if(r(l.documentElement,t)){var c=l.defaultView.getSelection(),s=e.getAnchorKey(),d=e.getAnchorOffset(),u=e.getFocusKey(),f=e.getFocusOffset(),m=e.getIsBackward();if(!c.extend&&m){var C=s,g=d;s=u,d=f,u=C,f=g,m=!1}var v=s===n&&i<=d&&a>=d,y=u===n&&i<=f&&a>=f;if(v&&y)return c.removeAllRanges(),p(c,t,d-i,e),void h(c,t,f-i,e);if(m){if(y&&(c.removeAllRanges(),p(c,t,f-i,e)),v){var w=c.focusNode,b=c.focusOffset;c.removeAllRanges(),p(c,t,d-i,e),h(c,w,b,e)}}else v&&(c.removeAllRanges(),p(c,t,d-i,e)),y&&h(c,t,f-i,e)}},addFocusToSelection:h}}function wT(){if(UN)return FN;UN=1;var e=vh();var t=hT(),n=i,r=tz(),o=pT(),a=yT().setDraftEditorSelection,l=function(i){var l,c;function s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=i.call.apply(i,[this].concat(n))||this),"leaf",void 0),e}c=i,(l=s).prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c;var d=s.prototype;return d._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,i=t.start,l=t.text,c=n.getKey(),s=i+l.length;if(e.hasEdgeWithin(c,i,s)){var d=this.leaf;d||("production"!==process.env.NODE_ENV?r(!1,"Missing node"):r(!1));var u,f=d.firstChild;f||("production"!==process.env.NODE_ENV?r(!1,"Missing child"):r(!1)),f.nodeType===Node.TEXT_NODE?u=f:o(f)?u=d:(u=f.firstChild)||("production"!==process.env.NODE_ENV?r(!1,"Missing targetNode"):r(!1)),a(e,u,c,i,s)}}},d.shouldComponentUpdate=function(e){var t=this.leaf;return t||("production"!==process.env.NODE_ENV?r(!1,"Missing leafNode"):r(!1)),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},d.componentDidUpdate=function(){this._setSelection()},d.componentDidMount=function(){this._setSelection()},d.render=function(){var r=this,i=this.props.block,o=this.props.text;o.endsWith("\n")&&this.props.isLast&&(o+="\n");var a=this.props,l=a.customStyleMap,c=a.customStyleFn,s=a.offsetKey,d=a.styleSet,u=d.reduce(function(t,n){var r={},i=l[n];return void 0!==i&&t.textDecoration!==i.textDecoration&&(r.textDecoration=[t.textDecoration,i.textDecoration].join(" ").trim()),e(t,i,r)},{});if(c){var f=c(d,i);u=e(u,f)}return n.createElement("span",{"data-offset-key":s,ref:function(e){return r.leaf=e},style:u},n.createElement(t,null,o))},s}(n.Component);return FN=l}function bT(){if(WN)return qN;WN=1;var e=fT(),t=wT(),n=eT(),r=GO(),o=i,a=_z();r.List;var l=function(r){var i,l;function c(){return r.apply(this,arguments)||this}return l=r,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,c.prototype.render=function(){var r=this.props,i=r.block,l=r.contentState,c=r.customStyleFn,s=r.customStyleMap,d=r.decorator,u=r.direction,f=r.forceSelection,h=r.hasSelection,p=r.selection,m=r.tree,C=i.getKey(),g=i.getText(),v=m.size-1,y=this.props.children||m.map(function(r,a){var m=r.get("decoratorKey"),y=r.get("leaves"),w=y.size-1,b=y.map(function(e,r){var l=n.encode(C,a,r),d=e.get("start"),u=e.get("end");return o.createElement(t,{key:l,offsetKey:l,block:i,start:d,selection:h?p:null,forceSelection:f,text:g.slice(d,u),styleSet:i.getInlineStyleAt(d),customStyleMap:s,customStyleFn:c,isLast:m===v&&r===w})}).toArray();return m&&d?o.createElement(e,{block:i,children:b,contentState:l,decorator:d,decoratorKey:m,direction:u,leafSet:r,text:g,key:a}):b}).toArray();return o.createElement("div",{"data-offset-key":n.encode(C,0,0),className:a({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===u,"public/DraftStyleDefault/rtl":"RTL"===u})},y)},c}(o.Component);return qN=l}function ET(){if(GN)return QN;function e(e,t){return!!t&&(e===t.documentElement||e===t.body)}return GN=1,QN={getTop:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollTop||n.documentElement.scrollTop:t.scrollTop},setTop:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollTop=r.documentElement.scrollTop=n:t.scrollTop=n},getLeft:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollLeft||n.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollLeft=r.documentElement.scrollLeft=n:t.scrollLeft=n}}}function MT(){if(eI)return $N;eI=1;var e=function(){if(YN)return KN;YN=1;var e=/-(.)/g;return KN=function(t){return t.replace(e,function(e,t){return t.toUpperCase()})}}(),t=function(){if(JN)return XN;JN=1;var e=/([A-Z])/g;return XN=function(t){return t.replace(e,"-$1").toLowerCase()}}();function n(e){return null==e?e:String(e)}return $N=function(r,i){var o;if(window.getComputedStyle&&(o=window.getComputedStyle(r,null)))return n(o.getPropertyValue(t(i)));if(document.defaultView&&document.defaultView.getComputedStyle){if(o=document.defaultView.getComputedStyle(r,null))return n(o.getPropertyValue(t(i)));if("display"===i)return"none"}return r.currentStyle?n("float"===i?r.currentStyle.cssFloat||r.currentStyle.styleFloat:r.currentStyle[e(i)]):n(r.style&&r.style[e(i)])}}function AT(){if(nI)return tI;function e(e,n){var r=t.get(e,n);return"auto"===r||"scroll"===r}nI=1;var t={get:MT(),getScrollParent:function(t){if(!t)return null;for(var n=t.ownerDocument;t&&t!==n.body;){if(e(t,"overflow")||e(t,"overflowY")||e(t,"overflowX"))return t;t=t.parentNode}return n.defaultView||n.parentWindow}};return tI=t}function xT(){if(aI)return oI;aI=1;var e=function(){if(iI)return rI;iI=1;var e=gT();return rI=function(t){var n=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!e(n,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-n.clientLeft,right:Math.round(r.right)-n.clientLeft,top:Math.round(r.top)-n.clientTop,bottom:Math.round(r.bottom)-n.clientTop}}}();return oI=function(t){var n=e(t);return{x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top}}}function kT(){if(fI)return uI;fI=1;var e=function(){if(cI)return lI;cI=1;var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;return lI=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}}(),t=dI?sI:(dI=1,sI=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}});return uI=function(n){var r=e(n.ownerDocument||n.document);n.Window&&n instanceof n.Window&&(n=r);var i=t(n),o=n===r?n.ownerDocument.documentElement:n,a=n.scrollWidth-o.clientWidth,l=n.scrollHeight-o.clientHeight;return i.x=Math.max(0,Math.min(i.x,a)),i.y=Math.max(0,Math.min(i.y,l)),i}}function LT(){if(pI)return hI;function e(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function t(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||t()}}return pI=1,n.withoutScrollbars=function(){return{width:e(),height:t()}},hI=n}function HT(){if(CI)return mI;CI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=bT(),a=eT(),l=i,c=ET(),s=AT(),d=xT(),u=kT(),f=LT(),h=GO(),p=tz(),m=rT();h.List;var C=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},g=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},y=function(e,t,r,i,o,a){var l={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},c=i(e);return c&&(l.className=c),void 0!==o.customEditable&&(l=n({},l,{contentEditable:o.customEditable,suppressContentEditableWarning:!0})),l},w=function(e){var i,h;function w(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(i))||this),"wrapperRef",l.createRef()),t}h=e,(i=w).prototype=Object.create(h.prototype),i.prototype.constructor=i,i.__proto__=h;var b=w.prototype;return b.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,i=t.tree,o=!n.getChildKeys().isEmpty(),a=n!==e.block||i!==e.tree||r!==e.direction||C(e.selection,e.block.getKey())&&e.forceSelection;return o||a},b.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,i=s.getScrollParent(n),o=u(i);if(i===window){var a=d(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{m(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1));var l=n;(r=l.offsetHeight+l.offsetTop-(i.offsetHeight+o.y))>0&&c.setTop(i,c.getTop(i)+r+10)}}}},b.render=function(){var e=this,r=this.props,i=r.block,c=r.blockRenderMap,s=r.blockRendererFn,d=r.blockStyleFn,u=r.contentState,f=r.decorator,h=r.editorKey,p=r.editorState,m=r.customStyleFn,b=r.customStyleMap,E=r.direction,M=r.forceSelection,A=r.selection,x=r.tree,k=null;i.children.size&&(k=i.children.reduce(function(t,r){var i=a.encode(r,0,0),o=u.getBlockForKey(r),f=v(o,s),m=f.CustomComponent||w,C=g(o,c),b=C.Element,E=C.wrapperTemplate,M=y(o,h,i,d,f,null),A=n({},e.props,{tree:p.getBlockTree(r),blockProps:f.customProps,offsetKey:i,block:o});return t.push(l.createElement(b,M,l.createElement(m,A))),!E||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(o,u)||function(e,t,n){var r=[],i=!0,o=!1,c=void 0;try{for(var s,d=n.reverse()[Symbol.iterator]();!(i=(s=d.next()).done);i=!0){var u=s.value;if(u.type!==t)break;r.push(u)}}catch(e){o=!0,c=e}finally{try{i||null==d.return||d.return()}finally{if(o)throw c}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),h=f[0].key;n.push(l.cloneElement(e,{key:"".concat(h,"-wrap"),"data-offset-key":a.encode(h,0,0)},f))}(E,b,t),t},[]));var L=i.getKey(),H=a.encode(L,0,0),_=v(i,s),S=_.CustomComponent,V=null!=S?l.createElement(S,t({},this.props,{tree:p.getBlockTree(L),blockProps:_.customProps,offsetKey:H,block:i})):l.createElement(o,{block:i,children:k,contentState:u,customStyleFn:m,customStyleMap:b,decorator:f,direction:E,forceSelection:M,hasSelection:C(A,L),selection:A,tree:x});if(i.getParentKey())return V;var O=g(i,c).Element,z=y(i,h,H,d,_,this.wrapperRef);return l.createElement(O,z,V)},w}(l.Component);return mI=w}function _T(){if(vI)return gI;vI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=HT(),r=eT(),o=i,a=Az(),l=function(e){var i,l;function c(){return e.apply(this,arguments)||this}l=e,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var s=c.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),c=t.getDecorator(),s=n.getDecorator();return i!==o||a!==l||c!==s||n.mustForceSelection()},s.render=function(){for(var e=this.props,i=e.blockRenderMap,l=e.blockRendererFn,c=e.blockStyleFn,s=e.customStyleMap,d=e.customStyleFn,u=e.editorState,f=e.editorKey,h=e.textDirectionality,p=u.getCurrentContent(),m=u.getSelection(),C=u.mustForceSelection(),g=u.getDecorator(),v=a(u.getDirectionMap()),y=[],w=p.getBlocksAsArray()[0];w;){var b=w.getKey(),E={blockRenderMap:i,blockRendererFn:l,blockStyleFn:c,contentState:p,customStyleFn:d,customStyleMap:s,decorator:g,editorKey:f,editorState:u,forceSelection:C,selection:m,block:w,direction:h||v.get(b),tree:u.getBlockTree(b)},M=(i.get(w.getType())||i.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:b},E)),wrapperTemplate:M,key:b,offsetKey:r.encode(b,0,0)});var A=w.getNextSiblingKey();w=A?p.getBlockForKey(A):null}for(var x=[],k=0;k<y.length;){var L=y[k];if(L.wrapperTemplate){var H=[];do{H.push(y[k].block),k++}while(k<y.length&&y[k].wrapperTemplate===L.wrapperTemplate);var _=o.cloneElement(L.wrapperTemplate,{key:L.key+"-wrap","data-offset-key":L.offsetKey},H);x.push(_)}else x.push(L.block),k++}return o.createElement("div",{"data-contents":"true"},x)},c}(o.Component);return gI=l}function ST(){if(wI)return yI;wI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=wT(),r=eT(),o=i,a=ET(),l=AT(),c=Mz(),s=Ez(),d=_z(),u=xT(),f=kT(),h=LT(),p=tz(),m=rT(),C=Az(),g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},v=function(e){var i,v;function y(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}v=e,(i=y).prototype=Object.create(v.prototype),i.prototype.constructor=i,i.__proto__=v;var w=y.prototype;return w.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection},w.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,i=l.getScrollParent(n),o=f(i);if(i===window){var c=u(n);(r=c.y+c.height-h().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{m(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1)),(r=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&a.setTop(i,a.getTop(i)+r+10)}}}}},w._renderChildren=function(){var e=this,i=this.props.block,a=i.getKey(),l=i.getText(),d=this.props.tree.size-1,u=g(this.props.selection,a);return this.props.tree.map(function(f,h){var p=f.get("leaves");if(0===p.size)return null;var m=p.size-1,g=p.map(function(t,c){var s=r.encode(a,h,c),f=t.get("start"),p=t.get("end");return o.createElement(n,{key:s,offsetKey:s,block:i,start:f,selection:u?e.props.selection:null,forceSelection:e.props.forceSelection,text:l.slice(f,p),styleSet:i.getInlineStyleAt(f),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:h===d&&c===m})}).toArray(),v=f.get("decoratorKey");if(null==v)return g;if(!e.props.decorator)return g;var y=C(e.props.decorator),w=y.getComponentForKey(v);if(!w)return g;var b=y.getPropsForKey(v),E=r.encode(a,h,0),M=p.first().get("start"),A=p.last().get("end"),x=l.slice(M,A),k=i.getEntityAt(f.get("start")),L=s.getHTMLDirIfDifferent(c.getDirection(x),e.props.direction),H={contentState:e.props.contentState,decoratedText:x,dir:L,start:M,end:A,blockKey:a,entityKey:k,offsetKey:E};return o.createElement(w,t({},b,H,{key:E}),g)}).toArray()},w.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,i=d({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return o.createElement("div",{"data-offset-key":r,className:i,ref:function(t){return e._node=t}},this._renderChildren())},y}(o.Component);return yI=v}function VT(){if(AI)return MI;AI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=ST(),a=eT(),l=i,c=_z(),s=(EI||(EI=1,bI=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var i=arguments[r];i&&(t=(t?t+" ":"")+i)}return t}),bI),d=Az(),u=function(e,t,n,r){return c({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){var r,i;function c(){return e.apply(this,arguments)||this}i=e,(r=c).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var f=c.prototype;return f.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),c=t.getDecorator(),s=n.getDecorator();return i!==o||a!==l||c!==s||n.mustForceSelection()},f.render=function(){for(var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,c=e.blockStyleFn,f=e.customStyleMap,h=e.customStyleFn,p=e.editorState,m=e.editorKey,C=e.preventScroll,g=e.textDirectionality,v=p.getCurrentContent(),y=p.getSelection(),w=p.mustForceSelection(),b=p.getDecorator(),E=d(p.getDirectionMap()),M=v.getBlocksAsArray(),A=[],x=null,k=null,L=0;L<M.length;L++){var H=M[L],_=H.getKey(),S=H.getType(),V=i(H),O=void 0,z=void 0,N=void 0;V&&(O=V.component,z=V.props,N=V.editable);var I=g||E.get(_),T=a.encode(_,0,0),D={contentState:v,block:H,blockProps:z,blockStyleFn:c,customStyleMap:f,customStyleFn:h,decorator:b,direction:I,forceSelection:w,offsetKey:T,preventScroll:C,selection:y,tree:p.getBlockTree(_)},j=r.get(S)||r.get("unstyled"),Z=j.wrapper,R=j.element||r.get("unstyled").element,B=H.getDepth(),P="";if(c&&(P=c(H)),"li"===R)P=s(P,u(S,B,k!==Z||null===x||B>x,I));var F=O||o,U={className:P,"data-block":!0,"data-editor":m,"data-offset-key":T,key:_};void 0!==N&&(U=n({},U,{contentEditable:N,suppressContentEditableWarning:!0}));var q=l.createElement(R,U,l.createElement(F,t({},D,{key:_})));A.push({block:q,wrapperTemplate:Z,key:_,offsetKey:T}),x=Z?H.getDepth():null,k=Z}for(var W=[],Q=0;Q<A.length;){var G=A[Q];if(G.wrapperTemplate){var K=[];do{K.push(A[Q].block),Q++}while(Q<A.length&&A[Q].wrapperTemplate===G.wrapperTemplate);var Y=l.cloneElement(G.wrapperTemplate,{key:G.key+"-wrap","data-offset-key":G.offsetKey},K);W.push(Y)}else W.push(G.block),Q++}return l.createElement("div",{"data-contents":"true"},W)},c}(l.Component);return MI=f}function OT(){if(SI)return _I;SI=1;var e=tz();return _I=function(t){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(t)?Array.isArray(t)?t.slice():function(t){var n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Array-like object expected"):e(!1)),"number"!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object needs a length property"):e(!1)),0===n||n-1 in t||("production"!==process.env.NODE_ENV?e(!1,"toArray: Object should have keys for indices"):e(!1)),"function"==typeof t.callee&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object can't be `arguments`. Use rest params (function(...args) {}) or Array.from() instead."):e(!1)),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r=Array(n),i=0;i<n;i++)r[i]=t[i];return r}(t):[t]}}function zT(){if(OI)return VI;function e(e){return function(){return e}}OI=1;var t=function(){};return t.thatReturns=e,t.thatReturnsFalse=e(!1),t.thatReturnsTrue=e(!0),t.thatReturnsNull=e(null),t.thatReturnsThis=function(){return this},t.thatReturnsArgument=function(e){return e},VI=t}function NT(){if(NI)return zI;NI=1;var e=function(){if(HI)return LI;HI=1;var e={isImage:function(e){return"image"===t(e)[0]},isJpeg:function(n){var r=t(n);return e.isImage(n)&&("jpeg"===r[1]||"pjpeg"===r[1])}};function t(e){return e.split("/")}return LI=e}(),t=OT(),n=zT(),r=new RegExp("\r\n","g"),i={"text/rtf":1,"text/html":1};function o(e){if("file"==e.kind)return e.getAsFile()}return zI=function(){function a(e){this.data=e,this.types=e.types?t(e.types):[]}var l=a.prototype;return l.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return i[e]})},l.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(r,"\n"):null},l.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},l.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},l.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},l.isImage=function(){var t=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(t)return!0;for(var n=this.getFiles(),r=0;r<n.length;r++){var i=n[r].type;if(!e.isImage(i))return!1}return!0},l.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},l.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(o).filter(n.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},l.hasFiles=function(){return this.getFiles().length>0},a}()}function IT(){if(TI)return II;TI=1;var e=tz(),t=/\.textClipping$/,n={"text/plain":!0,"text/html":!0,"text/rtf":!0};return II=function(r,i){var o=0,a=[];r.forEach(function(l){!function(r,i){if(!L.FileReader||r.type&&!(r.type in n))return void i("");if(""===r.type){var o="";return t.test(r.name)&&(o=r.name.replace(t,"")),void i(o)}var a=new FileReader;a.onload=function(){var t=a.result;"string"!=typeof t&&("production"!==process.env.NODE_ENV?e(!1,'We should be calling "FileReader.readAsText" which returns a string'):e(!1)),i(t)},a.onerror=function(){i("")},a.readAsText(r)}(l,function(e){o++,e&&a.push(e.slice(0,5e3)),o==r.length&&i(a.join("\r"))})})},II}function TT(){if(jI)return DI;return jI=1,DI=function(e){return"handled"===e||!0===e}}function DT(){if(RI)return ZI;RI=1;var e=NT(),t=hz(),n=kz(),r=JI(),i=KI(),o=IT(),a=oT(),l=$I(),c=TT(),s=Az();var d={onDragEnd:function(e){e.exitCurrentMode(),u(e)},onDrop:function(l,d){var h=new e(d.nativeEvent.dataTransfer),p=l._latestEditorState,m=function(e,t){var n=null,o=null,l=i(e.currentTarget);if("function"==typeof l.caretRangeFromPoint){var c=l.caretRangeFromPoint(e.x,e.y);n=c.startContainer,o=c.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,o=e.rangeOffset}n=s(n),o=s(o);var d=s(r(n));return a(t,d,o,d,o)}(d.nativeEvent,p);if(d.preventDefault(),l._dragCount=0,l.exitCurrentMode(),null!=m){var C=h.getFiles();if(C.length>0){if(l.props.handleDroppedFiles&&c(l.props.handleDroppedFiles(m,C)))return;o(C,function(e){e&&l.update(f(p,m,e))})}else{var g=l._internalDrag?"internal":"external";l.props.handleDrop&&c(l.props.handleDrop(m,h,g))||(l._internalDrag?l.update(function(e,r){var i=t.moveText(e.getCurrentContent(),e.getSelection(),r);return n.push(e,i,"insert-fragment")}(p,m)):l.update(f(p,m,h.getText()))),u(l)}}}};function u(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function f(e,r,i){var o=t.insertText(e.getCurrentContent(),r,i,e.getCurrentInlineStyle());return n.push(e,o,"insert-fragment")}return ZI=d}var jT,ZT,RT,BT,PT,FT,UT,qT,WT,QT,GT,KT,YT,XT,JT,$T,eD,tD,nD,rD,iD,oD,aD,lD,cD,sD,dD,uD,fD,hD,pD,mD,CD,gD,vD,yD,wD,bD,ED,MD,AD,xD,kD,LD,HD,_D,SD,VD,OD,zD,ND,ID,TD,DD,jD,ZD,RD,BD,PD,FD,UD,qD,WD,QD,GD,KD,YD,XD,JD,$D,ej,tj,nj,rj,ij,oj,aj,lj,cj,sj,dj,uj,fj,hj,pj,mj,Cj,gj,vj,yj,wj,bj,Ej,Mj,Aj,xj,kj,Lj,Hj,_j,Sj,Vj={};function Oj(){return RT?ZT:(RT=1,jT||(jT=1,function(e){if(!e.setImmediate){var t,n,r,i,o=1,a={},l=!1,c=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?t=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()+"$",i=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&u(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),t=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},t=function(e){n.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?function(){var e=c.documentElement;t=function(t){var n=c.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(u,0,e)},s.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];var i={callback:e,args:n};return a[o]=i,t(o),o++},s.clearImmediate=d}function d(e){delete a[e]}function u(e){if(l)setTimeout(u,0,e);else{var t=a[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===L?Vj:L:self)),ZT=L.setImmediate)}function zj(){if(PT)return BT;PT=1;var e=hz(),t=kz(),n=GI(),r=dT(),i=TT(),o=PI?BI:(PI=1,BI=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),i=t.getStartOffset(),o=!1;return r.some(function(e){return i===e.get("start")?(o=!0,!0):i<e.get("end")&&e.get("leaves").some(function(e){var t=e.get("start");return i===t&&(o=!0,!0)})}),o}),a=Az(),l=Oj(),c=n.isBrowser("Firefox");function s(n,r,i,o,a){var l=e.replaceText(n.getCurrentContent(),n.getSelection(),r,i,o);return t.push(n,l,"insert-characters",a)}return BT=function(e,n){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var d=e._latestEditorState,u=n.data;if(u)if(e.props.handleBeforeInput&&i(e.props.handleBeforeInput(u,d,n.timeStamp)))n.preventDefault();else{var f=d.getSelection(),h=f.getStartOffset(),p=f.getAnchorKey();if(!f.isCollapsed())return n.preventDefault(),void e.update(s(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!0));var m,C=s(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!1),g=!1;if(g||(g=o(e._latestCommittedEditorState)),!g){var v=d.getBlockTree(p),y=C.getBlockTree(p);g=v.size!==y.size||v.zip(y).some(function(e){var t=e[0],n=e[1],r=t.get("start"),i=r+(r>=h?u.length:0),o=t.get("end"),a=o+(o>=h?u.length:0),l=n.get("start"),c=n.get("end"),s=n.get("decoratorKey");return t.get("decoratorKey")!==s||t.get("leaves").size!==n.get("leaves").size||i!==l||a!==c||null!=s&&c-l!==o-r})}if(g||(m=u,g=c&&("'"==m||"/"==m)),g||(g=a(C.getDirectionMap()).get(p)!==a(d.getDirectionMap()).get(p)),g)return n.preventDefault(),C=t.set(C,{forceSelection:!0}),void e.update(C);C=t.set(C,{nativelyRenderedContent:C.getCurrentContent()}),e._pendingStateFromBeforeInput=C,l(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)})}},BT}function Nj(){if(GT)return QT;GT=1;var e=az();return QT=function(t){var n=t.getSelection();return n.isCollapsed()?null:e(t.getCurrentContent(),n)}}function Ij(){if(eD)return $T;eD=1;var e=hz(),t=kz(),n=AT(),r=Nj(),i=kT(),o=JT?XT:(JT=1,XT=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1});return $T=function(a,l){var c,s=a._latestEditorState,d=s.getSelection(),u=l.target;if(d.isCollapsed())l.preventDefault();else{if(o(u)){var f=u;c=i(n.getScrollParent(f))}var h=r(s);a.setClipboard(h),a.setMode("cut"),setTimeout(function(){a.restoreEditorDOM(c),a.exitCurrentMode(),a.update(function(n){var r=e.removeRange(n.getCurrentContent(),n.getSelection(),"forward");return t.push(n,r,"remove-range")}(s))},0)}},$T}function Tj(){if(cD)return lD;cD=1;var e=tz(),t=/[\uD800-\uDFFF]/;function n(e){return 55296<=e&&e<=57343}function r(e){return t.test(e)}function i(e,t){return 1+n(e.charCodeAt(t))}function o(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!r(e))return e.substr(t,n);var o=e.length;if(o<=0||t>o||n<=0)return"";var a=0;if(t>0){for(;t>0&&a<o;t--)a+=i(e,a);if(a>=o)return""}else if(t<0){for(a=o;t<0&&0<a;t++)a-=i(e,a-1);a<0&&(a=0)}var l=o;if(n<o)for(l=a;n>0&&l<o;n--)l+=i(e,l);return e.substring(a,l)}var a={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=i(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:i,hasSurrogateUnit:r,isCodeUnitInSurrogateRange:n,isSurrogatePair:function(t,n){if(0<=n&&n<t.length||("production"!==process.env.NODE_ENV?e(!1,"isSurrogatePair: Invalid index %s for string length %s.",n,t.length):e(!1)),n+1===t.length)return!1;var r=t.charCodeAt(n),i=t.charCodeAt(n+1);return 55296<=r&&r<=56319&&56320<=i&&i<=57343},strlen:function(e){if(!r(e))return e.length;for(var t=0,n=0;n<e.length;n+=i(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return o(e,t=t<n?t:n,r)},substr:o};return lD=a}function Dj(){if(dD)return sD;dD=1;var e=zT();function t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}}var n="production"!==process.env.NODE_ENV?function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.apply(void 0,[n].concat(i))}}:e;return sD=n}function jj(){if(fD)return uD;fD=1;var e=Dj();return uD=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionBackward should only be called with a collapsed SelectionState");var i=t.getCurrentContent(),o=r.getStartKey(),a=r.getStartOffset(),l=o,c=0;if(n>a){var s=i.getKeyBefore(o);if(null==s)l=o;else l=s,c=i.getBlockForKey(s).getText().length}else c=a-n;return r.merge({focusKey:l,focusOffset:c,isBackward:!0})},uD}function Zj(){if(pD)return hD;pD=1;var e=hz(),t=yz()("draft_tree_data_support");return hD=function(n,r,i){var o=n.getSelection(),a=n.getCurrentContent(),l=o,c=o.getAnchorKey(),s=o.getFocusKey(),d=a.getBlockForKey(c);if(t&&"forward"===i&&c!==s)return a;if(o.isCollapsed()){if("forward"===i){if(n.isSelectionAtEndOfContent())return a;if(t)if(o.getAnchorOffset()===a.getBlockForKey(c).getLength()){var u=a.getBlockForKey(d.nextSibling);if(!u||0===u.getLength())return a}}else if(n.isSelectionAtStartOfContent())return a;if((l=r(n))===o)return a}return e.removeRange(a,l,i)}}function Rj(){if(CD)return mD;CD=1;var e=kz(),t=Tj(),n=jj(),r=Zj();return mD=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a-1];return n(e,l?t.getUTF16Length(l,0):1)},"backward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"backspace-character":"remove-range")},mD}function Bj(){if(vD)return gD;vD=1;var e=hz(),t=eT(),n=kz(),r=GI(),i=sT().notEmptyKey,o=JI(),a=Rj(),l=Az(),c=r.isEngine("Gecko");return gD=function(r,s){void 0!==r._pendingStateFromBeforeInput&&(r.update(r._pendingStateFromBeforeInput),r._pendingStateFromBeforeInput=void 0);var d=r.editor.ownerDocument.defaultView.getSelection(),u=d.anchorNode,f=d.isCollapsed,h=(null==u?void 0:u.nodeType)!==Node.TEXT_NODE&&(null==u?void 0:u.nodeType)!==Node.ELEMENT_NODE;if(null!=u&&!h){if(u.nodeType===Node.TEXT_NODE&&(null!==u.previousSibling||null!==u.nextSibling)){var p=u.parentNode;if(null==p)return;u.nodeValue=p.textContent;for(var m=p.firstChild;null!=m;m=m.nextSibling)m!==u&&p.removeChild(m)}var C=u.textContent,g=r._latestEditorState,v=l(o(u)),y=t.decode(v),w=y.blockKey,b=y.decoratorKey,E=y.leafKey,M=g.getBlockTree(w).getIn([b,"leaves",E]),A=M.start,x=M.end,k=g.getCurrentContent(),L=k.getBlockForKey(w),H=L.getText().slice(A,x);if(C.endsWith("\n\n")&&(C=C.slice(0,-1)),C!==H){var _,S,V,O,z=g.getSelection(),N=z.merge({anchorOffset:A,focusOffset:x,isBackward:!1}),I=L.getEntityAt(A),T=i(I)?k.getEntity(I):null,D="MUTABLE"===(null!=T?T.getMutability():null),j=D?"spellcheck-change":"apply-entity",Z=e.replaceText(k,N,C,L.getInlineStyleAt(A),D?L.getEntityAt(A):null);if(c)_=d.anchorOffset,S=d.focusOffset,O=(V=A+Math.min(_,S))+Math.abs(_-S),_=V,S=O;else{var R=C.length-H.length;V=z.getStartOffset(),O=z.getEndOffset(),_=f?O+R:V,S=O+R}var B=Z.merge({selectionBefore:k.getSelectionAfter(),selectionAfter:z.merge({anchorOffset:_,focusOffset:S})});r.update(n.push(g,B,j))}else{var P=s.nativeEvent.inputType;if(P){var F=function(e,t){return"deleteContentBackward"===e?a(t):t}(P,g);if(F!==g)return r.restoreEditorDOM(),void r.update(F)}}}},gD}function Pj(){if(ED)return bD;ED=1;var e=GI(),t=function(){if(wD)return yD;wD=1;var e=tT();return yD=function(t){return t.which===e.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))},yD}(),n=e.isPlatform("Mac OS X"),r={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return n&&e.altKey},usesMacOSHeuristics:function(){return n},hasCommandModifier:function(e){return n?!!e.metaKey&&!e.altKey:r.isCtrlKeyCommand(e)},isSoftNewlineEvent:t};return bD=r}function Fj(){if(kD)return xD;kD=1;var e=GI(),t=tz();var n=e.isBrowser("Chrome")?function(e){for(var n=e.cloneRange(),r=[],i=e.endContainer;null!=i;i=i.parentNode){var o=i===e.commonAncestorContainer;o?n.setStart(e.startContainer,e.startOffset):n.setStart(n.endContainer,0);var a,l=Array.from(n.getClientRects());if(r.push(l),o)return r.reverse(),(a=[]).concat.apply(a,r);n.setEndBefore(i)}"production"!==process.env.NODE_ENV?t(!1,"Found an unexpected detached subtree when getting range client rects."):t(!1)}:function(e){return Array.from(e.getClientRects())};return xD=n}function Uj(){if(HD)return LD;HD=1;var e=Tj(),t=KI(),n=Fj(),r=tz();function i(e,t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<e.length;a++){var l=e[a];0!==l.width&&1!==l.width&&(n=Math.min(n,l.top),r=Math.min(r,l.bottom),i=Math.max(i,l.top),o=Math.max(o,l.bottom))}return i<=r&&i-n<t&&o-r<t}function o(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}return LD=function(a){a.collapsed||("production"!==process.env.NODE_ENV?r(!1,"expandRangeToStartOfLine: Provided range is not collapsed."):r(!1));var l=(a=a.cloneRange()).startContainer;1!==l.nodeType&&(l=l.parentNode);var c=function(e){var n=getComputedStyle(e),i=t(e),o=i.createElement("div");o.style.fontFamily=n.fontFamily,o.style.fontSize=n.fontSize,o.style.fontStyle=n.fontStyle,o.style.fontWeight=n.fontWeight,o.style.lineHeight=n.lineHeight,o.style.position="absolute",o.textContent="M";var a=i.body;a||("production"!==process.env.NODE_ENV?r(!1,"Missing document.body"):r(!1)),a.appendChild(o);var l=o.getBoundingClientRect();return a.removeChild(o),l.height}(l),s=a.endContainer,d=a.endOffset;for(a.setStart(a.startContainer,0);i(n(a),c)&&(s=a.startContainer,d=a.startOffset,s.parentNode||("production"!==process.env.NODE_ENV?r(!1,"Found unexpected detached subtree when traversing."):r(!1)),a.setStartBefore(s),1!==s.nodeType||"inline"===getComputedStyle(s).display););for(var u=s,f=d-1;;){for(var h=u.nodeValue,p=f;p>=0;p--)if(!(null!=h&&p>0&&e.isSurrogatePair(h,p-1))){if(a.setStart(u,p),!i(n(a),c))break;s=u,d=p}if(-1===p||0===u.childNodes.length)break;f=o(u=u.childNodes[p])}return a.setStart(s,d),a},LD}function qj(){if(OD)return VD;OD=1;return VD={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}}function Wj(){if(ND)return zD;ND=1;var e="['‘’]",t="\\s|(?![_])"+qj().getPunctuation(),n=new RegExp("^(?:"+t+")*(?:"+e+"|(?!"+t+").)*(?:(?!"+t+").)"),r=new RegExp("(?:(?!"+t+").)(?:"+e+"|(?!"+t+").)*(?:"+t+")*$");function i(e,t){var i=t?r.exec(e):n.exec(e);return i?i[0]:e}return zD={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}}function Qj(){if(jD)return DD;jD=1;var e=Dj();return DD=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionForward should only be called with a collapsed SelectionState");var i,o=r.getStartKey(),a=r.getStartOffset(),l=t.getCurrentContent(),c=o;return n>l.getBlockForKey(o).getText().length-a?(c=l.getKeyAfter(o),i=0):i=a+n,r.merge({focusKey:c,focusOffset:i})},DD}function Gj(){if(ej)return $D;ej=1;var e=hz(),t=kz(),n=Pj(),r=tT(),i=function(){if(AD)return MD;AD=1;var e=hz(),t=kz(),n=az(),r=Az(),i=null;return MD={cut:function(o){var a=o.getCurrentContent(),l=o.getSelection(),c=null;if(l.isCollapsed()){var s=l.getAnchorKey(),d=a.getBlockForKey(s).getLength();if(d===l.getAnchorOffset()){var u=a.getKeyAfter(s);if(null==u)return o;c=l.set("focusKey",u).set("focusOffset",0)}else c=l.set("focusOffset",d)}else c=l;c=r(c),i=n(a,c);var f=e.removeRange(a,c,"forward");return f===a?o:t.push(o,f,"remove-range")},paste:function(n){if(!i)return n;var r=e.replaceWithFragment(n.getCurrentContent(),n.getSelection(),i);return t.push(n,r,"insert-fragment")}}}(),o=GI(),a=TT(),l=function(){if(SD)return _D;SD=1;var e=kz(),t=Uj(),n=aT(),r=jj(),i=Zj();return _D=function(o,a){var l=i(o,function(e){var i=e.getSelection();if(i.isCollapsed()&&0===i.getAnchorOffset())return r(e,1);var o=a.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return o=t(o),n(e,null,o.endContainer,o.endOffset,o.startContainer,o.startOffset).selectionState},"backward");return l===o.getCurrentContent()?o:e.push(o,l,"remove-range")},_D}(),c=function(){if(TD)return ID;TD=1;var e=Wj(),t=kz(),n=jj(),r=Zj();return ID=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset();if(0===i)return n(t,1);var o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(0,i),l=e.getBackward(a);return n(t,l.length||1)},"backward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},ID}(),s=function(){if(RD)return ZD;RD=1;var e=Wj(),t=kz(),n=Qj(),r=Zj();return ZD=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset(),o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(i),l=e.getForward(a);return n(t,l.length||1)},"forward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},ZD}(),d=function(){if(PD)return BD;PD=1;var e=hz(),t=kz();return BD=function(n){var r=e.splitBlock(n.getCurrentContent(),n.getSelection());return t.push(n,r,"split-block")}}(),u=function(){if(UD)return FD;UD=1;var e=kz();return FD=function(t){var n=t.getSelection(),r=n.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}}(),f=function(){if(WD)return qD;WD=1;var e=kz();return qD=function(t){var n=t.getSelection(),r=n.getStartKey();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}}(),h=Rj(),p=function(){if(GD)return QD;GD=1;var e=kz(),t=Tj(),n=Qj(),r=Zj();return QD=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a];return n(e,l?t.getUTF16Length(l,0):1)},"forward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"delete-character":"remove-range")},QD}(),m=function(){if(YD)return KD;YD=1;var e=hz(),t=kz(),n=az();return KD=function(r){var i=r.getSelection();if(!i.isCollapsed())return r;var o=i.getAnchorOffset();if(0===o)return r;var a,l,c=i.getAnchorKey(),s=r.getCurrentContent(),d=s.getBlockForKey(c).getLength();if(d<=1)return r;o===d?(a=i.set("anchorOffset",o-1),l=i):l=(a=i.set("focusOffset",o+1)).set("anchorOffset",o+1);var u=n(s,a),f=e.removeRange(s,a,"backward"),h=f.getSelectionAfter(),p=h.getAnchorOffset()-1,m=h.merge({anchorOffset:p,focusOffset:p}),C=e.replaceWithFragment(f,m,u),g=t.push(r,C,"insert-fragment");return t.acceptSelection(g,l)}}(),C=function(){if(JD)return XD;JD=1;var e=kz();return XD=function(t,n,r){var i=e.undo(n);if("spellcheck-change"!==n.getLastChangeType())t.preventDefault(),n.getNativelyRenderedContent()?(r(e.set(n,{nativelyRenderedContent:null})),setTimeout(function(){r(i)},0)):r(i);else{var o=i.getCurrentContent();r(e.set(i,{nativelyRenderedContent:o}))}},XD}(),g=n.isOptionKeyCommand,v=o.isBrowser("Chrome");return $D=function(n,o){var y=o.which,w=n._latestEditorState;function b(e){var t=n.props[e];return!!t&&(t(o),!0)}switch(y){case r.RETURN:if(o.preventDefault(),n.props.handleReturn&&a(n.props.handleReturn(o,w)))return;break;case r.ESC:if(o.preventDefault(),b("onEscape"))return;break;case r.TAB:if(b("onTab"))return;break;case r.UP:if(b("onUpArrow"))return;break;case r.RIGHT:if(b("onRightArrow"))return;break;case r.DOWN:if(b("onDownArrow"))return;break;case r.LEFT:if(b("onLeftArrow"))return;break;case r.SPACE:v&&g(o)&&o.preventDefault()}var E=n.props.keyBindingFn(o);if(null!=E&&""!==E)if("undo"!==E){if(o.preventDefault(),!n.props.handleKeyCommand||!a(n.props.handleKeyCommand(E,w,o.timeStamp))){var M=function(e,n,r){switch(e){case"redo":return t.redo(n);case"delete":return p(n);case"delete-word":return s(n);case"backspace":return h(n);case"backspace-word":return c(n);case"backspace-to-start-of-line":return l(n,r);case"split-block":return d(n);case"transpose-characters":return m(n);case"move-selection-to-start-of-block":return f(n);case"move-selection-to-end-of-block":return u(n);case"secondary-cut":return i.cut(n);case"secondary-paste":return i.paste(n);default:return n}}(E,w,o);M!==w&&n.update(M)}}else C(o,w,n.update);else if(y===r.SPACE&&v&&g(o)){var A=e.replaceText(w.getCurrentContent(),w.getSelection()," ");n.update(t.push(w,A,"insert-characters"))}},$D}function Kj(){if(nj)return tj;nj=1;var e=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}();return tj=e}function Yj(){if(ij)return rj;ij=1;var e=GI(),t=tz(),n=e.isBrowser("IE <= 9");return rj=function(e){var r,i=null;return!n&&document.implementation&&document.implementation.createHTMLDocument&&((r=document.implementation.createHTMLDocument("foo")).documentElement||("production"!==process.env.NODE_ENV?t(!1,"Missing doc.documentElement"):t(!1)),r.documentElement.innerHTML=e,i=r.getElementsByTagName("body")[0]),i},rj}function Xj(){if(dj)return sj;var e;function t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}dj=1;var r=YO(),i=JO(),o=$O(),a=Sz(),l=gz(),c=Kj(),s=_z(),d=rz(),u=Yj(),f=yz(),h=GO(),p=h.List,m=h.Map,C=h.OrderedSet,g=function(){if(aj)return oj;aj=1;var e=YI();return oj=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"A"===t.nodeName}}(),v=pT(),y=rT(),w=function(){if(cj)return lj;cj=1;var e=YI();return lj=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"IMG"===t.nodeName}}(),b=f("draft_tree_data_support"),E=new RegExp("\r","g"),M=new RegExp("\n","g"),A=new RegExp("^\n","g"),x=new RegExp("&nbsp;","g"),k=new RegExp("&#13;?","g"),L=new RegExp("&#8203;?","g"),H=["bold","bolder","500","600","700","800","900"],_=["light","lighter","normal","100","200","300","400"],S=["className","href","rel","target","title"],V=["alt","className","height","src","width"],O=(n(e={},s("public/DraftStyleDefault/depth0"),0),n(e,s("public/DraftStyleDefault/depth1"),1),n(e,s("public/DraftStyleDefault/depth2"),2),n(e,s("public/DraftStyleDefault/depth3"),3),n(e,s("public/DraftStyleDefault/depth4"),4),e),z=m({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),N=function(e){if(y(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(O).some(function(n){e.classList.contains(n)&&(t=O[n])}),t},T=function(e){if(!g(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new c(t.href);return!0}catch(e){return!1}},D=function(e){if(!w(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},j=function(e,t){if(!y(e))return t;var n=e,r=n.style.fontWeight,i=n.style.fontStyle,o=n.style.textDecoration;return t.withMutations(function(e){H.indexOf(r)>=0?e.add("BOLD"):_.indexOf(r)>=0&&e.remove("BOLD"),"italic"===i?e.add("ITALIC"):"normal"===i&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})},Z=function(e){return"ul"===e||"ol"===e},R=function(){function e(e,t){n(this,"characterList",p()),n(this,"currentBlockType","unstyled"),n(this,"currentDepth",0),n(this,"currentEntity",null),n(this,"currentText",""),n(this,"wrapper",null),n(this,"blockConfigs",[]),n(this,"contentBlocks",[]),n(this,"entityMap",l),n(this,"blockTypeMap",void 0),n(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var a=e.prototype;return a.clear=function(){this.characterList=p(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},a.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],C())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},a.getContentBlocks=function(){return 0===this.contentBlocks.length&&(b?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},a._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:p(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=p(),this.currentBlockType="unstyled",this.currentText="",n},a._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i.nodeName.toLowerCase();if("body"===o||Z(o)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,l=this.wrapper;Z(o)&&(this.wrapper=o,Z(l)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),t)),this.currentDepth=a,this.wrapper=l}else{var c=this.blockTypeMap.get(o);if(void 0===c)if("#text"!==o)if("br"!==o)if(D(i))this._addImgNode(i,t);else if(T(i))this._addAnchorNode(i,n,t);else{var s=t;z.has(o)&&(s=s.add(z.get(o))),s=j(i,s);var u=N(i);null!=u&&(s=s.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),s))}else this._addBreakNode(i,t);else this._addTextNode(i,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var f=this.currentDepth,h=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof c&&(c=this.disambiguate(o,this.wrapper)||c[0]||"unstyled"),!b&&y(i)&&("unordered-list-item"===c||"ordered-list-item"===c)){var p=i;this.currentDepth=I(p,this.currentDepth)}var m=d(),C=this._toBlockConfigs(Array.from(i.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:m,childConfigs:C,type:c})),this.currentDepth=f,this.wrapper=h}}}return n},a._appendText=function(e,t){var n;this.currentText+=e;var i=r.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(i))},a._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()});(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=p()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},a._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(A,"")).replace(M," ")),this._appendText(n,t)},a._addBreakNode=function(e,t){v(e)&&this._appendText("\n",t)},a._addImgNode=function(e,t){if(w(e)){var n=e,r={};V.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),f("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},a._addAnchorNode=function(e,t,n){if(g(e)){var r=e,i={};S.forEach(function(e){var t=r.getAttribute(e);t&&(i[e]=t)}),i.url=new c(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},a._toContentBlocks=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.length-1,i=0;i<=r;i++){var a=e[i];a.parent=n,a.prevSibling=i>0?e[i-1].key:null,a.nextSibling=i<r?e[i+1].key:null,a.children=p(a.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new o(t({},a))),this._toContentBlocks(a.childConfigs,a.key)}},a._hoistContainersInBlockConfigs=function(e){var t=this;return p(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},a._toFlatContentBlocks=function(e){var n=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var r=n._extractTextFromBlockConfigs(e.childConfigs),o=r.text,a=r.characterList;n.contentBlocks.push(new i(t({},e,{text:e.text+o,characterList:e.characterList.concat(a)})))})},a._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=p(),i=0;i<=t;i++){var o=e[i];n+=o.text,r=r.concat(o.characterList),""!==n&&"unstyled"!==o.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}();return sj=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:u)(e=e.trim().replace(E,"").replace(x," ").replace(k,"").replace(L,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys(function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach(function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)})}),m(t)}(t);return new R(r,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(n).getContentBlocks()},sj}function Jj(){if(fj)return uj;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fj=1;var t=JO(),n=$O(),r=Xj(),i=rz(),o=Yj(),a=yz(),l=GO(),c=wz(),s=l.List,d=l.Repeat,u=a("draft_tree_data_support"),f=u?n:t,h={processHTML:function(e,t){return r(e,o,t)},processText:function(t,n,r){return t.reduce(function(t,o,a){o=c(o);var l=i(),h={key:l,type:r,text:o,characterList:s(d(n,o.length))};if(u&&0!==a){var p=a-1;h=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},h,{prevSibling:(t[p]=t[p].merge({nextSibling:l})).getKey()})}return t.push(new f(h)),t},[])}};return uj=h}function $j(){if(Cj)return mj;Cj=1;var e=hz(),t=kz(),n=(pj||(pj=1,hj=function(e,t,n,r){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat([[o,a.get(o)]]).map(function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)});return a=a.merge(l),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}),hj),r=Az(),i={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return i.toggleInlineStyle(e,"BOLD");case"italic":return i.toggleInlineStyle(e,"ITALIC");case"underline":return i.toggleInlineStyle(e,"UNDERLINE");case"code":return i.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return i.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return i.onDelete(e);default:return null}},insertSoftNewline:function(n){var r=e.insertText(n.getCurrentContent(),n.getSelection(),"\n",n.getCurrentInlineStyle(),null),i=t.push(n,r,"insert-characters");return t.forceSelection(i,r.getSelectionAfter())},onBackspace:function(e){var n=e.getSelection();if(!n.isCollapsed()||n.getAnchorOffset()||n.getFocusOffset())return null;var r=e.getCurrentContent(),o=n.getStartKey(),a=r.getBlockBefore(o);if(a&&"atomic"===a.getType()){var l=r.getBlockMap().delete(a.getKey()),c=r.merge({blockMap:l,selectionAfter:n});if(c!==r)return t.push(e,c,"remove-range")}var s=i.tryToRemoveBlockStyle(e);return s?t.push(e,s,"change-block-type"):null},onDelete:function(n){var r=n.getSelection();if(!r.isCollapsed())return null;var i=n.getCurrentContent(),o=r.getStartKey(),a=i.getBlockForKey(o).getLength();if(r.getStartOffset()<a)return null;var l=i.getBlockAfter(o);if(!l||"atomic"!==l.getType())return null;var c=r.merge({focusKey:l.getKey(),focusOffset:l.getLength()}),s=e.removeRange(i,c,"forward");return s!==i?t.push(n,s,"remove-range"):null},onTab:function(e,r,i){var o=r.getSelection(),a=o.getAnchorKey();if(a!==o.getFocusKey())return r;var l=r.getCurrentContent(),c=l.getBlockForKey(a),s=c.getType();if("unordered-list-item"!==s&&"ordered-list-item"!==s)return r;e.preventDefault();var d=c.getDepth();if(!e.shiftKey&&d===i)return r;var u=n(l,o,e.shiftKey?-1:1,i);return t.push(r,u,"adjust-depth")},toggleBlockType:function(n,i){var o=n.getSelection(),a=o.getStartKey(),l=o.getEndKey(),c=n.getCurrentContent(),s=o;if(a!==l&&0===o.getEndOffset()){var d=r(c.getBlockBefore(l));l=d.getKey(),s=s.merge({anchorKey:a,anchorOffset:o.getStartOffset(),focusKey:l,focusOffset:d.getLength(),isBackward:!1})}var u=c.getBlockMap().skipWhile(function(e,t){return t!==a}).reverse().skipWhile(function(e,t){return t!==l}).some(function(e){return"atomic"===e.getType()});if(u)return n;var f=c.getBlockForKey(a).getType()===i?"unstyled":i;return t.push(n,e.setBlockType(c,s,f),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?i.toggleBlockType(e,"code-block"):i.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(n,r){var i=n.getSelection(),o=n.getCurrentInlineStyle();if(i.isCollapsed())return t.setInlineStyleOverride(n,o.has(r)?o.remove(r):o.add(r));var a,l=n.getCurrentContent();return a=o.has(r)?e.removeInlineStyle(l,i,r):e.applyInlineStyle(l,i,r),t.push(n,a,"change-inline-style")},toggleLink:function(n,r,i){var o=e.applyEntity(n.getCurrentContent(),r,i);return t.push(n,o,"apply-entity")},tryToRemoveBlockStyle:function(t){var n=t.getSelection(),r=n.getAnchorOffset();if(n.isCollapsed()&&0===r){var i=n.getAnchorKey(),o=t.getCurrentContent(),a=o.getBlockForKey(i).getType(),l=o.getBlockBefore(i);if("code-block"===a&&l&&"code-block"===l.getType()&&0!==l.getLength())return null;if("unstyled"!==a)return e.setBlockType(o,n,"unstyled")}return null}};return mj=i}function eZ(){if(wj)return yj;wj=1;var e=KO(),t=YO(),n=NT(),r=hz(),i=Jj(),o=kz(),a=$j(),l=dT(),c=IT(),s=TT(),d=function(){if(vj)return gj;vj=1;var e=/\r\n?|\n/g;return gj=function(t){return t.split(e)}}();function u(e,t,n){var i=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return o.push(e,i.set("entityMap",n),"insert-fragment")}return yj=function(f,h){h.preventDefault();var p=new n(h.clipboardData);if(!p.isRichText()){var m=p.getFiles(),C=p.getText();if(m.length>0){if(f.props.handlePastedFiles&&s(f.props.handlePastedFiles(m)))return;return void c(m,function(n){if(n=n||C){var c=f._latestEditorState,s=d(n),u=t.create({style:c.getCurrentInlineStyle(),entity:l(c.getCurrentContent(),c.getSelection())}),h=a.getCurrentBlockType(c),p=i.processText(s,u,h),m=e.createFromArray(p),g=r.replaceWithFragment(c.getCurrentContent(),c.getSelection(),m);f.update(o.push(c,g,"insert-fragment"))}})}}var g=[],v=p.getText(),y=p.getHTML(),w=f._latestEditorState;if(f.props.formatPastedText){var b=f.props.formatPastedText(v,y);v=b.text,y=b.html}if(!f.props.handlePastedText||!s(f.props.handlePastedText(v,y,w))){if(v&&(g=d(v)),!f.props.stripPastedStyles){var E,M=f.getClipboard();if(!f.props.formatPastedText&&p.isRichText()&&M){if(-1!==(null===(E=y)||void 0===E?void 0:E.indexOf(f.getEditorKey()))||1===g.length&&1===M.size&&M.first().getText()===v)return void f.update(u(f._latestEditorState,M))}else if(M&&p.types.includes("com.apple.webarchive")&&!p.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every(function(t,n){return t.getText()===e[n]})}(g,M))return void f.update(u(f._latestEditorState,M));if(y){var A=i.processHTML(y,f.props.blockRenderMap);if(A){var x=A.contentBlocks,k=A.entityMap;if(x){var L=e.createFromArray(x);return void f.update(u(f._latestEditorState,L,k))}}}f.setClipboard(null)}if(g.length){var H=t.create({style:w.getCurrentInlineStyle(),entity:l(w.getCurrentContent(),w.getSelection())}),_=a.getCurrentBlockType(w),S=i.processText(g,H,_),V=e.createFromArray(S);f.update(u(f._latestEditorState,V))}}},yj}function tZ(){if(Ej)return bj;Ej=1;var e=GI(),t=zj(),n=function(){if(UT)return FT;UT=1;var e=kz(),t=gT(),n=vT();return FT=function(r,i){var o=i.currentTarget.ownerDocument;if(!Boolean(r.props.preserveSelectionOnBlur)&&n(o)===o.body){var a=o.defaultView.getSelection(),l=r.editor;1===a.rangeCount&&t(l,a.anchorNode)&&t(l,a.focusNode)&&a.removeAllRanges()}var c=r._latestEditorState,s=c.getSelection();if(s.getHasFocus()){var d=s.set("hasFocus",!1);r.props.onBlur&&r.props.onBlur(i),r.update(e.acceptSelection(c,d))}},FT}(),r=function(){if(WT)return qT;WT=1;var e=kz();return qT=function(t,n){t.setMode("composite"),t.update(e.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(n)},qT}(),i=function(){if(YT)return KT;YT=1;var e=Nj();return KT=function(t,n){t._latestEditorState.getSelection().isCollapsed()?n.preventDefault():t.setClipboard(e(t._latestEditorState))},KT}(),o=Ij(),a=(nD||(nD=1,tD=function(e,t){e.setMode("drag"),t.preventDefault()}),tD),l=iD?rD:(iD=1,rD=function(e){e._internalDrag=!0,e.setMode("drag")}),c=function(){if(aD)return oD;aD=1;var e=kz(),t=GI();return oD=function(n,r){var i=n._latestEditorState,o=i.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);n.props.onFocus&&n.props.onFocus(r),t.isBrowser("Chrome < 60.0.3081.0")?n.update(e.forceSelection(i,a)):n.update(e.acceptSelection(i,a))}},oD}(),s=Bj(),d=Gj(),u=eZ(),f=cT(),h=e.isBrowser("Chrome"),p=e.isBrowser("Firefox"),m=h||p?f:function(e){};return bj={onBeforeInput:t,onBlur:n,onCompositionStart:r,onCopy:i,onCut:o,onDragOver:a,onDragStart:l,onFocus:c,onInput:s,onKeyDown:d,onPaste:u,onSelect:f,onMouseUp:m,onKeyUp:m}}function nZ(){if(kj)return xj;kj=1;var e=i,t=_z(),n=function(n){var r,i;function o(){return n.apply(this,arguments)||this}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var a=o.prototype;return a.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},a.render=function(){var n=this.props.editorState.getSelection().getHasFocus(),r=t({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":n});return e.createElement("div",{className:r},e.createElement("div",{className:t("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},o}(e.Component);return xj=n}function rZ(){if(Hj)return Lj;Hj=1;var e=Pj(),t=tT(),n=GI(),r=n.isPlatform("Mac OS X"),i=r&&n.isBrowser("Firefox < 29"),o=e.hasCommandModifier,a=e.isCtrlKeyCommand;function l(e){return r&&e.altKey||a(e)}return Lj=function(e){switch(e.keyCode){case 66:return o(e)?"bold":null;case 68:return a(e)?"delete":null;case 72:return a(e)?"backspace":null;case 73:return o(e)?"italic":null;case 74:return o(e)?"code":null;case 75:return r&&a(e)?"secondary-cut":null;case 77:case 79:return a(e)?"split-block":null;case 84:return r&&a(e)?"transpose-characters":null;case 85:return o(e)?"underline":null;case 87:return r&&a(e)?"backspace-word":null;case 89:return a(e)?r?"secondary-paste":"redo":null;case 90:return function(e){return o(e)?e.shiftKey?"redo":"undo":null}(e)||null;case t.RETURN:return"split-block";case t.DELETE:return function(e){return!r&&e.shiftKey?null:l(e)?"delete-word":"delete"}(e);case t.BACKSPACE:return function(e){return o(e)&&r?"backspace-to-start-of-line":l(e)?"backspace-word":"backspace"}(e);case t.LEFT:return i&&o(e)?"move-selection-to-start-of-block":null;case t.RIGHT:return i&&o(e)?"move-selection-to-end-of-block":null;default:return null}},Lj}function iZ(){if(Sj)return _j;Sj=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l=Sz(),c=Vz(),s=uT(),d=function(){if(kI)return xI;kI=1;var e=yz()("draft_tree_data_support");return xI=e?_T():VT()}(),u=DT(),f=tZ(),h=function(){if(Aj)return Mj;Aj=1;var e=M.unstable_flushControlled;return Mj=e}(),p=nZ(),m=mT(),C=kz(),g=i,v=ET(),y=AT(),w=GI(),b=_z(),E=rz(),A=rZ(),x=kT(),k=yz(),H=tz(),_=rT(),S=Az(),V=w.isBrowser("IE"),O=!V,z={edit:f,composite:s,drag:u,cut:null,render:null},N=!1,I=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(g.Component),T=function(e){function i(t){var i;return o(r(i=e.call(this,t)||this),"_blockSelectEvents",void 0),o(r(i),"_clipboard",void 0),o(r(i),"_handler",void 0),o(r(i),"_dragCount",void 0),o(r(i),"_internalDrag",void 0),o(r(i),"_editorKey",void 0),o(r(i),"_placeholderAccessibilityID",void 0),o(r(i),"_latestEditorState",void 0),o(r(i),"_latestCommittedEditorState",void 0),o(r(i),"_pendingStateFromBeforeInput",void 0),o(r(i),"_onBeforeInput",void 0),o(r(i),"_onBlur",void 0),o(r(i),"_onCharacterData",void 0),o(r(i),"_onCompositionEnd",void 0),o(r(i),"_onCompositionStart",void 0),o(r(i),"_onCopy",void 0),o(r(i),"_onCut",void 0),o(r(i),"_onDragEnd",void 0),o(r(i),"_onDragOver",void 0),o(r(i),"_onDragStart",void 0),o(r(i),"_onDrop",void 0),o(r(i),"_onInput",void 0),o(r(i),"_onFocus",void 0),o(r(i),"_onKeyDown",void 0),o(r(i),"_onKeyPress",void 0),o(r(i),"_onKeyUp",void 0),o(r(i),"_onMouseDown",void 0),o(r(i),"_onMouseUp",void 0),o(r(i),"_onPaste",void 0),o(r(i),"_onSelect",void 0),o(r(i),"editor",void 0),o(r(i),"editorContainer",void 0),o(r(i),"focus",void 0),o(r(i),"blur",void 0),o(r(i),"setMode",void 0),o(r(i),"exitCurrentMode",void 0),o(r(i),"restoreEditorDOM",void 0),o(r(i),"setClipboard",void 0),o(r(i),"getClipboard",void 0),o(r(i),"getEditorKey",void 0),o(r(i),"update",void 0),o(r(i),"onDragEnter",void 0),o(r(i),"onDragLeave",void 0),o(r(i),"_handleEditorContainerRef",function(e){i.editorContainer=e,i.editor=null!==e?e.firstChild:null}),o(r(i),"focus",function(e){var t=i.props.editorState,n=t.getSelection().getHasFocus(),r=i.editor;if(r){var o=y.getScrollParent(r),a=e||x(o),l=a.x,c=a.y;_(r)||("production"!==process.env.NODE_ENV?H(!1,"editorNode is not an HTMLElement"):H(!1)),r.focus(),o===window?window.scrollTo(l,c):v.setTop(o,c),n||i.update(C.forceSelection(t,t.getSelection()))}}),o(r(i),"blur",function(){var e=i.editor;e&&(_(e)||("production"!==process.env.NODE_ENV?H(!1,"editorNode is not an HTMLElement"):H(!1)),e.blur())}),o(r(i),"setMode",function(e){var t=i.props,r=t.onPaste,o=t.onCut,a=t.onCopy,l=n({},z.edit);r&&(l.onPaste=r),o&&(l.onCut=o),a&&(l.onCopy=a);var c=n({},z,{edit:l});i._handler=c[e]}),o(r(i),"exitCurrentMode",function(){i.setMode("edit")}),o(r(i),"restoreEditorDOM",function(e){i.setState({contentsKey:i.state.contentsKey+1},function(){i.focus(e)})}),o(r(i),"setClipboard",function(e){i._clipboard=e}),o(r(i),"getClipboard",function(){return i._clipboard}),o(r(i),"update",function(e){i._latestEditorState=e,i.props.onChange(e)}),o(r(i),"onDragEnter",function(){i._dragCount++}),o(r(i),"onDragLeave",function(){i._dragCount--,0===i._dragCount&&i.exitCurrentMode()}),i._blockSelectEvents=!1,i._clipboard=null,i._handler=null,i._dragCount=0,i._editorKey=t.editorKey||E(),i._placeholderAccessibilityID="placeholder-"+i._editorKey,i._latestEditorState=t.editorState,i._latestCommittedEditorState=t.editorState,i._onBeforeInput=i._buildHandler("onBeforeInput"),i._onBlur=i._buildHandler("onBlur"),i._onCharacterData=i._buildHandler("onCharacterData"),i._onCompositionEnd=i._buildHandler("onCompositionEnd"),i._onCompositionStart=i._buildHandler("onCompositionStart"),i._onCopy=i._buildHandler("onCopy"),i._onCut=i._buildHandler("onCut"),i._onDragEnd=i._buildHandler("onDragEnd"),i._onDragOver=i._buildHandler("onDragOver"),i._onDragStart=i._buildHandler("onDragStart"),i._onDrop=i._buildHandler("onDrop"),i._onInput=i._buildHandler("onInput"),i._onFocus=i._buildHandler("onFocus"),i._onKeyDown=i._buildHandler("onKeyDown"),i._onKeyPress=i._buildHandler("onKeyPress"),i._onKeyUp=i._buildHandler("onKeyUp"),i._onMouseDown=i._buildHandler("onMouseDown"),i._onMouseUp=i._buildHandler("onMouseUp"),i._onPaste=i._buildHandler("onPaste"),i._onSelect=i._buildHandler("onSelect"),i.getEditorKey=function(){return i._editorKey},"production"!==process.env.NODE_ENV&&["onDownArrow","onEscape","onLeftArrow","onRightArrow","onTab","onUpArrow"].forEach(function(e){t.hasOwnProperty(e)&&console.warn("Supplying an `".concat(e,"` prop to `DraftEditor` has ")+"been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/wHKQ3W).")}),i.state={contentsKey:0},i}a(i,e);var l=i.prototype;return l._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(h?h(function(){return r(t,n)}):r(t,n))}}},l._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},l._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:S(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return g.createElement(p,e)}return null},l._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},l.render=function(){var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,o=e.blockStyleFn,a=e.customStyleFn,l=e.customStyleMap,s=e.editorState,u=e.preventScroll,f=e.readOnly,h=e.textAlignment,p=e.textDirectionality,m=b({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===h,"DraftEditor/alignRight":"right"===h,"DraftEditor/alignCenter":"center"===h}),C=this.props.role||"textbox",v="combobox"===C?!!this.props.ariaExpanded:null,y={blockRenderMap:r,blockRendererFn:i,blockStyleFn:o,customStyleMap:n({},c,l),customStyleFn:a,editorKey:this._editorKey,editorState:s,preventScroll:u,textDirectionality:p};return g.createElement("div",{className:m},this._renderPlaceholder(),g.createElement("div",{className:b("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:b({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:C,spellCheck:O&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(I,{editor:this,editorState:s}),g.createElement(d,t({},y,{key:"contents"+this.state.contentsKey})))))},l.componentDidMount=function(){this._blockSelectEvents=!1,!N&&k("draft_ods_enabled")&&(N=!0,m.initODS()),this.setMode("edit"),V&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):L.execCommand("AutoUrlDetect",!1,!1))},l.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},i}(g.Component);return o(T,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:l,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:A,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),_j=T}var oZ,aZ,lZ,cZ,sZ,dZ,uZ,fZ,hZ,pZ,mZ,CZ,gZ,vZ,yZ,wZ,bZ,EZ,MZ,AZ,xZ,kZ,LZ,HZ,_Z,SZ,VZ,OZ={};function zZ(){return oZ||(oZ=1),OZ}function NZ(){if(lZ)return aZ;lZ=1;var e={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};return aZ=e}function IZ(){if(uZ)return dZ;uZ=1;var e=Tj(),t=XO(),n=function(e,t){return e===t},r=function(e){return!!e},i=[];return dZ=function(o){var a=o.getCharacterList().map(function(e){return e.getStyle()}).toList(),l=a.flatten().toSet().map(function(i){return function(i,o,a){var l=[],c=o.map(function(e){return e.has(a)}).toList();return t(c,n,r,function(t,n){var r=i.getText();l.push({offset:e.strlen(r.slice(0,t)),length:e.strlen(r.slice(t,n)),style:a})}),l}(o,a,i)});return Array.prototype.concat.apply(i,l.toJS())}}function TZ(){if(hZ)return fZ;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}hZ=1;var t=JO(),n=$O(),r=NZ(),i=function(){if(sZ)return cZ;sZ=1;var e=NZ(),t=Tj().strlen;return cZ=function(n,r){var i=[];return n.findEntityRanges(function(e){return!!e.getEntity()},function(o,a){var l=n.getText(),c=n.getEntityAt(o);i.push({offset:t(l.slice(0,o)),length:t(l.slice(o,a)),key:Number(r[e.stringify(c)])})}),i},cZ}(),o=IZ(),a=tz(),l=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:o(e),entityRanges:i(e,t),data:e.getData().toObject()}},c=function(r,i,o,c){if(r instanceof t)o.push(l(r,i));else{r instanceof n||("production"!==process.env.NODE_ENV?a(!1,"block is not a BlockNode"):a(!1));var s=r.getParentKey(),d=c[r.getKey()]=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},l(r,i),{children:[]});s?c[s].children.push(d):o.push(d)}};return fZ=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.entityMap,i=[],o={},a={},l=0;return e.getBlockMap().forEach(function(e){e.findEntityRanges(function(e){return null!==e.getEntity()},function(t){var i=e.getEntityAt(t),o=r.stringify(i);a[o]||(a[o]=i,n[o]="".concat(l),l++)}),c(e,n,i,o)}),{blocks:i,entityMap:n}}(e,t),t=function(e,t){var n=t.blocks,i=t.entityMap,o={};return Object.keys(i).forEach(function(t,n){var i=e.getEntity(r.unstringify(t));o[n]={type:i.getType(),mutability:i.getMutability(),data:i.getData()}}),{blocks:n,entityMap:o}}(e,t),t},fZ}function DZ(){if(mZ)return pZ;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mZ=1;var n=rz(),r=tz(),i=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},o={fromRawTreeStateToRawState:function(t){var n=t.blocks,o=[];return Array.isArray(n)||("production"!==process.env.NODE_ENV?r(!1,"Invalid raw state"):r(!1)),Array.isArray(n)&&n.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var i=n.pop();t(i);var o=i.children;Array.isArray(o)||("production"!==process.env.NODE_ENV?r(!1,"Invalid tree raw block"):r(!1)),n=n.concat([].concat(o.reverse()))}}(n,function(t){var n=e({},t);i(t)&&(n.depth=n.depth||0,function(t){Array.isArray(t.children)&&(t.children=t.children.map(function(n){return n.type===t.type?e({},n,{depth:(t.depth||0)+1}):n}))}(t),null!=t.children&&t.children.length>0)||(delete n.children,o.push(n))}),t.blocks=o,e({},t,{blocks:o})):t},fromRawStateToRawTreeState:function(t){var r=[],o=[];return t.blocks.forEach(function(t){var a=i(t),l=t.depth||0,c=e({},t,{children:[]});if(a){var s=o[0];if(null==s&&0===l)r.push(c);else if(null==s||s.depth<l-1){var d={key:n(),text:"",depth:l-1,type:t.type,children:[],entityRanges:[],inlineStyleRanges:[]};o.unshift(d),1===l?r.push(d):null!=s&&s.children.push(d),d.children.push(c)}else if(s.depth===l-1)s.children.push(c);else{for(;null!=s&&s.depth>=l;)o.shift(),s=o[0];l>0?s.children.push(c):r.push(c)}}else r.push(c)}),e({},t,{blocks:r})}};return pZ=o}function jZ(){if(xZ)return AZ;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xZ=1;var n=JO(),r=$O(),i=bz(),o=gz(),a=DZ(),l=function(){if(gZ)return CZ;gZ=1;var e=Dj(),t={isValidBlock:function(t,n){var r=t.getKey(),i=t.getParentKey();if(null!=i&&!n.get(i).getChildKeys().includes(r))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing parent -> child pointer on %s",r),!1;var o=t.getChildKeys().map(function(e){return n.get(e)});if(!o.every(function(e){return e.getParentKey()===r}))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing child -> parent pointer on %s",r),!1;var a=t.getPrevSiblingKey();if(null!=a&&n.get(a).getNextSiblingKey()!==r)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing nextSibling pointer on %s's prevSibling",r),!1;var l=t.getNextSiblingKey();return null!=l&&n.get(l).getPrevSiblingKey()!==r?("production"!==process.env.NODE_ENV&&e(!0,"Tree is missing prevSibling pointer on %s's nextSibling",r),!1):null!==l&&null!==a&&a===l?("production"!==process.env.NODE_ENV&&e(!0,"Tree has a two-node cycle at %s",r),!1):!(""!=t.text&&t.getChildKeys().size>0&&("production"!==process.env.NODE_ENV&&e(!0,"Leaf node %s has children",r),1))},isConnectedTree:function(t){var n=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==n.length)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. More or less than one first node"),!1;for(var r=0,i=n.shift().getKey(),o=[];null!=i;){var a=t.get(i),l=a.getChildKeys(),c=a.getNextSiblingKey();if(l.size>0){null!=c&&o.unshift(c);var s=l.map(function(e){return t.get(e)}),d=s.find(function(e){return null==e.getPrevSiblingKey()});if(null==d)return"production"!==process.env.NODE_ENV&&e(!0,"%s has no first child",i),!1;i=d.getKey()}else i=null!=a.getNextSiblingKey()?a.getNextSiblingKey():o.shift();r++}return r===t.size||("production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. %s nodes were seen instead of %s",r,t.size),!1)},isValidTree:function(e){var t=this;return!!e.toArray().every(function(n){return t.isValidBlock(n,e)})&&this.isConnectedTree(e)}};return CZ=t}(),c=vz(),s=function(){if(yZ)return vZ;yZ=1;var e=YO(),t=GO().List;return vZ=function(n,r){var i=n.map(function(t,n){var i=r[n];return e.create({style:t,entity:i})});return t(i)}}(),d=function(){if(bZ)return wZ;bZ=1;var e=Tj().substr;return wZ=function(t,n){var r=Array(t.length).fill(null);return n&&n.forEach(function(n){for(var i=e(t,0,n.offset).length,o=i+e(t,n.offset,n.length).length,a=i;a<o;a++)r[a]=n.key}),r},wZ}(),u=function(){if(MZ)return EZ;MZ=1;var e=Tj(),t=GO().OrderedSet,n=e.substr,r=t();return EZ=function(e,t){var i=Array(e.length).fill(r);return t&&t.forEach(function(t){for(var r=n(e,0,t.offset).length,o=r+n(e,t.offset,t.length).length;r<o;)i[r]=i[r].add(t.style),r++}),i},EZ}(),f=rz(),h=yz(),p=GO(),m=tz(),C=h("draft_tree_data_support"),g=p.List,v=p.Map,y=p.OrderedMap,w=function(e,t){var n=e.key,r=e.type,i=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||f(),data:v(i),characterList:b(e,t)}},b=function(t,n){var r=t.text,i=t.entityRanges,o=t.inlineStyleRanges,a=i||[];return s(u(r,o||[]),d(r,a.filter(function(e){return n.hasOwnProperty(e.key)}).map(function(t){return e({},t,{key:n[t.key]})})))},E=function(t){return e({},t,{key:t.key||f()})},M=function(t,n,r){var i=n.map(function(t){return e({},t,{parentRef:r})});return t.concat(i.reverse())},A=function(t,i){var o=t.blocks.find(function(e){return Array.isArray(e.children)&&e.children.length>0}),c=C&&!o?a.fromRawStateToRawTreeState(t).blocks:t.blocks;if(!C)return function(e,t){return y(e.map(function(e){var r=new n(w(e,t));return[r.getKey(),r]}))}(o?a.fromRawTreeStateToRawState(t).blocks:c,i);var s=function(t,n){return t.map(E).reduce(function(i,o,a){Array.isArray(o.children)||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):m(!1));var l=o.children.map(E),c=new r(e({},w(o,n),{prevSibling:0===a?null:t[a-1].key,nextSibling:a===t.length-1?null:t[a+1].key,children:g(l.map(function(e){return e.key}))}));i=i.set(c.getKey(),c);for(var s=M([],l,c);s.length>0;){var d=s.pop(),u=d.parentRef,f=u.getChildKeys(),h=f.indexOf(d.key),p=Array.isArray(d.children);if(!p){p||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):m(!1));break}var C=d.children.map(E),v=new r(e({},w(d,n),{parent:u.getKey(),children:g(C.map(function(e){return e.key})),prevSibling:0===h?null:f.get(h-1),nextSibling:h===f.size-1?null:f.get(h+1)}));i=i.set(v.getKey(),v),s=M(s,C,v)}return i},y())}(c,i);return"production"!==process.env.NODE_ENV&&(l.isValidTree(s)||("production"!==process.env.NODE_ENV?m(!1,"Should be a valid tree"):m(!1))),s};return AZ=function(e){Array.isArray(e.blocks)||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentState"):m(!1));var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach(function(e){var r=t[e],i=r.type,a=r.mutability,l=r.data;n[e]=o.__create(i,a,l||{})}),n}(e),n=A(e,t),r=n.isEmpty()?new c:c.createEmpty(n.first().getKey());return new i({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}}function ZZ(){if(_Z)return HZ;_Z=1;var e=function(){if(LZ)return kZ;LZ=1;var e=Fj();return kZ=function(t){var n=e(t),r=0,i=0,o=0,a=0;if(n.length){if(n.length>1&&0===n[0].width){var l=n[1];r=l.top,i=l.right,o=l.bottom,a=l.left}else{var c=n[0];r=c.top,i=c.right,o=c.bottom,a=c.left}for(var s=1;s<n.length;s++){var d=n[s];0!==d.height&&0!==d.width&&(r=Math.min(r,d.top),i=Math.max(i,d.right),o=Math.max(o,d.bottom),a=Math.min(a,d.left))}}return{top:r,right:i,bottom:o,left:a,width:i-a,height:o-r}},kZ}();return HZ=function(t){var n=t.getSelection();if(!n.rangeCount)return null;var r=n.getRangeAt(0),i=e(r),o=i.top,a=i.right,l=i.bottom,c=i.left;return 0===o&&0===a&&0===l&&0===c?null:i},HZ}function RZ(){if(VZ)return SZ;VZ=1;var e=Lz(),t=KO(),n=YO(),r=Hz(),i=JO(),o=bz(),a=Sz(),l=Vz(),c=iZ(),s=ST(),d=gz(),u=hz(),f=Cz(),h=kz(),p=Pj(),m=zZ(),C=$j(),g=vz(),v=TZ(),y=jZ(),w=rz(),b=rZ(),E=ZZ(),M=Xj();return SZ={Editor:c,EditorBlock:s,EditorState:h,CompositeDecorator:r,Entity:d,EntityInstance:f,BlockMapBuilder:t,CharacterMetadata:n,ContentBlock:i,ContentState:o,RawDraftContentState:m,SelectionState:g,AtomicBlockUtils:e,KeyBindingUtil:p,Modifier:u,RichUtils:C,DefaultDraftBlockRenderMap:a,DefaultDraftInlineStyle:l,convertFromHTML:M,convertFromRaw:y,convertToRaw:v,genKey:w,getDefaultKeyBinding:b,getVisibleSelectionRect:E}}var BZ=RZ(),PZ={exports:{}},FZ="@@__IMMUTABLE_INDEXED__@@";function UZ(e){return Boolean(e&&e[FZ])}var qZ="@@__IMMUTABLE_KEYED__@@";function WZ(e){return Boolean(e&&e[qZ])}function QZ(e){return WZ(e)||UZ(e)}var GZ="@@__IMMUTABLE_ITERABLE__@@";function KZ(e){return Boolean(e&&e[GZ])}var YZ=function(e){return KZ(e)?e:zR(e)},XZ=function(e){function t(e){return WZ(e)?e:NR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ),JZ=function(e){function t(e){return UZ(e)?e:IR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ),$Z=function(e){function t(e){return KZ(e)&&!QZ(e)?e:TR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ);YZ.Keyed=XZ,YZ.Indexed=JZ,YZ.Set=$Z;var eR="function"==typeof Symbol&&Symbol.iterator,tR="@@iterator",nR=eR||tR,rR=function(e){this.next=e};function iR(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function oR(){return{value:void 0,done:!0}}function aR(e){return!!Array.isArray(e)||!!sR(e)}function lR(e){return!(!e||"function"!=typeof e.next)}function cR(e){var t=sR(e);return t&&t.call(e)}function sR(e){var t=e&&(eR&&e[eR]||e[tR]);if("function"==typeof t)return t}rR.prototype.toString=function(){return"[Iterator]"},rR.KEYS=0,rR.VALUES=1,rR.ENTRIES=2,rR.prototype.inspect=rR.prototype.toSource=function(){return this.toString()},rR.prototype[nR]=function(){return this};var dR="delete",uR=32,fR=31,hR={};function pR(e){e&&(e.value=!0)}function mR(){}function CR(e){return void 0===e.size&&(e.size=e.__iterate(vR)),e.size}function gR(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?CR(e)+t:t}function vR(){return!0}function yR(e,t,n){return(0===e&&!MR(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function wR(e,t){return ER(e,t,0)}function bR(e,t){return ER(e,t,t)}function ER(e,t,n){return void 0===e?n:MR(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function MR(e){return e<0||0===e&&1/e==-1/0}var AR="@@__IMMUTABLE_RECORD__@@";function xR(e){return Boolean(e&&e[AR])}function kR(e){return KZ(e)||xR(e)}var LR="@@__IMMUTABLE_ORDERED__@@";function HR(e){return Boolean(e&&e[LR])}var _R="@@__IMMUTABLE_SEQ__@@";function SR(e){return Boolean(e&&e[_R])}var VR=Object.prototype.hasOwnProperty;function OR(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var zR=function(e){function t(e){return null==e?BR():kR(e)?e.toSeq():function(e){var t=UR(e);if(t)return(r=sR(n=e))&&r===n.entries?t.fromEntrySeq():function(e){var t=sR(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var n,r;if("object"==typeof e)return new jR(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new rR(function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return iR(e,o[0],o[1])})}return this.__iteratorUncached(e,t)},t}(YZ),NR=function(e){function t(e){return null==e?BR().toKeyedSeq():KZ(e)?WZ(e)?e.toSeq():e.fromEntrySeq():xR(e)?e.toSeq():PR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(zR),IR=function(e){function t(e){return null==e?BR():KZ(e)?WZ(e)?e.entrySeq():e.toIndexedSeq():xR(e)?e.toSeq().entrySeq():FR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(zR),TR=function(e){function t(e){return(KZ(e)&&!QZ(e)?e:IR(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(zR);zR.isSeq=SR,zR.Keyed=NR,zR.Set=TR,zR.Indexed=IR,zR.prototype[_R]=!0;var DR=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[gR(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new rR(function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return iR(e,o,n[o])})},t}(IR),jR=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return VR.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new rR(function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return iR(e,a,n[a])})},t}(NR);jR.prototype[LR]=!0;var ZR,RR=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=cR(this._collection),r=0;if(lR(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=cR(this._collection);if(!lR(n))return new rR(oR);var r=0;return new rR(function(){var t=n.next();return t.done?t:iR(e,r++,t.value)})},t}(IR);function BR(){return ZR||(ZR=new DR([]))}function PR(e){var t=UR(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new jR(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function FR(e){var t=UR(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function UR(e){return OR(e)?new DR(e):aR(e)?new RR(e):void 0}function qR(){return this.__ensureOwner()}function WR(){return this.__ownerID?this:this.__ensureOwner(new mR)}var QR="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function GR(e){return e>>>1&1073741824|3221225471&e}var KR=Object.prototype.valueOf;function YR(e){if(null==e)return XR(e);if("function"==typeof e.hashCode)return GR(e.hashCode(e));var t,n=(t=e).valueOf!==KR&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==n)return XR(n);switch(typeof n){case"boolean":return n?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return GR(t)}(n);case"string":return n.length>lB?function(e){var t=dB[e];void 0===t&&(t=JR(e),sB===cB&&(sB=0,dB={}),sB++,dB[e]=t);return t}(n):JR(n);case"object":case"function":return function(e){var t;if(rB&&void 0!==(t=nB.get(e)))return t;if(t=e[aB],void 0!==t)return t;if(!eB){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[aB]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=tB(),rB)nB.set(e,t);else{if(void 0!==$R&&!1===$R(e))throw new Error("Non-extensible objects are not allowed as keys.");if(eB)Object.defineProperty(e,aB,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[aB]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[aB]=t}}return t}(n);case"symbol":return function(e){var t=iB[e];if(void 0!==t)return t;return t=tB(),iB[e]=t,t}(n);default:if("function"==typeof n.toString)return JR(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function XR(e){return null===e?1108378658:1108378659}function JR(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return GR(t)}var $R=Object.isExtensible,eB=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function tB(){var e=++oB;return 1073741824&oB&&(oB=0),e}var nB,rB="function"==typeof WeakMap;rB&&(nB=new WeakMap);var iB=Object.create(null),oB=0,aB="__immutablehash__";"function"==typeof Symbol&&(aB=Symbol(aB));var lB=16,cB=255,sB=0,dB={},uB=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=gB(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=CB(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(NR);uB.prototype[LR]=!0;var fB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&CR(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&CR(this),new rR(function(){var o=r.next();return o.done?o:iR(e,t?n.size-++i:i++,o.value,o)})},t}(IR),hB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new rR(function(){var t=n.next();return t.done?t:iR(e,t.value,t.value,t)})},t}(TR),pB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){HB(t);var r=KZ(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new rR(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){HB(r);var i=KZ(r);return iR(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(NR);function mB(e){var t=SB(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=VB,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new rR(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(1===t?0:1,n)},t}function CB(e,t,n){var r=SB(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,hR);return o===hR?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new rR(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return iR(r,l,t.call(n,a[1],l,e),i)})},r}function gB(e,t){var n=this,r=SB(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=mB(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=VB,r.__iterate=function(n,r){var i=this,o=0;return r&&CR(e),e.__iterate(function(e,a){return n(e,t?a:r?i.size-++o:o++,i)},!r)},r.__iterator=function(r,i){var o=0;i&&CR(e);var a=e.__iterator(2,!i);return new rR(function(){var e=a.next();if(e.done)return e;var l=e.value;return iR(r,t?l[0]:i?n.size-++o:o++,l[1],e)})},r}function vB(e,t,n,r){var i=SB(e);return r&&(i.has=function(r){var i=e.get(r,hR);return i!==hR&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,hR);return o!==hR&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,c){if(t.call(n,e,o,c))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),l=0;return new rR(function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,s=c[0],d=c[1];if(t.call(n,d,s,e))return iR(i,r?s:l++,d,o)}})},i}function yB(e,t,n,r){var i=e.size;if(yR(t,n,i))return e;if(void 0===i&&(t<0||n<0))return yB(e.toSeq().cacheResult(),t,n,r);var o,a=wR(t,i),l=bR(n,i)-a;l==l&&(o=l<0?0:l);var c=SB(e);return c.size=0===o?o:e.size&&o||void 0,!r&&SR(e)&&o>=0&&(c.get=function(t,n){return(t=gR(this,t))>=0&&t<o?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===o)return 0;if(n)return this.cacheResult().__iterate(t,n);var l=0,c=!0,s=0;return e.__iterate(function(e,n){if(!c||!(c=l++<a))return s++,!1!==t(e,r?n:s-1,i)&&s!==o}),s},c.__iteratorUncached=function(t,n){if(0!==o&&n)return this.cacheResult().__iterator(t,n);if(0===o)return new rR(oR);var i=e.__iterator(t,n),l=0,c=0;return new rR(function(){for(;l++<a;)i.next();if(++c>o)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:iR(t,c-1,0===t?void 0:e.value[1],e)})},c}function wB(e,t,n,r){var i=SB(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,c=0;return e.__iterate(function(e,o,s){if(!l||!(l=t.call(n,e,o,s)))return c++,i(e,r?o:c-1,a)}),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(2,o),c=!0,s=0;return new rR(function(){var e,o,d;do{if((e=l.next()).done)return r||1===i?e:iR(i,s++,0===i?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],c&&(c=t.call(n,d,o,a))}while(c);return 2===i?e:iR(i,o,d,e)})},i}fB.prototype.cacheResult=uB.prototype.cacheResult=hB.prototype.cacheResult=pB.prototype.cacheResult=VB;var bB=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),this[qZ]=this._wrappedIterables[0][qZ],this[FZ]=this._wrappedIterables[0][FZ],this[LR]=this._wrappedIterables[0][LR]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(0!==this._wrappedIterables.length){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=WZ(this),i=r?2:1,o=this._wrappedIterables[n].__iterator(i,t),a=!0,l=0;a;){for(var c=o.next();c.done;){if(++n===this._wrappedIterables.length)return l;c=(o=this._wrappedIterables[n].__iterator(i,t)).next()}a=!1!==(r?e(c.value[1],c.value[0],this):e(c.value,l,this)),l++}return l}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(0===this._wrappedIterables.length)return new rR(oR);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new rR(function(){for(var o=i.next();o.done;){if(++r===n._wrappedIterables.length)return o;o=(i=n._wrappedIterables[r].__iterator(e,t)).next()}return o})},t}(zR);function EB(e,t,n){var r=SB(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,l=!1;return function e(c,s){c.__iterate(function(o,c){return(!t||s<t)&&KZ(o)?e(o,s+1):(a++,!1===i(o,n?c:a-1,r)&&(l=!0)),!l},o)}(e,0),a},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),a=[],l=0;return new rR(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(2===r&&(c=c[1]),t&&!(a.length<t)||!KZ(c))return n?e:iR(r,l++,c,e);a.push(o),o=c.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}})},r}function MB(e,t,n){t||(t=OB);var r=WZ(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?NR(o):UZ(e)?IR(o):TR(o)}function AB(e,t,n){if(t||(t=OB),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return xB(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return xB(t,e,n)?n:e})}function xB(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function kB(e,t,n,r){var i=SB(e),o=new DR(n).map(function(e){return e.size});return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map(function(e){return e=YZ(e),cR(i?e.reverse():e)}),a=0,l=!1;return new rR(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),l?{value:void 0,done:!0}:iR(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function LB(e,t){return e===t?e:SR(e)?t:e.constructor(t)}function HB(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function _B(e){return WZ(e)?XZ:UZ(e)?JZ:$Z}function SB(e){return Object.create((WZ(e)?NR:UZ(e)?IR:TR).prototype)}function VB(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):zR.prototype.cacheResult.call(this)}function OB(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function zB(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function NB(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(zB(e)&&zB(t)&&e.equals(t))}function IB(e,t,n,r){return NP(e,[t],n,r)}function TB(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return jB(this,e)}function DB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return jB(this,t,e)}function jB(e,t,n){for(var r=[],i=0;i<t.length;i++){var o=XZ(t[i]);0!==o.size&&r.push(o)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){IB(e,r,hR,function(e){return e===hR?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):xR(e)?e:e.constructor(r[0])}var ZB=Object.prototype.toString;function RB(e){if(!e||"object"!=typeof e||"[object Object]"!==ZB.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function BB(e){return"object"==typeof e&&(kR(e)||Array.isArray(e)||RB(e))}function PB(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function FB(e){if(Array.isArray(e))return PB(e);var t={};for(var n in e)VR.call(e,n)&&(t[n]=e[n]);return t}function UB(e,t,n){return qB(e,t,function(e){function t(n,r,i){return BB(n)&&BB(r)&&(o=r,a=zR(n),l=zR(o),UZ(a)===UZ(l)&&WZ(a)===WZ(l))?qB(n,[r],t):e?e(n,r,i):r;var o,a,l}return t}(n))}function qB(e,t,n){if(!BB(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(kR(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?JZ:XZ,a=r?function(t){i===e&&(i=FB(i)),i.push(t)}:function(t,r){var o=VR.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=FB(i)),i[r]=a)},l=0;l<t.length;l++)o(t[l]).forEach(a);return i}function WB(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return UB(this,e)}function QB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return UB(this,t,e)}function GB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return NP(this,e,vP(),function(e){return UB(e,t)})}function KB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return NP(this,e,vP(),function(e){return qB(e,t)})}function YB(e,t,n){return NP(e,t,hR,function(){return n})}function XB(e,t){return YB(this,e,t)}function JB(e,t,n){return 1===arguments.length?e(this):IB(this,e,t,n)}function $B(e,t,n){return NP(this,e,t,n)}function eP(){return this.__altered}function tP(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var nP="@@__IMMUTABLE_MAP__@@";function rP(e){return Boolean(e&&e[nP])}function iP(e,t){if(!e)throw new Error(t)}function oP(e){iP(e!==1/0,"Cannot perform this action with an infinite size.")}var aP=function(e){function t(t){return null==t?vP():rP(t)&&!HR(t)?t:vP().withMutations(function(n){var r=e(t);oP(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return yP(this,e,t)},t.prototype.remove=function(e){return yP(this,e,hR)},t.prototype.deleteAll=function(e){var t=YZ(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vP()},t.prototype.sort=function(e){return eF(MB(this,e))},t.prototype.sortBy=function(e,t){return eF(MB(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,o){r.set(o,e.call(t,i,o,n))})})},t.prototype.__iterator=function(e,t){return new pP(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?gP(this.size,this._root,e,this.__hash):0===this.size?vP():(this.__ownerID=e,this.__altered=!1,this)},t}(XZ);aP.isMap=rP;var lP=aP.prototype;lP[nP]=!0,lP[dR]=lP.remove,lP.removeAll=lP.deleteAll,lP.setIn=XB,lP.removeIn=lP.deleteIn=DP,lP.update=JB,lP.updateIn=$B,lP.merge=lP.concat=TB,lP.mergeWith=DB,lP.mergeDeep=WB,lP.mergeDeepWith=QB,lP.mergeIn=KB,lP.mergeDeepIn=GB,lP.withMutations=tP,lP.wasAltered=eP,lP.asImmutable=qR,lP["@@transducer/init"]=lP.asMutable=WR,lP["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},lP["@@transducer/result"]=function(e){return e.asImmutable()};var cP=function(e,t){this.ownerID=e,this.entries=t};cP.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(NB(n,i[o][0]))return i[o][1];return r},cP.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===hR,c=this.entries,s=0,d=c.length;s<d&&!NB(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(pR(a),(l||!u)&&pR(o),!l||1!==c.length){if(!u&&!l&&c.length>=xP)return function(e,t,n,r){e||(e=new mR);for(var i=new fP(e,YR(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,r,i);var f=e&&e===this.ownerID,h=f?c:PB(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new cP(e,h)}};var sP=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};sP.prototype.get=function(e,t,n,r){void 0===t&&(t=YR(n));var i=1<<((0===e?t:t>>>e)&fR),o=this.bitmap;return 0===(o&i)?r:this.nodes[MP(o&i-1)].get(e+5,t,n,r)},sP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=(0===t?n:n>>>t)&fR,c=1<<l,s=this.bitmap,d=0!==(s&c);if(!d&&i===hR)return this;var u=MP(s&c-1),f=this.nodes,h=d?f[u]:void 0,p=wP(h,e,t+5,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=kP)return function(e,t,n,r,i){for(var o=0,a=new Array(uR),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new dP(e,o+1,a)}(e,f,s,l,p);if(d&&!p&&2===f.length&&bP(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&bP(p))return p;var m=e&&e===this.ownerID,C=d?p?s:s^c:s|c,g=d?p?AP(f,u,p,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(f,u,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}(f,u,p,m);return m?(this.bitmap=C,this.nodes=g,this):new sP(e,C,g)};var dP=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};dP.prototype.get=function(e,t,n,r){void 0===t&&(t=YR(n));var i=(0===e?t:t>>>e)&fR,o=this.nodes[i];return o?o.get(e+5,t,n,r):r},dP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=(0===t?n:n>>>t)&fR,c=i===hR,s=this.nodes,d=s[l];if(c&&!d)return this;var u=wP(d,e,t+5,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<LP)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,c=1,s=t.length;l<s;l++,c<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=c,a[o++]=d)}return new sP(e,i,a)}(e,s,f,l)}else f++;var h=e&&e===this.ownerID,p=AP(s,l,u,h);return h?(this.count=f,this.nodes=p,this):new dP(e,f,p)};var uP=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};uP.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(NB(n,i[o][0]))return i[o][1];return r},uP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=i===hR;if(n!==this.keyHash)return l?this:(pR(a),pR(o),EP(this,e,t,n,[r,i]));for(var c=this.entries,s=0,d=c.length;s<d&&!NB(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(pR(a),(l||!u)&&pR(o),l&&2===d)return new fP(e,this.keyHash,c[1^s]);var f=e&&e===this.ownerID,h=f?c:PB(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new uP(e,this.keyHash,h)};var fP=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};fP.prototype.get=function(e,t,n,r){return NB(n,this.entry[0])?this.entry[1]:r},fP.prototype.update=function(e,t,n,r,i,o,a){var l=i===hR,c=NB(r,this.entry[0]);return(c?i===this.entry[1]:l)?this:(pR(a),l?void pR(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new fP(e,this.keyHash,[r,i]):(pR(o),EP(this,e,t,YR(r),[r,i])))},cP.prototype.iterate=uP.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},sP.prototype.iterate=dP.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},fP.prototype.iterate=function(e,t){return e(this.entry)};var hP,pP=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&CP(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return mP(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return mP(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return mP(e,o.entry);t=this._stack=CP(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(rR);function mP(e,t){return iR(e,t[0],t[1])}function CP(e,t){return{node:e,index:0,__prev:t}}function gP(e,t,n,r){var i=Object.create(lP);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function vP(){return hP||(hP=gP(0))}function yP(e,t,n){var r,i;if(e._root){var o={value:!1},a={value:!1};if(r=wP(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===hR?-1:1:0)}else{if(n===hR)return e;i=1,r=new cP(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?gP(i,r):vP()}function wP(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===hR?e:(pR(l),pR(a),new fP(t,r,[i,o]))}function bP(e){return e.constructor===fP||e.constructor===uP}function EP(e,t,n,r,i){if(e.keyHash===r)return new uP(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&fR,l=(0===n?r:r>>>n)&fR,c=a===l?[EP(e,t,n+5,r,i)]:(o=new fP(t,r,i),a<l?[e,o]:[o,e]);return new sP(t,1<<a|1<<l,c)}function MP(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function AP(e,t,n,r){var i=r?e:PB(e);return i[t]=n,i}var xP=8,kP=16,LP=8;function HP(e){if(OR(e)&&"string"!=typeof e)return e;if(HR(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function _P(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function SP(e,t){return kR(e)?e.has(t):BB(e)&&VR.call(e,t)}function VP(e,t,n){return kR(e)?e.get(t,n):SP(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function OP(e,t){if(!BB(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(kR(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!VR.call(e,t))return e;var n=FB(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function zP(e,t,n){if(!BB(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(kR(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(VR.call(e,t)&&n===e[t])return e;var r=FB(e);return r[t]=n,r}function NP(e,t,n,r){r||(r=n,n=void 0);var i=IP(kR(e),e,HP(t),0,n,r);return i===hR?n:i}function IP(e,t,n,r,i,o){var a=t===hR;if(r===n.length){var l=a?i:t,c=o(l);return c===l?t:c}if(!a&&!BB(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(n).slice(0,r).map(_P)+"]: "+t);var s=n[r],d=a?hR:VP(t,s,hR),u=IP(d===hR?e:kR(d),d,n,r+1,i,o);return u===d?t:u===hR?OP(t,s):zP(a?e?vP():{}:t,s,u)}function TP(e,t){return NP(e,t,function(){return hR})}function DP(e){return TP(this,e)}var jP="@@__IMMUTABLE_LIST__@@";function ZP(e){return Boolean(e&&e[jP])}var RP=function(e){function t(t){var n=WP();if(null==t)return n;if(ZP(t))return t;var r=e(t),i=r.size;return 0===i?n:(oP(i),i>0&&i<uR?qP(0,i,5,null,new PP(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=gR(this,e))>=0&&e<this.size){var n=KP(this,e+=this._origin);return n&&n.array[e&fR]}return t},t.prototype.set=function(e,t){return function(e,t,n){if(t=gR(e,t),t!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?YP(e,t).set(0,n):YP(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=XP(e._capacity)?r=QP(r,e.__ownerID,0,t,n,o):i=QP(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return qP(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):WP()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){YP(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return YP(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){YP(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return YP(this,1)},t.prototype.shuffle=function(e){return void 0===e&&(e=Math.random),this.withMutations(function(t){for(var n,r,i=t.size;i;)n=Math.floor(e()*i--),r=t.get(n),t.set(n,t.get(i)),t.set(i,r)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&aR(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return YP(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return yR(e,t,n)?this:YP(this,wR(e,n),bR(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=UP(this,t);return new rR(function(){var i=r();return i===FP?{value:void 0,done:!0}:iR(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=UP(this,t);(n=i())!==FP&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qP(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?WP():(this.__ownerID=e,this.__altered=!1,this)},t}(JZ);RP.isList=ZP;var BP=RP.prototype;BP[jP]=!0,BP[dR]=BP.remove,BP.merge=BP.concat,BP.setIn=XB,BP.deleteIn=BP.removeIn=DP,BP.update=JB,BP.updateIn=$B,BP.mergeIn=KB,BP.mergeDeepIn=GB,BP.withMutations=tP,BP.wasAltered=eP,BP.asImmutable=qR,BP["@@transducer/init"]=BP.asMutable=WR,BP["@@transducer/step"]=function(e,t){return e.push(t)},BP["@@transducer/result"]=function(e){return e.asImmutable()};var PP=function(e,t){this.array=e,this.ownerID=t};PP.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+5)-1)||0===this.array.length)return this;var r=n>>>t&fR;if(r>=this.array.length)return new PP([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var l=GP(this,e);if(!o)for(var c=0;c<r;c++)l.array[c]=void 0;return i&&(l.array[r]=i),l},PP.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+5:uR)||0===this.array.length)return this;var r,i=n-1>>>t&fR;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=GP(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var FP={};function UP(e,t){var n=e._origin,r=e._capacity,i=XP(r),o=e._tail;return a(e._root,e._level,0);function a(e,l,c){return 0===l?function(e,a){var l=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,s=r-a;s>uR&&(s=uR);return function(){if(c===s)return FP;var e=t?--s:c++;return l&&l[e]}}(e,c):function(e,i,o){var l,c=e&&e.array,s=o>n?0:n-o>>i,d=1+(r-o>>i);d>uR&&(d=uR);return function(){for(;;){if(l){var e=l();if(e!==FP)return e;l=null}if(s===d)return FP;var n=t?--d:s++;l=a(c&&c[n],i-5,o+(n<<i))}}}(e,l,c)}}function qP(e,t,n,r,i,o,a){var l=Object.create(BP);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function WP(){return qP(0,0,5)}function QP(e,t,n,r,i,o){var a,l=r>>>n&fR,c=e&&l<e.array.length;if(!c&&void 0===i)return e;if(n>0){var s=e&&e.array[l],d=QP(s,t,n-5,r,i,o);return d===s?e:((a=GP(e,t)).array[l]=d,a)}return c&&e.array[l]===i?e:(o&&pR(o),a=GP(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function GP(e,t){return t&&e&&t===e.ownerID?e:new PP(e?e.array.slice():[],t)}function KP(e,t){if(t>=XP(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&fR],r-=5;return n}}function YP(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new mR,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var c=e._level,s=e._root,d=0;a+d<0;)s=new PP(s&&s.array.length?[void 0,s]:[],r),d+=1<<(c+=5);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=XP(o),f=XP(l);f>=1<<c+5;)s=new PP(s&&s.array.length?[s]:[],r),c+=5;var h=e._tail,p=f<u?KP(e,l-1):f>u?new PP([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var m=s=GP(s,r),C=c;C>5;C-=5){var g=u>>>C&fR;m=m.array[g]=GP(m.array[g],r)}m.array[u>>>5&fR]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,c=5,s=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;s;){var v=a>>>c&fR;if(v!==f>>>c&fR)break;v&&(d+=(1<<c)*v),c-=5,s=s.array[v]}s&&a>i&&(s=s.removeBefore(r,c,a-d)),s&&f<u&&(s=s.removeAfter(r,c,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=c,e._root=s,e._tail=p,e.__hash=void 0,e.__altered=!0,e):qP(a,l,c,s,p)}function XP(e){return e<uR?0:e-1>>>5<<5}function JP(e){return rP(e)&&HR(e)}var $P,eF=function(e){function t(e){return null==e?nF():JP(e)?e:nF().withMutations(function(t){var n=XZ(e);oP(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):nF()},t.prototype.set=function(e,t){return rF(this,e,t)},t.prototype.remove=function(e){return rF(this,e,hR)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?tF(t,n,e,this.__hash):0===this.size?nF():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(aP);function tF(e,t,n,r){var i=Object.create(eF.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function nF(){return $P||($P=tF(vP(),WP()))}function rF(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),c=void 0!==l;if(n===hR){if(!c)return e;a.size>=uR&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(c){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e.__altered=!0,e):tF(r,i)}eF.isOrderedMap=JP,eF.prototype[LR]=!0,eF.prototype[dR]=eF.prototype.remove;var iF="@@__IMMUTABLE_STACK__@@";function oF(e){return Boolean(e&&e[iF])}var aF=function(e){function t(e){return null==e?dF():oF(e)?e:dF().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=gR(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):sF(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&oF(t))return t;oP(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):sF(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):dF()},t.prototype.slice=function(t,n){if(yR(t,n,this.size))return this;var r=wR(t,this.size);if(bR(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):sF(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?sF(this.size,this._head,e,this.__hash):0===this.size?dF():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new DR(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new DR(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new rR(function(){if(r){var t=r.value;return r=r.next,iR(e,n++,t)}return{value:void 0,done:!0}})},t}(JZ);aF.isStack=oF;var lF,cF=aF.prototype;function sF(e,t,n,r){var i=Object.create(cF);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function dF(){return lF||(lF=sF(0))}function uF(e,t,n,r,i,o){return oP(e.size),e.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)},o),n}function fF(e,t){return t}function hF(e,t){return[t,e]}function pF(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function mF(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function CF(e,t){return e<t?1:e>t?-1:0}function gF(e,t){if(e===t)return!0;if(!KZ(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||WZ(e)!==WZ(t)||UZ(e)!==UZ(t)||HR(e)!==HR(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!QZ(e);if(HR(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&NB(i[1],e)&&(n||NB(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,l=t.__iterate(function(t,r){if(n?!e.has(t):i?!NB(t,e.get(r,hR)):!NB(e.get(r,hR),t))return a=!1,!1});return a&&e.size===l}cF[iF]=!0,cF.shift=cF.pop,cF.unshift=cF.push,cF.unshiftAll=cF.pushAll,cF.withMutations=tP,cF.wasAltered=eP,cF.asImmutable=qR,cF["@@transducer/init"]=cF.asMutable=WR,cF["@@transducer/step"]=function(e,t){return e.unshift(t)},cF["@@transducer/result"]=function(e){return e.asImmutable()};var vF,yF=function(e){function t(e,n,r){if(void 0===r&&(r=1),!(this instanceof t))return new t(e,n,r);if(iP(0!==r,"Cannot step a Range by 0"),iP(void 0!==e,"You must define a start value when using Range"),iP(void 0!==n,"You must define an end value when using Range"),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(vF)return vF;vF=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+gR(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return yR(e,n,this.size)?this:(e=wR(e,this.size),(n=bR(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new rR(function(){if(o===n)return{value:void 0,done:!0};var a=i;return i+=t?-r:r,iR(e,t?n-++o:o++,a)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:gF(this,e)},t}(IR),wF="@@__IMMUTABLE_SET__@@";function bF(e){return Boolean(e&&e[wF])}var EF=function(e){function t(t){return null==t?LF():bF(t)&&!HR(t)?t:LF().withMutations(function(n){var r=e(t);oP(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(XZ(e).keySeq())},t.intersect=function(e){return(e=YZ(e).toArray()).length?AF.intersect.apply(t(e.pop()),e):LF()},t.union=function(e){return(e=YZ(e).toArray()).length?AF.union.apply(t(e.pop()),e):LF()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return xF(this,this._map.set(e,e))},t.prototype.remove=function(e){return xF(this,this._map.remove(e))},t.prototype.clear=function(){return xF(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=xF(this,this._map.mapEntries(function(i){var o=i[1],a=e.call(t,o,o,n);return a!==o&&(r=!0),[a,a]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)"string"==typeof t[r]?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return PF(MB(this,e))},t.prototype.sortBy=function(e,t){return PF(MB(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}($Z);EF.isSet=bF;var MF,AF=EF.prototype;function xF(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function kF(e,t){var n=Object.create(AF);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function LF(){return MF||(MF=kF(vP()))}function HF(e,t,n){for(var r=HP(t),i=0;i!==r.length;)if((e=VP(e,r[i++],hR))===hR)return n;return e}function _F(e,t){return HF(this,e,t)}function SF(e,t){return HF(e,t,hR)!==hR}function VF(){oP(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}function OF(e){if(!e||"object"!=typeof e)return e;if(!KZ(e)){if(!BB(e))return e;e=zR(e)}if(WZ(e)){var t={};return e.__iterate(function(e,n){t[n]=OF(e)}),t}var n=[];return e.__iterate(function(e){n.push(OF(e))}),n}function zF(e){if(e.size===1/0)return 0;var t=HR(e),n=WZ(e),r=t?1:0;return e.__iterate(n?t?function(e,t){r=31*r+NF(YR(e),YR(t))|0}:function(e,t){r=r+NF(YR(e),YR(t))|0}:t?function(e){r=31*r+YR(e)|0}:function(e){r=r+YR(e)|0}),function(e,t){return t=QR(t,3432918353),t=QR(t<<15|t>>>-15,461845907),t=QR(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=QR(t^t>>>16,2246822507),t=QR(t^t>>>13,3266489909),t=GR(t^t>>>16),t}(e.size,r)}function NF(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function IF(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}AF[wF]=!0,AF[dR]=AF.remove,AF.merge=AF.concat=AF.union,AF.withMutations=tP,AF.asImmutable=qR,AF["@@transducer/init"]=AF.asMutable=WR,AF["@@transducer/step"]=function(e,t){return e.add(t)},AF["@@transducer/result"]=function(e){return e.asImmutable()},AF.__empty=LF,AF.__make=kF,YZ.Iterator=rR,IF(YZ,{toArray:function(){oP(this.size);var e=new Array(this.size||0),t=WZ(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new fB(this)},toJS:function(){return OF(this)},toKeyedSeq:function(){return new uB(this,!0)},toMap:function(){return aP(this.toKeyedSeq())},toObject:VF,toOrderedMap:function(){return eF(this.toKeyedSeq())},toOrderedSet:function(){return PF(WZ(this)?this.valueSeq():this)},toSet:function(){return EF(WZ(this)?this.valueSeq():this)},toSetSeq:function(){return new hB(this)},toSeq:function(){return UZ(this)?this.toIndexedSeq():WZ(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return aF(WZ(this)?this.valueSeq():this)},toList:function(){return RP(WZ(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return LB(this,function(e,t){var n=WZ(e),r=[e].concat(t).map(function(e){return KZ(e)?n&&(e=XZ(e)):e=n?PR(e):FR(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&WZ(i)||UZ(e)&&UZ(i))return i}return new bB(r)}(this,e))},includes:function(e){return this.some(function(t){return NB(t,e)})},entries:function(){return this.__iterator(2)},every:function(e,t){oP(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return LB(this,vB(this,e,t,!0))},partition:function(e,t){return function(e,t,n){var r=WZ(e),i=[[],[]];e.__iterate(function(o,a){i[t.call(n,o,a,e)?1:0].push(r?[a,o]:o)});var o=_B(e);return i.map(function(t){return LB(e,o(t))})}(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return oP(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){oP(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(0)},map:function(e,t){return LB(this,CB(this,e,t))},reduce:function(e,t,n){return uF(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return uF(this,e,t,n,arguments.length<2,!0)},reverse:function(){return LB(this,gB(this,!0))},slice:function(e,t){return LB(this,yB(this,e,t,!0))},some:function(e,t){oP(this.size);var n=!1;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=!0,!1}),n},sort:function(e){return LB(this,MB(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return CR(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=aP().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return gF(this,e)},entrySeq:function(){var e=this;if(e._cache)return new DR(e._cache);var t=e.toSeq().map(hF).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(pF(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(vR,null,e)},flatMap:function(e,t){return LB(this,function(e,t,n){var r=_B(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return LB(this,EB(this,e,!0))},fromEntrySeq:function(){return new pB(this)},get:function(e,t){return this.find(function(t,n){return NB(n,e)},void 0,t)},getIn:_F,groupBy:function(e,t){return function(e,t,n){var r=WZ(e),i=(HR(e)?eF():aP()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=_B(e);return i.map(function(t){return LB(e,o(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,hR)!==hR},hasIn:function(e){return SF(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:YZ(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:YZ(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return NB(t,e)})},keySeq:function(){return this.toSeq().map(fF).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return AB(this,e)},maxBy:function(e,t){return AB(this,t,e)},min:function(e){return AB(this,e?mF(e):CF)},minBy:function(e,t){return AB(this,t?mF(t):CF,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return LB(this,wB(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(pF(e),t)},sortBy:function(e,t){return LB(this,MB(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return LB(this,function(e,t,n){var r=SB(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),l=!0;return new rR(function(){if(!l)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],s=i[1];return t.call(n,s,c,o)?2===r?e:iR(r,c,s,e):(l=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(pF(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=zF(this))}});var TF=YZ.prototype;TF[GZ]=!0,TF[nR]=TF.values,TF.toJSON=TF.toArray,TF.__toStringMapper=_P,TF.inspect=TF.toSource=function(){return this.toString()},TF.chain=TF.flatMap,TF.contains=TF.includes,IF(XZ,{flip:function(){return LB(this,mB(this))},mapEntries:function(e,t){var n=this,r=0;return LB(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return LB(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var DF=XZ.prototype;DF[qZ]=!0,DF[nR]=TF.entries,DF.toJSON=VF,DF.__toStringMapper=function(e,t){return _P(t)+": "+_P(e)},IF(JZ,{toKeyedSeq:function(){return new uB(this,!1)},filter:function(e,t){return LB(this,vB(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return LB(this,gB(this,!1))},slice:function(e,t){return LB(this,yB(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=wR(e,e<0?this.count():this.size);var r=this.slice(0,e);return LB(this,1===n?r:r.concat(PB(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return LB(this,EB(this,e,!1))},get:function(e,t){return(e=gR(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=gR(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return LB(this,function(e,t){var n=SB(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new rR(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?iR(n,a++,t):iR(n,a++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(PB(arguments)),t=kB(this.toSeq(),IR.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),LB(this,n)},keySeq:function(){return yF(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return LB(this,wB(this,e,t,!1))},zip:function(){return LB(this,kB(this,RF,[this].concat(PB(arguments))))},zipAll:function(){return LB(this,kB(this,RF,[this].concat(PB(arguments)),!0))},zipWith:function(e){var t=PB(arguments);return t[0]=this,LB(this,kB(this,e,t))}});var jF=JZ.prototype;jF[FZ]=!0,jF[LR]=!0,IF($Z,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var ZF=$Z.prototype;function RF(){return PB(arguments)}function BF(e){return bF(e)&&HR(e)}ZF.has=TF.includes,ZF.contains=ZF.includes,ZF.keys=ZF.values,IF(NR,DF),IF(IR,jF),IF(TR,ZF);var PF=function(e){function t(e){return null==e?WF():BF(e)?e:WF().withMutations(function(t){var n=$Z(e);oP(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(XZ(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(EF);PF.isOrderedSet=BF;var FF,UF=PF.prototype;function qF(e,t){var n=Object.create(UF);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function WF(){return FF||(FF=qF(nF()))}UF[LR]=!0,UF.zip=jF.zip,UF.zipWith=jF.zipWith,UF.zipAll=jF.zipAll,UF.__empty=WF,UF.__make=qF;var QF=function(e,t){var n;!function(e){if(xR(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(kR(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var l=Object.keys(e),c=i._indices={};i._name=t,i._keys=l,i._defaultValues=e;for(var s=0;s<l.length;s++){var d=l[s];c[d]=s,i[d]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+YF(this)+' with property "'+d+'" since that property name is part of the Record API.'):JF(i,d)}}return this.__ownerID=void 0,this._values=RP().withMutations(function(e){e.setSize(a._keys.length),XZ(o).forEach(function(t,n){e.set(a._indices[n],t===a._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(GF);return i.constructor=r,t&&(r.displayName=t),r};QF.prototype.toString=function(){for(var e,t=YF(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+_P(this.get(e));return t+" }"},QF.prototype.equals=function(e){return this===e||xR(e)&&XF(this).equals(XF(e))},QF.prototype.hashCode=function(){return XF(this).hashCode()},QF.prototype.has=function(e){return this._indices.hasOwnProperty(e)},QF.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},QF.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return KF(this,n)}return this},QF.prototype.remove=function(e){return this.set(e)},QF.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:KF(this,e)},QF.prototype.wasAltered=function(){return this._values.wasAltered()},QF.prototype.toSeq=function(){return XF(this)},QF.prototype.toJS=function(){return OF(this)},QF.prototype.entries=function(){return this.__iterator(2)},QF.prototype.__iterator=function(e,t){return XF(this).__iterator(e,t)},QF.prototype.__iterate=function(e,t){return XF(this).__iterate(e,t)},QF.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?KF(this,t,e):(this.__ownerID=e,this._values=t,this)},QF.isRecord=xR,QF.getDescriptiveName=YF;var GF=QF.prototype;function KF(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function YF(e){return e.constructor.displayName||e.constructor.name||"Record"}function XF(e){return PR(e._keys.map(function(t){return[t,e.get(t)]}))}function JF(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){iP(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}GF[AR]=!0,GF[dR]=GF.remove,GF.deleteIn=GF.removeIn=DP,GF.getIn=_F,GF.hasIn=TF.hasIn,GF.merge=TB,GF.mergeWith=DB,GF.mergeIn=KB,GF.mergeDeep=WB,GF.mergeDeepWith=QB,GF.mergeDeepIn=GB,GF.setIn=XB,GF.update=JB,GF.updateIn=$B,GF.withMutations=tP,GF.asMutable=WR,GF.asImmutable=qR,GF[nR]=GF.entries,GF.toJSON=GF.toObject=TF.toObject,GF.inspect=GF.toSource=function(){return this.toString()};var $F,eU=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if($F)return $F;$F=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return NB(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return yR(e,n,r)?this:new t(this._value,bR(n,r)-wR(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return NB(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return NB(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new rR(function(){return i===r?{value:void 0,done:!0}:iR(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?NB(this._value,e._value):gF(this,e)},t}(IR);function tU(e,t,n,r,i,o){if("string"!=typeof n&&!kR(n)&&(OR(n)||aR(n)||RB(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,zR(n).map(function(r,o){return tU(e,t,r,o,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function nU(e,t){return UZ(t)?t.toList():WZ(t)?t.toMap():t.toSet()}var rU,iU=YZ,oU=_(Object.freeze({__proto__:null,Collection:YZ,Iterable:iU,List:RP,Map:aP,OrderedMap:eF,OrderedSet:PF,PairSorting:{LeftThenRight:-1,RightThenLeft:1},Range:yF,Record:QF,Repeat:eU,Seq:zR,Set:EF,Stack:aF,fromJS:function(e,t){return tU([],t||nU,e,"",t&&t.length>2?[]:void 0,{"":e})},get:VP,getIn:HF,has:SP,hasIn:SF,hash:YR,is:NB,isAssociative:QZ,isCollection:KZ,isImmutable:kR,isIndexed:UZ,isKeyed:WZ,isList:ZP,isMap:rP,isOrdered:HR,isOrderedMap:JP,isOrderedSet:BF,isPlainObject:RB,isRecord:xR,isSeq:SR,isSet:bF,isStack:oF,isValueObject:zB,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return qB(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return UB(e,t)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return UB(t,n,e)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return qB(t,n,e)},remove:OP,removeIn:TP,set:zP,setIn:YB,update:IB,updateIn:NP,version:"5.1.4"}));var aU=(rU||(rU=1,window,PZ.exports=function(e,t,n){return o={},r.m=i=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
34
+ let r=n?.map(e=>({...e,stepId:Yh()}));return e.map(e=>e.stepId===t&&["Group","PRE","POST","Script"].includes(e.type)?{...e,data:[...r||[]]}:e.data?{...e,data:RS(e.data,t,r)}:e)},BS=(e,t,n,r)=>e.map(e=>e.title===t?{...e,data:RS(e.data,n,r)}:e),PS=e=>{let t;if(e.includes("T"))t=new Date(e);else{const[n,r]=e.split(" ");if(!n||!r)throw new Error("Invalid input format. Expected 'DD-MM-YYYY HH:mm'");const[i,o,a]=n.split("-"),[l,c]=r.split(":");t=new Date(parseInt(a||"",10),parseInt(o||"",10)-1,parseInt(i||"",10),parseInt(l||"",10),parseInt(c||"",10))}const n=`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}`,r=`${("0"+t.getHours()).slice(-2)}:${("0"+t.getMinutes()).slice(-2)}:00`;return new Date(`${n}T${r}`)},FS=e=>{const t=new Date;return new Intl.DateTimeFormat("en-US",{timeZone:e,weekday:"long",year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}).format(t)},US=({data:r,level:i=0,columnCount:o=1,viewModeId:a,ViewComponent:l,handleClick:c,handleStepGroupExpand:s,isStepGroupExpanded:d})=>{const u=0===i?26:i+8,h=p(e=>["PRE","POST","Group"].includes(e)?"6px 8px":"7px 8px",[]);return e(t,{children:r?.map(t=>{const r=a===t.stepId,i=d?.(t.stepId),p=h(t.type);return n(f,{children:[e("tr",r?{className:"pre-edit-row",id:"getInFocus",children:e("td",{colSpan:o,children:e("div",{style:{marginLeft:u},children:l&&e(l,{})})})}:{children:e("td",{colSpan:o,style:{padding:p},children:n("div",{style:{marginLeft:u,display:"flex",alignItems:"center"},children:[e(K,{title:t?.name,children:n(F,{as:"div",color:"var(--brand-color)",lineHeight:"18px",onClick:()=>c?.(t),children:[t.displayOrder,".",ie(t.name,40)]})}),["PRE","POST","Group"].includes(t.type)&&e("div",{className:"pre-accordion-arrow "+(i?"expanded":""),children:e(P,{name:"arrow_right",className:"pre-arrow-svg",color:i?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>s?.(t)})})]})})}),i&&e(US,{data:t.data,level:u,columnCount:o,viewModeId:a,handleClick:c,ViewComponent:l,handleStepGroupExpand:s,isStepGroupExpanded:d})]},t.stepId)})})};var qS=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:a,tableDataTextColor:l,withCheckbox:c,onSelectClick:s,draggable:d,indexNumber:u=0,dataLength:f=0,viewModeId:p,ViewComponent:m,handleClick:C,handleStepGroupExpand:g,isStepGroupExpanded:v,scriptType:y})=>{const w=r?.isDisabled,b=r?._id||r?.stepId,E=!!y&&"cascaded"===r.cascaded,M=w||f<=1||E;let A=(u+1).toString();const{attributes:x,listeners:k,setNodeRef:L,transform:H,transition:_}=ha({id:b,disabled:M}),S=h(()=>({transform:Rr.Transform.toString(H),transition:_}),[H,_]),V=v?.(r.stepId);return n(t,{children:[e("tr",{ref:L,style:S,className:z(o,{"disabled-row":w}),children:i.map((t,i)=>{const o=0===i;return e("td",{style:{paddingLeft:o&&d?"0px":"8px"},onClick:()=>a(t,r,i),className:z(t.className,{"clickable-cell":t.onClick}),children:n(F,{as:"div",color:l,className:"ff-data-checkbox-container",children:[o&&c&&e("span",{className:"ff-table-pre-post-checkbox",children:e(te,{onChange:e=>s(e,r),checked:r.checked,disabled:!!w})}),o&&d&&e("div",{className:w?"ff-table-drag":"ff-table-drag-icon",...k,...x,children:e(P,{name:"drag",className:M?"drag-icon-disabled":"drag-icon"})}),pr(r,t,u),o&&["PRE","POST","Group"].includes(r.type)&&e("div",{className:"pre-accordion-arrow "+(V?"expanded":""),children:e(P,{name:"arrow_right",color:V?"var(--brand-color)":"var(--default-color)",width:12,height:12,className:"pre-arrow-svg",onClick:()=>{g?.({...r,serialNumber:A})}})}),t.extraInfo&&t.extraInfo({row:r,indexNumber:u})]})},`${t.accessor}${i}`)})},b),V&&e(US,{data:r.data,columnCount:i.length,viewModeId:p,ViewComponent:m,handleClick:C,handleStepGroupExpand:g,isStepGroupExpanded:v})]})});const WS=(e,t)=>{const{action:n,sourceIndex:r,nlpName:i,id:o}=t;if(!n)return e;const a=[...e];let l={stepId:"stepId-9745-9745",isNew:!0,disabled:!1,...i&&{name:i},...o&&{id:o}};switch(n){case"addBelow":void 0!==r&&a.splice(r+1,0,l);break;case"replaceNlp":void 0!==r&&a.splice(r,0,l);break;case"EditNlp":void 0!==r&&(a.splice(r,1),a.splice(r,0,l));break;case"addLast":a.push(l)}return a},QS=(e,t="nearest",n=5)=>{if(!e)return;const r=document.getElementById(e);r?r.scrollIntoView({behavior:"smooth",block:t}):n>0?setTimeout(()=>{QS(e,t,n-1)},300):console.warn(`Element with id - "${e}" not found after multiple retries.`)},GS=o(({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:c,allSelected:d,partialSelected:u=!1,withFixedHeader:f=!0,borderWithRadius:h=!1,headerCheckboxDisabled:p=!1,noDataContent:m,height:C="100%",className:g="",tableHeadClass:v="",tableBodyRowClass:E="",headerTextColor:M,tableDataTextColor:A,draggable:x=!1,onDragEnd:k,loadMore:L=()=>{},editMode:H="",editComponent:_,NlpComponent:S,AddNlp:V,handleDragStart:O,handleViewComponent:N,handleAccordion:I,loading:T,scriptType:D=!1},j)=>{const Z=a(null),[R,B]=s(null),[P,U]=s(null),q=e=>{U(t=>t===e?.stepId?null:e?.stepId)},W=e=>{q(e);const t=N?.(e,q);t?B(()=>t):q(null)},[Q,K]=s(new Map),Y=e=>Q.has(e),X=e=>{Y(e?.stepId)||(P&&q(null),I?.(e)),T||K(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})};l(()=>{const e=document.getElementById("ff-table-scroll-container"),n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return Z.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";L(t)}})},{root:e,rootMargin:"8px",threshold:.1}),Z.current.observe(n),Z.current.observe(r),()=>{Z.current?.disconnect()}},[t,L]);const J=(e,t,n)=>{let{onClick:r,accessor:i}=e;r&&ur(r)&&r(i,t,n)},$=(e,t)=>{c&&c(e,t)};return l(()=>{QS("getInFocus")},[V,P]),j&&b(j,()=>({resetStepGroupAccordion:()=>{K(new Map)}})),e(Vo,{collisionDetection:ci,onDragStart:()=>{O?.(),Q.clear()},onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&k&&k(i,o)},modifiers:[zf],children:e(aa,{disabled:!x,items:t?.map(e=>e.stepId||e._id),strategy:ra,children:n("div",{style:{height:C},id:"ff-table-scroll-container",className:z(g,{"pre-fixed-header-table":f,"pre-border-borderRadius":h}),children:[n("table",{className:z("ff-table-pre-post"),cellSpacing:0,children:[e("thead",{className:z({"pre-table-thead":f},v),children:e("tr",{children:r.map((t,r)=>e("th",{className:z(`${i&&`${i}-bg`}`,`${M&&`${M}-color`}`),style:{width:t?.width},children:n(F,{as:"div",fontWeight:"semi-bold",className:"ff-label-checkbox-container",lineHeight:"18px",color:"var(--drawer-title-color)",children:[0===r&&o&&e("span",{className:"ff-table-pre-post-checkbox",children:e(te,{onChange:e=>{$(e,{allSelected:e.target.checked})},checked:void 0!==d&&d,partial:!!u,disabled:p})}),t.header]})},t.header))})}),n("tbody",{className:"pre-table-tbody",children:[e("tr",{id:"ff-table-first-node"}),WS(t,V??{})?.map((i,a)=>{const l=H===i.stepId;return l||i.isNew?n("tr",{id:"getInFocus",className:"pre-edit-row",children:[l&&w(_)&&e("td",{colSpan:r.length,children:y(_,{rowData:i,rowIndex:a+1})}),i.isNew&&!l&&w(S)&&e("td",{colSpan:r.length,children:y(S,{rowIndex:a,rowData:i})})]},i.stepId||a):e(qS,{row:i,indexNumber:a,columns:r,tableBodyRowClass:E,handleOnclick:J,tableDataTextColor:A,withCheckbox:o,onSelectClick:$,draggable:x,dataLength:t?.length,viewModeId:P,ViewComponent:R,handleClick:W,handleStepGroupExpand:X,isStepGroupExpanded:Y,scriptType:D})}),e("tr",{id:"ff-table-last-node"})]})]}),G(t)&&G(V)&&e("div",{className:"ff-no-data-content",style:{height:`calc(${C} - 50px)`},children:m})]})})})}),KS=g(({data:r=[],level:o=0,columnCount:c=1,viewModeId:s,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:m,columns:C=[],parentIndex:g,updateRowHeight:v})=>{const y=a([]),w=new Set(["Group","PRE","POST","Script"]),b=o+8,E=(e,t,n,r)=>{const i=e[t.accessor];if(t.cell){const o=e._id||e.id;return t.cell({value:i,row:e,column:t.accessor,index:n,tableType:r,...o&&{refId:o}})}return t.accessor||i&&"object"!=typeof i?i:"--"};return l(()=>{if(!v)return;const e=new ResizeObserver(()=>{let e=0;y.current.forEach(t=>{t&&(e+=t.getBoundingClientRect().height)}),e>0&&v(g??0,e)});return y.current.forEach(t=>{t&&e.observe(t)}),()=>e.disconnect()},[r,v,g,p]),e(t,{children:r?.map((t,r)=>{const o=g??0+r+1;return n(i.Fragment,{children:[e("tr",s===t?.stepId?{ref:e=>y.current[r]=e,className:"steps-edit-row",id:"getInFocus",children:e("td",{colSpan:c,children:e("div",{style:{marginLeft:`${b}px`},children:d&&e(d,{})})})}:{ref:e=>y.current[r]=e,children:C.map((r,i)=>{return e("td",{style:{maxWidth:r.width,padding:(o=t.type,w.has(o)?"6px 8px":"7px 8px")},children:n(F,{as:"div",className:"ff-data-checkbox-container",children:[n("div",{className:"ff-data-checkbox-container-content",style:{marginLeft:0===i?`${b}px`:0},onClick:()=>{0===i&&!t?.displayName?.includes("End")&&!t?.isDisabled&&u?.({...t,tableType:f})},children:[!m&&0===i&&e("div",{style:{padding:"4px 18px"}}),E({...t,marginLeft:b},r)]}),0===i&&["Group","PRE","POST","Script"].includes(t.type)&&e("div",{className:"ff-accordion-arrow "+(p?.(t.stepId)?"expanded":""),children:e(P,{name:"arrow_right",color:p?.(t.stepId)?"var(--brand-color)":"var(--default-color)",className:"steps-arrow-svg",width:12,height:12,onClick:()=>h?.({...t,tableType:f})})})]})},`${t.stepId}-${i}`);var o})}),p?.(t.stepId)&&e(KS,{data:t.data,level:b,columnCount:c,viewModeId:s,ViewComponent:d,handleClick:u,tableType:f,handleStepGroupExpand:h,isStepGroupExpanded:p,isViewPrivilegeMode:m,columns:C,parentIndex:o,updateRowHeight:v})]},t.stepId)})})});KS.displayName="StepGroupAccordions";const YS=g(({row:r,columns:i,tableBodyRowClass:o,handleOnclick:c,tableDataTextColor:s,withCheckbox:d,onSelectClick:u,draggable:f,indexNumber:p=0,tableType:m="",viewModeId:C,ViewComponent:g,handleClick:v,selectedRows:y,handleStepGroupExpand:w,isStepGroupExpanded:b,dataLength:E,stepPartialSelect:M,isViewPrivilegeMode:A,isClientSide:x,updateRowHeight:k,rowId:L})=>{const H=a(null),_=h(()=>r?.isDisabled||(E??0)<=1||r.isSpecialNlp,[r,E]),S=(p+1).toString(),{attributes:V,listeners:O,setNodeRef:N,transform:I,transition:T}=ha({id:r?._id||r?.stepId,disabled:_}),D=h(()=>({transform:Rr.Transform.toString(I),transition:T}),[I,T]),j=r?._id||r?.stepId;l(()=>{if(H.current&&k){const e=H.current.getBoundingClientRect().height;k(p,e)}},[r,k,p,b?.(r?.stepId)]);const Z=e=>A||x?["Group","PRE","POST","Script"].includes(r.type)&&0===e?"4px 8px":"7px 8px":0!==e?"Steps"===m?"4px 8px":"7px 8px":"Steps"===m&&f?"4px 8px 4px 0px":"4px 8px 4px 24px";return n(t,{children:[e("tr",{"data-rowid":L,ref:e=>{H.current=e,N(e)},style:D,className:z(o,{"disabled-inner-row":_}),id:j,children:i?.map((i,o)=>e(t,{children:e("td",{style:{padding:Z(o),maxWidth:i.width},onClick:()=>c(i,r,p),children:n(F,{as:"div",color:s,className:"ff-data-checkbox-container",children:[0===o&&!x&&f&&e("div",{className:_?"ff-table-drag":"ff-table-drag-icon",...O,...V,children:e(P,{name:"drag",className:_?"drag-icon-disabled":"drag-icon"})}),0===o&&!x&&d&&e("span",{className:m&&y[m]?.has(r.stepId)||M?.has(r.stepId)?"ff-step-table-select-checkbox":"ff-table-checkbox-step",children:e(te,{onChange:e=>u(m,r,e.target.checked),checked:!!y[m]?.has(r.stepId),partial:M?.has(r.stepId),disabled:r?.isSpecialNlp&&r?.name?.includes("End")})}),n("div",{className:"ff-margin-container",style:{marginLeft:0===o?r.marginLeft:0},children:[pr(r,i,p,m),["Group","PRE","POST","Script"].includes(r.type)&&0===o&&!x&&e("div",{className:"ff-accordion-arrow "+(b?.(r?.stepId)?"expanded":""),children:e(P,{name:"arrow_right",className:"steps-arrow-svg",color:b?.(r?.stepId)?"var(--brand-color)":"var(--default-color)",width:12,height:12,onClick:()=>w?.({...r,tableType:m,serialNumber:S})})}),i.extraInfo?.({row:r,indexNumber:p,tableType:m})]})]})},`${i.accessor}-${Yh()}`)}))},j),b?.(r?.stepId)&&e(KS,{data:r.data||r?.stepResults,columnCount:i.length,viewModeId:C,ViewComponent:g,handleClick:v,tableType:m,handleStepGroupExpand:w,isStepGroupExpanded:b,level:r?.marginLeft,isViewPrivilegeMode:A,columns:i,parentIndex:p,updateRowHeight:k})]})});YS.displayName="StepTableMainRow";const XS=({data:t=[],columns:r=[],headerType:i,withCheckbox:o=!1,onSelect:c,withFixedHeader:d=!0,borderWithRadius:u=!1,noDataContent:f,height:m="100%",className:C="",tableBodyRowClass:g="",headerTextColor:v,tableDataTextColor:b,draggable:E=!1,onDragEnd:M,loadMore:A=()=>{},editMode:x="",editComponent:k,NlpComponent:L,AddNlp:H,handleDragStart:_,tableType:S,viewModeId:V,ViewComponent:O,handleClick:N,selectedRows:I,handleStepGroupExpand:T,isStepGroupExpanded:D,stepPartialSelect:j,isViewPrivilegeMode:Z,isClientSide:R,highlightKey:B,onHighlightComplete:P})=>{const F=a(null),U=a(null),[q,W]=s(0),[Q,K]=s(0),[Y,X]=s([]),[J,$]=s(null),ee=50,te=a(0);l(()=>{U.current&&K(U.current.clientHeight);const e=WS(t,H??{});X(t=>{const n=[...t];for(;n.length<e.length;)n.push(ee);return n.length>e.length&&(n.length=e.length),n})},[t,H]),l(()=>{te.current>0&&U.current&&(U.current.scrollTop=te.current,te.current=0)},[Y]),l(()=>{if(G(B))if(x)$(x);else if(H&&Object.keys(H).length>0){const e=WS(t,H).find(e=>e.isNew);e&&$(e.stepId||"new-row")}else $(null);else $(B)},[x,H,t,B]),l(()=>{if(J&&U.current){const e=setTimeout(()=>{const e=U.current?.querySelector(`[data-rowid="${J}"]`);e&&(e.scrollIntoView({behavior:"smooth",block:"nearest"}),setTimeout(()=>{G(B)||P?.()},300))},100);return()=>clearTimeout(e)}},[J,Y,B,P]);const ne=p(e=>{const t=e.currentTarget.scrollTop;W(t)},[]),re=p((e,t)=>{X(n=>{const r=[...n];return e<r.length&&r[e]!==t?(r[e]=t,r):n})},[]),ie=h(()=>WS(t,H??{}),[t,H]),oe=ie.length,{startIndex:ae,paddingTop:le,paddingBottom:ce,visibleRows:se}=h(()=>{let e=0,t=oe-1,n=0,r=0;if(Y.length===oe&&Q>0){let i=0;for(let t=0;t<oe;t++)i<=q&&(e=t),i+=Y[t]??0;i=0;for(let e=0;e<oe;e++)if(i+=Y[e]??0,i>=q+Q&&t===oe-1){t=e;break}if(e=Math.max(0,e-5),t=Math.min(oe-1,t+5),J){const n=ie.findIndex(e=>e.stepId===J||e.isNew&&"new-row"===J);n>=0&&(n<e?e=n:n>t&&(t=n))}n=Y.slice(0,e).reduce((e,t)=>e+t,0),r=Y.slice(t+1).reduce((e,t)=>e+t,0)}else{if(e=Math.max(0,Math.floor(q/ee)-5),t=Math.min(oe-1,e+Math.ceil(Q/ee)+5),J){const n=ie.findIndex(e=>e.stepId===J||e.isNew&&"new-row"===J);n>=0&&(n<e?e=n:n>t&&(t=n))}n=e*ee,r=(oe-t-1)*ee}return{startIndex:e,endIndex:t,paddingTop:n,paddingBottom:r,visibleRows:ie.slice(e,t+1)}},[ie,oe,Y,Q,q,5,J,ee]);l(()=>{const e=U.current,n=document.getElementById("ff-table-first-node"),r=document.getElementById("ff-table-last-node");if(e&&n&&r&&t?.length)return F.current=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t="ff-table-last-node"===e.target.id?"below":"above";A(t)}})},{root:e,rootMargin:"8px",threshold:.1}),F.current.observe(n),F.current.observe(r),()=>{F.current?.disconnect()}},[t?.length,A]);const de=(e,t,n)=>{const{onClick:r,accessor:i}=e;r&&ur(r)&&r(i,t,n)},ue=(e,t,n)=>{c&&c(e,t,n)};return e(Vo,{collisionDetection:ci,onDragStart:_,onDragEnd:e=>{const{active:n,over:r}=e;if(!r||n.id===r.id)return;const i=t.findIndex(e=>e._id===n.id||e.stepId===n.id),o=t.findIndex(e=>e._id===r.id||e.stepId===r.id);-1!==i&&-1!==o&&M&&M(i,o)},modifiers:[zf],children:e(aa,{disabled:!E,items:t?.map(e=>e._id||e.stepId),strategy:ra,children:n("div",{ref:U,style:{height:m,position:"relative",overflowY:m?.includes("vh")?"auto":void 0},id:"ff-table-scroll-container",className:z(C,{"ff-fixed-header-steps-table":d,"steps-border-borderRadius":u}),onScroll:ne,children:[n("table",{className:z("ff-table-steps"),cellSpacing:0,children:[e("thead",{className:"steps-inner-thead",children:e("tr",{children:r?.map(t=>e("th",{className:z(`${i&&`${i}-bg`}`,`${v&&`${v}-color`}`),style:{width:t?.width}},`${t.header}-${Yh()}`))})}),n("tbody",{className:"ff-steps-tbody",children:[e("tr",{id:"ff-table-first-node",style:{display:"none"}}),le>0&&e("tr",{children:e("td",{style:{height:le,padding:0},colSpan:r.length})}),se.map((i,a)=>{const l=ae+a,c=x===i.stepId,s=c||i.isNew,d=c&&i.stepId===J||i.isNew&&"new-row"===J;return s?n("tr",{className:"steps-edit-row",id:d?"getInFocus":void 0,"data-rowid":i.stepId||"new-row",children:[c&&w(k)&&e("td",{colSpan:r.length,children:y(k,{rowData:i,rowIndex:l+1})}),i.isNew&&!c&&w(L)&&e("td",{colSpan:r.length,children:y(L,{rowIndex:l,rowData:i})})]},i.stepId||l):e(YS,{rowId:i.stepId,row:i,indexNumber:l,columns:r,tableBodyRowClass:g,handleOnclick:de,tableDataTextColor:b,withCheckbox:o,onSelectClick:ue,draggable:E,tableType:S,viewModeId:V,ViewComponent:O,handleClick:N,selectedRows:I,handleStepGroupExpand:T,isStepGroupExpanded:D,dataLength:t?.length,stepPartialSelect:j,isViewPrivilegeMode:Z,isClientSide:R,updateRowHeight:re})}),ce>0&&e("tr",{children:e("td",{style:{height:ce,padding:0},colSpan:r.length})}),e("tr",{id:"ff-table-last-node",style:{display:"none"}})]})]}),t?.length<=0&&e("div",{className:"steps-no-data-content",style:{height:`calc(${m} - 50px)`},children:f})]})})})},JS=e=>["ElseIfCondition","ElseCondition"].includes(e?.nlpName);let $S=null,eV=null;const tV=e=>{if(eV===e&&$S)return $S;const t=((e,t="Steps")=>{const n=e.find(e=>e?.title===t);return n?.data??[]})(e),n=new Map,r=(e,n,r)=>{const i=t,o=i.findIndex(t=>t.stepId===e?.stepId),a=i.findIndex(e=>e.stepId===n?.stepId);return r?i.slice(o+1,a).map(e=>e.stepId):i.slice(o,a+1).map(e=>e.stepId)};return t?.forEach(e=>{const i=(e=>e.specialNlpId??e.conditionSearchKey??null)(e);if(!i)return;const o=n.get(i)||{start:null,end:null,childIds:[],allIds:[]};if(e?.isSpecialNlp&&e.name?.startsWith("Start")){o.start=e;const n=(e=>{const n=(e=>({IfCondition:"EndIfCondition",StartForLoop:"EndForLoop",StartIteration:"EndIteration",ElseIfCondition:"EndElseIfCondition",ElseCondition:"EndElseCondition"}[e.nlpName]||e.nlpName))(e),r=t;if(void 0!==e?.conditionId&&void 0!==e?.conditionSearchKey&&!e.specialNlpId){const t=e.conditionId===e.conditionSearchKey?e.conditionId:e.conditionSearchKey;return r.find(e=>e.conditionSearchKey===t&&e.nlpName===n)||null}return e.specialNlpId&&r.find(t=>t.specialNlpId===e.specialNlpId&&t.nlpName===n)||null})(e);n&&(o.end=n,o.childIds=r(e,n,!0),o.allIds=r(e,n,!1))}n.set(i,o)}),$S=n,eV=e,n},nV=e=>e.includes("/")?e.split("/").slice(0,-1).join("/"):e;const rV=e=>{if(!e)return!1;for(const t of Object.values(e))if(t&&t.size>0)return!0;return!1},iV=e=>{switch(e){case"PASS":return"var(--status-button-text-passed)";case"FAIL":return"var(--status-button-text-failed)";case"SKIP":return"var(--status-button-text-skipped)";case"WARNING":return"var(--status-warning-text-color)";default:return"var(--status-button-text-notExecuted)"}},oV=e=>{switch(e){case"PASS":return"Passed";case"FAIL":return"Failed";case"SKIP":return"Skipped";case"WARNING":return"Warning";default:return e}},aV=e=>{switch(e){case"PASS":return"passed";case"FAIL":return"failed";case"SKIP":return"skipped";case"WARNING":return"warning";case"Running":return"running";case"Partially Executed":return"partially-executed";case"Aborted":return"aborted";case"Terminated":return"terminated";default:return"default"}},lV=({metaData:t,width:n=0})=>{const r=t?.total||0,i=[{name:"Passed",count:t?.totalPassed,color:"var(--status-approved-text-color)"},{name:"Failed",count:t?.totalFailed,color:"var(--status-rejected-text-color)"},{name:"Warning",count:t?.totalWarning,color:"var(--status-warning-text-color)"},{name:"Skipped",count:t?.totalSkipped,color:"var(--status-skipped-text-color)"},{name:"Terminated",count:t?.totalTerminated,color:"var(--status-skipped-text-color)"},{name:"Aborted",count:t?.totalAborted,color:"var(--status-skipped-text-color)"}].filter(e=>e.count>0),o=i.map(({count:e,name:t})=>`${e}/${r} ${t}`).join(" "),a=n?ie(o,n,"pixel"):o,l=[];let c=0;for(const{count:e,name:t,color:n}of i){const i=`${e}/${r} ${t}`;if(!(c+i.length<=a.length)){const e=a.slice(c).trim();e&&l.push({text:e,color:n});break}l.push({text:i,color:n}),c+=i.length+1}return e("div",{className:"ff-stepResultStats",children:e(K,{title:o,children:e(F,{as:"div",className:"status-inline-text",fontWeight:"semi-bold",children:l.map(({text:t,color:n},r)=>e(F,{as:"span",fontWeight:"semi-bold",style:{color:n,whiteSpace:"nowrap"},children:t+" "},r))})})})},cV=({isHeaderRequired:r,isViewPrivilegeMode:i,onAccordionClick:o,isBulkEnable:a,showActionCell:l,handleMainCheckbox:c,isAllSelected:s,isPartialSelected:d,tableMeta:u=[],title:f,totalRows:h,expanded:p,actionCell:m,row:C,metaData:g,isClientSide:v})=>{const y=u?.map(e=>e.width),w=e=>{const t=y[e]??0;switch(e){case 0:return t+110;case 1:return t+(t>300?60:70);case 2:return t+20;default:return 0}};return n("article",{className:"step-title-article",style:{...!r&&!v&&{backgroundColor:"var(--hover-color)"}},children:[e("div",{style:{width:`${w(0)}px`},children:n("div",{className:"accordion-header",style:{paddingLeft:i||v?"8px":"24px"},children:[!i&&!v&&e(te,{onChange:e=>c(f,e.target.checked),checked:s(f,h),partial:d(f,h),disabled:0===h}),e("div",{className:"header-title",children:e(F,{as:"div",fontWeight:"semi-bold",color:v?"var(--brand-color)":"var(--nlp-option-color)",cursor:"default",lineHeight:"18px",children:f})}),e("div",v?{style:{padding:"12px"}}:{className:"accordion-arrow "+(p?"expanded":""),onClick:()=>o(f),children:e(P,{name:"arrow_right",color:p?"var(--brand-color)":"var(--default-color)",width:16,height:16,className:"steps-arrow-svg"})}),n("div",{className:"ff_action_container",children:[g&&e(lV,{metaData:g}),l&&!a&&e(t,{children:m(C)})]})]})}),g?.message&&e("div",{className:"step-result",style:{width:`${w(1)}px`},children:e(K,{title:g?.message,placement:"bottom-start",children:e(F,{lineHeight:"18px",as:"div",className:"step-result-text",color:iV(g?.status),children:g?.message})})}),g?.status&&e("div",{className:"step-result",style:{width:`${w(2)}px`},children:e(lr,{label:oV(g?.status),status:aV(g?.status),children:g?.status})})]})},sV=i.memo(i.forwardRef(({tableMeta:t=[],tableData:r=[],noDataContent:i,height:o="100%",withFixedHeader:a=!1,headerType:c,handleDragStart:d,onDragEnd:u,editMode:f,editComponent:m,NlpComponent:C,AddNlp:g,handleAccordion:v,handleViewComponent:y,onSelectClick:w,loading:E=!1,isViewPrivilegeMode:M=!1,defaultExpanded:A="Steps",isHeaderRequired:x=!0,isClientSide:k=!1,highlightKey:L,onHighlightComplete:H,isDraggable:_=!0},S)=>{const[V,O]=s(null),[N,I]=s(null),[T,D]=s({}),[j,Z]=s(new Map),[R,B]=s(!1),P=p((e,t)=>{const n=r.find(t=>t.title===e);n&&n.data&&0!==n.data.length&&D(n=>({...n,[e]:"open"===t||!n[e]}))},[r]),U=h(()=>e=>T[e]??!1,[T]),q=p(e=>{I(t=>t===e?.stepId?null:e?.stepId)},[]),W=p(e=>{q(e);const t=y?.(e,q);t?O(()=>t):q(null)},[y,q]),[Q,K]=s(Object.fromEntries(r.map(e=>[e.title,new Set]))),[Y,X]=s(new Set);l(()=>{if(K(e=>function(e,t){const n={};return e.forEach(e=>{const r=e.data.map(e=>e.stepId),i=t[e.title]||new Set,o=new Set([...i].filter(e=>r.includes(e)));n[e.title]=o}),n}(r,e)),X(e=>function(e,t){const n=e.reduce((e,t)=>(t.data.forEach(t=>e.add(t.stepId)),e),new Set);return new Set([...t].filter(e=>n.has(e)))}(r,e)),D(e=>function(e,t,n){const r={Steps:"Steps",Depends:"Depends on Scripts",PRE:"Pre Conditions",POST:"Post Conditions"},i={};return e.forEach(e=>{const o=e.title,a=o in t,l="All"===n?Object.values(r).includes(o):o===r[n];i[o]=a?t[o]??!1:l}),i}(r,e,A)),Q&&!rV(Q))return;const{updateSelectRow:e,updateStepPartialSelect:t}=((e,t,n)=>{const r=tV(e),i=new Set(t.Steps),o=new Set(n);return r?.forEach(e=>{const t=e?.childIds;if(0===t?.length)return;const n=t.every(e=>i.has(e)),a=t.some(e=>i.has(e));if(n?(i.add(e.start.stepId),i.add(e.end.stepId)):(i.delete(e.start.stepId),i.delete(e.end.stepId)),JS(e?.start)&&(a||n)){const t=e?.start?.conditionSearchKey,n=nV(t),a=r?.get(n)?.allIds;if(0===a?.length)return;a?.forEach(e=>{i.add(e),o.delete(e)})}a&&!n?(o.add(e.start.stepId),o.add(e.end.stepId)):(o.delete(e.start.stepId),o.delete(e.end.stepId))}),{updateSelectRow:{...t,Steps:i},updateStepPartialSelect:o}})(r,Q,Y);t&&X(t),e&&K(e)},[r]),l(()=>{if(rV(Q)){const e={...Q,partialSelected:Y};w?.(e)}else w?.(Q)},[Q]);const J=p((e,t)=>{const n=r.find(t=>t.title===e)?.data.map(e=>e.stepId);n&&(K(r=>({...r,[e]:t?new Set(n):new Set})),t||X(new Set))},[r]),$=p((e,t,n,r)=>{const{updateSelectRow:i,updateStepPartialSelect:o}=((e,t,n,r,i,o="Steps")=>{const a=new Set(r[o]);if("Steps"===o&&(t?.isSpecialNlp||t?.conditionId||t?.parentSpecialNlpId)){const{updateStepPartialSelect:l}=function(r){const o=new Set(i),l=tV(e),c=e=>{const t=e?.conditionSearchKey,n=nV(t),r=l.get(n);r&&(s(r.start),r.start?.conditionSearchKey?.includes("/")&&"IfCondition"!==r.start.nlpName&&c(r.start))},s=e=>{if(e?.isSpecialNlp){const t=e?.specialNlpId||e?.conditionSearchKey,r=t&&l.get(t);r&&Array.isArray(r.allIds)&&r.allIds.forEach(e=>{o.delete(e),n?a.add(e):a.delete(e)})}else n?a.add(e?.stepId):a.delete(e?.stepId)},d=e=>{let i=!0;const s=e=>{const t=e?.childIds;if(JS(e?.start)&&n&&c(r),0===t?.length)return;const d=t.every(e=>a.has(e)),u=t.some(e=>a.has(e));if(d?(a.add(e.start?.stepId),a.add(e.end?.stepId)):(a.delete(e.start?.stepId),a.delete(e.end?.stepId)),u&&!d?(o.add(e.start?.stepId),o.add(e.end?.stepId)):(o.delete(e.start?.stepId),o.delete(e.end?.stepId)),e?.start?.parentSpecialNlpId){const t=l.get(e.start.parentSpecialNlpId);t&&s(t)}if(e?.start?.conditionSearchKey){const t=nV(e?.start?.conditionSearchKey),n=e?.start?.conditionSearchKey,r=e?.start?.conditionId;if(n===r&&i){i=!1;const e=l.get(t);return void(e&&s(e))}if(n===r)return;const o=l.get(t);return void(o&&s(o))}};if(e?.conditionSearchKey===e?.conditionId&&!e?.parentSpecialNlpId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);return void(t&&s(t))}if(e?.conditionSearchKey||e?.conditionId||!e?.specialNlpId||e?.parentSpecialNlpId){if(e?.conditionSearchKey&&e?.conditionSearchKey===e?.conditionId&&e?.conditionId&&e?.specialNlpId){const t=l.get(e?.conditionSearchKey);t&&s(t)}if(e?.parentSpecialNlpId){const t=l.get(e?.parentSpecialNlpId);t&&s(t)}if(e?.conditionSearchKey){const n=!t?.isSpecialNlp||JS(e)||t?.specialNlpId?e.conditionSearchKey:nV(e.conditionSearchKey);i=!0;const r=l.get(n);if(r)return void s(r)}}};return s(r),d(r),{updateStepPartialSelect:o}}(t);return{updateSelectRow:{...r,[o]:a},updateStepPartialSelect:l}}return n?a.add(t.stepId):a.delete(t.stepId),{updateSelectRow:{...r,[o]:a}}})(e,t,n,Q,Y,r);o&&X(o),i&&K(i)},[Q,Y]),ee=p((e,t,n)=>{$(r,t,n,e)},[r,$]),te=p((e,t)=>{const n=t>0&&Q[e]?.size===t;return e.includes("Script")&&B(n),n},[Q]),ne=p((e,t)=>{const n=Q[e]?.size||0;return n>0&&n<t},[Q]),re=p(e=>j.has(e),[j]),ie=p(e=>{re(e?.stepId)||(N&&q(null),v?.(e)),E||Z(t=>{const n=new Map(t);return n.has(e?.stepId)?n.delete(e?.stepId):n.set(e?.stepId,!0),n})},[re,N,q,v,E]),oe=p(n=>"Steps"!==n.title||M?e(XS,{onHighlightComplete:H,highlightKey:L,draggable:!1,editMode:f,withCheckbox:!M,editComponent:m,columns:t,data:n.data,headerType:c,noDataContent:i,tableType:n.title,onSelect:ee,selectedRows:Q,viewModeId:N,ViewComponent:V,handleClick:W,handleStepGroupExpand:ie,isStepGroupExpanded:re,isViewPrivilegeMode:M,height:n?.data?.length<=15?"auto":o,isClientSide:k}):e(XS,{onHighlightComplete:H,highlightKey:L,draggable:_,columns:t,onDragEnd:u,data:n.data,headerType:c,withCheckbox:!0,editMode:f,editComponent:m,noDataContent:i,NlpComponent:C,AddNlp:g,tableType:n.title,handleDragStart:()=>{j.clear(),d?.()},onSelect:ee,selectedRows:Q,viewModeId:N,ViewComponent:V,handleClick:W,handleStepGroupExpand:ie,isStepGroupExpanded:re,stepPartialSelect:Y,height:0===n?.data?.length?"300px":n?.data?.length<=12?"auto":o,isClientSide:k}),[M,H,L,_,t,u,c,f,m,i,C,g,j,d,ee,Q,N,V,W,ie,re,Y,r.length,o,k]);return b(S,()=>({resetSelection:()=>{K(Object.fromEntries(r.map(e=>[e.title,new Set]))),X(new Set)},handleUpdateCheckbox:(e,t)=>{const n=e?.parentSpecialNlpId,i=e?.conditionSearchKey;(n||i)&&$(t||r,e,!1)},deleteRow:e=>{K(t=>Object.fromEntries(Object.entries(t)?.map(([t,n])=>[t,new Set([...n].filter(t=>t!==e?.stepId))])))},resetStepGroupAccordion:()=>{Z(new Map)}}),[r,$]),l(()=>{G(g)||(O(()=>null),I(null),"addLast"===g?.action&&P("Steps","open"))},[g]),n("div",{className:z("ff-accordion-table-container-steps",{"ff-accordion-fixed-header-table":a}),children:[x&&!k&&e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":a}),children:e("thead",{className:"table-thead",children:e("tr",{className:"ff-table-row",children:t.map((t,n)=>e("th",{style:{width:t?.width},className:z("ff-table-header",c&&`ff-accordion-table--${c}-bg`),children:e(F,{as:"div",fontWeight:"semi-bold",lineHeight:"18px",color:"var(--drawer-title-color)",children:t.header})},`${t.header}-${n}`))})})}),e("div",{className:"ff-accordion-table-body",style:{height:o,overflowY:"auto"},children:r?.map(r=>{const{title:i,data:o,actionCell:a,metaData:l}=r,c=o.length,s=U(i),d=Q[i]?.size??0;return n("div",{className:"column-table-accordion",children:[e(cV,{isViewPrivilegeMode:M,onAccordionClick:P,showActionCell:d>0&&c>0&&a,handleMainCheckbox:J,isAllSelected:te,isPartialSelected:ne,title:i,totalRows:c,expanded:s,metaData:l,actionCell:a,row:r,tableMeta:t,isHeaderRequired:x,isBulkEnable:R,isClientSide:k}),s&&oe(r)]},i)})})]})}));sV.displayName="StepLandingTable";var dV,uV,fV,hV,pV,mV,CV,gV,vV,yV,wV,bV,EV,MV,AV,xV,kV,LV,HV,_V,SV,VV,OV,zV,NV,IV,TV,DV,jV,ZV,RV,BV,PV,FV,UV,qV,WV,QV,GV,KV,YV,XV,JV,$V,eO,tO,nO,rO,iO,oO,aO,lO,cO,sO,dO,uO,fO,hO,pO,mO,CO,gO,vO,yO,wO,bO,EO,MO,AO,xO,kO,LO,HO,_O,SO,VO,OO,zO,NO,IO,TO,DO,jO,ZO,RO,BO,PO,FO,UO,qO,WO,QO={exports:{}};function GO(){return dV||(dV=1,QO.exports=function(){var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:Q(e)}function r(e){return l(e)?e:G(e)}function i(e){return c(e)?e:K(e)}function o(e){return a(e)&&!s(e)?e:Y(e)}function a(e){return!(!e||!e[u])}function l(e){return!(!e||!e[f])}function c(e){return!(!e||!e[h])}function s(e){return l(e)||c(e)}function d(e){return!(!e||!e[p])}t(r,n),t(i,n),t(o,n),n.isIterable=a,n.isKeyed=l,n.isIndexed=c,n.isAssociative=s,n.isOrdered=d,n.Keyed=r,n.Indexed=i,n.Set=o;var u="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",p="@@__IMMUTABLE_ORDERED__@@",m="delete",C=5,g=1<<C,v=g-1,y={},w={value:!1},b={value:!1};function E(e){return e.value=!1,e}function M(e){e&&(e.value=!0)}function A(){}function x(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function k(e){return void 0===e.size&&(e.size=e.__iterate(H)),e.size}function L(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?k(e)+t:t}function H(){return!0}function _(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function S(e,t){return O(e,t,0)}function V(e,t){return O(e,t,t)}function O(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var z=0,N=1,I=2,T="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",j=T||D;function Z(e){this.next=e}function R(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function P(e){return!!q(e)}function F(e){return e&&"function"==typeof e.next}function U(e){var t=q(e);return t&&t.call(e)}function q(e){var t=e&&(T&&e[T]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function Q(e){return null==e?ae():a(e)?e.toSeq():se(e)}function G(e){return null==e?ae().toKeyedSeq():a(e)?l(e)?e.toSeq():e.fromEntrySeq():le(e)}function K(e){return null==e?ae():a(e)?l(e)?e.entrySeq():e.toIndexedSeq():ce(e)}function Y(e){return(null==e?ae():a(e)?l(e)?e.entrySeq():e:ce(e)).toSetSeq()}Z.prototype.toString=function(){return"[Iterator]"},Z.KEYS=z,Z.VALUES=N,Z.ENTRIES=I,Z.prototype.inspect=Z.prototype.toSource=function(){return this.toString()},Z.prototype[j]=function(){return this},t(Q,n),Q.of=function(){return Q(arguments)},Q.prototype.toSeq=function(){return this},Q.prototype.toString=function(){return this.__toString("Seq {","}")},Q.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Q.prototype.__iterate=function(e,t){return ue(this,e,t,!0)},Q.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(G,Q),G.prototype.toKeyedSeq=function(){return this},t(K,Q),K.of=function(){return K(arguments)},K.prototype.toIndexedSeq=function(){return this},K.prototype.toString=function(){return this.__toString("Seq [","]")},K.prototype.__iterate=function(e,t){return ue(this,e,t,!1)},K.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(Y,Q),Y.of=function(){return Y(arguments)},Y.prototype.toSetSeq=function(){return this},Q.isSeq=oe,Q.Keyed=G,Q.Set=Y,Q.Indexed=K;var X,J,$,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function ie(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[ee])}function ae(){return X||(X=new te([]))}function le(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():F(e)?new ie(e).fromEntrySeq():P(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ce(e){var t=de(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function se(e){var t=de(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function de(e){return W(e)?new te(e):F(e)?new ie(e):P(e)?new re(e):void 0}function ue(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var l=i[n?o-a:a];if(!1===t(l[1],r?l[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new Z(function(){var e=i[n?o-a:a];return a++>o?B():R(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function he(e,t){return t?pe(t,e,"",{"":e}):me(e)}function pe(e,t,n,r){return Array.isArray(t)?e.call(r,n,K(t).map(function(n,r){return pe(e,n,r,t)})):Ce(t)?e.call(r,n,G(t).map(function(n,r){return pe(e,n,r,t)})):t}function me(e){return Array.isArray(e)?K(e).map(me).toList():Ce(e)?G(e).map(me).toMap():e}function Ce(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||l(e)!==l(t)||c(e)!==c(t)||d(e)!==d(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!s(e);if(d(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&ge(i[1],e)&&(n||ge(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var u=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!ge(t,e.get(r,y)):!ge(e.get(r,y),t))return u=!1,!1});return u&&e.size===f}function ye(e,t){if(!(this instanceof ye))return new ye(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(J)return J;J=this}}function we(e,t){if(!e)throw new Error(t)}function be(e,t,n){if(!(this instanceof be))return new be(e,t,n);if(we(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if($)return $;$=this}}function Ee(){throw TypeError("Abstract")}function Me(){}function Ae(){}function xe(){}Q.prototype[ee]=!0,t(te,K),te.prototype.get=function(e,t){return this.has(e)?this._array[L(this,e)]:t},te.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===e(n[t?r-i:i],i,this))return i+1;return i},te.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new Z(function(){return i>r?B():R(e,i,n[t?r-i++:i++])})},t(ne,G),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new Z(function(){var a=r[t?i-o:o];return o++>i?B():R(e,a,n[a])})},ne.prototype[p]=!0,t(re,K),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=U(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=U(this._iterable);if(!F(n))return new Z(B);var r=0;return new Z(function(){var t=n.next();return t.done?t:R(e,r++,t.value)})},t(ie,K),ie.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===e(i[o],o++,this))return o;for(;!(n=r.next()).done;){var a=n.value;if(i[o]=a,!1===e(a,o++,this))break}return o},ie.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,i=0;return new Z(function(){if(i>=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return R(e,i,r[i++])})},t(ye,K),ye.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ye.prototype.get=function(e,t){return this.has(e)?this._value:t},ye.prototype.includes=function(e){return ge(this._value,e)},ye.prototype.slice=function(e,t){var n=this.size;return _(e,t,n)?this:new ye(this._value,V(t,n)-S(e,n))},ye.prototype.reverse=function(){return this},ye.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},ye.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},ye.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},ye.prototype.__iterator=function(e,t){var n=this,r=0;return new Z(function(){return r<n.size?R(e,r++,n._value):B()})},ye.prototype.equals=function(e){return e instanceof ye?ge(this._value,e._value):ve(e)},t(be,K),be.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},be.prototype.get=function(e,t){return this.has(e)?this._start+L(this,e)*this._step:t},be.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},be.prototype.slice=function(e,t){return _(e,t,this.size)?this:(e=S(e,this.size),(t=V(t,this.size))<=e?new be(0,0):new be(this.get(e,this._end),this.get(t,this._end),this._step))},be.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},be.prototype.lastIndexOf=function(e){return this.indexOf(e)},be.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===e(i,o,this))return o+1;i+=t?-r:r}return o},be.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new Z(function(){var a=i;return i+=t?-r:r,o>n?B():R(e,o++,a)})},be.prototype.equals=function(e){return e instanceof be?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(Ee,n),t(Me,Ee),t(Ae,Ee),t(xe,Ee),Ee.Keyed=Me,Ee.Indexed=Ae,Ee.Set=xe;var ke="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Le(e){return e>>>1&1073741824|3221225471&e}function He(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Le(n)}if("string"===t)return e.length>Ze?_e(e):Se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ve(e);if("function"==typeof e.toString)return Se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function _e(e){var t=Pe[e];return void 0===t&&(t=Se(e),Be===Re&&(Be=0,Pe={}),Be++,Pe[e]=t),t}function Se(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Le(t)}function Ve(e){var t;if(Te&&void 0!==(t=Ie.get(e)))return t;if(void 0!==(t=e[je]))return t;if(!ze){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[je]))return t;if(void 0!==(t=Ne(e)))return t}if(t=++De,1073741824&De&&(De=0),Te)Ie.set(e,t);else{if(void 0!==Oe&&!1===Oe(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ze)Object.defineProperty(e,je,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[je]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[je]=t}}return t}var Oe=Object.isExtensible,ze=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function Ne(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Ie,Te="function"==typeof WeakMap;Te&&(Ie=new WeakMap);var De=0,je="__immutablehash__";"function"==typeof Symbol&&(je=Symbol(je));var Ze=16,Re=255,Be=0,Pe={};function Fe(e){we(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null==e?it():qe(e)&&!d(e)?e:it().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function qe(e){return!(!e||!e[Qe])}t(Ue,Me),Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return ot(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return ot(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Ct(this,En(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):it()},Ue.prototype.merge=function(){return ft(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return ft(this,ht,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,pt(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,it(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Pt(un(this,e))},Ue.prototype.sortBy=function(e,t){return Pt(un(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new A)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new et(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var We,Qe="@@__IMMUTABLE_MAP__@@",Ge=Ue.prototype;function Ke(e,t){this.ownerID=e,this.entries=t}function Ye(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function $e(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return R(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var i=Object.create(Ge);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function it(){return We||(We=rt(0))}function ot(e,t,n){var r,i;if(e._root){var o=E(w),a=E(b);if(r=at(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===y?-1:1:0)}else{if(n===y)return e;i=1,r=new Ke(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(i,r):it()}function at(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===y?e:(M(l),M(a),new $e(t,r,[i,o]))}function lt(e){return e.constructor===$e||e.constructor===Je}function ct(e,t,n,r,i){if(e.keyHash===r)return new Je(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&v,l=(0===n?r:r>>>n)&v;return new Ye(t,1<<a|1<<l,a===l?[ct(e,t,n+C,r,i)]:(o=new $e(t,r,i),a<l?[e,o]:[o,e]))}function st(e,t,n,r){e||(e=new A);for(var i=new $e(e,He(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function dt(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,c=1,s=t.length;l<s;l++,c<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=c,a[o++]=d)}return new Ye(e,i,a)}function ut(e,t,n,r,i){for(var o=0,a=new Array(g),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new Xe(e,o+1,a)}function ft(e,t,n){for(var i=[],o=0;o<n.length;o++){var l=n[o],c=r(l);a(l)||(c=c.map(function(e){return he(e)})),i.push(c)}return mt(e,t,i)}function ht(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):ge(e,t)?e:t}function pt(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var i=e(t,n,r);return ge(t,i)?t:i}}function mt(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},i=0;i<n.length;i++)n[i].forEach(r)}):e.constructor(n[0])}function Ct(e,t,n,r){var i=e===y,o=t.next();if(o.done){var a=i?n:e,l=r(a);return l===a?e:l}we(i||e&&e.set,"invalid keyPath");var c=o.value,s=i?y:e.get(c,y),d=Ct(s,t,n,r);return d===s?e:d===y?e.remove(c):(i?it():e).set(c,d)}function gt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function vt(e,t,n,r){var i=r?e:x(e);return i[t]=n,i}function yt(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}function wt(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}Ge[Qe]=!0,Ge[m]=Ge.remove,Ge.removeIn=Ge.deleteIn,Ke.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Ke.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===y,c=this.entries,s=0,d=c.length;s<d&&!ge(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(M(a),(l||!u)&&M(o),!l||1!==c.length){if(!u&&!l&&c.length>=bt)return st(e,c,r,i);var f=e&&e===this.ownerID,h=f?c:x(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Ke(e,h)}},Ye.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=1<<((0===e?t:t>>>e)&v),o=this.bitmap;return 0===(o&i)?r:this.nodes[gt(o&i-1)].get(e+C,t,n,r)},Ye.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,c=1<<l,s=this.bitmap,d=0!==(s&c);if(!d&&i===y)return this;var u=gt(s&c-1),f=this.nodes,h=d?f[u]:void 0,p=at(h,e,t+C,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=Et)return ut(e,f,s,l,p);if(d&&!p&&2===f.length&&lt(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&lt(p))return p;var m=e&&e===this.ownerID,g=d?p?s:s^c:s|c,w=d?p?vt(f,u,p,m):wt(f,u,m):yt(f,u,p,m);return m?(this.bitmap=g,this.nodes=w,this):new Ye(e,g,w)},Xe.prototype.get=function(e,t,n,r){void 0===t&&(t=He(n));var i=(0===e?t:t>>>e)&v,o=this.nodes[i];return o?o.get(e+C,t,n,r):r},Xe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=(0===t?n:n>>>t)&v,c=i===y,s=this.nodes,d=s[l];if(c&&!d)return this;var u=at(d,e,t+C,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<Mt)return dt(e,s,f,l)}else f++;var h=e&&e===this.ownerID,p=vt(s,l,u,h);return h?(this.count=f,this.nodes=p,this):new Xe(e,f,p)},Je.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(ge(n,i[o][0]))return i[o][1];return r},Je.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=He(r));var l=i===y;if(n!==this.keyHash)return l?this:(M(a),M(o),ct(this,e,t,n,[r,i]));for(var c=this.entries,s=0,d=c.length;s<d&&!ge(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(M(a),(l||!u)&&M(o),l&&2===d)return new $e(e,this.keyHash,c[1^s]);var f=e&&e===this.ownerID,h=f?c:x(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new Je(e,this.keyHash,h)},$e.prototype.get=function(e,t,n,r){return ge(n,this.entry[0])?this.entry[1]:r},$e.prototype.update=function(e,t,n,r,i,o,a){var l=i===y,c=ge(r,this.entry[0]);return(c?i===this.entry[1]:l)?this:(M(a),l?void M(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new $e(e,this.keyHash,[r,i]):(M(o),ct(this,e,t,He(r),[r,i])))},Ke.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},Ye.prototype.iterate=Xe.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},$e.prototype.iterate=function(e,t){return e(this.entry)},t(et,Z),et.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return tt(e,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return tt(e,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return tt(e,o.entry);t=this._stack=nt(o,t)}continue}t=this._stack=this._stack.__prev}return B()};var bt=g/4,Et=g/2,Mt=g/4;function At(e){var t=Nt();if(null==e)return t;if(xt(e))return e;var n=i(e),r=n.size;return 0===r?t:(Fe(r),r>0&&r<g?zt(0,r,C,null,new Ht(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function xt(e){return!(!e||!e[kt])}t(At,Ae),At.of=function(){return this(arguments)},At.prototype.toString=function(){return this.__toString("List [","]")},At.prototype.get=function(e,t){if((e=L(this,e))>=0&&e<this.size){var n=jt(this,e+=this._origin);return n&&n.array[e&v]}return t},At.prototype.set=function(e,t){return It(this,e,t)},At.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},At.prototype.insert=function(e,t){return this.splice(e,0,t)},At.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=C,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Nt()},At.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){Zt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},At.prototype.pop=function(){return Zt(this,0,-1)},At.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){Zt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},At.prototype.shift=function(){return Zt(this,1)},At.prototype.merge=function(){return Rt(this,void 0,arguments)},At.prototype.mergeWith=function(t){return Rt(this,t,e.call(arguments,1))},At.prototype.mergeDeep=function(){return Rt(this,ht,arguments)},At.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return Rt(this,pt(t),n)},At.prototype.setSize=function(e){return Zt(this,0,e)},At.prototype.slice=function(e,t){var n=this.size;return _(e,t,n)?this:Zt(this,S(e,n),V(t,n))},At.prototype.__iterator=function(e,t){var n=0,r=Ot(this,t);return new Z(function(){var t=r();return t===Vt?B():R(e,n++,t)})},At.prototype.__iterate=function(e,t){for(var n,r=0,i=Ot(this,t);(n=i())!==Vt&&!1!==e(n,r++,this););return r},At.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?zt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},At.isList=xt;var kt="@@__IMMUTABLE_LIST__@@",Lt=At.prototype;function Ht(e,t){this.array=e,this.ownerID=t}Lt[kt]=!0,Lt[m]=Lt.remove,Lt.setIn=Ge.setIn,Lt.deleteIn=Lt.removeIn=Ge.removeIn,Lt.update=Ge.update,Lt.updateIn=Ge.updateIn,Lt.mergeIn=Ge.mergeIn,Lt.mergeDeepIn=Ge.mergeDeepIn,Lt.withMutations=Ge.withMutations,Lt.asMutable=Ge.asMutable,Lt.asImmutable=Ge.asImmutable,Lt.wasAltered=Ge.wasAltered,Ht.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&v;if(r>=this.array.length)return new Ht([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-C,n))===a&&o)return this}if(o&&!i)return this;var l=Dt(this,e);if(!o)for(var c=0;c<r;c++)l.array[c]=void 0;return i&&(l.array[r]=i),l},Ht.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&v;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-C,n))===o&&i===this.array.length-1)return this}var a=Dt(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var _t,St,Vt={};function Ot(e,t){var n=e._origin,r=e._capacity,i=Bt(r),o=e._tail;return a(e._root,e._level,0);function a(e,t,n){return 0===t?l(e,n):c(e,t,n)}function l(e,a){var l=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,s=r-a;return s>g&&(s=g),function(){if(c===s)return Vt;var e=t?--s:c++;return l&&l[e]}}function c(e,i,o){var l,c=e&&e.array,s=o>n?0:n-o>>i,d=1+(r-o>>i);return d>g&&(d=g),function(){for(;;){if(l){var e=l();if(e!==Vt)return e;l=null}if(s===d)return Vt;var n=t?--d:s++;l=a(c&&c[n],i-C,o+(n<<i))}}}}function zt(e,t,n,r,i,o,a){var l=Object.create(Lt);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function Nt(){return _t||(_t=zt(0,0,C))}function It(e,t,n){if((t=L(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?Zt(e,t).set(0,n):Zt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=E(b);return t>=Bt(e._capacity)?r=Tt(r,e.__ownerID,0,t,n,o):i=Tt(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):zt(e._origin,e._capacity,e._level,i,r):e}function Tt(e,t,n,r,i,o){var a,l=r>>>n&v,c=e&&l<e.array.length;if(!c&&void 0===i)return e;if(n>0){var s=e&&e.array[l],d=Tt(s,t,n-C,r,i,o);return d===s?e:((a=Dt(e,t)).array[l]=d,a)}return c&&e.array[l]===i?e:(M(o),a=Dt(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function Dt(e,t){return t&&e&&t===e.ownerID?e:new Ht(e?e.array.slice():[],t)}function jt(e,t){if(t>=Bt(e._capacity))return e._tail;if(t<1<<e._level+C){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&v],r-=C;return n}}function Zt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new A,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var c=e._level,s=e._root,d=0;a+d<0;)s=new Ht(s&&s.array.length?[void 0,s]:[],r),d+=1<<(c+=C);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=Bt(o),f=Bt(l);f>=1<<c+C;)s=new Ht(s&&s.array.length?[s]:[],r),c+=C;var h=e._tail,p=f<u?jt(e,l-1):f>u?new Ht([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var m=s=Dt(s,r),g=c;g>C;g-=C){var y=u>>>g&v;m=m.array[y]=Dt(m.array[y],r)}m.array[u>>>C&v]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,c=C,s=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;s;){var w=a>>>c&v;if(w!==f>>>c&v)break;w&&(d+=(1<<c)*w),c-=C,s=s.array[w]}s&&a>i&&(s=s.removeBefore(r,c,a-d)),s&&f<u&&(s=s.removeAfter(r,c,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=c,e._root=s,e._tail=p,e.__hash=void 0,e.__altered=!0,e):zt(a,l,c,s,p)}function Rt(e,t,n){for(var r=[],o=0,l=0;l<n.length;l++){var c=n[l],s=i(c);s.size>o&&(o=s.size),a(c)||(s=s.map(function(e){return he(e)})),r.push(s)}return o>e.size&&(e=e.setSize(o)),mt(e,t,r)}function Bt(e){return e<g?0:e-1>>>C<<C}function Pt(e){return null==e?qt():Ft(e)?e:qt().withMutations(function(t){var n=r(e);Fe(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Ft(e){return qe(e)&&d(e)}function Ut(e,t,n,r){var i=Object.create(Pt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function qt(){return St||(St=Ut(it(),Nt()))}function Wt(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),c=void 0!==l;if(n===y){if(!c)return e;a.size>=g&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(c){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Ut(r,i)}function Qt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Xt(e){var t=yn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=wn,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===I){var r=e.__iterator(t,n);return new Z(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===N?z:N,n)},t}function Jt(e,t,n){var r=yn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,y);return o===y?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(I,i);return new Z(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return R(r,l,t.call(n,a[1],l,e),i)})},r}function $t(e,t){var n=yn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Xt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=wn,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var i=yn(e);return r&&(i.has=function(r){var i=e.get(r,y);return i!==y&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,y);return o!==y&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,c){if(t.call(n,e,o,c))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(I,o),l=0;return new Z(function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,s=c[0],d=c[1];if(t.call(n,d,s,e))return R(i,r?s:l++,d,o)}})},i}function tn(e,t,n){var r=Ue().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function nn(e,t,n){var r=l(e),i=(d(e)?Pt():Ue()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=vn(e);return i.map(function(t){return mn(e,o(t))})}function rn(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),_(t,n,i))return e;var o=S(t,i),a=V(n,i);if(o!=o||a!=a)return rn(e.toSeq().cacheResult(),t,n,r);var l,c=a-o;c==c&&(l=c<0?0:c);var s=yn(e);return s.size=0===l?l:e.size&&l||void 0,!r&&oe(e)&&l>=0&&(s.get=function(t,n){return(t=L(this,t))>=0&&t<l?e.get(t+o,n):n}),s.__iterateUncached=function(t,n){var i=this;if(0===l)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,c=!0,s=0;return e.__iterate(function(e,n){if(!c||!(c=a++<o))return s++,!1!==t(e,r?n:s-1,i)&&s!==l}),s},s.__iteratorUncached=function(t,n){if(0!==l&&n)return this.cacheResult().__iterator(t,n);var i=0!==l&&e.__iterator(t,n),a=0,c=0;return new Z(function(){for(;a++<o;)i.next();if(++c>l)return B();var e=i.next();return r||t===N?e:R(t,c-1,t===z?void 0:e.value[1],e)})},s}function on(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(I,i),l=!0;return new Z(function(){if(!l)return B();var e=a.next();if(e.done)return e;var i=e.value,c=i[0],s=i[1];return t.call(n,s,c,o)?r===I?e:R(r,c,s,e):(l=!1,B())})},r}function an(e,t,n,r){var i=yn(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,c=0;return e.__iterate(function(e,o,s){if(!l||!(l=t.call(n,e,o,s)))return c++,i(e,r?o:c-1,a)}),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(I,o),c=!0,s=0;return new Z(function(){var e,o,d;do{if((e=l.next()).done)return r||i===N?e:R(i,s++,i===z?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],c&&(c=t.call(n,d,o,a))}while(c);return i===I?e:R(i,o,d,e)})},i}function ln(e,t){var n=l(e),i=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?le(e):ce(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var o=i[0];if(o===e||n&&l(o)||c(e)&&c(o))return o}var s=new te(i);return n?s=s.toKeyedSeq():c(e)||(s=s.toSetSeq()),(s=s.flatten(!0)).size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),s}function cn(e,t,n){var r=yn(e);return r.__iterateUncached=function(r,i){var o=0,l=!1;function c(e,s){var d=this;e.__iterate(function(e,i){return(!t||s<t)&&a(e)?c(e,s+1):!1===r(e,n?i:o++,d)&&(l=!0),!l},i)}return c(e,0),o},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),l=[],c=0;return new Z(function(){for(;o;){var e=o.next();if(!1===e.done){var s=e.value;if(r===I&&(s=s[1]),t&&!(l.length<t)||!a(s))return n?e:R(r,c++,s,e);l.push(o),o=s.__iterator(r,i)}else o=l.pop()}return B()})},r}function sn(e,t,n){var r=vn(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}function dn(e,t){var n=yn(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e,r){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(N,r),a=0;return new Z(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?R(n,a++,t):R(n,a++,i.value,i)})},n}function un(e,t,n){t||(t=bn);var r=l(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?G(o):c(e)?K(o):Y(o)}function fn(e,t,n){if(t||(t=bn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return hn(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return hn(t,e,n)?n:e})}function hn(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function pn(e,t,r){var i=yn(e);return i.size=new te(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(N,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=n(e),U(i?e.reverse():e)}),a=0,l=!1;return new Z(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=n.some(function(e){return e.done})),l?B():R(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function mn(e,t){return oe(e)?t:e.constructor(t)}function Cn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Fe(e.size),k(e)}function vn(e){return l(e)?r:c(e)?i:o}function yn(e){return Object.create((l(e)?G:c(e)?K:Y).prototype)}function wn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Q.prototype.cacheResult.call(this)}function bn(e,t){return e>t?1:e<t?-1:0}function En(e){var t=U(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=U(n(e))}return t}function Mn(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);Ln(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=Ue(o)},i=r.prototype=Object.create(An);return i.constructor=r,r}t(Pt,Ue),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Pt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):qt()},Pt.prototype.set=function(e,t){return Wt(this,e,t)},Pt.prototype.remove=function(e){return Wt(this,e,y)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Pt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Pt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Ut(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Pt.isOrderedMap=Ft,Pt.prototype[p]=!0,Pt.prototype[m]=Pt.prototype.remove,t(Qt,G),Qt.prototype.get=function(e,t){return this._iter.get(e,t)},Qt.prototype.has=function(e){return this._iter.has(e)},Qt.prototype.valueSeq=function(){return this._iter.valueSeq()},Qt.prototype.reverse=function(){var e=this,t=$t(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Qt.prototype.map=function(e,t){var n=this,r=Jt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Qt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?gn(this):0,function(i){return e(i,t?--n:n++,r)}),t)},Qt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(N,t),r=t?gn(this):0;return new Z(function(){var i=n.next();return i.done?i:R(e,t?--r:r++,i.value,i)})},Qt.prototype[p]=!0,t(Gt,K),Gt.prototype.includes=function(e){return this._iter.includes(e)},Gt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Gt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t),r=0;return new Z(function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)})},t(Kt,Y),Kt.prototype.has=function(e){return this._iter.includes(e)},Kt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Kt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new Z(function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)})},t(Yt,G),Yt.prototype.entrySeq=function(){return this._iter.toSeq()},Yt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Cn(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Yt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(N,t);return new Z(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Cn(r);var i=a(r);return R(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},Gt.prototype.cacheResult=Qt.prototype.cacheResult=Kt.prototype.cacheResult=Yt.prototype.cacheResult=wn,t(Mn,Me),Mn.prototype.toString=function(){return this.__toString(kn(this)+" {","}")},Mn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Mn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Mn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=xn(this,it()))},Mn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+kn(this));var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:xn(this,n)},Mn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:xn(this,t)},Mn.prototype.wasAltered=function(){return this._map.wasAltered()},Mn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},Mn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},Mn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?xn(this,t,e):(this.__ownerID=e,this._map=t,this)};var An=Mn.prototype;function xn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function kn(e){return e._name||e.constructor.name||"Record"}function Ln(e,t){try{t.forEach(Hn.bind(void 0,e))}catch(e){}}function Hn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){we(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function _n(e){return null==e?Tn():Sn(e)&&!d(e)?e:Tn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function Sn(e){return!(!e||!e[On])}An[m]=An.remove,An.deleteIn=An.removeIn=Ge.removeIn,An.merge=Ge.merge,An.mergeWith=Ge.mergeWith,An.mergeIn=Ge.mergeIn,An.mergeDeep=Ge.mergeDeep,An.mergeDeepWith=Ge.mergeDeepWith,An.mergeDeepIn=Ge.mergeDeepIn,An.setIn=Ge.setIn,An.update=Ge.update,An.updateIn=Ge.updateIn,An.withMutations=Ge.withMutations,An.asMutable=Ge.asMutable,An.asImmutable=Ge.asImmutable,t(_n,xe),_n.of=function(){return this(arguments)},_n.fromKeys=function(e){return this(r(e).keySeq())},_n.prototype.toString=function(){return this.__toString("Set {","}")},_n.prototype.has=function(e){return this._map.has(e)},_n.prototype.add=function(e){return Nn(this,this._map.set(e,!0))},_n.prototype.remove=function(e){return Nn(this,this._map.remove(e))},_n.prototype.clear=function(){return Nn(this,this._map.clear())},_n.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)o(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},_n.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},_n.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return o(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},_n.prototype.merge=function(){return this.union.apply(this,arguments)},_n.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},_n.prototype.sort=function(e){return Dn(un(this,e))},_n.prototype.sortBy=function(e,t){return Dn(un(this,t,e))},_n.prototype.wasAltered=function(){return this._map.wasAltered()},_n.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},_n.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},_n.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},_n.isSet=Sn;var Vn,On="@@__IMMUTABLE_SET__@@",zn=_n.prototype;function Nn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function In(e,t){var n=Object.create(zn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Tn(){return Vn||(Vn=In(it()))}function Dn(e){return null==e?Pn():jn(e)?e:Pn().withMutations(function(t){var n=o(e);Fe(n.size),n.forEach(function(e){return t.add(e)})})}function jn(e){return Sn(e)&&d(e)}zn[On]=!0,zn[m]=zn.remove,zn.mergeDeep=zn.merge,zn.mergeDeepWith=zn.mergeWith,zn.withMutations=Ge.withMutations,zn.asMutable=Ge.asMutable,zn.asImmutable=Ge.asImmutable,zn.__empty=Tn,zn.__make=In,t(Dn,_n),Dn.of=function(){return this(arguments)},Dn.fromKeys=function(e){return this(r(e).keySeq())},Dn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Dn.isOrderedSet=jn;var Zn,Rn=Dn.prototype;function Bn(e,t){var n=Object.create(Rn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Pn(){return Zn||(Zn=Bn(qt()))}function Fn(e){return null==e?Kn():Un(e)?e:Kn().unshiftAll(e)}function Un(e){return!(!e||!e[Wn])}Rn[p]=!0,Rn.__empty=Pn,Rn.__make=Bn,t(Fn,Ae),Fn.of=function(){return this(arguments)},Fn.prototype.toString=function(){return this.__toString("Stack [","]")},Fn.prototype.get=function(e,t){var n=this._head;for(e=L(this,e);n&&e--;)n=n.next;return n?n.value:t},Fn.prototype.peek=function(){return this._head&&this._head.value},Fn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gn(e,t)},Fn.prototype.pushAll=function(e){if(0===(e=i(e)).size)return this;Fe(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gn(t,n)},Fn.prototype.pop=function(){return this.slice(1)},Fn.prototype.unshift=function(){return this.push.apply(this,arguments)},Fn.prototype.unshiftAll=function(e){return this.pushAll(e)},Fn.prototype.shift=function(){return this.pop.apply(this,arguments)},Fn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Kn()},Fn.prototype.slice=function(e,t){if(_(e,t,this.size))return this;var n=S(e,this.size);if(V(t,this.size)!==this.size)return Ae.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Gn(r,i)},Fn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Fn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Fn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new Z(function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return B()})},Fn.isStack=Un;var qn,Wn="@@__IMMUTABLE_STACK__@@",Qn=Fn.prototype;function Gn(e,t,n,r){var i=Object.create(Qn);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kn(){return qn||(qn=Gn(0))}function Yn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Qn[Wn]=!0,Qn.withMutations=Ge.withMutations,Qn.asMutable=Ge.asMutable,Qn.asImmutable=Ge.asImmutable,Qn.wasAltered=Ge.wasAltered,n.Iterator=Z,Yn(n,{toArray:function(){Fe(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Gt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Qt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Fe(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Pt(this.toKeyedSeq())},toOrderedSet:function(){return Dn(l(this)?this.valueSeq():this)},toSet:function(){return _n(l(this)?this.valueSeq():this)},toSetSeq:function(){return new Kt(this)},toSeq:function(){return c(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Fn(l(this)?this.valueSeq():this)},toList:function(){return At(l(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,ln(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return ge(t,e)})},entries:function(){return this.__iterator(I)},every:function(e,t){Fe(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Fe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Fe(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(z)},map:function(e,t){return mn(this,Jt(this,e,t))},reduce:function(e,t,n){var r,i;return Fe(this.size),arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,$t(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,un(this,e))},values:function(){return this.__iterator(N)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return k(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(H)},flatMap:function(e,t){return mn(this,sn(this,e,t))},flatten:function(e){return mn(this,cn(this,e,!0))},fromEntrySeq:function(){return new Yt(this)},get:function(e,t){return this.find(function(t,n){return ge(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=En(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,y):y)===y)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map($n).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):or)},minBy:function(e,t){return fn(this,t?nr(t):or,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,un(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ar(this))}});var Xn=n.prototype;Xn[u]=!0,Xn[j]=Xn.values,Xn.__toJS=Xn.toArray,Xn.__toStringMapper=rr,Xn.inspect=Xn.toSource=function(){return this.toString()},Xn.chain=Xn.flatMap,Xn.contains=Xn.includes,function(){try{Object.defineProperty(Xn,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Yn(r,{flip:function(){return mn(this,Xt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey(function(t){return ge(t,e)})},lastKeyOf:function(e){return this.findLastKey(function(t){return ge(t,e)})},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var Jn=r.prototype;function $n(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):e}function ir(){return x(arguments)}function or(e,t){return e<t?1:e>t?-1:0}function ar(e){if(e.size===1/0)return 0;var t=d(e),n=l(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+cr(He(e),He(t))|0}:function(e,t){r=r+cr(He(e),He(t))|0}:t?function(e){r=31*r+He(e)|0}:function(e){r=r+He(e)|0});return lr(i,r)}function lr(e,t){return t=ke(t,3432918353),t=ke(t<<15|t>>>-15,461845907),t=ke(t<<13|t>>>-13,5),t=ke((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Le((t=ke(t^t>>>13,3266489909))^t>>>16)}function cr(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Jn[f]=!0,Jn[j]=Xn.entries,Jn.__toJS=Xn.toObject,Jn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Yn(i,{toKeyedSeq:function(){return new Qt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,$t(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=S(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(x(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return mn(this,cn(this,e,!1))},get:function(e,t){return(e=L(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=L(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return mn(this,dn(this,e))},interleave:function(){var e=[this].concat(x(arguments)),t=pn(this.toSeq(),K.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),mn(this,n)},last:function(){return this.get(-1)},skipWhile:function(e,t){return mn(this,an(this,e,t,!1))},zip:function(){return mn(this,pn(this,ir,[this].concat(x(arguments))))},zipWith:function(e){var t=x(arguments);return t[0]=this,mn(this,pn(this,e,t))}}),i.prototype[h]=!0,i.prototype[p]=!0,Yn(o,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Xn.includes,Yn(G,r.prototype),Yn(K,i.prototype),Yn(Y,o.prototype),Yn(Me,r.prototype),Yn(Ae,i.prototype),Yn(xe,o.prototype);var sr={Iterable:n,Seq:Q,Collection:Ee,Map:Ue,OrderedMap:Pt,List:At,Stack:Fn,Set:_n,OrderedSet:Dn,Record:Mn,Range:be,Repeat:ye,is:ge,fromJS:he};return sr}()),QO.exports}function KO(){if(fV)return uV;fV=1;var e=GO().OrderedMap;return uV={createFromArray:function(t){return e(t.map(function(e){return[e.getKey(),e]}))}}}function YO(){if(pV)return hV;pV=1;var e=GO(),t=e.Map,n=e.OrderedSet,r=e.Record,i=n(),o={style:i,entity:null},a=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var s=a.prototype;return s.getStyle=function(){return this.get("style")},s.getEntity=function(){return this.get("entity")},s.hasStyle=function(e){return this.getStyle().includes(e)},a.applyStyle=function(e,t){var n=e.set("style",e.getStyle().add(t));return a.create(n)},a.removeStyle=function(e,t){var n=e.set("style",e.getStyle().remove(t));return a.create(n)},a.applyEntity=function(e,t){var n=e.getEntity()===t?e:e.set("entity",t);return a.create(n)},a.create=function(e){if(!e)return l;var n=t({style:i,entity:null}).merge(e),r=c.get(n);if(r)return r;var o=new a(n);return c=c.set(n,o),o},a.fromJS=function(e){var t=e.style,r=e.entity;return new a({style:Array.isArray(t)?n(t):t,entity:Array.isArray(r)?n(r):r})},a}(r(o)),l=new a,c=t([[t(o),l]]);return a.EMPTY=l,hV=a}function XO(){if(CV)return mV;return CV=1,mV=function(e,t,n,r){if(e.size){var i=0;e.reduce(function(e,o,a){return t(e,o)||(n(e)&&r(i,a),i=a),o}),n(e.last())&&r(i,e.count())}}}function JO(){if(vV)return gV;vV=1;var e=YO(),t=XO(),n=GO(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,c=o(),s=a({key:"",type:"unstyled",text:"",characterList:r(),depth:0,data:i()}),d=function(n){var i,o;function a(t){return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var s=a.prototype;return s.getKey=function(){return this.get("key")},s.getType=function(){return this.get("type")},s.getText=function(){return this.get("text")},s.getCharacterList=function(){return this.get("characterList")},s.getLength=function(){return this.getText().length},s.getDepth=function(){return this.get("depth")},s.getData=function(){return this.get("data")},s.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():c},s.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},s.findStyleRanges=function(e,n){t(this.getCharacterList(),u,e,n)},s.findEntityRanges=function(e,n){t(this.getCharacterList(),f,e,n)},a}(s);function u(e,t){return e.getStyle()===t.getStyle()}function f(e,t){return e.getEntity()===t.getEntity()}return gV=d}function $O(){if(wV)return yV;wV=1;var e=YO(),t=XO(),n=GO(),r=n.List,i=n.Map,o=n.OrderedSet,a=n.Record,l=n.Repeat,c=o(),s={parent:null,characterList:r(),data:i(),depth:0,key:"",text:"",type:"unstyled",children:r(),prevSibling:null,nextSibling:null},d=function(e,t){return e.getStyle()===t.getStyle()},u=function(e,t){return e.getEntity()===t.getEntity()},f=function(n){var i,o;function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return n.call(this,function(t){if(!t)return t;var n=t.characterList,i=t.text;return i&&!n&&(t.characterList=r(l(e.EMPTY,i.length))),t}(t))||this}o=n,(i=a).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var f=a.prototype;return f.getKey=function(){return this.get("key")},f.getType=function(){return this.get("type")},f.getText=function(){return this.get("text")},f.getCharacterList=function(){return this.get("characterList")},f.getLength=function(){return this.getText().length},f.getDepth=function(){return this.get("depth")},f.getData=function(){return this.get("data")},f.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():c},f.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},f.getChildKeys=function(){return this.get("children")},f.getParentKey=function(){return this.get("parent")},f.getPrevSiblingKey=function(){return this.get("prevSibling")},f.getNextSiblingKey=function(){return this.get("nextSibling")},f.findStyleRanges=function(e,n){t(this.getCharacterList(),d,e,n)},f.findEntityRanges=function(e,n){t(this.getCharacterList(),u,e,n)},a}(a(s));return yV=f}function ez(){if(kV)return xV;kV=1;var e=function(){if(AV)return MV;AV=1;var e=YO();return MV=function(t,n,r,i){for(var o=n,a=t.getCharacterList();o<r;)a=a.set(o,e.applyEntity(a.get(o),i)),o++;return t.set("characterList",a)}}(),t=GO();return xV=function(n,r,i){var o=n.getBlockMap(),a=r.getStartKey(),l=r.getStartOffset(),c=r.getEndKey(),s=r.getEndOffset(),d=o.skipUntil(function(e,t){return t===a}).takeUntil(function(e,t){return t===c}).toOrderedMap().merge(t.OrderedMap([[c,o.get(c)]])).map(function(t,n){var r=n===a?l:0,o=n===c?s:t.getLength();return e(t,r,o,i)});return n.merge({blockMap:o.merge(d),selectionBefore:r,selectionAfter:r})},xV}function tz(){if(SV)return _V;SV=1;var e="production"!==process.env.NODE_ENV?function(e){if(void 0===e)throw new Error("invariant(...): Second argument must be a string.")}:function(e){};return _V=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(e(n),!t){var a;if(void 0===n)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;(a=new Error(n.replace(/%s/g,function(){return String(i[l++])}))).name="Invariant Violation"}throw a.framesToPop=1,a}},_V}function nz(){if(NV)return zV;NV=1;var e=HV?LV:(HV=1,LV={getRemovalRange:function(e,t,n,r,i){var o=n.split(" ");o=o.map(function(e,t){if("forward"===i){if(t>0)return" "+e}else if(t<o.length-1)return e+" ";return e});for(var a,l=r,c=null,s=null,d=0;d<o.length;d++){if(e<(a=l+o[d].length)&&l<t)null!==c||(c=l),s=a;else if(null!==c)break;l=a}var u=r+n.length,f=c===r,h=s===u;return(!f&&h||f&&!h)&&("forward"===i?s!==u&&s++:c!==r&&c--),{start:c,end:s}}}),t=function(){if(OV)return VV;OV=1;var e=tz();return VV=function(t,n){var r=[];return t.findEntityRanges(function(e){return e.getEntity()===n},function(e,t){r.push({start:e,end:t})}),r.length||("production"!==process.env.NODE_ENV?e(!1,"Entity key not found in this range."):e(!1)),r},VV}(),n=tz();function r(r,i,o,a,l,c,s){var d=o.getStartOffset(),u=o.getEndOffset(),f=r.__get(l).getMutability(),h=s?d:u;if("MUTABLE"===f)return o;var p=t(i,l).filter(function(e){return h<=e.end&&h>=e.start});1!=p.length&&("production"!==process.env.NODE_ENV?n(!1,"There should only be one entity range within this removal range."):n(!1));var m=p[0];if("IMMUTABLE"===f)return o.merge({anchorOffset:m.start,focusOffset:m.end,isBackward:!1});c||(s?u=m.end:d=m.start);var C=e.getRemovalRange(d,u,i.getText().slice(m.start,m.end),m.start,a);return o.merge({anchorOffset:C.start,focusOffset:C.end,isBackward:!1})}return zV=function(e,t,n,i,o){var a=i.getStartOffset(),l=i.getEndOffset(),c=t.getEntityAt(a),s=n.getEntityAt(l-1);if(!c&&!s)return i;var d=i;if(c&&c===s)d=r(e,t,d,o,c,!0,!0);else if(c&&s){var u=r(e,t,d,o,c,!1,!0),f=r(e,n,d,o,s,!1,!1);d=d.merge({anchorOffset:u.getAnchorOffset(),focusOffset:f.getFocusOffset(),isBackward:!1})}else if(c){var h=r(e,t,d,o,c,!1,!0);d=d.merge({anchorOffset:h.getStartOffset(),isBackward:!1})}else if(s){var p=r(e,n,d,o,s,!1,!1);d=d.merge({focusOffset:p.getEndOffset(),isBackward:!1})}return d}}function rz(){if(TV)return IV;TV=1;var e={},t=Math.pow(2,24);return IV=function(){for(var n;void 0===n||e.hasOwnProperty(n)||!isNaN(+n);)n=Math.floor(Math.random()*t).toString(32);return e[n]=!0,n},IV}function iz(){if(jV)return DV;jV=1;var e=$O(),t=rz(),n=GO().OrderedMap;return DV=function(r){return r.first()instanceof e?function(e){var r,i={};return n(e.withMutations(function(e){e.forEach(function(n,o){var a=n.getKey(),l=n.getNextSiblingKey(),c=n.getPrevSiblingKey(),s=n.getChildKeys(),d=n.getParentKey(),u=t();if(i[a]=u,l&&(e.get(l)?e.setIn([l,"prevSibling"],u):e.setIn([a,"nextSibling"],null)),c&&(e.get(c)?e.setIn([c,"nextSibling"],u):e.setIn([a,"prevSibling"],null)),d&&e.get(d)){var f=e.get(d).getChildKeys();e.setIn([d,"children"],f.set(f.indexOf(n.getKey()),u))}else e.setIn([a,"parent"],null),r&&(e.setIn([r.getKey(),"nextSibling"],u),e.setIn([a,"prevSibling"],i[r.getKey()])),r=e.get(a);s.forEach(function(t){e.get(t)?e.setIn([t,"parent"],u):e.setIn([a,"children"],n.getChildKeys().filter(function(e){return e!==t}))})})}).toArray().map(function(e){return[i[e.getKey()],e.set("key",i[e.getKey()])]}))}(r):function(e){return n(e.toArray().map(function(e){var n=t();return[n,e.set("key",n)]}))}(r)},DV}function oz(){if(RV)return ZV;RV=1;var e=YO(),t=XO(),n=tz();function r(r,i,o){var a=i.getCharacterList(),l=o>0?a.get(o-1):void 0,c=o<a.count()?a.get(o):void 0,s=l?l.getEntity():void 0,d=c?c.getEntity():void 0;if(d&&d===s&&"MUTABLE"!==r.__get(d).getMutability()){for(var u,f=function(e,r,i){var o;return t(e,function(e,t){return e.getEntity()===t.getEntity()},function(e){return e.getEntity()===r},function(e,t){e<=i&&t>=i&&(o={start:e,end:t})}),"object"!=typeof o&&("production"!==process.env.NODE_ENV?n(!1,"Removal range must exist within character list."):n(!1)),o}(a,d,o),h=f.start,p=f.end;h<p;)u=a.get(h),a=a.set(h,e.applyEntity(u,null)),h++;return i.set("characterList",a)}return i}return ZV=function(e,t){var n=e.getBlockMap(),i=e.getEntityMap(),o={},a=t.getStartKey(),l=t.getStartOffset(),c=n.get(a),s=r(i,c,l);s!==c&&(o[a]=s);var d=t.getEndKey(),u=t.getEndOffset(),f=n.get(d);a===d&&(f=s);var h=r(i,f,u);return h!==f&&(o[d]=h),Object.keys(o).length?e.merge({blockMap:n.merge(o),selectionAfter:t}):e.set("selectionAfter",t)}}function az(){if(PV)return BV;PV=1;var e=iz(),t=oz();return BV=function(n,r){var i=r.getStartKey(),o=r.getStartOffset(),a=r.getEndKey(),l=r.getEndOffset(),c=t(n,r).getBlockMap(),s=c.keySeq(),d=s.indexOf(i),u=s.indexOf(a)+1;return e(c.slice(d,u).map(function(e,t){var n=e.getText(),r=e.getCharacterList();return i===a?e.merge({text:n.slice(o,l),characterList:r.slice(o,l)}):t===i?e.merge({text:n.slice(o),characterList:r.slice(o)}):t===a?e.merge({text:n.slice(0,l),characterList:r.slice(0,l)}):e}))}}function lz(){if(UV)return FV;return UV=1,FV=function(e,t,n){var r=e;if(n===r.count())t.forEach(function(e){r=r.push(e)});else if(0===n)t.reverse().forEach(function(e){r=r.unshift(e)});else{var i=r.slice(0,n),o=r.slice(n);r=i.concat(t,o).toList()}return r}}function cz(){if(WV)return qV;WV=1;var e=KO(),t=$O(),n=GO(),r=lz(),i=tz(),o=iz(),a=n.List,l=function(n,r,i,o,l,c){var s=i.first()instanceof t,d=[],u=o.size,f=i.get(l),h=o.first(),p=o.last(),m=p.getLength(),C=p.getKey(),g=s&&(!f.getChildKeys().isEmpty()||!h.getChildKeys().isEmpty());i.forEach(function(e,t){t===l?(g?d.push(e):d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.slice(0,t),a=i.slice(0,t),l=n.first();return e.merge({text:o+l.getText(),characterList:a.concat(l.getCharacterList()),type:o?e.getType():l.getType(),data:l.getData()})}(e,c,o)),o.slice(g?0:1,u-1).forEach(function(e){return d.push(e)}),d.push(function(e,t,n){var r=e.getText(),i=e.getCharacterList(),o=r.length,a=r.slice(t,o),l=i.slice(t,o),c=n.last();return c.merge({text:c.getText()+a,characterList:c.getCharacterList().concat(l),data:c.getData()})}(e,c,o))):d.push(e)});var v=e.createFromArray(d);return s&&(v=function(e,t,n,r){return e.withMutations(function(t){var i=n.getKey(),o=r.getKey(),l=n.getNextSiblingKey(),c=n.getParentKey(),s=function(e,t){var n=e.getKey(),r=e,i=[];for(t.get(n)&&i.push(n);r&&r.getNextSiblingKey();){var o=r.getNextSiblingKey();if(!o)break;i.push(o),r=t.get(o)}return i}(r,e),d=s[s.length-1];if(t.get(o)?(t.setIn([i,"nextSibling"],o),t.setIn([o,"prevSibling"],i)):(t.setIn([i,"nextSibling"],r.getNextSiblingKey()),t.setIn([r.getNextSiblingKey(),"prevSibling"],i)),t.setIn([d,"nextSibling"],l),l&&t.setIn([l,"prevSibling"],d),s.forEach(function(e){return t.setIn([e,"parent"],c)}),c){var u=e.get(c).getChildKeys(),f=u.indexOf(i)+1,h=u.toArray();h.splice.apply(h,[f,0].concat(s)),t.setIn([c,"children"],a(h))}})}(v,0,f,h)),n.merge({blockMap:v,selectionBefore:r,selectionAfter:r.merge({anchorKey:C,anchorOffset:m,focusKey:C,focusOffset:m,isBackward:!1})})};return qV=function(e,n,a){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA";n.isCollapsed()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should only be called with a collapsed selection state."):i(!1));var s=e.getBlockMap(),d=o(a),u=n.getStartKey(),f=n.getStartOffset(),h=s.get(u);return h instanceof t&&(h.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?i(!1,"`insertFragment` should not be called when a container node is selected."):i(!1))),1===d.size?function(e,t,n,i,o,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"REPLACE_WITH_NEW_DATA",c=n.get(o),s=c.getText(),d=c.getCharacterList(),u=o,f=a+i.getText().length,h=null;switch(l){case"MERGE_OLD_DATA_TO_NEW_DATA":h=i.getData().merge(c.getData());break;case"REPLACE_WITH_NEW_DATA":h=i.getData()}var p=c.getType();s&&"unstyled"===p&&(p=i.getType());var m=c.merge({text:s.slice(0,a)+i.getText()+s.slice(a),characterList:r(d,i.getCharacterList(),a),type:p,data:h});return e.merge({blockMap:n.set(o,m),selectionBefore:t,selectionAfter:t.merge({anchorKey:u,anchorOffset:f,focusKey:u,focusOffset:f,isBackward:!1})})}(e,n,s,d.first(),u,f,c):l(e,n,s,d,u,f)},qV}function sz(){if(YV)return KV;YV=1;var e=GO().Map;return KV=function(t,n,r){var i=n.getStartKey(),o=n.getEndKey(),a=t.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat(e([[o,a.get(o)]])).map(r);return t.merge({blockMap:a.merge(l),selectionBefore:n,selectionAfter:n})},KV}function dz(){if(JV)return XV;JV=1;var e=$O();return XV=function(t,n){if(!(t instanceof e))return null;var r=t.getNextSiblingKey();if(r)return r;var i=t.getParentKey();if(!i)return null;for(var o=n.get(i);o&&!o.getNextSiblingKey();){var a=o.getParentKey();o=a?n.get(a):null}return o?o.getNextSiblingKey():null}}function uz(){if(eO)return $V;eO=1;var e=$O(),t=dz(),n=GO();n.List;var r=n.Map,i=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},o=function(e,t){var n=[];if(!e)return n;for(var r=t.get(e);r&&r.getParentKey();){var i=r.getParentKey();i&&n.push(i),r=i?t.get(i):null}return n},a=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getNextSiblingKey();r&&!t.get(r);)r=n.get(r).getNextSiblingKey()||null;return r},l=function(e,t,n){if(!e)return null;for(var r=n.get(e.getKey()).getPrevSiblingKey();r&&!t.get(r);)r=n.get(r).getPrevSiblingKey()||null;return r},c=function(e,n,r,c){return e.withMutations(function(s){if(i(n.getKey(),s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})}),i(r.getKey(),s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})}),o(n.getKey(),c).forEach(function(e){return i(e,s,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return s.get(e)}),nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),i(n.getNextSiblingKey(),s,function(e){return e.merge({prevSibling:n.getPrevSiblingKey()})}),i(n.getPrevSiblingKey(),s,function(e){return e.merge({nextSibling:a(e,s,c)})}),i(r.getNextSiblingKey(),s,function(e){return e.merge({prevSibling:l(e,s,c)})}),i(r.getPrevSiblingKey(),s,function(e){return e.merge({nextSibling:r.getNextSiblingKey()})}),o(r.getKey(),c).forEach(function(e){i(e,s,function(e){return e.merge({children:e.getChildKeys().filter(function(e){return s.get(e)}),nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),function(e,n){var r=[];if(!e)return r;for(var i=t(e,n);i&&n.get(i);){var o=n.get(i);r.push(i),i=o.getParentKey()?t(o,n):null}return r}(r,c).forEach(function(e){return i(e,s,function(e){return e.merge({nextSibling:a(e,s,c),prevSibling:l(e,s,c)})})}),null==e.get(n.getKey())&&null!=e.get(r.getKey())&&r.getParentKey()===n.getKey()&&null==r.getPrevSiblingKey()){var d=n.getPrevSiblingKey();i(r.getKey(),s,function(e){return e.merge({prevSibling:d})}),i(d,s,function(e){return e.merge({nextSibling:r.getKey()})});var u=d?e.get(d):null,f=u?u.getParentKey():null;if(n.getChildKeys().forEach(function(e){i(e,s,function(e){return e.merge({parent:f})})}),null!=f){var h=e.get(f);i(f,s,function(e){return e.merge({children:h.getChildKeys().concat(n.getChildKeys())})})}i(n.getChildKeys().find(function(t){return null===e.get(t).getNextSiblingKey()}),s,function(e){return e.merge({nextSibling:n.getNextSiblingKey()})})}})},s=function(e,t,n){if(0===t)for(;t<n;)e=e.shift(),t++;else if(n===e.count())for(;n>t;)e=e.pop(),n--;else{var r=e.slice(0,t),i=e.slice(n);e=r.concat(i).toList()}return e};return $V=function(n,i){if(i.isCollapsed())return n;var a,l=n.getBlockMap(),d=i.getStartKey(),u=i.getStartOffset(),f=i.getEndKey(),h=i.getEndOffset(),p=l.get(d),m=l.get(f),C=p instanceof e,g=[];if(C){var v=m.getChildKeys(),y=o(f,l);m.getNextSiblingKey()&&(g=g.concat(y)),v.isEmpty()||(g=g.concat(y.concat([f]))),g=g.concat(o(t(m,l),l))}a=p===m?s(p.getCharacterList(),u,h):p.getCharacterList().slice(0,u).concat(m.getCharacterList().slice(h));var w=p.merge({text:p.getText().slice(0,u)+m.getText().slice(h),characterList:a}),b=C&&0===u&&0===h&&m.getParentKey()===d&&null==m.getPrevSiblingKey()?r([[d,null]]):l.toSeq().skipUntil(function(e,t){return t===d}).takeUntil(function(e,t){return t===f}).filter(function(e,t){return-1===g.indexOf(t)}).concat(r([[f,null]])).map(function(e,t){return t===d?w:null}),E=l.merge(b).filter(function(e){return!!e});return C&&p!==m&&(E=c(E,p,m,l)),n.merge({blockMap:E,selectionBefore:i,selectionAfter:i.merge({anchorKey:d,anchorOffset:u,focusKey:d,focusOffset:u,isBackward:!1})})},$V}function fz(){if(nO)return tO;nO=1;var e=$O(),t=rz(),n=GO(),r=tz(),i=sz(),o=n.List,a=n.Map,l=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}};return tO=function(n,c){c.isCollapsed()||("production"!==process.env.NODE_ENV?r(!1,"Selection range must be collapsed."):r(!1));var s=c.getAnchorKey(),d=n.getBlockMap(),u=d.get(s),f=u.getText();if(!f){var h=u.getType();if("unordered-list-item"===h||"ordered-list-item"===h)return i(n,c,function(e){return e.merge({type:"unstyled",depth:0})})}var p=c.getAnchorOffset(),m=u.getCharacterList(),C=t(),g=u instanceof e,v=u.merge({text:f.slice(0,p),characterList:m.slice(0,p)}),y=v.merge({key:C,text:f.slice(p),characterList:m.slice(p),data:a()}),w=d.toSeq().takeUntil(function(e){return e===u}),b=d.toSeq().skipUntil(function(e){return e===u}).rest(),E=w.concat([[s,v],[C,y]],b).toOrderedMap();return g&&(u.getChildKeys().isEmpty()||("production"!==process.env.NODE_ENV?r(!1,"ContentBlockNode must not have children"):r(!1)),E=function(e,t,n){return e.withMutations(function(e){var r=t.getKey(),i=n.getKey();l(t.getParentKey(),e,function(e){var t=e.getChildKeys(),n=t.indexOf(r)+1,a=t.toArray();return a.splice(n,0,i),e.merge({children:o(a)})}),l(t.getNextSiblingKey(),e,function(e){return e.merge({prevSibling:i})}),l(r,e,function(e){return e.merge({nextSibling:i})}),l(i,e,function(e){return e.merge({prevSibling:r})})})}(E,v,y)),n.merge({blockMap:E,selectionBefore:c,selectionAfter:c.merge({anchorKey:C,anchorOffset:0,focusKey:C,focusOffset:0,isBackward:!1})})},tO}function hz(){if(iO)return rO;iO=1;var e=YO(),t=function(){if(EV)return bV;EV=1;var e=YO(),t=GO().Map;function n(n,r,i,o){var a=n.getBlockMap(),l=r.getStartKey(),c=r.getStartOffset(),s=r.getEndKey(),d=r.getEndOffset(),u=a.skipUntil(function(e,t){return t===l}).takeUntil(function(e,t){return t===s}).concat(t([[s,a.get(s)]])).map(function(t,n){var r,a;l===s?(r=c,a=d):(r=n===l?c:0,a=n===s?d:t.getLength());for(var u,f=t.getCharacterList();r<a;)u=f.get(r),f=f.set(r,o?e.applyStyle(u,i):e.removeStyle(u,i)),r++;return t.set("characterList",f)});return n.merge({blockMap:a.merge(u),selectionBefore:r,selectionAfter:r})}return bV={add:function(e,t,r){return n(e,t,r,!0)},remove:function(e,t,r){return n(e,t,r,!1)}}}(),n=ez(),r=nz(),i=az(),o=GO(),a=cz(),l=function(){if(GV)return QV;GV=1;var e=GO(),t=lz(),n=tz(),r=e.Repeat;return QV=function(e,i,o,a){i.isCollapsed()||("production"!==process.env.NODE_ENV?n(!1,"`insertText` should only be called with a collapsed range."):n(!1));var l=null;if(null!=o&&(l=o.length),null==l||0===l)return e;var c=e.getBlockMap(),s=i.getStartKey(),d=i.getStartOffset(),u=c.get(s),f=u.getText(),h=u.merge({text:f.slice(0,d)+o+f.slice(d,u.getLength()),characterList:t(u.getCharacterList(),r(a,l).toList(),d)}),p=d+l;return e.merge({blockMap:c.set(s,h),selectionAfter:i.merge({anchorOffset:p,focusOffset:p})})},QV}(),c=tz(),s=sz(),d=oz(),u=uz(),f=fz(),h=o.OrderedSet,p={replaceText:function(t,n,r,i,o){var a=d(t,n),c=u(a,n),s=e.create({style:i||h(),entity:o||null});return l(c,c.getSelectionAfter(),r,s)},insertText:function(e,t,n,r,i){return t.isCollapsed()||("production"!==process.env.NODE_ENV?c(!1,"Target range must be collapsed for `insertText`."):c(!1)),p.replaceText(e,t,n,r,i)},moveText:function(e,t,n){var r=i(e,t),o=p.removeRange(e,t,"backward");return p.replaceWithFragment(o,n,r)},replaceWithFragment:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"REPLACE_WITH_NEW_DATA",i=d(e,t),o=u(i,t);return a(o,o.getSelectionAfter(),n,r)},removeRange:function(e,t,n){var i,o,a,l;t.getIsBackward()&&(t=t.merge({anchorKey:t.getFocusKey(),anchorOffset:t.getFocusOffset(),focusKey:t.getAnchorKey(),focusOffset:t.getAnchorOffset(),isBackward:!1})),i=t.getAnchorKey(),o=t.getFocusKey(),a=e.getBlockForKey(i),l=e.getBlockForKey(o);var c=t.getStartOffset(),s=t.getEndOffset(),f=a.getEntityAt(c),h=l.getEntityAt(s-1);if(i===o&&f&&f===h){var p=r(e.getEntityMap(),a,l,t,n);return u(e,p)}var m=d(e,t);return u(m,t)},splitBlock:function(e,t){var n=d(e,t),r=u(n,t);return f(r,r.getSelectionAfter())},applyInlineStyle:function(e,n,r){return t.add(e,n,r)},removeInlineStyle:function(e,n,r){return t.remove(e,n,r)},setBlockType:function(e,t,n){return s(e,t,function(e){return e.merge({type:n,depth:0})})},setBlockData:function(e,t,n){return s(e,t,function(e){return e.merge({data:n})})},mergeBlockData:function(e,t,n){return s(e,t,function(e){return e.merge({data:e.getData().merge(n)})})},applyEntity:function(e,t,r){var i=d(e,t);return n(i,t,r)}};return rO=p}function pz(){if(aO)return oO;return aO=1,oO=function(e){return Object.keys(e).map(function(t){return e[t]})},oO}function mz(){if(cO)return lO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cO=1;var t=XO(),n=pz(),r=GO(),i=r.List,o=r.Repeat,a=r.Record,l=function(){return!0},c=a({start:null,end:null}),s=a({start:null,end:null,decoratorKey:null,leaves:null}),d={generate:function(e,n,r){var a=n.getLength();if(!a)return i.of(new s({start:0,end:0,decoratorKey:null,leaves:i.of(new c({start:0,end:0}))}));var d=[],h=r?r.getDecorations(n,e):i(o(null,a)),p=n.getCharacterList();return t(h,f,l,function(e,t){d.push(new s({start:e,end:t,decoratorKey:h.get(e),leaves:u(p.slice(e,t).toList(),e)}))}),i(d)},fromJS:function(t){var r=t.leaves,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["leaves"]);return new s(function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},o,{leaves:null!=r?i(Array.isArray(r)?r:n(r)).map(function(e){return c(e)}):null}))}};function u(e,n){var r=[],o=e.map(function(e){return e.getStyle()}).toList();return t(o,f,l,function(e,t){r.push(new c({start:e+n,end:t+n}))}),i(r)}function f(e,t){return e===t}return lO=d}function Cz(){if(dO)return sO;dO=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getType=function(){return this.get("type")},i.getMutability=function(){return this.get("mutability")},i.getData=function(){return this.get("data")},r}((0,GO().Record)({type:"TOKEN",mutability:"IMMUTABLE",data:Object}));return sO=e}function gz(){if(pO)return hO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pO=1;var t=Cz(),n=GO(),r=tz(),i=(fO||(fO=1,uO=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}),uO),o=(0,n.Map)(),a=i();function l(e,t){console.warn("WARNING: "+e+' will be deprecated soon!\nPlease use "'+t+'" instead.')}var c={getLastCreatedEntityKey:function(){return l("DraftEntity.getLastCreatedEntityKey","contentState.getLastCreatedEntityKey"),c.__getLastCreatedEntityKey()},create:function(e,t,n){return l("DraftEntity.create","contentState.createEntity"),c.__create(e,t,n)},add:function(e){return l("DraftEntity.add","contentState.addEntity"),c.__add(e)},get:function(e){return l("DraftEntity.get","contentState.getEntity"),c.__get(e)},__getAll:function(){return o},__loadWithEntities:function(e){o=e,a=i()},mergeData:function(e,t){return l("DraftEntity.mergeData","contentState.mergeEntityData"),c.__mergeData(e,t)},replaceData:function(e,t){return l("DraftEntity.replaceData","contentState.replaceEntityData"),c.__replaceData(e,t)},__getLastCreatedEntityKey:function(){return a},__create:function(e,n,r){return c.__add(new t({type:e,mutability:n,data:r||{}}))},__add:function(e){return a=i(),o=o.set(a,e),a},__get:function(e){var t=o.get(e);return t||("production"!==process.env.NODE_ENV?r(!1,"Unknown DraftEntity key: %s.",e):r(!1)),t},__mergeData:function(t,n){var r=c.__get(t),i=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},r.getData(),n),a=r.set("data",i);return o=o.set(t,a),a},__replaceData:function(e,t){var n=c.__get(e).set("data",t);return o=o.set(e,n),n}};return hO=c}function vz(){if(CO)return mO;CO=1;var e=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},i.getAnchorKey=function(){return this.get("anchorKey")},i.getAnchorOffset=function(){return this.get("anchorOffset")},i.getFocusKey=function(){return this.get("focusKey")},i.getFocusOffset=function(){return this.get("focusOffset")},i.getIsBackward=function(){return this.get("isBackward")},i.getHasFocus=function(){return this.get("hasFocus")},i.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),i=this.getFocusKey();if(r===i&&r===e){var o=this.getStartOffset(),a=this.getEndOffset();return t<=o&&o<=n||t<=a&&a<=n}if(e!==r&&e!==i)return!1;var l=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=l&&n>=l},i.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},i.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},i.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},i.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},i.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},r.createEmpty=function(e){return new r({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},r}((0,GO().Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));return mO=e}function yz(){return vO?gO:(vO=1,gO=function(e){return!("undefined"==typeof window||!window.__DRAFT_GKX)&&!!window.__DRAFT_GKX[e]})}function wz(){if(wO)return yO;wO=1;var e=new RegExp("\r","g");return yO=function(t){return t.replace(e,"")}}function bz(){if(EO)return bO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}EO=1;var n=KO(),r=YO(),i=JO(),o=$O(),a=gz(),l=vz(),c=rz(),s=pz(),d=yz(),u=GO(),f=wz(),h=u.List,p=u.Record,m=u.Repeat,C=u.Map,g=u.OrderedMap,v=p({entityMap:null,blockMap:null,selectionBefore:null,selectionAfter:null}),y=d("draft_tree_data_support")?o:i,w=function(t){var i,o;function d(){return t.apply(this,arguments)||this}o=t,(i=d).prototype=Object.create(o.prototype),i.prototype.constructor=i,i.__proto__=o;var u=d.prototype;return u.getEntityMap=function(){return a},u.getBlockMap=function(){return this.get("blockMap")},u.getSelectionBefore=function(){return this.get("selectionBefore")},u.getSelectionAfter=function(){return this.get("selectionAfter")},u.getBlockForKey=function(e){return this.getBlockMap().get(e)},u.getKeyBefore=function(e){return this.getBlockMap().reverse().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getKeyAfter=function(e){return this.getBlockMap().keySeq().skipUntil(function(t){return t===e}).skip(1).first()},u.getBlockAfter=function(e){return this.getBlockMap().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlockBefore=function(e){return this.getBlockMap().reverse().skipUntil(function(t,n){return n===e}).skip(1).first()},u.getBlocksAsArray=function(){return this.getBlockMap().toArray()},u.getFirstBlock=function(){return this.getBlockMap().first()},u.getLastBlock=function(){return this.getBlockMap().last()},u.getPlainText=function(e){return this.getBlockMap().map(function(e){return e?e.getText():""}).join(e||"\n")},u.getLastCreatedEntityKey=function(){return a.__getLastCreatedEntityKey()},u.hasText=function(){var e=this.getBlockMap();return e.size>1||escape(e.first().getText()).replace(/%u200B/g,"").length>0},u.createEntity=function(e,t,n){return a.__create(e,t,n),this},u.mergeEntityData=function(e,t){return a.__mergeData(e,t),this},u.replaceEntityData=function(e,t){return a.__replaceData(e,t),this},u.addEntity=function(e){return a.__add(e),this},u.getEntity=function(e){return a.__get(e)},u.getAllEntities=function(){return a.__getAll()},u.loadWithEntities=function(e){return a.__loadWithEntities(e)},d.createFromBlockArray=function(e,t){var r=Array.isArray(e)?e:e.contentBlocks,i=n.createFromArray(r),o=i.isEmpty()?new l:l.createEmpty(i.first().getKey());return new d({blockMap:i,entityMap:t||a,selectionBefore:o,selectionAfter:o})},d.createFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\r\n?|\n/g,n=e.split(t).map(function(e){return e=f(e),new y({key:c(),text:e,type:"unstyled",characterList:h(m(r.EMPTY,e.length))})});return d.createFromBlockArray(n)},d.fromJS=function(t){return new d(e({},t,{blockMap:g(t.blockMap).map(d.createContentBlockFromJS),selectionBefore:new l(t.selectionBefore),selectionAfter:new l(t.selectionAfter)}))},d.createContentBlockFromJS=function(t){var n=t.characterList;return new y(e({},t,{data:C(t.data),characterList:null!=n?h((Array.isArray(n)?n:s(n)).map(function(e){return r.fromJS(e)})):void 0}))},d}(v);return bO=w}function Ez(){if(AO)return MO;AO=1;var e=tz(),t="LTR",n=null;function r(e){return e===t||"RTL"===e}function i(n){return r(n)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),n===t?"ltr":"rtl"}function o(e){n=e}return MO={NEUTRAL:"NEUTRAL",LTR:t,RTL:"RTL",isStrong:r,getHTMLDir:i,getHTMLDirIfDifferent:function(t,n){return r(t)||("production"!==process.env.NODE_ENV?e(!1,"`dir` must be a strong direction to be converted to HTML Direction"):e(!1)),r(n)||("production"!==process.env.NODE_ENV?e(!1,"`otherDir` must be a strong direction to be converted to HTML Direction"):e(!1)),t===n?null:i(t)},setGlobalDir:o,initGlobalDir:function(){o(t)},getGlobalDir:function(){return n||this.initGlobalDir(),n||("production"!==process.env.NODE_ENV?e(!1,"Global direction not set."):e(!1)),n}}}function Mz(){if(kO)return xO;kO=1;var e=Ez(),t=tz(),n="֐־׀׃׆׈-׏א-ת׫-ׯװ-ײ׳-״׵-׿߀-߉ߊ-ߪߴ-ߵߺ߻-߿ࠀ-ࠕࠚࠤࠨ࠮-࠯࠰-࠾࠿ࡀ-ࡘ࡜-࡝࡞࡟-࢟‏יִײַ-ﬨשׁ-זּ﬷טּ-לּ﬽מּ﬿נּ-סּ﭂ףּ-פּ﭅צּ-ﭏ",r="؈؋؍؛؜؝؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܎܏ܐܒ-ܯ݋-݌ݍ-ޥޱ޲-޿ࢠ-ࢲࢳ-ࣣﭐ-ﮱ﮲-﯁﯂-﯒ﯓ-ﴽ﵀-﵏ﵐ-ﶏ﶐-﶑ﶒ-ﷇ﷈-﷏ﷰ-ﷻ﷼﷾-﷿ﹰ-ﹴ﹵ﹶ-ﻼ﻽-﻾",i=new RegExp("["+"A-Za-zªµºÀ-ÖØ-öø-ƺƻƼ-ƿǀ-ǃDŽ-ʓʔʕ-ʯʰ-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͷͺͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҂Ҋ-ԯԱ-Ֆՙ՚-՟ա-և։ःऄ-हऻऽा-ीॉ-ौॎ-ॏॐक़-ॡ।-॥०-९॰ॱॲ-ঀং-ঃঅ-ঌএ-ঐও-নপ-রলশ-হঽা-ীে-ৈো-ৌৎৗড়-ঢ়য়-ৡ০-৯ৰ-ৱ৴-৹৺ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽા-ીૉો-ૌૐૠ-ૡ૦-૯૰ଂ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽାୀେ-ୈୋ-ୌୗଡ଼-ଢ଼ୟ-ୡ୦-୯୰ୱ୲-୷ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ிு-ூெ-ைொ-ௌௐௗ௦-௯௰-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౙౠ-ౡ౦-౯౿ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽಾಿೀ-ೄೆೇ-ೈೊ-ೋೕ-ೖೞೠ-ೡ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽാ-ീെ-ൈൊ-ൌൎൗൠ-ൡ൦-൯൰-൵൹ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-ෳ෴ก-ะา-ำเ-ๅๆ๏๐-๙๚-๛ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆ໐-໙ໜ-ໟༀ༁-༃༄-༒༓༔༕-༗༚-༟༠-༩༪-༳༴༶༸༾-༿ཀ-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿏࿐-࿔࿕-࿘࿙-࿚က-ဪါ-ာေးျ-ြဿ၀-၉၊-၏ၐ-ၕၖ-ၗၚ-ၝၡၢ-ၤၥ-ၦၧ-ၭၮ-ၰၵ-ႁႃ-ႄႇ-ႌႎႏ႐-႙ႚ-ႜ႞-႟Ⴀ-ჅჇჍა-ჺ჻ჼჽ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፨፩-፼ᎀ-ᎏᎠ-Ᏼᐁ-ᙬ᙭-᙮ᙯ-ᙿᚁ-ᚚᚠ-ᛪ᛫-᛭ᛮ-ᛰᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵-᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះ-ៈ។-៖ៗ៘-៚ៜ០-៩᠐-᠙ᠠ-ᡂᡃᡄ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰ-ᤱᤳ-ᤸ᥆-᥏ᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧀᧁ-ᧇᧈ-ᧉ᧐-᧙᧚ᨀ-ᨖᨙ-ᨚ᨞-᨟ᨠ-ᩔᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪦ᪧ᪨-᪭ᬄᬅ-ᬳᬵᬻᬽ-ᭁᭃ-᭄ᭅ-ᭋ᭐-᭙᭚-᭠᭡-᭪᭴-᭼ᮂᮃ-ᮠᮡᮦ-ᮧ᮪ᮮ-ᮯ᮰-᮹ᮺ-ᯥᯧᯪ-ᯬᯮ᯲-᯳᯼-᯿ᰀ-ᰣᰤ-ᰫᰴ-ᰵ᰻-᰿᱀-᱉ᱍ-ᱏ᱐-᱙ᱚ-ᱷᱸ-ᱽ᱾-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳱᳲ-ᳳᳵ-ᳶᴀ-ᴫᴬ-ᵪᵫ-ᵷᵸᵹ-ᶚᶛ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℵ-ℸℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↂↃ-ↄↅ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⱻⱼ-ⱽⱾ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々〆〇〡-〩〮-〯〱-〵〸-〺〻〼ぁ-ゖゝ-ゞゟァ-ヺー-ヾヿㄅ-ㄭㄱ-ㆎ㆐-㆑㆒-㆕㆖-㆟ㆠ-ㆺㇰ-ㇿ㈀-㈜㈠-㈩㈪-㉇㉈-㉏㉠-㉻㉿㊀-㊉㊊-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿌ꀀ-ꀔꀕꀖ-ꒌꓐ-ꓷꓸ-ꓽ꓾-꓿ꔀ-ꘋꘌꘐ-ꘟ꘠-꘩ꘪ-ꘫꙀ-ꙭꙮꚀ-ꚛꚜ-ꚝꚠ-ꛥꛦ-ꛯ꛲-꛷Ꜣ-ꝯꝰꝱ-ꞇ꞉-꞊Ꞌ-ꞎꞐ-ꞭꞰ-Ʇꟷꟸ-ꟹꟺꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꠣ-ꠤꠧ꠰-꠵꠶-꠷ꡀ-ꡳꢀ-ꢁꢂ-ꢳꢴ-ꣃ꣎-꣏꣐-꣙ꣲ-ꣷ꣸-꣺ꣻ꤀-꤉ꤊ-ꤥ꤮-꤯ꤰ-ꥆꥒ-꥓꥟ꥠ-ꥼꦃꦄ-ꦲꦴ-ꦵꦺ-ꦻꦽ-꧀꧁-꧍ꧏ꧐-꧙꧞-꧟ꧠ-ꧤꧦꧧ-ꧯ꧰-꧹ꧺ-ꧾꨀ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-꩟ꩠ-ꩯꩰꩱ-ꩶ꩷-꩹ꩺꩻꩽꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫜꫝ꫞-꫟ꫠ-ꫪꫫꫮ-ꫯ꫰-꫱ꫲꫳ-ꫴꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚ꭛ꭜ-ꭟꭤ-ꭥꯀ-ꯢꯣ-ꯤꯦ-ꯧꯩ-ꯪ꯫꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-豈-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-ッーア-ン゙-゚ᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"+n+r+"]"),o=new RegExp("["+n+r+"]");function a(e){var t=i.exec(e);return null==t?null:t[0]}function l(t){var n=a(t);return null==n?e.NEUTRAL:o.exec(n)?e.RTL:e.LTR}function c(t,n){if(n=n||e.NEUTRAL,!t.length)return n;var r=l(t);return r===e.NEUTRAL?n:r}function s(n,r){return r||(r=e.getGlobalDir()),e.isStrong(r)||("production"!==process.env.NODE_ENV?t(!1,"Fallback direction must be a strong direction"):t(!1)),c(n,r)}return xO={firstStrongChar:a,firstStrongCharDir:l,resolveBlockDir:c,getDirection:s,isDirectionLTR:function(t,n){return s(t,n)===e.LTR},isDirectionRTL:function(t,n){return s(t,n)===e.RTL}}}function Az(){if(SO)return _O;SO=1;return _O=function(e){if(null!=e)return e;throw new Error("Got unexpected null or undefined")}}function xz(){if(OO)return VO;OO=1;var e,t=function(){if(HO)return LO;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HO=1;var t=Mz(),n=Ez(),r=tz();return LO=function(){function i(t){e(this,"_defaultDir",void 0),e(this,"_lastDir",void 0),t?n.isStrong(t)||("production"!==process.env.NODE_ENV?r(!1,"Default direction must be a strong direction (LTR or RTL)"):r(!1)):t=n.getGlobalDir(),this._defaultDir=t,this.reset()}var o=i.prototype;return o.reset=function(){this._lastDir=this._defaultDir},o.getDirection=function(e){return this._lastDir=t.getDirection(e,this._lastDir),this._lastDir},i}()}(),n=GO(),r=Az(),i=n.OrderedMap;return VO={getDirectionMap:function(o,a){e?e.reset():e=new t;var l=o.getBlockMap(),c=l.valueSeq().map(function(t){return r(e).getDirection(t.getText())}),s=i(l.keySeq().zip(c));return null!=a&&n.is(a,s)?a:s}}}function kz(){if(NO)return zO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}NO=1;var n=mz(),r=bz(),i=xz(),o=vz(),a=GO(),l=a.OrderedSet,c=a.Record,s=a.Stack,d=a.OrderedMap,u=a.List,f=c({allowUndo:!0,currentContent:null,decorator:null,directionMap:null,forceSelection:!1,inCompositionMode:!1,inlineStyleOverride:null,lastChangeType:null,nativelyRenderedContent:null,redoStack:s(),selection:null,treeMap:null,undoStack:s()}),h=function(){c.createEmpty=function(e){return this.createWithText("",e)},c.createWithText=function(e,t){return c.createWithContent(r.createFromText(e),t)},c.createWithContent=function(e,t){if(0===e.getBlockMap().count())return c.createEmpty(t);var n=e.getBlockMap().first().getKey();return c.create({currentContent:e,undoStack:s(),redoStack:s(),decorator:t||null,selection:o.createEmpty(n)})},c.create=function(t){var n=t.currentContent,r=e({},t,{treeMap:m(n,t.decorator),directionMap:i.getDirectionMap(n)});return new c(new f(r))},c.fromJS=function(t){return new c(new f(e({},t,{directionMap:null!=t.directionMap?d(t.directionMap):t.directionMap,inlineStyleOverride:null!=t.inlineStyleOverride?l(t.inlineStyleOverride):t.inlineStyleOverride,nativelyRenderedContent:null!=t.nativelyRenderedContent?r.fromJS(t.nativelyRenderedContent):t.nativelyRenderedContent,redoStack:null!=t.redoStack?s(t.redoStack.map(function(e){return r.fromJS(e)})):t.redoStack,selection:null!=t.selection?new o(t.selection):t.selection,treeMap:null!=t.treeMap?d(t.treeMap).map(function(e){return u(e).map(function(e){return n.fromJS(e)})}):t.treeMap,undoStack:null!=t.undoStack?s(t.undoStack.map(function(e){return r.fromJS(e)})):t.undoStack,currentContent:r.fromJS(t.currentContent)})))},c.set=function(e,t){var r=e.getImmutable().withMutations(function(r){var i=r.get("decorator"),o=i;null===t.decorator?o=null:t.decorator&&(o=t.decorator);var a=t.currentContent||e.getCurrentContent();if(o!==i){var l,c=r.get("treeMap");return l=o&&i?function(e,t,r,i,o){return r.merge(t.toSeq().filter(function(t){return i.getDecorations(t,e)!==o.getDecorations(t,e)}).map(function(t){return n.generate(e,t,i)}))}(a,a.getBlockMap(),c,o,i):m(a,o),void r.merge({decorator:o,treeMap:l,nativelyRenderedContent:null})}a!==e.getCurrentContent()&&r.set("treeMap",function(e,t,r,i){var o=e.getCurrentContent().set("entityMap",r),a=o.getBlockMap(),l=e.getImmutable().get("treeMap");return l.merge(t.toSeq().filter(function(e,t){return e!==a.get(t)}).map(function(e){return n.generate(o,e,i)}))}(e,a.getBlockMap(),a.getEntityMap(),o)),r.merge(t)});return new c(r)};var a=c.prototype;function c(e){t(this,"_immutable",void 0),this._immutable=e}return a.toJS=function(){return this.getImmutable().toJS()},a.getAllowUndo=function(){return this.getImmutable().get("allowUndo")},a.getCurrentContent=function(){return this.getImmutable().get("currentContent")},a.getUndoStack=function(){return this.getImmutable().get("undoStack")},a.getRedoStack=function(){return this.getImmutable().get("redoStack")},a.getSelection=function(){return this.getImmutable().get("selection")},a.getDecorator=function(){return this.getImmutable().get("decorator")},a.isInCompositionMode=function(){return this.getImmutable().get("inCompositionMode")},a.mustForceSelection=function(){return this.getImmutable().get("forceSelection")},a.getNativelyRenderedContent=function(){return this.getImmutable().get("nativelyRenderedContent")},a.getLastChangeType=function(){return this.getImmutable().get("lastChangeType")},a.getInlineStyleOverride=function(){return this.getImmutable().get("inlineStyleOverride")},c.setInlineStyleOverride=function(e,t){return c.set(e,{inlineStyleOverride:t})},a.getCurrentInlineStyle=function(){var e=this.getInlineStyleOverride();if(null!=e)return e;var t=this.getCurrentContent(),n=this.getSelection();return n.isCollapsed()?function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r>0)return i.getInlineStyleAt(r-1);if(i.getLength())return i.getInlineStyleAt(0);return C(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),i=e.getBlockForKey(n);if(r<i.getLength())return i.getInlineStyleAt(r);if(r>0)return i.getInlineStyleAt(r-1);return C(e,n)}(t,n)},a.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},a.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},a.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},a.getDirectionMap=function(){return this.getImmutable().get("directionMap")},c.acceptSelection=function(e,t){return p(e,t,!1)},c.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),p(e,t,!0)},c.moveSelectionToEnd=function(e){var t=e.getCurrentContent().getLastBlock(),n=t.getKey(),r=t.getLength();return c.acceptSelection(e,new o({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r,isBackward:!1}))},c.moveFocusToEnd=function(e){var t=c.moveSelectionToEnd(e);return c.forceSelection(t,t.getSelection())},c.push=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e.getCurrentContent()===t)return e;var o=i.getDirectionMap(t,e.getDirectionMap());if(!e.getAllowUndo())return c.set(e,{currentContent:t,directionMap:o,lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:null});var a=e.getSelection(),l=e.getCurrentContent(),d=e.getUndoStack(),u=t;a!==l.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(e,n)?(d=d.push(l),u=u.set("selectionBefore",a)):"insert-characters"!==n&&"backspace-character"!==n&&"delete-character"!==n||(u=u.set("selectionBefore",l.getSelectionBefore()));var f=e.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(n)&&(f=null);var h={currentContent:u,directionMap:o,undoStack:d,redoStack:s(),lastChangeType:n,selection:t.getSelectionAfter(),forceSelection:r,inlineStyleOverride:f};return c.set(e,h)},c.undo=function(e){if(!e.getAllowUndo())return e;var t=e.getUndoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return c.set(e,{currentContent:n,directionMap:o,undoStack:t.shift(),redoStack:e.getRedoStack().push(r),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:r.getSelectionBefore()})},c.redo=function(e){if(!e.getAllowUndo())return e;var t=e.getRedoStack(),n=t.peek();if(!n)return e;var r=e.getCurrentContent(),o=i.getDirectionMap(n,e.getDirectionMap());return c.set(e,{currentContent:n,directionMap:o,undoStack:e.getUndoStack().push(r),redoStack:t.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:n.getSelectionAfter()})},a.getImmutable=function(){return this._immutable},c}();function p(e,t,n){return h.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function m(e,t){return e.getBlockMap().map(function(r){return n.generate(e,r,t)}).toOrderedMap()}function C(e,t){var n=e.getBlockMap().reverse().skipUntil(function(e,n){return n===t}).skip(1).skipUntil(function(e,t){return e.getLength()}).first();return n?n.getInlineStyleAt(n.getLength()-1):l()}return zO=h}function Lz(){if(jO)return DO;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jO=1;var n=KO(),r=YO(),i=JO(),o=$O(),a=hz(),l=kz(),c=rz(),s=yz(),d=GO(),u=function(){if(TO)return IO;TO=1;var e=$O(),t=dz(),n=GO(),r=tz(),i=n.OrderedMap,o=n.List,a=function(e,t,n){if(e){var r=t.get(e);r&&t.set(e,n(r))}},l=function(e,t,n,r,i){if(!i)return e;var l="after"===r,c=t.getKey(),s=n.getKey(),d=t.getParentKey(),u=t.getNextSiblingKey(),f=t.getPrevSiblingKey(),h=n.getParentKey(),p=l?n.getNextSiblingKey():s,m=l?s:n.getPrevSiblingKey();return e.withMutations(function(e){a(d,e,function(e){var t=e.getChildKeys();return e.merge({children:t.delete(t.indexOf(c))})}),a(f,e,function(e){return e.merge({nextSibling:u})}),a(u,e,function(e){return e.merge({prevSibling:f})}),a(p,e,function(e){return e.merge({prevSibling:c})}),a(m,e,function(e){return e.merge({nextSibling:c})}),a(h,e,function(e){var t=e.getChildKeys(),n=t.indexOf(s),r=l?n+1:0!==n?n-1:0,i=t.toArray();return i.splice(r,0,c),e.merge({children:o(i)})}),a(c,e,function(e){return e.merge({nextSibling:p,prevSibling:m,parent:h})})})};return IO=function(n,o,a,c){"replace"===c&&("production"!==process.env.NODE_ENV?r(!1,"Replacing blocks is not supported."):r(!1));var s=a.getKey(),d=o.getKey();d===s&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1));var u=n.getBlockMap(),f=o instanceof e,h=[o],p=u.delete(d);f&&(h=[],p=u.withMutations(function(e){var n=o.getNextSiblingKey(),r=t(o,e);e.toSeq().skipUntil(function(e){return e.getKey()===d}).takeWhile(function(e){var t=e.getKey(),i=t===d,o=n&&t!==n,a=!n&&e.getParentKey()&&(!r||t!==r);return!!(i||o||a)}).forEach(function(t){h.push(t),e.delete(t.getKey())})}));var m=p.toSeq().takeUntil(function(e){return e===a}),C=p.toSeq().skipUntil(function(e){return e===a}).skip(1),g=h.map(function(e){return[e.getKey(),e]}),v=i();if("before"===c){var y=n.getBlockBefore(s);y&&y.getKey()===o.getKey()&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=m.concat([].concat(g,[[s,a]]),C).toOrderedMap()}else if("after"===c){var w=n.getBlockAfter(s);w&&w.getKey()===d&&("production"!==process.env.NODE_ENV?r(!1,"Block cannot be moved next to itself."):r(!1)),v=m.concat([[s,a]].concat(g),C).toOrderedMap()}return n.merge({blockMap:l(v,o,a,c,f),selectionBefore:n.getSelectionAfter(),selectionAfter:n.getSelectionAfter().merge({anchorKey:d,focusKey:d})})},IO}(),f=s("draft_tree_data_support"),h=f?o:i,p=d.List,m=d.Repeat;return DO={insertAtomicBlock:function(t,i,o){var s=t.getCurrentContent(),d=t.getSelection(),u=a.removeRange(s,d,"backward"),C=u.getSelectionAfter(),g=a.splitBlock(u,C),v=g.getSelectionAfter(),y=a.setBlockType(g,v,"atomic"),w=r.create({entity:i}),b={key:c(),type:"atomic",text:o,characterList:p(m(w,o.length))},E={key:c(),type:"unstyled"};f&&(b=e({},b,{nextSibling:E.key}),E=e({},E,{prevSibling:b.key}));var M=[new h(b),new h(E)],A=n.createFromArray(M),x=a.replaceWithFragment(y,v,A),k=x.merge({selectionBefore:d,selectionAfter:x.getSelectionAfter().set("hasFocus",!0)});return l.push(t,k,"insert-fragment")},moveAtomicBlock:function(e,t,n,r){var i,o=e.getCurrentContent(),c=e.getSelection();if("before"===r||"after"===r){var s=o.getBlockForKey("before"===r?n.getStartKey():n.getEndKey());i=u(o,t,s,r)}else{var d=a.removeRange(o,n,"backward"),f=d.getSelectionAfter(),h=d.getBlockForKey(f.getFocusKey());if(0===f.getStartOffset())i=u(d,t,h,"before");else if(f.getEndOffset()===h.getLength())i=u(d,t,h,"after");else{var p=a.splitBlock(d,f),m=p.getSelectionAfter(),C=p.getBlockForKey(m.getFocusKey());i=u(p,t,C,"before")}}var g=i.merge({selectionBefore:c,selectionAfter:i.getSelectionAfter().set("hasFocus",!0)});return l.push(e,g,"move-block")}}}function Hz(){if(RO)return ZO;RO=1;var e=GO().List,t=function(){function t(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_decorators",void 0),this._decorators=e.slice()}var n=t.prototype;return n.getDecorations=function(t,n){var r=Array(t.getText().length).fill(null);return this._decorators.forEach(function(e,i){var o=0;(0,e.strategy)(t,function(e,t){(function(e,t,n){for(var r=t;r<n;r++)if(null!=e[r])return!1;return!0})(r,e,t)&&(!function(e,t,n,r){for(var i=t;i<n;i++)e[i]=r}(r,e,t,i+"."+o),o++)},n)}),e(r)},n.getComponentForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].component},n.getPropsForKey=function(e){var t=parseInt(e.split(".")[0],10);return this._decorators[t].props},t}();return ZO=t}function _z(){if(PO)return BO;function e(e){return e.replace(/\//g,"-")}return PO=1,BO=function(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).map(e).join(" "):Array.prototype.map.call(arguments,e).join(" ")},BO}function Sz(){if(UO)return FO;UO=1;var e=i,t=_z(),n=(0,GO().Map)({"header-one":{element:"h1"},"header-two":{element:"h2"},"header-three":{element:"h3"},"header-four":{element:"h4"},"header-five":{element:"h5"},"header-six":{element:"h6"},section:{element:"section"},article:{element:"article"},"unordered-list-item":{element:"li",wrapper:e.createElement("ul",{className:t("public/DraftStyleDefault/ul")})},"ordered-list-item":{element:"li",wrapper:e.createElement("ol",{className:t("public/DraftStyleDefault/ol")})},blockquote:{element:"blockquote"},atomic:{element:"figure"},"code-block":{element:"pre",wrapper:e.createElement("pre",{className:t("public/DraftStyleDefault/pre")})},unstyled:{element:"div",aliasedElements:["p"]}});return FO=n}function Vz(){return WO?qO:(WO=1,qO={BOLD:{fontWeight:"bold"},CODE:{fontFamily:"monospace",wordWrap:"break-word"},ITALIC:{fontStyle:"italic"},STRIKETHROUGH:{textDecoration:"line-through"},UNDERLINE:{textDecoration:"underline"}})}var Oz,zz,Nz,Iz,Tz,Dz,jz,Zz,Rz,Bz,Pz,Fz,Uz,qz,Wz,Qz,Gz,Kz,Yz,Xz,Jz,$z,eN,tN,nN,rN,iN,oN,aN,lN,cN,sN,dN,uN,fN,hN,pN,mN,CN,gN,vN,yN,wN,bN,EN,MN,AN,xN,kN,LN,HN,_N,SN,VN,ON,zN,NN,IN,TN,DN,jN,ZN,RN,BN,PN,FN,UN,qN,WN,QN,GN,KN,YN,XN,JN,$N,eI,tI,nI,rI,iI,oI,aI,lI,cI,sI,dI,uI,fI,hI,pI,mI,CI,gI,vI,yI,wI,bI,EI,MI,AI,xI,kI,LI,HI,_I,SI,VI,OI,zI,NI,II,TI,DI,jI,ZI,RI,BI,PI,FI={exports:{}},UI=FI.exports;function qI(){return Oz||(Oz=1,function(e,t){!function(n,r){var i="function",o="undefined",a="object",l="string",c="major",s="model",d="name",u="type",f="vendor",h="version",p="architecture",m="console",C="mobile",g="tablet",v="smarttv",y="wearable",w="embedded",b="Amazon",E="Apple",M="ASUS",A="BlackBerry",x="Browser",k="Chrome",L="Firefox",H="Google",_="Honor",S="Huawei",V="LG",O="Microsoft",z="Motorola",N="Nvidia",I="OnePlus",T="Opera",D="OPPO",j="Samsung",Z="Sharp",R="Sony",B="Xiaomi",P="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",W=" Browser",Q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},G=function(e,t){return typeof e===l&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},X=function(e,t){for(var n,o,l,c,s,d,u=0;u<t.length&&!s;){var f=t[u],h=t[u+1];for(n=o=0;n<f.length&&!s&&f[n];)if(s=f[n++].exec(e))for(l=0;l<h.length;l++)d=s[++o],typeof(c=h[l])===a&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=d?d.replace(c[1],c[2]):r:this[c[0]]=d?c[1].call(this,d,c[2]):r:4===c.length&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):r):this[c]=d||r;u+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(G(t[n][i],e))return"?"===n?r:n}else if(G(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,h],[/opios[\/ ]+([\w\.]+)/i],[h,[d,T+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[d,T+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[d,T]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[d,"Smart Lenovo "+x]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],h],[/\bfocus\/([\w\.]+)/i],[h,[d,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[d,T+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[d,T+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[d,"MIUI"+W]],[/fxios\/([\w\.-]+)/i],[h,[d,L]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+W],h],[/samsungbrowser\/([\w\.]+)/i],[h,[d,j+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],h],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[d,k+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,k+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[h,J,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[d,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[d,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[s,[f,j],[u,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[s,[f,j],[u,C]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[s,[f,E],[u,C]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[f,E],[u,g]],[/(macintosh);/i],[s,[f,E]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[f,Z],[u,C]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[s,[f,_],[u,g]],[/honor([-\w ]+)[;\)]/i],[s,[f,_],[u,C]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[s,[f,S],[u,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[s,[f,S],[u,C]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[s,/_/g," "],[f,B],[u,g]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[s,/_/g," "],[f,B],[u,C]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[f,D],[u,C]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[s,[f,J,{OnePlus:["304","403","203"],"*":D}],[u,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[f,"Vivo"],[u,C]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[s,[f,"Realme"],[u,C]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[s,[f,z],[u,C]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[f,z],[u,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[f,V],[u,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[f,V],[u,C]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[s,[f,"Lenovo"],[u,g]],[/(nokia) (t[12][01])/i],[f,s,[u,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[s,/_/g," "],[u,C],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[s,[f,H],[u,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[f,H],[u,C]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[f,R],[u,C]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[f,R],[u,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[f,I],[u,C]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[f,b],[u,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[f,b],[u,C]],[/(playbook);[-\w\),; ]+(rim)/i],[s,f,[u,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[f,A],[u,C]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[f,M],[u,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[f,M],[u,C]],[/(nexus 9)/i],[s,[f,"HTC"],[u,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[s,/_/g," "],[u,C]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[s,[f,"TCL"],[u,g]],[/(itel) ((\w+))/i],[[f,K],s,[u,J,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[f,"Acer"],[u,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[f,"Meizu"],[u,C]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[s,[f,"Ulefone"],[u,C]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[s,[f,"Energizer"],[u,C]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[s,[f,"Cat"],[u,C]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[s,[f,"Smartfren"],[u,C]],[/droid.+; (a(?:015|06[35]|142p?))/i],[s,[f,"Nothing"],[u,C]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[s,[f,"Archos"],[u,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[s,[f,"Archos"],[u,C]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,s,[u,g]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[f,s,[u,C]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,s,[u,g]],[/(surface duo)/i],[s,[f,O],[u,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[f,"Fairphone"],[u,C]],[/(u304aa)/i],[s,[f,"AT&T"],[u,C]],[/\bsie-(\w*)/i],[s,[f,"Siemens"],[u,C]],[/\b(rct\w+) b/i],[s,[f,"RCA"],[u,g]],[/\b(venue[\d ]{2,7}) b/i],[s,[f,"Dell"],[u,g]],[/\b(q(?:mv|ta)\w+) b/i],[s,[f,"Verizon"],[u,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[f,"Barnes & Noble"],[u,g]],[/\b(tm\d{3}\w+) b/i],[s,[f,"NuVision"],[u,g]],[/\b(k88) b/i],[s,[f,"ZTE"],[u,g]],[/\b(nx\d{3}j) b/i],[s,[f,"ZTE"],[u,C]],[/\b(gen\d{3}) b.+49h/i],[s,[f,"Swiss"],[u,C]],[/\b(zur\d{3}) b/i],[s,[f,"Swiss"],[u,g]],[/\b((zeki)?tb.*\b) b/i],[s,[f,"Zeki"],[u,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],s,[u,g]],[/\b(ns-?\w{0,9}) b/i],[s,[f,"Insignia"],[u,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[f,"NextBook"],[u,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],s,[u,C]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],s,[u,C]],[/\b(ph-1) /i],[s,[f,"Essential"],[u,C]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[f,"Envizen"],[u,g]],[/\b(trio[-\w\. ]+) b/i],[s,[f,"MachSpeed"],[u,g]],[/\btu_(1491) b/i],[s,[f,"Rotor"],[u,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[s,[f,N],[u,g]],[/(sprint) (\w+)/i],[f,s,[u,C]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[f,O],[u,C]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[f,P],[u,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[f,P],[u,C]],[/smart-tv.+(samsung)/i],[f,[u,v]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[f,j],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,V],[u,v]],[/(apple) ?tv/i],[f,[s,E+" TV"],[u,v]],[/crkey/i],[[s,k+"cast"],[f,H],[u,v]],[/droid.+aft(\w+)( bui|\))/i],[s,[f,b],[u,v]],[/(shield \w+ tv)/i],[s,[f,N],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[s,[f,Z],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[s,[f,R],[u,v]],[/(mi(tv|box)-?\w+) bui/i],[s,[f,B],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[f,s,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Y],[s,Y],[u,v]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[s,[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,s,[u,m]],[/droid.+; (shield)( bui|\))/i],[s,[f,N],[u,m]],[/(playstation \w+)/i],[s,[f,R],[u,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[f,O],[u,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[s,[f,j],[u,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,s,[u,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[s,[f,D],[u,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[s,[f,E],[u,y]],[/(opwwe\d{3})/i],[s,[f,I],[u,y]],[/(moto 360)/i],[s,[f,z],[u,y]],[/(smartwatch 3)/i],[s,[f,R],[u,y]],[/(g watch r)/i],[s,[f,V],[u,y]],[/droid.+; (wt63?0{2,3})\)/i],[s,[f,P],[u,y]],[/droid.+; (glass) \d/i],[s,[f,H],[u,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,s,[u,y]],[/; (quest( \d| pro)?)/i],[s,[f,F],[u,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[u,w]],[/(aeobc)\b/i],[s,[f,b],[u,w]],[/(homepod).+mac os/i],[s,[f,E],[u,w]],[/windows iot/i],[[u,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[s,[u,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[u,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,C]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[s,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,h],[/ladybird\//i],[[d,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[d,[h,J,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,J,$],[d,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,d],[/(ubuntu) ([\w\.]+) like android/i],[[d,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[d,h],[/\(bb(10);/i],[h,[d,A]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[d,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[d,k+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,h],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,h]]},te=function(e,t){if(typeof e===a&&(t=e,e=r),!(this instanceof te))return new te(e,t).getResult();var m=typeof n!==o&&n.navigator?n.navigator:r,v=e||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:r,w=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,t):ee,b=m&&m.userAgent==v;return this.getBrowser=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.browser),e[c]=function(e){return typeof e===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e[h]),b&&m&&m.brave&&typeof m.brave.isBrave==i&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[p]=r,X.call(e,v,w.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[s]=r,e[u]=r,X.call(e,v,w.device),b&&!e[u]&&y&&y.mobile&&(e[u]=C),b&&"Macintosh"==e[s]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[s]="iPad",e[u]=g),e},this.getEngine=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.engine),e},this.getOS=function(){var e={};return e[d]=r,e[h]=r,X.call(e,v,w.os),b&&!e[d]&&y&&y.platform&&"Unknown"!=y.platform&&(e[d]=y.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(e){return v=typeof e===l&&e.length>500?Y(e,500):e,this},this.setUA(v),this};te.VERSION="0.7.41",te.BROWSER=Q([d,h,c]),te.CPU=Q([p]),te.DEVICE=Q([s,f,u,m,C,v,g,y,w]),te.ENGINE=te.OS=Q([d,h]),e.exports&&(t=e.exports=te),t.UAParser=te;var ne=typeof n!==o&&(n.jQuery||n.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:UI)}(FI,FI.exports)),FI.exports}function WI(){if(Nz)return zz;Nz=1;var e=qI(),t="Unknown",n={"Mac OS":"Mac OS X"};var r,i=(new e).getResult(),o=function(e){if(!e)return{major:"",minor:""};var t=e.split(".");return{major:t[0],minor:t[1]}}(i.browser.version),a={browserArchitecture:i.cpu.architecture||t,browserFullVersion:i.browser.version||t,browserMinorVersion:o.minor||t,browserName:i.browser.name||t,browserVersion:i.browser.major||t,deviceName:i.device.model||t,engineName:i.engine.name||t,engineVersion:i.engine.version||t,platformArchitecture:i.cpu.architecture||t,platformName:(r=i.os.name,n[r]||r||t),platformVersion:i.os.version||t,platformFullVersion:i.os.version||t};return zz=a}function QI(){if(Tz)return Iz;Tz=1;var e=tz(),t=/\./,n=/\|\|/,r=/\s+\-\s+/,i=/^(<=|<|=|>=|~>|~|>|)?\s*(.+)/,o=/^(\d*)(.*)/;function a(t,i){var o=t.split(n);return o.length>1?o.some(function(e){return g.contains(e,i)}):function(t,n){var i=t.split(r);if(i.length>0&&i.length<=2||("production"!==process.env.NODE_ENV?e(!1,'the "-" operator expects exactly 2 operands'):e(!1)),1===i.length)return l(i[0],n);var o=i[0],a=i[1];return f(o)&&f(a)||("production"!==process.env.NODE_ENV?e(!1,'operands to the "-" operator must be simple (no modifiers)'):e(!1)),l(">="+o,n)&&l("<="+a,n)}(t=o[0].trim(),i)}function l(e,n){if(""===(e=e.trim()))return!0;var r=n.split(t),i=d(e),o=i.modifier,a=i.rangeComponents;switch(o){case"<":return c(r,a);case"<=":return function(e,t){var n=C(e,t);return-1===n||0===n}(r,a);case">=":return s(r,a);case">":return 1===C(r,a);case"~":case"~>":return function(e,t){var n=t.slice(),r=t.slice();r.length>1&&r.pop();var i=r.length-1,o=parseInt(r[i],10);u(o)&&(r[i]=o+1+"");return s(e,n)&&c(e,r)}(r,a);default:return function(e,t){return 0===C(e,t)}(r,a)}}function c(e,t){return-1===C(e,t)}function s(e,t){var n=C(e,t);return 1===n||0===n}function d(n){var r=n.split(t),o=r[0].match(i);return o||("production"!==process.env.NODE_ENV?e(!1,"expected regex to match but it did not"):e(!1)),{modifier:o[1],rangeComponents:[o[2]].concat(r.slice(1))}}function u(e){return!isNaN(e)&&isFinite(e)}function f(e){return!d(e).modifier}function h(e,t){for(var n=e.length;n<t;n++)e[n]="0"}function p(e,t){var n=e.match(o)[1],r=t.match(o)[1],i=parseInt(n,10),a=parseInt(r,10);return u(i)&&u(a)&&i!==a?m(i,a):m(e,t)}function m(t,n){return typeof t!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,'"a" and "b" must be of the same type'):e(!1)),t>n?1:t<n?-1:0}function C(e,t){for(var n=function(e,t){h(e=e.slice(),(t=t.slice()).length);for(var n=0;n<t.length;n++){var r=t[n].match(/^[x*]$/i);if(r&&(t[n]=e[n]="0","*"===r[0]&&n===t.length-1))for(var i=n;i<e.length;i++)e[i]="0"}return h(t,e.length),[e,t]}(e,t),r=n[0],i=n[1],o=0;o<i.length;o++){var a=p(r[o],i[o]);if(a)return a}return 0}var g={contains:function(e,t){return a(e.trim(),t.trim())}};return Iz=g}function GI(){if(Pz)return Bz;Pz=1;var e=WI(),t=QI(),n=function(){if(jz)return Dz;jz=1;var e=Object.prototype.hasOwnProperty;return Dz=function(t,n,r){if(!t)return null;var i={};for(var o in t)e.call(t,o)&&(i[o]=n.call(r,t[o],o,t));return i},Dz}(),r=Rz?Zz:(Rz=1,Zz=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}});function i(e,n,r,i){if(e===r)return!0;if(!r.startsWith(e))return!1;var o=r.slice(e.length);return!!n&&(o=i?i(o):o,t.contains(o,n))}function o(t){return"Windows"===e.platformName?t.replace(/^\s*NT/,""):t}return Bz=n({isBrowser:function(t){return i(e.browserName,e.browserFullVersion,t)},isBrowserArchitecture:function(t){return i(e.browserArchitecture,null,t)},isDevice:function(t){return i(e.deviceName,null,t)},isEngine:function(t){return i(e.engineName,e.engineVersion,t)},isPlatform:function(t){return i(e.platformName,e.platformFullVersion,t,o)},isPlatformArchitecture:function(t){return i(e.platformArchitecture,null,t)}},r)}function KI(){if(Uz)return Fz;return Uz=1,Fz=function(e){return e&&e.ownerDocument?e.ownerDocument:document}}function YI(){if(Wz)return qz;return Wz=1,qz=function(e){return!(!e||!e.ownerDocument)&&e.nodeType===Node.ELEMENT_NODE}}function XI(){if(Gz)return Qz;Gz=1;var e=YI();return Qz=function t(n){if(e(n)){var r=n,i=r.getAttribute("data-offset-key");if(i)return i;for(var o=0;o<r.childNodes.length;o++){var a=t(r.childNodes[o]);if(a)return a}}return null},Qz}function JI(){if(Yz)return Kz;Yz=1;var e=KI(),t=XI();return Kz=function(n){for(var r=n;r&&r!==e(n).documentElement;){var i=t(r);if(null!=i)return i;r=r.parentNode}return null},Kz}function $I(){if(Jz)return Xz;return Jz=1,Xz=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}}function eT(){if(nN)return tN;nN=1;var e="-";return tN={encode:function(t,n,r){return t+e+n+e+r},decode:function(t){var n=t.split(e).reverse(),r=n[0],i=n[1];return{blockKey:n.slice(2).reverse().join(e),decoratorKey:parseInt(i,10),leafKey:parseInt(r,10)}}}}function tT(){return iN?rN:(iN=1,rN={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105})}function nT(){return aN?oN:(aN=1,oN={logBlockedSelectionEvent:function(){return null},logSelectionStateFailure:function(){return null}})}function rT(){if(cN)return lN;return cN=1,lN=function(e){return!(!e||!e.ownerDocument)&&(e.ownerDocument.defaultView?e instanceof e.ownerDocument.defaultView.HTMLElement:e instanceof HTMLElement)}}function iT(){if(dN)return sN;dN=1;var e=tz(),t=rT();return sN=function(n){var r=n.editorContainer;return r||("production"!==process.env.NODE_ENV?e(!1,"Missing editorNode"):e(!1)),t(r.firstChild)||("production"!==process.env.NODE_ENV?e(!1,"editorNode.firstChild is not an HTMLElement"):e(!1)),r.firstChild}}function oT(){if(fN)return uN;fN=1;var e=eT(),t=Az();return uN=function(n,r,i,o,a){var l=t(n.getSelection());if(!r||!o)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var c=e.decode(r),s=c.blockKey,d=n.getBlockTree(s),u=d&&d.getIn([c.decoratorKey,"leaves",c.leafKey]),f=e.decode(o),h=f.blockKey,p=n.getBlockTree(h),m=p&&p.getIn([f.decoratorKey,"leaves",f.leafKey]);if(!u||!m)return"production"!==process.env.NODE_ENV&&console.warn("Invalid selection state.",arguments,n.toJS()),l;var C=u.get("start"),g=m.get("start"),v=u?C+i:null,y=m?g+a:null;if(l.getAnchorKey()===s&&l.getAnchorOffset()===v&&l.getFocusKey()===h&&l.getFocusOffset()===y)return l;var w=!1;if(s===h){var b=u.get("end"),E=m.get("end");w=g===C&&E===b?a<i:g<C}else{var M=n.getCurrentContent().getBlockMap().keySeq().skipUntil(function(e){return e===s||e===h}).first();w=M===h}return l.merge({anchorKey:s,anchorOffset:v,focusKey:h,focusOffset:y,isBackward:w})},uN}function aT(){if(pN)return hN;pN=1;var e=JI(),t=XI(),n=oT(),r=tz(),i=YI(),o=Az();function a(n,a,c){var s=a,d=e(s);(null!=d||n&&(n===s||n.firstChild===s)||("production"!==process.env.NODE_ENV?r(!1,"Unknown node in selection range."):r(!1)),n===s)&&(s=s.firstChild,i(s)||("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents node."):r(!1)),"true"!==(s=s).getAttribute("data-contents")&&("production"!==process.env.NODE_ENV?r(!1,"Invalid DraftEditorContents structure."):r(!1)),c>0&&(c=s.childNodes.length));if(0===c){var u=null;if(null!=d)u=d;else{var f=function(e){for(;e.firstChild&&(i(e.firstChild)&&"true"===e.firstChild.getAttribute("data-blocks")||t(e.firstChild));)e=e.firstChild;return e}(s);u=o(t(f))}return{key:u,offset:0}}var h=s.childNodes[c-1],p=null,m=null;if(t(h)){var C=function(e){for(;e.lastChild&&(i(e.lastChild)&&"true"===e.lastChild.getAttribute("data-blocks")||t(e.lastChild));)e=e.lastChild;return e}(h);p=o(t(C)),m=l(C)}else p=o(d),m=l(h);return{key:p,offset:m}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}return hN=function(t,r,i,l,c,s){var d=i.nodeType===Node.TEXT_NODE,u=c.nodeType===Node.TEXT_NODE;if(d&&u)return{selectionState:n(t,o(e(i)),l,o(e(c)),s),needsRecovery:!1};var f=null,h=null,p=!0;return d?(f={key:o(e(i)),offset:l},h=a(r,c,s)):u?(h={key:o(e(c)),offset:s},f=a(r,i,l)):(f=a(r,i,l),h=a(r,c,s),i===c&&l===s&&(p=!!i.firstChild&&"BR"!==i.firstChild.nodeName)),{selectionState:n(t,f.key,f.offset,h.key,h.offset),needsRecovery:p}}}function lT(){if(CN)return mN;CN=1;var e=aT();return mN=function(t,n){var r=n.ownerDocument.defaultView.getSelection(),i=r.anchorNode,o=r.anchorOffset,a=r.focusNode,l=r.focusOffset;return 0===r.rangeCount||null==i||null==a?{selectionState:t.getSelection().set("hasFocus",!1),needsRecovery:!1}:e(t,n,i,o,a,l)}}function cT(){if(vN)return gN;vN=1;var e=nT(),t=kz(),n=iT(),r=lT();return gN=function(i){if(i._blockSelectEvents||i._latestEditorState!==i.props.editorState){if(i._blockSelectEvents){var o=i.props.editorState.getSelection();e.logBlockedSelectionEvent({anonymizedDom:"N/A",extraParams:JSON.stringify({stacktrace:(new Error).stack}),selectionState:JSON.stringify(o.toJS())})}}else{var a=i.props.editorState,l=r(a,n(i)),c=l.selectionState;c!==a.getSelection()&&(a=l.needsRecovery?t.forceSelection(a,c):t.acceptSelection(a,c),i.update(a))}}}function sT(){if(wN)return yN;return wN=1,yN={notEmptyKey:function(e){return null!=e&&""!=e}},yN}function dT(){if(EN)return bN;EN=1;var e=sT().notEmptyKey;function t(t,n){return e(n)&&"MUTABLE"===t.__get(n).getMutability()?n:null}return bN=function(e,n){var r;if(n.isCollapsed()){var i=n.getAnchorKey(),o=n.getAnchorOffset();return o>0?(r=e.getBlockForKey(i).getEntityAt(o-1))!==e.getBlockForKey(i).getEntityAt(o)?null:t(e.getEntityMap(),r):null}var a=n.getStartKey(),l=n.getStartOffset(),c=e.getBlockForKey(a);return r=l===c.getLength()?null:c.getEntityAt(l),t(e.getEntityMap(),r)},bN}function uT(){if(AN)return MN;AN=1;var e=function(){if(eN)return $z;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}eN=1;var t=GI(),n=JI(),r=$I(),i=GO(),o=tz(),a=Az(),l=i.Map,c={subtree:!0,characterData:!0,childList:!0,characterDataOldValue:!1,attributes:!1},s=t.isBrowser("IE <= 11"),d=function(){function t(t){var n=this;e(this,"observer",void 0),e(this,"container",void 0),e(this,"mutations",void 0),e(this,"onCharData",void 0),this.container=t,this.mutations=l();var i=r(t);i.MutationObserver&&!s?this.observer=new i.MutationObserver(function(e){return n.registerMutations(e)}):this.onCharData=function(e){e.target instanceof Node||("production"!==process.env.NODE_ENV?o(!1,"Expected target to be an instance of Node"):o(!1)),n.registerMutation({type:"characterData",target:e.target})}}var i=t.prototype;return i.start=function(){this.observer?this.observer.observe(this.container,c):this.container.addEventListener("DOMCharacterDataModified",this.onCharData)},i.stopAndFlushMutations=function(){var e=this.observer;e?(this.registerMutations(e.takeRecords()),e.disconnect()):this.container.removeEventListener("DOMCharacterDataModified",this.onCharData);var t=this.mutations;return this.mutations=l(),t},i.registerMutations=function(e){for(var t=0;t<e.length;t++)this.registerMutation(e[t])},i.getMutationTextContent=function(e){var t=e.type,n=e.target,r=e.removedNodes;if("characterData"===t){if(""!==n.textContent)return s?n.textContent.replace("\n",""):n.textContent}else if("childList"===t){if(r&&r.length)return"";if(""!==n.textContent)return n.textContent}return null},i.registerMutation=function(e){var t=this.getMutationTextContent(e);if(null!=t){var r=a(n(e.target));this.mutations=this.mutations.set(r,t)}},t}();return $z=d}(),t=hz(),n=eT(),r=kz(),i=tT(),o=GI(),a=cT(),l=iT(),c=lT(),s=dT(),d=Az(),u=o.isBrowser("IE"),f=!1,h=!1,p=null;var m={onCompositionStart:function(t){h=!0,function(t){p||(p=new e(l(t))).start()}(t)},onCompositionEnd:function(e){f=!1,h=!1,setTimeout(function(){f||m.resolveComposition(e)},20)},onSelect:a,onKeyDown:function(e,t){if(!h)return m.resolveComposition(e),void e._onKeyDown(t);t.which!==i.RIGHT&&t.which!==i.LEFT||t.preventDefault()},onKeyPress:function(e,t){t.which===i.RETURN&&t.preventDefault()},resolveComposition:function(e){if(!h){var i=d(p).stopAndFlushMutations();p=null,f=!0;var o=r.set(e._latestEditorState,{inCompositionMode:!1});if(e.exitCurrentMode(),i.size){var a=o.getCurrentContent();i.forEach(function(e,i){var l=n.decode(i),c=l.blockKey,d=l.decoratorKey,u=l.leafKey,f=o.getBlockTree(c).getIn([d,"leaves",u]),h=f.start,p=f.end,m=o.getSelection().merge({anchorKey:c,focusKey:c,anchorOffset:h,focusOffset:p,isBackward:!1}),C=s(a,m),g=a.getBlockForKey(c).getInlineStyleAt(h);a=t.replaceText(a,m,e,g,C),o=r.set(o,{currentContent:a})});var m=c(o,l(e)).selectionState;e.restoreEditorDOM();var C=u?r.forceSelection(o,m):r.acceptSelection(o,m);e.update(r.push(C,a,"insert-characters"))}else e.update(o)}}};return MN=m}function fT(){if(kN)return xN;kN=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=eT(),r=i,o=Mz(),a=Ez(),l=function(e){var i,l;function c(){return e.apply(this,arguments)||this}return l=e,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,c.prototype.render=function(){var e=this.props,i=e.block,l=e.children,c=e.contentState,s=e.decorator,d=e.decoratorKey,u=e.direction,f=e.leafSet,h=e.text,p=i.getKey(),m=f.get("leaves"),C=s.getComponentForKey(d),g=s.getPropsForKey(d),v=n.encode(p,parseInt(d,10),0),y=h.slice(m.first().get("start"),m.last().get("end")),w=a.getHTMLDirIfDifferent(o.getDirection(y),u);return r.createElement(C,t({},g,{contentState:c,decoratedText:y,dir:w,key:v,entityKey:i.getEntityAt(f.get("start")),offsetKey:v}),l)},c}(r.Component);return xN=l}function hT(){if(HN)return LN;function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}HN=1;var n=i,r=GI(),o=tz(),a=YI(),l=r.isBrowser("IE <= 11");var c=function(r){var i,c;function s(n){var i;return t(e(i=r.call(this,n)||this),"_forceFlag",void 0),t(e(i),"_node",void 0),i._forceFlag=!1,i}c=r,(i=s).prototype=Object.create(c.prototype),i.prototype.constructor=i,i.__proto__=c;var d=s.prototype;return d.shouldComponentUpdate=function(e){var t=this._node,n=""===e.children;a(t)||("production"!==process.env.NODE_ENV?o(!1,"node is not an Element"):o(!1));var r=t;return n?!function(e){return l?"\n"===e.textContent:"BR"===e.tagName}(r):r.textContent!==e.children},d.componentDidMount=function(){this._forceFlag=!this._forceFlag},d.componentDidUpdate=function(){this._forceFlag=!this._forceFlag},d.render=function(){var e,t=this;return""===this.props.children?this._forceFlag?(e=function(e){return t._node=e},l?n.createElement("span",{key:"A","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"A","data-text":"true",ref:e})):function(e){return l?n.createElement("span",{key:"B","data-text":"true",ref:e},"\n"):n.createElement("br",{key:"B","data-text":"true",ref:e})}(function(e){return t._node=e}):n.createElement("span",{key:this._forceFlag?"A":"B","data-text":"true",ref:function(e){return t._node=e}},this.props.children)},s}(n.Component);return LN=c}function pT(){if(SN)return _N;SN=1;var e=YI();return _N=function(t){return!(!t||!t.ownerDocument)&&(e(t)&&"BR"===t.nodeName)}}function mT(){return ON?VN:(ON=1,VN={initODS:function(){},handleExtensionCausedError:function(){}})}function CT(){if(TN)return IN;TN=1;var e=NN?zN:(NN=1,zN=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))});return IN=function(t){return e(t)&&3==t.nodeType}}function gT(){if(jN)return DN;jN=1;var e=CT();return DN=function t(n,r){return!(!n||!r)&&(n===r||!e(n)&&(e(r)?t(n,r.parentNode):"contains"in n?n.contains(r):!!n.compareDocumentPosition&&!!(16&n.compareDocumentPosition(r))))},DN}function vT(){if(RN)return ZN;return RN=1,ZN=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}}function yT(){if(PN)return BN;PN=1;var e=mT(),t=nT(),n=GI(),r=gT(),i=vT(),o=KI(),a=tz(),l=YI(),c=n.isBrowser("IE");function s(e,t){if(!e)return"[empty]";var n=d(e,t);return n.nodeType===Node.TEXT_NODE?n.textContent:(l(n)||("production"!==process.env.NODE_ENV?a(!1,"Node must be an Element if it is not a text node."):a(!1)),n.outerHTML)}function d(e,t){var n=void 0!==t?t(e):[];if(e.nodeType===Node.TEXT_NODE){var r=e.textContent.length;return o(e).createTextNode("[text "+r+(n.length?" | "+n.join(", "):"")+"]")}var i=e.cloneNode();1===i.nodeType&&n.length&&i.setAttribute("data-labels",n.join(", "));for(var a=e.childNodes,l=0;l<a.length;l++)i.appendChild(d(a[l],t));return i}function u(e,t){for(var n=e,r=n;n;){if(l(n)&&r.hasAttribute("contenteditable"))return s(n,t);r=n=n.parentNode}return"Could not find contentEditable parent of node"}function f(e){return null===e.nodeValue?e.childNodes.length:e.nodeValue.length}function h(e,n,o,a){var l=i();if(e.extend&&null!=n&&r(l,n)){o>f(n)&&t.logSelectionStateFailure({anonymizedDom:u(n),extraParams:JSON.stringify({offset:o}),selectionState:JSON.stringify(a.toJS())});var c=n===e.focusNode;try{e.rangeCount>0&&e.extend&&e.extend(n,o)}catch(r){throw t.logSelectionStateFailure({anonymizedDom:u(n,function(t){var n=[];return t===l&&n.push("active element"),t===e.anchorNode&&n.push("selection anchor node"),t===e.focusNode&&n.push("selection focus node"),n}),extraParams:JSON.stringify({activeElementName:l?l.nodeName:null,nodeIsFocus:n===e.focusNode,nodeWasFocus:c,selectionRangeCount:e.rangeCount,selectionAnchorNodeName:e.anchorNode?e.anchorNode.nodeName:null,selectionAnchorOffset:e.anchorOffset,selectionFocusNodeName:e.focusNode?e.focusNode.nodeName:null,selectionFocusOffset:e.focusOffset,message:r?""+r:null,offset:o},null,2),selectionState:JSON.stringify(a.toJS(),null,2)}),r}}else if(n&&e.rangeCount>0){var s=e.getRangeAt(0);s.setEnd(n,o),e.addRange(s.cloneRange())}}function p(n,r,i,a){var l=o(r).createRange();if(i>f(r)&&(t.logSelectionStateFailure({anonymizedDom:u(r),extraParams:JSON.stringify({offset:i}),selectionState:JSON.stringify(a.toJS())}),e.handleExtensionCausedError()),l.setStart(r,i),c)try{n.addRange(l)}catch(e){"production"!==process.env.NODE_ENV&&console.warn("Call to selection.addRange() threw exception: ",e)}else n.addRange(l)}return BN={setDraftEditorSelection:function(e,t,n,i,a){var l=o(t);if(r(l.documentElement,t)){var c=l.defaultView.getSelection(),s=e.getAnchorKey(),d=e.getAnchorOffset(),u=e.getFocusKey(),f=e.getFocusOffset(),m=e.getIsBackward();if(!c.extend&&m){var C=s,g=d;s=u,d=f,u=C,f=g,m=!1}var v=s===n&&i<=d&&a>=d,y=u===n&&i<=f&&a>=f;if(v&&y)return c.removeAllRanges(),p(c,t,d-i,e),void h(c,t,f-i,e);if(m){if(y&&(c.removeAllRanges(),p(c,t,f-i,e)),v){var w=c.focusNode,b=c.focusOffset;c.removeAllRanges(),p(c,t,d-i,e),h(c,w,b,e)}}else v&&(c.removeAllRanges(),p(c,t,d-i,e)),y&&h(c,t,f-i,e)}},addFocusToSelection:h}}function wT(){if(UN)return FN;UN=1;var e=vh();var t=hT(),n=i,r=tz(),o=pT(),a=yT().setDraftEditorSelection,l=function(i){var l,c;function s(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e=i.call.apply(i,[this].concat(n))||this),"leaf",void 0),e}c=i,(l=s).prototype=Object.create(c.prototype),l.prototype.constructor=l,l.__proto__=c;var d=s.prototype;return d._setSelection=function(){var e=this.props.selection;if(null!=e&&e.getHasFocus()){var t=this.props,n=t.block,i=t.start,l=t.text,c=n.getKey(),s=i+l.length;if(e.hasEdgeWithin(c,i,s)){var d=this.leaf;d||("production"!==process.env.NODE_ENV?r(!1,"Missing node"):r(!1));var u,f=d.firstChild;f||("production"!==process.env.NODE_ENV?r(!1,"Missing child"):r(!1)),f.nodeType===Node.TEXT_NODE?u=f:o(f)?u=d:(u=f.firstChild)||("production"!==process.env.NODE_ENV?r(!1,"Missing targetNode"):r(!1)),a(e,u,c,i,s)}}},d.shouldComponentUpdate=function(e){var t=this.leaf;return t||("production"!==process.env.NODE_ENV?r(!1,"Missing leafNode"):r(!1)),t.textContent!==e.text||e.styleSet!==this.props.styleSet||e.forceSelection},d.componentDidUpdate=function(){this._setSelection()},d.componentDidMount=function(){this._setSelection()},d.render=function(){var r=this,i=this.props.block,o=this.props.text;o.endsWith("\n")&&this.props.isLast&&(o+="\n");var a=this.props,l=a.customStyleMap,c=a.customStyleFn,s=a.offsetKey,d=a.styleSet,u=d.reduce(function(t,n){var r={},i=l[n];return void 0!==i&&t.textDecoration!==i.textDecoration&&(r.textDecoration=[t.textDecoration,i.textDecoration].join(" ").trim()),e(t,i,r)},{});if(c){var f=c(d,i);u=e(u,f)}return n.createElement("span",{"data-offset-key":s,ref:function(e){return r.leaf=e},style:u},n.createElement(t,null,o))},s}(n.Component);return FN=l}function bT(){if(WN)return qN;WN=1;var e=fT(),t=wT(),n=eT(),r=GO(),o=i,a=_z();r.List;var l=function(r){var i,l;function c(){return r.apply(this,arguments)||this}return l=r,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l,c.prototype.render=function(){var r=this.props,i=r.block,l=r.contentState,c=r.customStyleFn,s=r.customStyleMap,d=r.decorator,u=r.direction,f=r.forceSelection,h=r.hasSelection,p=r.selection,m=r.tree,C=i.getKey(),g=i.getText(),v=m.size-1,y=this.props.children||m.map(function(r,a){var m=r.get("decoratorKey"),y=r.get("leaves"),w=y.size-1,b=y.map(function(e,r){var l=n.encode(C,a,r),d=e.get("start"),u=e.get("end");return o.createElement(t,{key:l,offsetKey:l,block:i,start:d,selection:h?p:null,forceSelection:f,text:g.slice(d,u),styleSet:i.getInlineStyleAt(d),customStyleMap:s,customStyleFn:c,isLast:m===v&&r===w})}).toArray();return m&&d?o.createElement(e,{block:i,children:b,contentState:l,decorator:d,decoratorKey:m,direction:u,leafSet:r,text:g,key:a}):b}).toArray();return o.createElement("div",{"data-offset-key":n.encode(C,0,0),className:a({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===u,"public/DraftStyleDefault/rtl":"RTL"===u})},y)},c}(o.Component);return qN=l}function ET(){if(GN)return QN;function e(e,t){return!!t&&(e===t.documentElement||e===t.body)}return GN=1,QN={getTop:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollTop||n.documentElement.scrollTop:t.scrollTop},setTop:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollTop=r.documentElement.scrollTop=n:t.scrollTop=n},getLeft:function(t){var n=t.ownerDocument;return e(t,n)?n.body.scrollLeft||n.documentElement.scrollLeft:t.scrollLeft},setLeft:function(t,n){var r=t.ownerDocument;e(t,r)?r.body.scrollLeft=r.documentElement.scrollLeft=n:t.scrollLeft=n}}}function MT(){if(eI)return $N;eI=1;var e=function(){if(YN)return KN;YN=1;var e=/-(.)/g;return KN=function(t){return t.replace(e,function(e,t){return t.toUpperCase()})}}(),t=function(){if(JN)return XN;JN=1;var e=/([A-Z])/g;return XN=function(t){return t.replace(e,"-$1").toLowerCase()}}();function n(e){return null==e?e:String(e)}return $N=function(r,i){var o;if(window.getComputedStyle&&(o=window.getComputedStyle(r,null)))return n(o.getPropertyValue(t(i)));if(document.defaultView&&document.defaultView.getComputedStyle){if(o=document.defaultView.getComputedStyle(r,null))return n(o.getPropertyValue(t(i)));if("display"===i)return"none"}return r.currentStyle?n("float"===i?r.currentStyle.cssFloat||r.currentStyle.styleFloat:r.currentStyle[e(i)]):n(r.style&&r.style[e(i)])}}function AT(){if(nI)return tI;function e(e,n){var r=t.get(e,n);return"auto"===r||"scroll"===r}nI=1;var t={get:MT(),getScrollParent:function(t){if(!t)return null;for(var n=t.ownerDocument;t&&t!==n.body;){if(e(t,"overflow")||e(t,"overflowY")||e(t,"overflowX"))return t;t=t.parentNode}return n.defaultView||n.parentWindow}};return tI=t}function xT(){if(aI)return oI;aI=1;var e=function(){if(iI)return rI;iI=1;var e=gT();return rI=function(t){var n=t.ownerDocument.documentElement;if(!("getBoundingClientRect"in t)||!e(n,t))return{left:0,right:0,top:0,bottom:0};var r=t.getBoundingClientRect();return{left:Math.round(r.left)-n.clientLeft,right:Math.round(r.right)-n.clientLeft,top:Math.round(r.top)-n.clientTop,bottom:Math.round(r.bottom)-n.clientTop}}}();return oI=function(t){var n=e(t);return{x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top}}}function kT(){if(fI)return uI;fI=1;var e=function(){if(cI)return lI;cI=1;var e="undefined"!=typeof navigator&&navigator.userAgent.indexOf("AppleWebKit")>-1;return lI=function(t){return(t=t||document).scrollingElement?t.scrollingElement:e||"CSS1Compat"!==t.compatMode?t.body:t.documentElement}}(),t=dI?sI:(dI=1,sI=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}});return uI=function(n){var r=e(n.ownerDocument||n.document);n.Window&&n instanceof n.Window&&(n=r);var i=t(n),o=n===r?n.ownerDocument.documentElement:n,a=n.scrollWidth-o.clientWidth,l=n.scrollHeight-o.clientHeight;return i.x=Math.max(0,Math.min(i.x,a)),i.y=Math.max(0,Math.min(i.y,l)),i}}function LT(){if(pI)return hI;function e(){var e;return document.documentElement&&(e=document.documentElement.clientWidth),!e&&document.body&&(e=document.body.clientWidth),e||0}function t(){var e;return document.documentElement&&(e=document.documentElement.clientHeight),!e&&document.body&&(e=document.body.clientHeight),e||0}function n(){return{width:window.innerWidth||e(),height:window.innerHeight||t()}}return pI=1,n.withoutScrollbars=function(){return{width:e(),height:t()}},hI=n}function HT(){if(CI)return mI;CI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=bT(),a=eT(),l=i,c=ET(),s=AT(),d=xT(),u=kT(),f=LT(),h=GO(),p=tz(),m=rT();h.List;var C=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},g=function(e,t){var n=t.get(e.getType())||t.get("unstyled"),r=n.wrapper;return{Element:n.element||t.get("unstyled").element,wrapperTemplate:r}},v=function(e,t){var n=t(e);return n?{CustomComponent:n.component,customProps:n.props,customEditable:n.editable}:{}},y=function(e,t,r,i,o,a){var l={"data-block":!0,"data-editor":t,"data-offset-key":r,key:e.getKey(),ref:a},c=i(e);return c&&(l.className=c),void 0!==o.customEditable&&(l=n({},l,{contentEditable:o.customEditable,suppressContentEditableWarning:!0})),l},w=function(e){var i,h;function w(){for(var t,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(i))||this),"wrapperRef",l.createRef()),t}h=e,(i=w).prototype=Object.create(h.prototype),i.prototype.constructor=i,i.__proto__=h;var b=w.prototype;return b.shouldComponentUpdate=function(e){var t=this.props,n=t.block,r=t.direction,i=t.tree,o=!n.getChildKeys().isEmpty(),a=n!==e.block||i!==e.tree||r!==e.direction||C(e.selection,e.block.getKey())&&e.forceSelection;return o||a},b.componentDidMount=function(){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this.wrapperRef.current;if(n){var r,i=s.getScrollParent(n),o=u(i);if(i===window){var a=d(n);(r=a.y+a.height-f().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{m(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1));var l=n;(r=l.offsetHeight+l.offsetTop-(i.offsetHeight+o.y))>0&&c.setTop(i,c.getTop(i)+r+10)}}}},b.render=function(){var e=this,r=this.props,i=r.block,c=r.blockRenderMap,s=r.blockRendererFn,d=r.blockStyleFn,u=r.contentState,f=r.decorator,h=r.editorKey,p=r.editorState,m=r.customStyleFn,b=r.customStyleMap,E=r.direction,M=r.forceSelection,A=r.selection,x=r.tree,k=null;i.children.size&&(k=i.children.reduce(function(t,r){var i=a.encode(r,0,0),o=u.getBlockForKey(r),f=v(o,s),m=f.CustomComponent||w,C=g(o,c),b=C.Element,E=C.wrapperTemplate,M=y(o,h,i,d,f,null),A=n({},e.props,{tree:p.getBlockTree(r),blockProps:f.customProps,offsetKey:i,block:o});return t.push(l.createElement(b,M,l.createElement(m,A))),!E||function(e,t){var n=e.getNextSiblingKey();return!!n&&t.getBlockForKey(n).getType()===e.getType()}(o,u)||function(e,t,n){var r=[],i=!0,o=!1,c=void 0;try{for(var s,d=n.reverse()[Symbol.iterator]();!(i=(s=d.next()).done);i=!0){var u=s.value;if(u.type!==t)break;r.push(u)}}catch(e){o=!0,c=e}finally{try{i||null==d.return||d.return()}finally{if(o)throw c}}n.splice(n.indexOf(r[0]),r.length+1);var f=r.reverse(),h=f[0].key;n.push(l.cloneElement(e,{key:"".concat(h,"-wrap"),"data-offset-key":a.encode(h,0,0)},f))}(E,b,t),t},[]));var L=i.getKey(),H=a.encode(L,0,0),_=v(i,s),S=_.CustomComponent,V=null!=S?l.createElement(S,t({},this.props,{tree:p.getBlockTree(L),blockProps:_.customProps,offsetKey:H,block:i})):l.createElement(o,{block:i,children:k,contentState:u,customStyleFn:m,customStyleMap:b,decorator:f,direction:E,forceSelection:M,hasSelection:C(A,L),selection:A,tree:x});if(i.getParentKey())return V;var O=g(i,c).Element,z=y(i,h,H,d,_,this.wrapperRef);return l.createElement(O,z,V)},w}(l.Component);return mI=w}function _T(){if(vI)return gI;vI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=HT(),r=eT(),o=i,a=Az(),l=function(e){var i,l;function c(){return e.apply(this,arguments)||this}l=e,(i=c).prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l;var s=c.prototype;return s.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),c=t.getDecorator(),s=n.getDecorator();return i!==o||a!==l||c!==s||n.mustForceSelection()},s.render=function(){for(var e=this.props,i=e.blockRenderMap,l=e.blockRendererFn,c=e.blockStyleFn,s=e.customStyleMap,d=e.customStyleFn,u=e.editorState,f=e.editorKey,h=e.textDirectionality,p=u.getCurrentContent(),m=u.getSelection(),C=u.mustForceSelection(),g=u.getDecorator(),v=a(u.getDirectionMap()),y=[],w=p.getBlocksAsArray()[0];w;){var b=w.getKey(),E={blockRenderMap:i,blockRendererFn:l,blockStyleFn:c,contentState:p,customStyleFn:d,customStyleMap:s,decorator:g,editorKey:f,editorState:u,forceSelection:C,selection:m,block:w,direction:h||v.get(b),tree:u.getBlockTree(b)},M=(i.get(w.getType())||i.get("unstyled")).wrapper;y.push({block:o.createElement(n,t({key:b},E)),wrapperTemplate:M,key:b,offsetKey:r.encode(b,0,0)});var A=w.getNextSiblingKey();w=A?p.getBlockForKey(A):null}for(var x=[],k=0;k<y.length;){var L=y[k];if(L.wrapperTemplate){var H=[];do{H.push(y[k].block),k++}while(k<y.length&&y[k].wrapperTemplate===L.wrapperTemplate);var _=o.cloneElement(L.wrapperTemplate,{key:L.key+"-wrap","data-offset-key":L.offsetKey},H);x.push(_)}else x.push(L.block),k++}return o.createElement("div",{"data-contents":"true"},x)},c}(o.Component);return gI=l}function ST(){if(wI)return yI;wI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}var n=wT(),r=eT(),o=i,a=ET(),l=AT(),c=Mz(),s=Ez(),d=_z(),u=xT(),f=kT(),h=LT(),p=tz(),m=rT(),C=Az(),g=function(e,t){return e.getAnchorKey()===t||e.getFocusKey()===t},v=function(e){var i,v;function y(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call.apply(e,[this].concat(r))||this),"_node",void 0),t}v=e,(i=y).prototype=Object.create(v.prototype),i.prototype.constructor=i,i.__proto__=v;var w=y.prototype;return w.shouldComponentUpdate=function(e){return this.props.block!==e.block||this.props.tree!==e.tree||this.props.direction!==e.direction||g(e.selection,e.block.getKey())&&e.forceSelection},w.componentDidMount=function(){if(!this.props.preventScroll){var e=this.props.selection,t=e.getEndKey();if(e.getHasFocus()&&t===this.props.block.getKey()){var n=this._node;if(null!=n){var r,i=l.getScrollParent(n),o=f(i);if(i===window){var c=u(n);(r=c.y+c.height-h().height)>0&&window.scrollTo(o.x,o.y+r+10)}else{m(n)||("production"!==process.env.NODE_ENV?p(!1,"blockNode is not an HTMLElement"):p(!1)),(r=n.offsetHeight+n.offsetTop-(i.offsetTop+i.offsetHeight+o.y))>0&&a.setTop(i,a.getTop(i)+r+10)}}}}},w._renderChildren=function(){var e=this,i=this.props.block,a=i.getKey(),l=i.getText(),d=this.props.tree.size-1,u=g(this.props.selection,a);return this.props.tree.map(function(f,h){var p=f.get("leaves");if(0===p.size)return null;var m=p.size-1,g=p.map(function(t,c){var s=r.encode(a,h,c),f=t.get("start"),p=t.get("end");return o.createElement(n,{key:s,offsetKey:s,block:i,start:f,selection:u?e.props.selection:null,forceSelection:e.props.forceSelection,text:l.slice(f,p),styleSet:i.getInlineStyleAt(f),customStyleMap:e.props.customStyleMap,customStyleFn:e.props.customStyleFn,isLast:h===d&&c===m})}).toArray(),v=f.get("decoratorKey");if(null==v)return g;if(!e.props.decorator)return g;var y=C(e.props.decorator),w=y.getComponentForKey(v);if(!w)return g;var b=y.getPropsForKey(v),E=r.encode(a,h,0),M=p.first().get("start"),A=p.last().get("end"),x=l.slice(M,A),k=i.getEntityAt(f.get("start")),L=s.getHTMLDirIfDifferent(c.getDirection(x),e.props.direction),H={contentState:e.props.contentState,decoratedText:x,dir:L,start:M,end:A,blockKey:a,entityKey:k,offsetKey:E};return o.createElement(w,t({},b,H,{key:E}),g)}).toArray()},w.render=function(){var e=this,t=this.props,n=t.direction,r=t.offsetKey,i=d({"public/DraftStyleDefault/block":!0,"public/DraftStyleDefault/ltr":"LTR"===n,"public/DraftStyleDefault/rtl":"RTL"===n});return o.createElement("div",{"data-offset-key":r,className:i,ref:function(t){return e._node=t}},this._renderChildren())},y}(o.Component);return yI=v}function VT(){if(AI)return MI;AI=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=ST(),a=eT(),l=i,c=_z(),s=(EI||(EI=1,bI=function(e){var t=e||"",n=arguments.length;if(n>1)for(var r=1;r<n;r++){var i=arguments[r];i&&(t=(t?t+" ":"")+i)}return t}),bI),d=Az(),u=function(e,t,n,r){return c({"public/DraftStyleDefault/unorderedListItem":"unordered-list-item"===e,"public/DraftStyleDefault/orderedListItem":"ordered-list-item"===e,"public/DraftStyleDefault/reset":n,"public/DraftStyleDefault/depth0":0===t,"public/DraftStyleDefault/depth1":1===t,"public/DraftStyleDefault/depth2":2===t,"public/DraftStyleDefault/depth3":3===t,"public/DraftStyleDefault/depth4":t>=4,"public/DraftStyleDefault/listLTR":"LTR"===r,"public/DraftStyleDefault/listRTL":"RTL"===r})},f=function(e){var r,i;function c(){return e.apply(this,arguments)||this}i=e,(r=c).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var f=c.prototype;return f.shouldComponentUpdate=function(e){var t=this.props.editorState,n=e.editorState;if(t.getDirectionMap()!==n.getDirectionMap())return!0;if(t.getSelection().getHasFocus()!==n.getSelection().getHasFocus())return!0;var r=n.getNativelyRenderedContent(),i=t.isInCompositionMode(),o=n.isInCompositionMode();if(t===n||null!==r&&n.getCurrentContent()===r||i&&o)return!1;var a=t.getCurrentContent(),l=n.getCurrentContent(),c=t.getDecorator(),s=n.getDecorator();return i!==o||a!==l||c!==s||n.mustForceSelection()},f.render=function(){for(var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,c=e.blockStyleFn,f=e.customStyleMap,h=e.customStyleFn,p=e.editorState,m=e.editorKey,C=e.preventScroll,g=e.textDirectionality,v=p.getCurrentContent(),y=p.getSelection(),w=p.mustForceSelection(),b=p.getDecorator(),E=d(p.getDirectionMap()),M=v.getBlocksAsArray(),A=[],x=null,k=null,L=0;L<M.length;L++){var H=M[L],_=H.getKey(),S=H.getType(),V=i(H),O=void 0,z=void 0,N=void 0;V&&(O=V.component,z=V.props,N=V.editable);var I=g||E.get(_),T=a.encode(_,0,0),D={contentState:v,block:H,blockProps:z,blockStyleFn:c,customStyleMap:f,customStyleFn:h,decorator:b,direction:I,forceSelection:w,offsetKey:T,preventScroll:C,selection:y,tree:p.getBlockTree(_)},j=r.get(S)||r.get("unstyled"),Z=j.wrapper,R=j.element||r.get("unstyled").element,B=H.getDepth(),P="";if(c&&(P=c(H)),"li"===R)P=s(P,u(S,B,k!==Z||null===x||B>x,I));var F=O||o,U={className:P,"data-block":!0,"data-editor":m,"data-offset-key":T,key:_};void 0!==N&&(U=n({},U,{contentEditable:N,suppressContentEditableWarning:!0}));var q=l.createElement(R,U,l.createElement(F,t({},D,{key:_})));A.push({block:q,wrapperTemplate:Z,key:_,offsetKey:T}),x=Z?H.getDepth():null,k=Z}for(var W=[],Q=0;Q<A.length;){var G=A[Q];if(G.wrapperTemplate){var K=[];do{K.push(A[Q].block),Q++}while(Q<A.length&&A[Q].wrapperTemplate===G.wrapperTemplate);var Y=l.cloneElement(G.wrapperTemplate,{key:G.key+"-wrap","data-offset-key":G.offsetKey},K);W.push(Y)}else W.push(G.block),Q++}return l.createElement("div",{"data-contents":"true"},W)},c}(l.Component);return MI=f}function OT(){if(SI)return _I;SI=1;var e=tz();return _I=function(t){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(t)?Array.isArray(t)?t.slice():function(t){var n=t.length;if((Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t)&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Array-like object expected"):e(!1)),"number"!=typeof n&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object needs a length property"):e(!1)),0===n||n-1 in t||("production"!==process.env.NODE_ENV?e(!1,"toArray: Object should have keys for indices"):e(!1)),"function"==typeof t.callee&&("production"!==process.env.NODE_ENV?e(!1,"toArray: Object can't be `arguments`. Use rest params (function(...args) {}) or Array.from() instead."):e(!1)),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(e){}for(var r=Array(n),i=0;i<n;i++)r[i]=t[i];return r}(t):[t]}}function zT(){if(OI)return VI;function e(e){return function(){return e}}OI=1;var t=function(){};return t.thatReturns=e,t.thatReturnsFalse=e(!1),t.thatReturnsTrue=e(!0),t.thatReturnsNull=e(null),t.thatReturnsThis=function(){return this},t.thatReturnsArgument=function(e){return e},VI=t}function NT(){if(NI)return zI;NI=1;var e=function(){if(HI)return LI;HI=1;var e={isImage:function(e){return"image"===t(e)[0]},isJpeg:function(n){var r=t(n);return e.isImage(n)&&("jpeg"===r[1]||"pjpeg"===r[1])}};function t(e){return e.split("/")}return LI=e}(),t=OT(),n=zT(),r=new RegExp("\r\n","g"),i={"text/rtf":1,"text/html":1};function o(e){if("file"==e.kind)return e.getAsFile()}return zI=function(){function a(e){this.data=e,this.types=e.types?t(e.types):[]}var l=a.prototype;return l.isRichText=function(){return!(!this.getHTML()||!this.getText())||!this.isImage()&&this.types.some(function(e){return i[e]})},l.getText=function(){var e;return this.data.getData&&(this.types.length?-1!=this.types.indexOf("text/plain")&&(e=this.data.getData("text/plain")):e=this.data.getData("Text")),e?e.replace(r,"\n"):null},l.getHTML=function(){if(this.data.getData){if(!this.types.length)return this.data.getData("Text");if(-1!=this.types.indexOf("text/html"))return this.data.getData("text/html")}},l.isLink=function(){return this.types.some(function(e){return-1!=e.indexOf("Url")||-1!=e.indexOf("text/uri-list")||e.indexOf("text/x-moz-url")})},l.getLink=function(){return this.data.getData?-1!=this.types.indexOf("text/x-moz-url")?this.data.getData("text/x-moz-url").split("\n")[0]:-1!=this.types.indexOf("text/uri-list")?this.data.getData("text/uri-list"):this.data.getData("url"):null},l.isImage=function(){var t=this.types.some(function(e){return-1!=e.indexOf("application/x-moz-file")});if(t)return!0;for(var n=this.getFiles(),r=0;r<n.length;r++){var i=n[r].type;if(!e.isImage(i))return!1}return!0},l.getCount=function(){return this.data.hasOwnProperty("items")?this.data.items.length:this.data.hasOwnProperty("mozItemCount")?this.data.mozItemCount:this.data.files?this.data.files.length:null},l.getFiles=function(){return this.data.items?Array.prototype.slice.call(this.data.items).map(o).filter(n.thatReturnsArgument):this.data.files?Array.prototype.slice.call(this.data.files):[]},l.hasFiles=function(){return this.getFiles().length>0},a}()}function IT(){if(TI)return II;TI=1;var e=tz(),t=/\.textClipping$/,n={"text/plain":!0,"text/html":!0,"text/rtf":!0};return II=function(r,i){var o=0,a=[];r.forEach(function(l){!function(r,i){if(!L.FileReader||r.type&&!(r.type in n))return void i("");if(""===r.type){var o="";return t.test(r.name)&&(o=r.name.replace(t,"")),void i(o)}var a=new FileReader;a.onload=function(){var t=a.result;"string"!=typeof t&&("production"!==process.env.NODE_ENV?e(!1,'We should be calling "FileReader.readAsText" which returns a string'):e(!1)),i(t)},a.onerror=function(){i("")},a.readAsText(r)}(l,function(e){o++,e&&a.push(e.slice(0,5e3)),o==r.length&&i(a.join("\r"))})})},II}function TT(){if(jI)return DI;return jI=1,DI=function(e){return"handled"===e||!0===e}}function DT(){if(RI)return ZI;RI=1;var e=NT(),t=hz(),n=kz(),r=JI(),i=KI(),o=IT(),a=oT(),l=$I(),c=TT(),s=Az();var d={onDragEnd:function(e){e.exitCurrentMode(),u(e)},onDrop:function(l,d){var h=new e(d.nativeEvent.dataTransfer),p=l._latestEditorState,m=function(e,t){var n=null,o=null,l=i(e.currentTarget);if("function"==typeof l.caretRangeFromPoint){var c=l.caretRangeFromPoint(e.x,e.y);n=c.startContainer,o=c.startOffset}else{if(!e.rangeParent)return null;n=e.rangeParent,o=e.rangeOffset}n=s(n),o=s(o);var d=s(r(n));return a(t,d,o,d,o)}(d.nativeEvent,p);if(d.preventDefault(),l._dragCount=0,l.exitCurrentMode(),null!=m){var C=h.getFiles();if(C.length>0){if(l.props.handleDroppedFiles&&c(l.props.handleDroppedFiles(m,C)))return;o(C,function(e){e&&l.update(f(p,m,e))})}else{var g=l._internalDrag?"internal":"external";l.props.handleDrop&&c(l.props.handleDrop(m,h,g))||(l._internalDrag?l.update(function(e,r){var i=t.moveText(e.getCurrentContent(),e.getSelection(),r);return n.push(e,i,"insert-fragment")}(p,m)):l.update(f(p,m,h.getText()))),u(l)}}}};function u(e){e._internalDrag=!1;var t=e.editorContainer;if(t){var n=new MouseEvent("mouseup",{view:l(t),bubbles:!0,cancelable:!0});t.dispatchEvent(n)}}function f(e,r,i){var o=t.insertText(e.getCurrentContent(),r,i,e.getCurrentInlineStyle());return n.push(e,o,"insert-fragment")}return ZI=d}var jT,ZT,RT,BT,PT,FT,UT,qT,WT,QT,GT,KT,YT,XT,JT,$T,eD,tD,nD,rD,iD,oD,aD,lD,cD,sD,dD,uD,fD,hD,pD,mD,CD,gD,vD,yD,wD,bD,ED,MD,AD,xD,kD,LD,HD,_D,SD,VD,OD,zD,ND,ID,TD,DD,jD,ZD,RD,BD,PD,FD,UD,qD,WD,QD,GD,KD,YD,XD,JD,$D,ej,tj,nj,rj,ij,oj,aj,lj,cj,sj,dj,uj,fj,hj,pj,mj,Cj,gj,vj,yj,wj,bj,Ej,Mj,Aj,xj,kj,Lj,Hj,_j,Sj,Vj={};function Oj(){return RT?ZT:(RT=1,jT||(jT=1,function(e){if(!e.setImmediate){var t,n,r,i,o=1,a={},l=!1,c=e.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(e);s=s&&s.setTimeout?s:e,"[object process]"==={}.toString.call(e.process)?t=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()+"$",i=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&u(+t.data.slice(r.length))},e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),t=function(t){e.postMessage(r+t,"*")}):e.MessageChannel?((n=new MessageChannel).port1.onmessage=function(e){u(e.data)},t=function(e){n.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?function(){var e=c.documentElement;t=function(t){var n=c.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():t=function(e){setTimeout(u,0,e)},s.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];var i={callback:e,args:n};return a[o]=i,t(o),o++},s.clearImmediate=d}function d(e){delete a[e]}function u(e){if(l)setTimeout(u,0,e);else{var t=a[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===L?Vj:L:self)),ZT=L.setImmediate)}function zj(){if(PT)return BT;PT=1;var e=hz(),t=kz(),n=GI(),r=dT(),i=TT(),o=PI?BI:(PI=1,BI=function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=e.getBlockTree(n),i=t.getStartOffset(),o=!1;return r.some(function(e){return i===e.get("start")?(o=!0,!0):i<e.get("end")&&e.get("leaves").some(function(e){var t=e.get("start");return i===t&&(o=!0,!0)})}),o}),a=Az(),l=Oj(),c=n.isBrowser("Firefox");function s(n,r,i,o,a){var l=e.replaceText(n.getCurrentContent(),n.getSelection(),r,i,o);return t.push(n,l,"insert-characters",a)}return BT=function(e,n){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var d=e._latestEditorState,u=n.data;if(u)if(e.props.handleBeforeInput&&i(e.props.handleBeforeInput(u,d,n.timeStamp)))n.preventDefault();else{var f=d.getSelection(),h=f.getStartOffset(),p=f.getAnchorKey();if(!f.isCollapsed())return n.preventDefault(),void e.update(s(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!0));var m,C=s(d,u,d.getCurrentInlineStyle(),r(d.getCurrentContent(),d.getSelection()),!1),g=!1;if(g||(g=o(e._latestCommittedEditorState)),!g){var v=d.getBlockTree(p),y=C.getBlockTree(p);g=v.size!==y.size||v.zip(y).some(function(e){var t=e[0],n=e[1],r=t.get("start"),i=r+(r>=h?u.length:0),o=t.get("end"),a=o+(o>=h?u.length:0),l=n.get("start"),c=n.get("end"),s=n.get("decoratorKey");return t.get("decoratorKey")!==s||t.get("leaves").size!==n.get("leaves").size||i!==l||a!==c||null!=s&&c-l!==o-r})}if(g||(m=u,g=c&&("'"==m||"/"==m)),g||(g=a(C.getDirectionMap()).get(p)!==a(d.getDirectionMap()).get(p)),g)return n.preventDefault(),C=t.set(C,{forceSelection:!0}),void e.update(C);C=t.set(C,{nativelyRenderedContent:C.getCurrentContent()}),e._pendingStateFromBeforeInput=C,l(function(){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0)})}},BT}function Nj(){if(GT)return QT;GT=1;var e=az();return QT=function(t){var n=t.getSelection();return n.isCollapsed()?null:e(t.getCurrentContent(),n)}}function Ij(){if(eD)return $T;eD=1;var e=hz(),t=kz(),n=AT(),r=Nj(),i=kT(),o=JT?XT:(JT=1,XT=function(e){if(!e||!("ownerDocument"in e))return!1;if("ownerDocument"in e){var t=e;if(!t.ownerDocument.defaultView)return t instanceof Node;if(t instanceof t.ownerDocument.defaultView.Node)return!0}return!1});return $T=function(a,l){var c,s=a._latestEditorState,d=s.getSelection(),u=l.target;if(d.isCollapsed())l.preventDefault();else{if(o(u)){var f=u;c=i(n.getScrollParent(f))}var h=r(s);a.setClipboard(h),a.setMode("cut"),setTimeout(function(){a.restoreEditorDOM(c),a.exitCurrentMode(),a.update(function(n){var r=e.removeRange(n.getCurrentContent(),n.getSelection(),"forward");return t.push(n,r,"remove-range")}(s))},0)}},$T}function Tj(){if(cD)return lD;cD=1;var e=tz(),t=/[\uD800-\uDFFF]/;function n(e){return 55296<=e&&e<=57343}function r(e){return t.test(e)}function i(e,t){return 1+n(e.charCodeAt(t))}function o(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!r(e))return e.substr(t,n);var o=e.length;if(o<=0||t>o||n<=0)return"";var a=0;if(t>0){for(;t>0&&a<o;t--)a+=i(e,a);if(a>=o)return""}else if(t<0){for(a=o;t<0&&0<a;t++)a-=i(e,a-1);a<0&&(a=0)}var l=o;if(n<o)for(l=a;n>0&&l<o;n--)l+=i(e,l);return e.substring(a,l)}var a={getCodePoints:function(e){for(var t=[],n=0;n<e.length;n+=i(e,n))t.push(e.codePointAt(n));return t},getUTF16Length:i,hasSurrogateUnit:r,isCodeUnitInSurrogateRange:n,isSurrogatePair:function(t,n){if(0<=n&&n<t.length||("production"!==process.env.NODE_ENV?e(!1,"isSurrogatePair: Invalid index %s for string length %s.",n,t.length):e(!1)),n+1===t.length)return!1;var r=t.charCodeAt(n),i=t.charCodeAt(n+1);return 55296<=r&&r<=56319&&56320<=i&&i<=57343},strlen:function(e){if(!r(e))return e.length;for(var t=0,n=0;n<e.length;n+=i(e,n))t++;return t},substring:function(e,t,n){(t=t||0)<0&&(t=0),(n=void 0===n?1/0:n||0)<0&&(n=0);var r=Math.abs(n-t);return o(e,t=t<n?t:n,r)},substr:o};return lD=a}function Dj(){if(dD)return sD;dD=1;var e=zT();function t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}}var n="production"!==process.env.NODE_ENV?function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.apply(void 0,[n].concat(i))}}:e;return sD=n}function jj(){if(fD)return uD;fD=1;var e=Dj();return uD=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionBackward should only be called with a collapsed SelectionState");var i=t.getCurrentContent(),o=r.getStartKey(),a=r.getStartOffset(),l=o,c=0;if(n>a){var s=i.getKeyBefore(o);if(null==s)l=o;else l=s,c=i.getBlockForKey(s).getText().length}else c=a-n;return r.merge({focusKey:l,focusOffset:c,isBackward:!0})},uD}function Zj(){if(pD)return hD;pD=1;var e=hz(),t=yz()("draft_tree_data_support");return hD=function(n,r,i){var o=n.getSelection(),a=n.getCurrentContent(),l=o,c=o.getAnchorKey(),s=o.getFocusKey(),d=a.getBlockForKey(c);if(t&&"forward"===i&&c!==s)return a;if(o.isCollapsed()){if("forward"===i){if(n.isSelectionAtEndOfContent())return a;if(t)if(o.getAnchorOffset()===a.getBlockForKey(c).getLength()){var u=a.getBlockForKey(d.nextSibling);if(!u||0===u.getLength())return a}}else if(n.isSelectionAtStartOfContent())return a;if((l=r(n))===o)return a}return e.removeRange(a,l,i)}}function Rj(){if(CD)return mD;CD=1;var e=kz(),t=Tj(),n=jj(),r=Zj();return mD=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a-1];return n(e,l?t.getUTF16Length(l,0):1)},"backward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"backspace-character":"remove-range")},mD}function Bj(){if(vD)return gD;vD=1;var e=hz(),t=eT(),n=kz(),r=GI(),i=sT().notEmptyKey,o=JI(),a=Rj(),l=Az(),c=r.isEngine("Gecko");return gD=function(r,s){void 0!==r._pendingStateFromBeforeInput&&(r.update(r._pendingStateFromBeforeInput),r._pendingStateFromBeforeInput=void 0);var d=r.editor.ownerDocument.defaultView.getSelection(),u=d.anchorNode,f=d.isCollapsed,h=(null==u?void 0:u.nodeType)!==Node.TEXT_NODE&&(null==u?void 0:u.nodeType)!==Node.ELEMENT_NODE;if(null!=u&&!h){if(u.nodeType===Node.TEXT_NODE&&(null!==u.previousSibling||null!==u.nextSibling)){var p=u.parentNode;if(null==p)return;u.nodeValue=p.textContent;for(var m=p.firstChild;null!=m;m=m.nextSibling)m!==u&&p.removeChild(m)}var C=u.textContent,g=r._latestEditorState,v=l(o(u)),y=t.decode(v),w=y.blockKey,b=y.decoratorKey,E=y.leafKey,M=g.getBlockTree(w).getIn([b,"leaves",E]),A=M.start,x=M.end,k=g.getCurrentContent(),L=k.getBlockForKey(w),H=L.getText().slice(A,x);if(C.endsWith("\n\n")&&(C=C.slice(0,-1)),C!==H){var _,S,V,O,z=g.getSelection(),N=z.merge({anchorOffset:A,focusOffset:x,isBackward:!1}),I=L.getEntityAt(A),T=i(I)?k.getEntity(I):null,D="MUTABLE"===(null!=T?T.getMutability():null),j=D?"spellcheck-change":"apply-entity",Z=e.replaceText(k,N,C,L.getInlineStyleAt(A),D?L.getEntityAt(A):null);if(c)_=d.anchorOffset,S=d.focusOffset,O=(V=A+Math.min(_,S))+Math.abs(_-S),_=V,S=O;else{var R=C.length-H.length;V=z.getStartOffset(),O=z.getEndOffset(),_=f?O+R:V,S=O+R}var B=Z.merge({selectionBefore:k.getSelectionAfter(),selectionAfter:z.merge({anchorOffset:_,focusOffset:S})});r.update(n.push(g,B,j))}else{var P=s.nativeEvent.inputType;if(P){var F=function(e,t){return"deleteContentBackward"===e?a(t):t}(P,g);if(F!==g)return r.restoreEditorDOM(),void r.update(F)}}}},gD}function Pj(){if(ED)return bD;ED=1;var e=GI(),t=function(){if(wD)return yD;wD=1;var e=tT();return yD=function(t){return t.which===e.RETURN&&(t.getModifierState("Shift")||t.getModifierState("Alt")||t.getModifierState("Control"))},yD}(),n=e.isPlatform("Mac OS X"),r={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return n&&e.altKey},usesMacOSHeuristics:function(){return n},hasCommandModifier:function(e){return n?!!e.metaKey&&!e.altKey:r.isCtrlKeyCommand(e)},isSoftNewlineEvent:t};return bD=r}function Fj(){if(kD)return xD;kD=1;var e=GI(),t=tz();var n=e.isBrowser("Chrome")?function(e){for(var n=e.cloneRange(),r=[],i=e.endContainer;null!=i;i=i.parentNode){var o=i===e.commonAncestorContainer;o?n.setStart(e.startContainer,e.startOffset):n.setStart(n.endContainer,0);var a,l=Array.from(n.getClientRects());if(r.push(l),o)return r.reverse(),(a=[]).concat.apply(a,r);n.setEndBefore(i)}"production"!==process.env.NODE_ENV?t(!1,"Found an unexpected detached subtree when getting range client rects."):t(!1)}:function(e){return Array.from(e.getClientRects())};return xD=n}function Uj(){if(HD)return LD;HD=1;var e=Tj(),t=KI(),n=Fj(),r=tz();function i(e,t){for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<e.length;a++){var l=e[a];0!==l.width&&1!==l.width&&(n=Math.min(n,l.top),r=Math.min(r,l.bottom),i=Math.max(i,l.top),o=Math.max(o,l.bottom))}return i<=r&&i-n<t&&o-r<t}function o(e){switch(e.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return e.length;default:return e.childNodes.length}}return LD=function(a){a.collapsed||("production"!==process.env.NODE_ENV?r(!1,"expandRangeToStartOfLine: Provided range is not collapsed."):r(!1));var l=(a=a.cloneRange()).startContainer;1!==l.nodeType&&(l=l.parentNode);var c=function(e){var n=getComputedStyle(e),i=t(e),o=i.createElement("div");o.style.fontFamily=n.fontFamily,o.style.fontSize=n.fontSize,o.style.fontStyle=n.fontStyle,o.style.fontWeight=n.fontWeight,o.style.lineHeight=n.lineHeight,o.style.position="absolute",o.textContent="M";var a=i.body;a||("production"!==process.env.NODE_ENV?r(!1,"Missing document.body"):r(!1)),a.appendChild(o);var l=o.getBoundingClientRect();return a.removeChild(o),l.height}(l),s=a.endContainer,d=a.endOffset;for(a.setStart(a.startContainer,0);i(n(a),c)&&(s=a.startContainer,d=a.startOffset,s.parentNode||("production"!==process.env.NODE_ENV?r(!1,"Found unexpected detached subtree when traversing."):r(!1)),a.setStartBefore(s),1!==s.nodeType||"inline"===getComputedStyle(s).display););for(var u=s,f=d-1;;){for(var h=u.nodeValue,p=f;p>=0;p--)if(!(null!=h&&p>0&&e.isSurrogatePair(h,p-1))){if(a.setStart(u,p),!i(n(a),c))break;s=u,d=p}if(-1===p||0===u.childNodes.length)break;f=o(u=u.childNodes[p])}return a.setStart(s,d),a},LD}function qj(){if(OD)return VD;OD=1;return VD={getPunctuation:function(){return"[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"}}}function Wj(){if(ND)return zD;ND=1;var e="['‘’]",t="\\s|(?![_])"+qj().getPunctuation(),n=new RegExp("^(?:"+t+")*(?:"+e+"|(?!"+t+").)*(?:(?!"+t+").)"),r=new RegExp("(?:(?!"+t+").)(?:"+e+"|(?!"+t+").)*(?:"+t+")*$");function i(e,t){var i=t?r.exec(e):n.exec(e);return i?i[0]:e}return zD={getBackward:function(e){return i(e,!0)},getForward:function(e){return i(e,!1)}}}function Qj(){if(jD)return DD;jD=1;var e=Dj();return DD=function(t,n){var r=t.getSelection();"production"!==process.env.NODE_ENV&&e(r.isCollapsed(),"moveSelectionForward should only be called with a collapsed SelectionState");var i,o=r.getStartKey(),a=r.getStartOffset(),l=t.getCurrentContent(),c=o;return n>l.getBlockForKey(o).getText().length-a?(c=l.getKeyAfter(o),i=0):i=a+n,r.merge({focusKey:c,focusOffset:i})},DD}function Gj(){if(ej)return $D;ej=1;var e=hz(),t=kz(),n=Pj(),r=tT(),i=function(){if(AD)return MD;AD=1;var e=hz(),t=kz(),n=az(),r=Az(),i=null;return MD={cut:function(o){var a=o.getCurrentContent(),l=o.getSelection(),c=null;if(l.isCollapsed()){var s=l.getAnchorKey(),d=a.getBlockForKey(s).getLength();if(d===l.getAnchorOffset()){var u=a.getKeyAfter(s);if(null==u)return o;c=l.set("focusKey",u).set("focusOffset",0)}else c=l.set("focusOffset",d)}else c=l;c=r(c),i=n(a,c);var f=e.removeRange(a,c,"forward");return f===a?o:t.push(o,f,"remove-range")},paste:function(n){if(!i)return n;var r=e.replaceWithFragment(n.getCurrentContent(),n.getSelection(),i);return t.push(n,r,"insert-fragment")}}}(),o=GI(),a=TT(),l=function(){if(SD)return _D;SD=1;var e=kz(),t=Uj(),n=aT(),r=jj(),i=Zj();return _D=function(o,a){var l=i(o,function(e){var i=e.getSelection();if(i.isCollapsed()&&0===i.getAnchorOffset())return r(e,1);var o=a.currentTarget.ownerDocument.defaultView.getSelection().getRangeAt(0);return o=t(o),n(e,null,o.endContainer,o.endOffset,o.startContainer,o.startOffset).selectionState},"backward");return l===o.getCurrentContent()?o:e.push(o,l,"remove-range")},_D}(),c=function(){if(TD)return ID;TD=1;var e=Wj(),t=kz(),n=jj(),r=Zj();return ID=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset();if(0===i)return n(t,1);var o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(0,i),l=e.getBackward(a);return n(t,l.length||1)},"backward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},ID}(),s=function(){if(RD)return ZD;RD=1;var e=Wj(),t=kz(),n=Qj(),r=Zj();return ZD=function(i){var o=r(i,function(t){var r=t.getSelection(),i=r.getStartOffset(),o=r.getStartKey(),a=t.getCurrentContent().getBlockForKey(o).getText().slice(i),l=e.getForward(a);return n(t,l.length||1)},"forward");return o===i.getCurrentContent()?i:t.push(i,o,"remove-range")},ZD}(),d=function(){if(PD)return BD;PD=1;var e=hz(),t=kz();return BD=function(n){var r=e.splitBlock(n.getCurrentContent(),n.getSelection());return t.push(n,r,"split-block")}}(),u=function(){if(UD)return FD;UD=1;var e=kz();return FD=function(t){var n=t.getSelection(),r=n.getEndKey(),i=t.getCurrentContent().getBlockForKey(r).getLength();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:i,focusKey:r,focusOffset:i,isBackward:!1}),forceSelection:!0})}}(),f=function(){if(WD)return qD;WD=1;var e=kz();return qD=function(t){var n=t.getSelection(),r=n.getStartKey();return e.set(t,{selection:n.merge({anchorKey:r,anchorOffset:0,focusKey:r,focusOffset:0,isBackward:!1}),forceSelection:!0})}}(),h=Rj(),p=function(){if(GD)return QD;GD=1;var e=kz(),t=Tj(),n=Qj(),r=Zj();return QD=function(i){var o=r(i,function(e){var r=e.getSelection(),i=e.getCurrentContent(),o=r.getAnchorKey(),a=r.getAnchorOffset(),l=i.getBlockForKey(o).getText()[a];return n(e,l?t.getUTF16Length(l,0):1)},"forward");if(o===i.getCurrentContent())return i;var a=i.getSelection();return e.push(i,o.set("selectionBefore",a),a.isCollapsed()?"delete-character":"remove-range")},QD}(),m=function(){if(YD)return KD;YD=1;var e=hz(),t=kz(),n=az();return KD=function(r){var i=r.getSelection();if(!i.isCollapsed())return r;var o=i.getAnchorOffset();if(0===o)return r;var a,l,c=i.getAnchorKey(),s=r.getCurrentContent(),d=s.getBlockForKey(c).getLength();if(d<=1)return r;o===d?(a=i.set("anchorOffset",o-1),l=i):l=(a=i.set("focusOffset",o+1)).set("anchorOffset",o+1);var u=n(s,a),f=e.removeRange(s,a,"backward"),h=f.getSelectionAfter(),p=h.getAnchorOffset()-1,m=h.merge({anchorOffset:p,focusOffset:p}),C=e.replaceWithFragment(f,m,u),g=t.push(r,C,"insert-fragment");return t.acceptSelection(g,l)}}(),C=function(){if(JD)return XD;JD=1;var e=kz();return XD=function(t,n,r){var i=e.undo(n);if("spellcheck-change"!==n.getLastChangeType())t.preventDefault(),n.getNativelyRenderedContent()?(r(e.set(n,{nativelyRenderedContent:null})),setTimeout(function(){r(i)},0)):r(i);else{var o=i.getCurrentContent();r(e.set(i,{nativelyRenderedContent:o}))}},XD}(),g=n.isOptionKeyCommand,v=o.isBrowser("Chrome");return $D=function(n,o){var y=o.which,w=n._latestEditorState;function b(e){var t=n.props[e];return!!t&&(t(o),!0)}switch(y){case r.RETURN:if(o.preventDefault(),n.props.handleReturn&&a(n.props.handleReturn(o,w)))return;break;case r.ESC:if(o.preventDefault(),b("onEscape"))return;break;case r.TAB:if(b("onTab"))return;break;case r.UP:if(b("onUpArrow"))return;break;case r.RIGHT:if(b("onRightArrow"))return;break;case r.DOWN:if(b("onDownArrow"))return;break;case r.LEFT:if(b("onLeftArrow"))return;break;case r.SPACE:v&&g(o)&&o.preventDefault()}var E=n.props.keyBindingFn(o);if(null!=E&&""!==E)if("undo"!==E){if(o.preventDefault(),!n.props.handleKeyCommand||!a(n.props.handleKeyCommand(E,w,o.timeStamp))){var M=function(e,n,r){switch(e){case"redo":return t.redo(n);case"delete":return p(n);case"delete-word":return s(n);case"backspace":return h(n);case"backspace-word":return c(n);case"backspace-to-start-of-line":return l(n,r);case"split-block":return d(n);case"transpose-characters":return m(n);case"move-selection-to-start-of-block":return f(n);case"move-selection-to-end-of-block":return u(n);case"secondary-cut":return i.cut(n);case"secondary-paste":return i.paste(n);default:return n}}(E,w,o);M!==w&&n.update(M)}}else C(o,w,n.update);else if(y===r.SPACE&&v&&g(o)){var A=e.replaceText(w.getCurrentContent(),w.getSelection()," ");n.update(t.push(w,A,"insert-characters"))}},$D}function Kj(){if(nj)return tj;nj=1;var e=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uri",void 0),this._uri=e}return e.prototype.toString=function(){return this._uri},e}();return tj=e}function Yj(){if(ij)return rj;ij=1;var e=GI(),t=tz(),n=e.isBrowser("IE <= 9");return rj=function(e){var r,i=null;return!n&&document.implementation&&document.implementation.createHTMLDocument&&((r=document.implementation.createHTMLDocument("foo")).documentElement||("production"!==process.env.NODE_ENV?t(!1,"Missing doc.documentElement"):t(!1)),r.documentElement.innerHTML=e,i=r.getElementsByTagName("body")[0]),i},rj}function Xj(){if(dj)return sj;var e;function t(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(t){n(e,t,r[t])})}return e}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}dj=1;var r=YO(),i=JO(),o=$O(),a=Sz(),l=gz(),c=Kj(),s=_z(),d=rz(),u=Yj(),f=yz(),h=GO(),p=h.List,m=h.Map,C=h.OrderedSet,g=function(){if(aj)return oj;aj=1;var e=YI();return oj=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"A"===t.nodeName}}(),v=pT(),y=rT(),w=function(){if(cj)return lj;cj=1;var e=YI();return lj=function(t){return!(!t||!t.ownerDocument)&&e(t)&&"IMG"===t.nodeName}}(),b=f("draft_tree_data_support"),E=new RegExp("\r","g"),M=new RegExp("\n","g"),A=new RegExp("^\n","g"),x=new RegExp("&nbsp;","g"),k=new RegExp("&#13;?","g"),L=new RegExp("&#8203;?","g"),H=["bold","bolder","500","600","700","800","900"],_=["light","lighter","normal","100","200","300","400"],S=["className","href","rel","target","title"],V=["alt","className","height","src","width"],O=(n(e={},s("public/DraftStyleDefault/depth0"),0),n(e,s("public/DraftStyleDefault/depth1"),1),n(e,s("public/DraftStyleDefault/depth2"),2),n(e,s("public/DraftStyleDefault/depth3"),3),n(e,s("public/DraftStyleDefault/depth4"),4),e),z=m({b:"BOLD",code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",i:"ITALIC",s:"STRIKETHROUGH",strike:"STRIKETHROUGH",strong:"BOLD",u:"UNDERLINE",mark:"HIGHLIGHT"}),N=function(e){if(y(e)&&e.style.fontFamily.includes("monospace"))return"CODE";return null},I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(O).some(function(n){e.classList.contains(n)&&(t=O[n])}),t},T=function(e){if(!g(e))return!1;var t=e;if(!t.href||"http:"!==t.protocol&&"https:"!==t.protocol&&"mailto:"!==t.protocol&&"tel:"!==t.protocol)return!1;try{new c(t.href);return!0}catch(e){return!1}},D=function(e){if(!w(e))return!1;var t=e;return!(!t.attributes.getNamedItem("src")||!t.attributes.getNamedItem("src").value)},j=function(e,t){if(!y(e))return t;var n=e,r=n.style.fontWeight,i=n.style.fontStyle,o=n.style.textDecoration;return t.withMutations(function(e){H.indexOf(r)>=0?e.add("BOLD"):_.indexOf(r)>=0&&e.remove("BOLD"),"italic"===i?e.add("ITALIC"):"normal"===i&&e.remove("ITALIC"),"underline"===o&&e.add("UNDERLINE"),"line-through"===o&&e.add("STRIKETHROUGH"),"none"===o&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))})},Z=function(e){return"ul"===e||"ol"===e},R=function(){function e(e,t){n(this,"characterList",p()),n(this,"currentBlockType","unstyled"),n(this,"currentDepth",0),n(this,"currentEntity",null),n(this,"currentText",""),n(this,"wrapper",null),n(this,"blockConfigs",[]),n(this,"contentBlocks",[]),n(this,"entityMap",l),n(this,"blockTypeMap",void 0),n(this,"disambiguate",void 0),this.clear(),this.blockTypeMap=e,this.disambiguate=t}var a=e.prototype;return a.clear=function(){this.characterList=p(),this.blockConfigs=[],this.currentBlockType="unstyled",this.currentDepth=0,this.currentEntity=null,this.currentText="",this.entityMap=l,this.wrapper=null,this.contentBlocks=[]},a.addDOMNode=function(e){var t;return this.contentBlocks=[],this.currentDepth=0,(t=this.blockConfigs).push.apply(t,this._toBlockConfigs([e],C())),this._trimCurrentText(),""!==this.currentText&&this.blockConfigs.push(this._makeBlockConfig()),this},a.getContentBlocks=function(){return 0===this.contentBlocks.length&&(b?this._toContentBlocks(this.blockConfigs):this._toFlatContentBlocks(this.blockConfigs)),{contentBlocks:this.contentBlocks,entityMap:this.entityMap}},a._makeBlockConfig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t({key:e.key||d(),type:this.currentBlockType,text:this.currentText,characterList:this.characterList,depth:this.currentDepth,parent:null,children:p(),prevSibling:null,nextSibling:null,childConfigs:[]},e);return this.characterList=p(),this.currentBlockType="unstyled",this.currentText="",n},a._toBlockConfigs=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r],o=i.nodeName.toLowerCase();if("body"===o||Z(o)){this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var a=this.currentDepth,l=this.wrapper;Z(o)&&(this.wrapper=o,Z(l)&&this.currentDepth++),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),t)),this.currentDepth=a,this.wrapper=l}else{var c=this.blockTypeMap.get(o);if(void 0===c)if("#text"!==o)if("br"!==o)if(D(i))this._addImgNode(i,t);else if(T(i))this._addAnchorNode(i,n,t);else{var s=t;z.has(o)&&(s=s.add(z.get(o))),s=j(i,s);var u=N(i);null!=u&&(s=s.add(u)),n.push.apply(n,this._toBlockConfigs(Array.from(i.childNodes),s))}else this._addBreakNode(i,t);else this._addTextNode(i,t);else{this._trimCurrentText(),""!==this.currentText&&n.push(this._makeBlockConfig());var f=this.currentDepth,h=this.wrapper;if(this.wrapper="pre"===o?"pre":this.wrapper,"string"!=typeof c&&(c=this.disambiguate(o,this.wrapper)||c[0]||"unstyled"),!b&&y(i)&&("unordered-list-item"===c||"ordered-list-item"===c)){var p=i;this.currentDepth=I(p,this.currentDepth)}var m=d(),C=this._toBlockConfigs(Array.from(i.childNodes),t);this._trimCurrentText(),n.push(this._makeBlockConfig({key:m,childConfigs:C,type:c})),this.currentDepth=f,this.wrapper=h}}}return n},a._appendText=function(e,t){var n;this.currentText+=e;var i=r.create({style:t,entity:this.currentEntity});this.characterList=(n=this.characterList).push.apply(n,Array(e.length).fill(i))},a._trimCurrentText=function(){var e=this.currentText.length,t=e-this.currentText.trimLeft().length,n=this.currentText.trimRight().length,r=this.characterList.findEntry(function(e){return null!==e.getEntity()});(t=void 0!==r?Math.min(t,r[0]):t)>(n=void 0!==(r=this.characterList.reverse().findEntry(function(e){return null!==e.getEntity()}))?Math.max(n,e-r[0]):n)?(this.currentText="",this.characterList=p()):(this.currentText=this.currentText.slice(t,n),this.characterList=this.characterList.slice(t,n))},a._addTextNode=function(e,t){var n=e.textContent;""===n.trim()&&"pre"!==this.wrapper&&(n=" "),"pre"!==this.wrapper&&(n=(n=n.replace(A,"")).replace(M," ")),this._appendText(n,t)},a._addBreakNode=function(e,t){v(e)&&this._appendText("\n",t)},a._addImgNode=function(e,t){if(w(e)){var n=e,r={};V.forEach(function(e){var t=n.getAttribute(e);t&&(r[e]=t)}),this.currentEntity=this.entityMap.__create("IMAGE","IMMUTABLE",r),f("draftjs_fix_paste_for_img")?"presentation"!==n.getAttribute("role")&&this._appendText("📷",t):this._appendText("📷",t),this.currentEntity=null}},a._addAnchorNode=function(e,t,n){if(g(e)){var r=e,i={};S.forEach(function(e){var t=r.getAttribute(e);t&&(i[e]=t)}),i.url=new c(r.href).toString(),this.currentEntity=this.entityMap.__create("LINK","MUTABLE",i||{}),t.push.apply(t,this._toBlockConfigs(Array.from(e.childNodes),n)),this.currentEntity=null}},a._toContentBlocks=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.length-1,i=0;i<=r;i++){var a=e[i];a.parent=n,a.prevSibling=i>0?e[i-1].key:null,a.nextSibling=i<r?e[i+1].key:null,a.children=p(a.childConfigs.map(function(e){return e.key})),this.contentBlocks.push(new o(t({},a))),this._toContentBlocks(a.childConfigs,a.key)}},a._hoistContainersInBlockConfigs=function(e){var t=this;return p(e).flatMap(function(e){return"unstyled"!==e.type||""!==e.text?[e]:t._hoistContainersInBlockConfigs(e.childConfigs)})},a._toFlatContentBlocks=function(e){var n=this;this._hoistContainersInBlockConfigs(e).forEach(function(e){var r=n._extractTextFromBlockConfigs(e.childConfigs),o=r.text,a=r.characterList;n.contentBlocks.push(new i(t({},e,{text:e.text+o,characterList:e.characterList.concat(a)})))})},a._extractTextFromBlockConfigs=function(e){for(var t=e.length-1,n="",r=p(),i=0;i<=t;i++){var o=e[i];n+=o.text,r=r.concat(o.characterList),""!==n&&"unstyled"!==o.type&&(n+="\n",r=r.push(r.last()));var a=this._extractTextFromBlockConfigs(o.childConfigs);n+=a.text,r=r.concat(a.characterList)}return{text:n,characterList:r}},e}();return sj=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:u)(e=e.trim().replace(E,"").replace(x," ").replace(k,"").replace(L,""));if(!n)return null;var r=function(e){var t={};return e.mapKeys(function(e,n){var r=[n.element];void 0!==n.aliasedElements&&r.push.apply(r,n.aliasedElements),r.forEach(function(n){void 0===t[n]?t[n]=e:"string"==typeof t[n]?t[n]=[t[n],e]:t[n].push(e)})}),m(t)}(t);return new R(r,function(e,t){return"li"===e?"ol"===t?"ordered-list-item":"unordered-list-item":null}).addDOMNode(n).getContentBlocks()},sj}function Jj(){if(fj)return uj;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}fj=1;var t=JO(),n=$O(),r=Xj(),i=rz(),o=Yj(),a=yz(),l=GO(),c=wz(),s=l.List,d=l.Repeat,u=a("draft_tree_data_support"),f=u?n:t,h={processHTML:function(e,t){return r(e,o,t)},processText:function(t,n,r){return t.reduce(function(t,o,a){o=c(o);var l=i(),h={key:l,type:r,text:o,characterList:s(d(n,o.length))};if(u&&0!==a){var p=a-1;h=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},h,{prevSibling:(t[p]=t[p].merge({nextSibling:l})).getKey()})}return t.push(new f(h)),t},[])}};return uj=h}function $j(){if(Cj)return mj;Cj=1;var e=hz(),t=kz(),n=(pj||(pj=1,hj=function(e,t,n,r){var i=t.getStartKey(),o=t.getEndKey(),a=e.getBlockMap(),l=a.toSeq().skipUntil(function(e,t){return t===i}).takeUntil(function(e,t){return t===o}).concat([[o,a.get(o)]]).map(function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)});return a=a.merge(l),e.merge({blockMap:a,selectionBefore:t,selectionAfter:t})}),hj),r=Az(),i={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t,n){switch(t){case"bold":return i.toggleInlineStyle(e,"BOLD");case"italic":return i.toggleInlineStyle(e,"ITALIC");case"underline":return i.toggleInlineStyle(e,"UNDERLINE");case"code":return i.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return i.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return i.onDelete(e);default:return null}},insertSoftNewline:function(n){var r=e.insertText(n.getCurrentContent(),n.getSelection(),"\n",n.getCurrentInlineStyle(),null),i=t.push(n,r,"insert-characters");return t.forceSelection(i,r.getSelectionAfter())},onBackspace:function(e){var n=e.getSelection();if(!n.isCollapsed()||n.getAnchorOffset()||n.getFocusOffset())return null;var r=e.getCurrentContent(),o=n.getStartKey(),a=r.getBlockBefore(o);if(a&&"atomic"===a.getType()){var l=r.getBlockMap().delete(a.getKey()),c=r.merge({blockMap:l,selectionAfter:n});if(c!==r)return t.push(e,c,"remove-range")}var s=i.tryToRemoveBlockStyle(e);return s?t.push(e,s,"change-block-type"):null},onDelete:function(n){var r=n.getSelection();if(!r.isCollapsed())return null;var i=n.getCurrentContent(),o=r.getStartKey(),a=i.getBlockForKey(o).getLength();if(r.getStartOffset()<a)return null;var l=i.getBlockAfter(o);if(!l||"atomic"!==l.getType())return null;var c=r.merge({focusKey:l.getKey(),focusOffset:l.getLength()}),s=e.removeRange(i,c,"forward");return s!==i?t.push(n,s,"remove-range"):null},onTab:function(e,r,i){var o=r.getSelection(),a=o.getAnchorKey();if(a!==o.getFocusKey())return r;var l=r.getCurrentContent(),c=l.getBlockForKey(a),s=c.getType();if("unordered-list-item"!==s&&"ordered-list-item"!==s)return r;e.preventDefault();var d=c.getDepth();if(!e.shiftKey&&d===i)return r;var u=n(l,o,e.shiftKey?-1:1,i);return t.push(r,u,"adjust-depth")},toggleBlockType:function(n,i){var o=n.getSelection(),a=o.getStartKey(),l=o.getEndKey(),c=n.getCurrentContent(),s=o;if(a!==l&&0===o.getEndOffset()){var d=r(c.getBlockBefore(l));l=d.getKey(),s=s.merge({anchorKey:a,anchorOffset:o.getStartOffset(),focusKey:l,focusOffset:d.getLength(),isBackward:!1})}var u=c.getBlockMap().skipWhile(function(e,t){return t!==a}).reverse().skipWhile(function(e,t){return t!==l}).some(function(e){return"atomic"===e.getType()});if(u)return n;var f=c.getBlockForKey(a).getType()===i?"unstyled":i;return t.push(n,e.setBlockType(c,s,f),"change-block-type")},toggleCode:function(e){var t=e.getSelection(),n=t.getAnchorKey(),r=t.getFocusKey();return t.isCollapsed()||n!==r?i.toggleBlockType(e,"code-block"):i.toggleInlineStyle(e,"CODE")},toggleInlineStyle:function(n,r){var i=n.getSelection(),o=n.getCurrentInlineStyle();if(i.isCollapsed())return t.setInlineStyleOverride(n,o.has(r)?o.remove(r):o.add(r));var a,l=n.getCurrentContent();return a=o.has(r)?e.removeInlineStyle(l,i,r):e.applyInlineStyle(l,i,r),t.push(n,a,"change-inline-style")},toggleLink:function(n,r,i){var o=e.applyEntity(n.getCurrentContent(),r,i);return t.push(n,o,"apply-entity")},tryToRemoveBlockStyle:function(t){var n=t.getSelection(),r=n.getAnchorOffset();if(n.isCollapsed()&&0===r){var i=n.getAnchorKey(),o=t.getCurrentContent(),a=o.getBlockForKey(i).getType(),l=o.getBlockBefore(i);if("code-block"===a&&l&&"code-block"===l.getType()&&0!==l.getLength())return null;if("unstyled"!==a)return e.setBlockType(o,n,"unstyled")}return null}};return mj=i}function eZ(){if(wj)return yj;wj=1;var e=KO(),t=YO(),n=NT(),r=hz(),i=Jj(),o=kz(),a=$j(),l=dT(),c=IT(),s=TT(),d=function(){if(vj)return gj;vj=1;var e=/\r\n?|\n/g;return gj=function(t){return t.split(e)}}();function u(e,t,n){var i=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return o.push(e,i.set("entityMap",n),"insert-fragment")}return yj=function(f,h){h.preventDefault();var p=new n(h.clipboardData);if(!p.isRichText()){var m=p.getFiles(),C=p.getText();if(m.length>0){if(f.props.handlePastedFiles&&s(f.props.handlePastedFiles(m)))return;return void c(m,function(n){if(n=n||C){var c=f._latestEditorState,s=d(n),u=t.create({style:c.getCurrentInlineStyle(),entity:l(c.getCurrentContent(),c.getSelection())}),h=a.getCurrentBlockType(c),p=i.processText(s,u,h),m=e.createFromArray(p),g=r.replaceWithFragment(c.getCurrentContent(),c.getSelection(),m);f.update(o.push(c,g,"insert-fragment"))}})}}var g=[],v=p.getText(),y=p.getHTML(),w=f._latestEditorState;if(f.props.formatPastedText){var b=f.props.formatPastedText(v,y);v=b.text,y=b.html}if(!f.props.handlePastedText||!s(f.props.handlePastedText(v,y,w))){if(v&&(g=d(v)),!f.props.stripPastedStyles){var E,M=f.getClipboard();if(!f.props.formatPastedText&&p.isRichText()&&M){if(-1!==(null===(E=y)||void 0===E?void 0:E.indexOf(f.getEditorKey()))||1===g.length&&1===M.size&&M.first().getText()===v)return void f.update(u(f._latestEditorState,M))}else if(M&&p.types.includes("com.apple.webarchive")&&!p.types.includes("text/html")&&function(e,t){return e.length===t.size&&t.valueSeq().every(function(t,n){return t.getText()===e[n]})}(g,M))return void f.update(u(f._latestEditorState,M));if(y){var A=i.processHTML(y,f.props.blockRenderMap);if(A){var x=A.contentBlocks,k=A.entityMap;if(x){var L=e.createFromArray(x);return void f.update(u(f._latestEditorState,L,k))}}}f.setClipboard(null)}if(g.length){var H=t.create({style:w.getCurrentInlineStyle(),entity:l(w.getCurrentContent(),w.getSelection())}),_=a.getCurrentBlockType(w),S=i.processText(g,H,_),V=e.createFromArray(S);f.update(u(f._latestEditorState,V))}}},yj}function tZ(){if(Ej)return bj;Ej=1;var e=GI(),t=zj(),n=function(){if(UT)return FT;UT=1;var e=kz(),t=gT(),n=vT();return FT=function(r,i){var o=i.currentTarget.ownerDocument;if(!Boolean(r.props.preserveSelectionOnBlur)&&n(o)===o.body){var a=o.defaultView.getSelection(),l=r.editor;1===a.rangeCount&&t(l,a.anchorNode)&&t(l,a.focusNode)&&a.removeAllRanges()}var c=r._latestEditorState,s=c.getSelection();if(s.getHasFocus()){var d=s.set("hasFocus",!1);r.props.onBlur&&r.props.onBlur(i),r.update(e.acceptSelection(c,d))}},FT}(),r=function(){if(WT)return qT;WT=1;var e=kz();return qT=function(t,n){t.setMode("composite"),t.update(e.set(t._latestEditorState,{inCompositionMode:!0})),t._onCompositionStart(n)},qT}(),i=function(){if(YT)return KT;YT=1;var e=Nj();return KT=function(t,n){t._latestEditorState.getSelection().isCollapsed()?n.preventDefault():t.setClipboard(e(t._latestEditorState))},KT}(),o=Ij(),a=(nD||(nD=1,tD=function(e,t){e.setMode("drag"),t.preventDefault()}),tD),l=iD?rD:(iD=1,rD=function(e){e._internalDrag=!0,e.setMode("drag")}),c=function(){if(aD)return oD;aD=1;var e=kz(),t=GI();return oD=function(n,r){var i=n._latestEditorState,o=i.getSelection();if(!o.getHasFocus()){var a=o.set("hasFocus",!0);n.props.onFocus&&n.props.onFocus(r),t.isBrowser("Chrome < 60.0.3081.0")?n.update(e.forceSelection(i,a)):n.update(e.acceptSelection(i,a))}},oD}(),s=Bj(),d=Gj(),u=eZ(),f=cT(),h=e.isBrowser("Chrome"),p=e.isBrowser("Firefox"),m=h||p?f:function(e){};return bj={onBeforeInput:t,onBlur:n,onCompositionStart:r,onCopy:i,onCut:o,onDragOver:a,onDragStart:l,onFocus:c,onInput:s,onKeyDown:d,onPaste:u,onSelect:f,onMouseUp:m,onKeyUp:m}}function nZ(){if(kj)return xj;kj=1;var e=i,t=_z(),n=function(n){var r,i;function o(){return n.apply(this,arguments)||this}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var a=o.prototype;return a.shouldComponentUpdate=function(e){return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},a.render=function(){var n=this.props.editorState.getSelection().getHasFocus(),r=t({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":n});return e.createElement("div",{className:r},e.createElement("div",{className:t("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:{whiteSpace:"pre-wrap"}},this.props.text))},o}(e.Component);return xj=n}function rZ(){if(Hj)return Lj;Hj=1;var e=Pj(),t=tT(),n=GI(),r=n.isPlatform("Mac OS X"),i=r&&n.isBrowser("Firefox < 29"),o=e.hasCommandModifier,a=e.isCtrlKeyCommand;function l(e){return r&&e.altKey||a(e)}return Lj=function(e){switch(e.keyCode){case 66:return o(e)?"bold":null;case 68:return a(e)?"delete":null;case 72:return a(e)?"backspace":null;case 73:return o(e)?"italic":null;case 74:return o(e)?"code":null;case 75:return r&&a(e)?"secondary-cut":null;case 77:case 79:return a(e)?"split-block":null;case 84:return r&&a(e)?"transpose-characters":null;case 85:return o(e)?"underline":null;case 87:return r&&a(e)?"backspace-word":null;case 89:return a(e)?r?"secondary-paste":"redo":null;case 90:return function(e){return o(e)?e.shiftKey?"redo":"undo":null}(e)||null;case t.RETURN:return"split-block";case t.DELETE:return function(e){return!r&&e.shiftKey?null:l(e)?"delete-word":"delete"}(e);case t.BACKSPACE:return function(e){return o(e)&&r?"backspace-to-start-of-line":l(e)?"backspace-word":"backspace"}(e);case t.LEFT:return i&&o(e)?"move-selection-to-start-of-block":null;case t.RIGHT:return i&&o(e)?"move-selection-to-end-of-block":null;default:return null}},Lj}function iZ(){if(Sj)return _j;Sj=1;var e=vh();function t(){return t=e||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.apply(this,arguments)}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){o(e,t,n[t])})}return e}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var l=Sz(),c=Vz(),s=uT(),d=function(){if(kI)return xI;kI=1;var e=yz()("draft_tree_data_support");return xI=e?_T():VT()}(),u=DT(),f=tZ(),h=function(){if(Aj)return Mj;Aj=1;var e=M.unstable_flushControlled;return Mj=e}(),p=nZ(),m=mT(),C=kz(),g=i,v=ET(),y=AT(),w=GI(),b=_z(),E=rz(),A=rZ(),x=kT(),k=yz(),H=tz(),_=rT(),S=Az(),V=w.isBrowser("IE"),O=!V,z={edit:f,composite:s,drag:u,cut:null,render:null},N=!1,I=function(e){function t(){return e.apply(this,arguments)||this}a(t,e);var n=t.prototype;return n.render=function(){return null},n.componentDidMount=function(){this._update()},n.componentDidUpdate=function(){this._update()},n._update=function(){var e=this.props.editor;e._latestEditorState=this.props.editorState,e._blockSelectEvents=!0},t}(g.Component),T=function(e){function i(t){var i;return o(r(i=e.call(this,t)||this),"_blockSelectEvents",void 0),o(r(i),"_clipboard",void 0),o(r(i),"_handler",void 0),o(r(i),"_dragCount",void 0),o(r(i),"_internalDrag",void 0),o(r(i),"_editorKey",void 0),o(r(i),"_placeholderAccessibilityID",void 0),o(r(i),"_latestEditorState",void 0),o(r(i),"_latestCommittedEditorState",void 0),o(r(i),"_pendingStateFromBeforeInput",void 0),o(r(i),"_onBeforeInput",void 0),o(r(i),"_onBlur",void 0),o(r(i),"_onCharacterData",void 0),o(r(i),"_onCompositionEnd",void 0),o(r(i),"_onCompositionStart",void 0),o(r(i),"_onCopy",void 0),o(r(i),"_onCut",void 0),o(r(i),"_onDragEnd",void 0),o(r(i),"_onDragOver",void 0),o(r(i),"_onDragStart",void 0),o(r(i),"_onDrop",void 0),o(r(i),"_onInput",void 0),o(r(i),"_onFocus",void 0),o(r(i),"_onKeyDown",void 0),o(r(i),"_onKeyPress",void 0),o(r(i),"_onKeyUp",void 0),o(r(i),"_onMouseDown",void 0),o(r(i),"_onMouseUp",void 0),o(r(i),"_onPaste",void 0),o(r(i),"_onSelect",void 0),o(r(i),"editor",void 0),o(r(i),"editorContainer",void 0),o(r(i),"focus",void 0),o(r(i),"blur",void 0),o(r(i),"setMode",void 0),o(r(i),"exitCurrentMode",void 0),o(r(i),"restoreEditorDOM",void 0),o(r(i),"setClipboard",void 0),o(r(i),"getClipboard",void 0),o(r(i),"getEditorKey",void 0),o(r(i),"update",void 0),o(r(i),"onDragEnter",void 0),o(r(i),"onDragLeave",void 0),o(r(i),"_handleEditorContainerRef",function(e){i.editorContainer=e,i.editor=null!==e?e.firstChild:null}),o(r(i),"focus",function(e){var t=i.props.editorState,n=t.getSelection().getHasFocus(),r=i.editor;if(r){var o=y.getScrollParent(r),a=e||x(o),l=a.x,c=a.y;_(r)||("production"!==process.env.NODE_ENV?H(!1,"editorNode is not an HTMLElement"):H(!1)),r.focus(),o===window?window.scrollTo(l,c):v.setTop(o,c),n||i.update(C.forceSelection(t,t.getSelection()))}}),o(r(i),"blur",function(){var e=i.editor;e&&(_(e)||("production"!==process.env.NODE_ENV?H(!1,"editorNode is not an HTMLElement"):H(!1)),e.blur())}),o(r(i),"setMode",function(e){var t=i.props,r=t.onPaste,o=t.onCut,a=t.onCopy,l=n({},z.edit);r&&(l.onPaste=r),o&&(l.onCut=o),a&&(l.onCopy=a);var c=n({},z,{edit:l});i._handler=c[e]}),o(r(i),"exitCurrentMode",function(){i.setMode("edit")}),o(r(i),"restoreEditorDOM",function(e){i.setState({contentsKey:i.state.contentsKey+1},function(){i.focus(e)})}),o(r(i),"setClipboard",function(e){i._clipboard=e}),o(r(i),"getClipboard",function(){return i._clipboard}),o(r(i),"update",function(e){i._latestEditorState=e,i.props.onChange(e)}),o(r(i),"onDragEnter",function(){i._dragCount++}),o(r(i),"onDragLeave",function(){i._dragCount--,0===i._dragCount&&i.exitCurrentMode()}),i._blockSelectEvents=!1,i._clipboard=null,i._handler=null,i._dragCount=0,i._editorKey=t.editorKey||E(),i._placeholderAccessibilityID="placeholder-"+i._editorKey,i._latestEditorState=t.editorState,i._latestCommittedEditorState=t.editorState,i._onBeforeInput=i._buildHandler("onBeforeInput"),i._onBlur=i._buildHandler("onBlur"),i._onCharacterData=i._buildHandler("onCharacterData"),i._onCompositionEnd=i._buildHandler("onCompositionEnd"),i._onCompositionStart=i._buildHandler("onCompositionStart"),i._onCopy=i._buildHandler("onCopy"),i._onCut=i._buildHandler("onCut"),i._onDragEnd=i._buildHandler("onDragEnd"),i._onDragOver=i._buildHandler("onDragOver"),i._onDragStart=i._buildHandler("onDragStart"),i._onDrop=i._buildHandler("onDrop"),i._onInput=i._buildHandler("onInput"),i._onFocus=i._buildHandler("onFocus"),i._onKeyDown=i._buildHandler("onKeyDown"),i._onKeyPress=i._buildHandler("onKeyPress"),i._onKeyUp=i._buildHandler("onKeyUp"),i._onMouseDown=i._buildHandler("onMouseDown"),i._onMouseUp=i._buildHandler("onMouseUp"),i._onPaste=i._buildHandler("onPaste"),i._onSelect=i._buildHandler("onSelect"),i.getEditorKey=function(){return i._editorKey},"production"!==process.env.NODE_ENV&&["onDownArrow","onEscape","onLeftArrow","onRightArrow","onTab","onUpArrow"].forEach(function(e){t.hasOwnProperty(e)&&console.warn("Supplying an `".concat(e,"` prop to `DraftEditor` has ")+"been deprecated. If your handler needs access to the keyboard event, supply a custom `keyBindingFn` prop that falls back to the default one (eg. https://is.gd/wHKQ3W).")}),i.state={contentsKey:0},i}a(i,e);var l=i.prototype;return l._buildHandler=function(e){var t=this;return function(n){if(!t.props.readOnly){var r=t._handler&&t._handler[e];r&&(h?h(function(){return r(t,n)}):r(t,n))}}},l._showPlaceholder=function(){return!!this.props.placeholder&&!this.props.editorState.isInCompositionMode()&&!this.props.editorState.getCurrentContent().hasText()},l._renderPlaceholder=function(){if(this._showPlaceholder()){var e={text:S(this.props.placeholder),editorState:this.props.editorState,textAlignment:this.props.textAlignment,accessibilityID:this._placeholderAccessibilityID};return g.createElement(p,e)}return null},l._renderARIADescribedBy=function(){var e=this.props.ariaDescribedBy||"",t=this._showPlaceholder()?this._placeholderAccessibilityID:"";return e.replace("{{editor_id_placeholder}}",t)||void 0},l.render=function(){var e=this.props,r=e.blockRenderMap,i=e.blockRendererFn,o=e.blockStyleFn,a=e.customStyleFn,l=e.customStyleMap,s=e.editorState,u=e.preventScroll,f=e.readOnly,h=e.textAlignment,p=e.textDirectionality,m=b({"DraftEditor/root":!0,"DraftEditor/alignLeft":"left"===h,"DraftEditor/alignRight":"right"===h,"DraftEditor/alignCenter":"center"===h}),C=this.props.role||"textbox",v="combobox"===C?!!this.props.ariaExpanded:null,y={blockRenderMap:r,blockRendererFn:i,blockStyleFn:o,customStyleMap:n({},c,l),customStyleFn:a,editorKey:this._editorKey,editorState:s,preventScroll:u,textDirectionality:p};return g.createElement("div",{className:m},this._renderPlaceholder(),g.createElement("div",{className:b("DraftEditor/editorContainer"),ref:this._handleEditorContainerRef},g.createElement("div",{"aria-activedescendant":f?null:this.props.ariaActiveDescendantID,"aria-autocomplete":f?null:this.props.ariaAutoComplete,"aria-controls":f?null:this.props.ariaControls,"aria-describedby":this._renderARIADescribedBy(),"aria-expanded":f?null:v,"aria-label":this.props.ariaLabel,"aria-labelledby":this.props.ariaLabelledBy,"aria-multiline":this.props.ariaMultiline,"aria-owns":f?null:this.props.ariaOwneeID,autoCapitalize:this.props.autoCapitalize,autoComplete:this.props.autoComplete,autoCorrect:this.props.autoCorrect,className:b({notranslate:!f,"public/DraftEditor/content":!0}),contentEditable:!f,"data-testid":this.props.webDriverTestID,onBeforeInput:this._onBeforeInput,onBlur:this._onBlur,onCompositionEnd:this._onCompositionEnd,onCompositionStart:this._onCompositionStart,onCopy:this._onCopy,onCut:this._onCut,onDragEnd:this._onDragEnd,onDragEnter:this.onDragEnter,onDragLeave:this.onDragLeave,onDragOver:this._onDragOver,onDragStart:this._onDragStart,onDrop:this._onDrop,onFocus:this._onFocus,onInput:this._onInput,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseUp:this._onMouseUp,onPaste:this._onPaste,onSelect:this._onSelect,ref:this.props.editorRef,role:f?null:C,spellCheck:O&&this.props.spellCheck,style:{outline:"none",userSelect:"text",WebkitUserSelect:"text",whiteSpace:"pre-wrap",wordWrap:"break-word"},suppressContentEditableWarning:!0,tabIndex:this.props.tabIndex},g.createElement(I,{editor:this,editorState:s}),g.createElement(d,t({},y,{key:"contents"+this.state.contentsKey})))))},l.componentDidMount=function(){this._blockSelectEvents=!1,!N&&k("draft_ods_enabled")&&(N=!0,m.initODS()),this.setMode("edit"),V&&(this.editor?this.editor.ownerDocument.execCommand("AutoUrlDetect",!1,!1):L.execCommand("AutoUrlDetect",!1,!1))},l.componentDidUpdate=function(){this._blockSelectEvents=!1,this._latestEditorState=this.props.editorState,this._latestCommittedEditorState=this.props.editorState},i}(g.Component);return o(T,"defaultProps",{ariaDescribedBy:"{{editor_id_placeholder}}",blockRenderMap:l,blockRendererFn:function(){return null},blockStyleFn:function(){return""},keyBindingFn:A,readOnly:!1,spellCheck:!1,stripPastedStyles:!1}),_j=T}var oZ,aZ,lZ,cZ,sZ,dZ,uZ,fZ,hZ,pZ,mZ,CZ,gZ,vZ,yZ,wZ,bZ,EZ,MZ,AZ,xZ,kZ,LZ,HZ,_Z,SZ,VZ,OZ={};function zZ(){return oZ||(oZ=1),OZ}function NZ(){if(lZ)return aZ;lZ=1;var e={stringify:function(e){return"_"+String(e)},unstringify:function(e){return e.slice(1)}};return aZ=e}function IZ(){if(uZ)return dZ;uZ=1;var e=Tj(),t=XO(),n=function(e,t){return e===t},r=function(e){return!!e},i=[];return dZ=function(o){var a=o.getCharacterList().map(function(e){return e.getStyle()}).toList(),l=a.flatten().toSet().map(function(i){return function(i,o,a){var l=[],c=o.map(function(e){return e.has(a)}).toList();return t(c,n,r,function(t,n){var r=i.getText();l.push({offset:e.strlen(r.slice(0,t)),length:e.strlen(r.slice(t,n)),style:a})}),l}(o,a,i)});return Array.prototype.concat.apply(i,l.toJS())}}function TZ(){if(hZ)return fZ;function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}hZ=1;var t=JO(),n=$O(),r=NZ(),i=function(){if(sZ)return cZ;sZ=1;var e=NZ(),t=Tj().strlen;return cZ=function(n,r){var i=[];return n.findEntityRanges(function(e){return!!e.getEntity()},function(o,a){var l=n.getText(),c=n.getEntityAt(o);i.push({offset:t(l.slice(0,o)),length:t(l.slice(o,a)),key:Number(r[e.stringify(c)])})}),i},cZ}(),o=IZ(),a=tz(),l=function(e,t){return{key:e.getKey(),text:e.getText(),type:e.getType(),depth:e.getDepth(),inlineStyleRanges:o(e),entityRanges:i(e,t),data:e.getData().toObject()}},c=function(r,i,o,c){if(r instanceof t)o.push(l(r,i));else{r instanceof n||("production"!==process.env.NODE_ENV?a(!1,"block is not a BlockNode"):a(!1));var s=r.getParentKey(),d=c[r.getKey()]=function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){e(t,n,r[n])})}return t}({},l(r,i),{children:[]});s?c[s].children.push(d):o.push(d)}};return fZ=function(e){var t={entityMap:{},blocks:[]};return t=function(e,t){var n=t.entityMap,i=[],o={},a={},l=0;return e.getBlockMap().forEach(function(e){e.findEntityRanges(function(e){return null!==e.getEntity()},function(t){var i=e.getEntityAt(t),o=r.stringify(i);a[o]||(a[o]=i,n[o]="".concat(l),l++)}),c(e,n,i,o)}),{blocks:i,entityMap:n}}(e,t),t=function(e,t){var n=t.blocks,i=t.entityMap,o={};return Object.keys(i).forEach(function(t,n){var i=e.getEntity(r.unstringify(t));o[n]={type:i.getType(),mutability:i.getMutability(),data:i.getData()}}),{blocks:n,entityMap:o}}(e,t),t},fZ}function DZ(){if(mZ)return pZ;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mZ=1;var n=rz(),r=tz(),i=function(e){if(!e||!e.type)return!1;var t=e.type;return"unordered-list-item"===t||"ordered-list-item"===t},o={fromRawTreeStateToRawState:function(t){var n=t.blocks,o=[];return Array.isArray(n)||("production"!==process.env.NODE_ENV?r(!1,"Invalid raw state"):r(!1)),Array.isArray(n)&&n.length?(function(e,t){for(var n=[].concat(e).reverse();n.length;){var i=n.pop();t(i);var o=i.children;Array.isArray(o)||("production"!==process.env.NODE_ENV?r(!1,"Invalid tree raw block"):r(!1)),n=n.concat([].concat(o.reverse()))}}(n,function(t){var n=e({},t);i(t)&&(n.depth=n.depth||0,function(t){Array.isArray(t.children)&&(t.children=t.children.map(function(n){return n.type===t.type?e({},n,{depth:(t.depth||0)+1}):n}))}(t),null!=t.children&&t.children.length>0)||(delete n.children,o.push(n))}),t.blocks=o,e({},t,{blocks:o})):t},fromRawStateToRawTreeState:function(t){var r=[],o=[];return t.blocks.forEach(function(t){var a=i(t),l=t.depth||0,c=e({},t,{children:[]});if(a){var s=o[0];if(null==s&&0===l)r.push(c);else if(null==s||s.depth<l-1){var d={key:n(),text:"",depth:l-1,type:t.type,children:[],entityRanges:[],inlineStyleRanges:[]};o.unshift(d),1===l?r.push(d):null!=s&&s.children.push(d),d.children.push(c)}else if(s.depth===l-1)s.children.push(c);else{for(;null!=s&&s.depth>=l;)o.shift(),s=o[0];l>0?s.children.push(c):r.push(c)}}else r.push(c)}),e({},t,{blocks:r})}};return pZ=o}function jZ(){if(xZ)return AZ;function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),i.forEach(function(n){t(e,n,r[n])})}return e}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xZ=1;var n=JO(),r=$O(),i=bz(),o=gz(),a=DZ(),l=function(){if(gZ)return CZ;gZ=1;var e=Dj(),t={isValidBlock:function(t,n){var r=t.getKey(),i=t.getParentKey();if(null!=i&&!n.get(i).getChildKeys().includes(r))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing parent -> child pointer on %s",r),!1;var o=t.getChildKeys().map(function(e){return n.get(e)});if(!o.every(function(e){return e.getParentKey()===r}))return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing child -> parent pointer on %s",r),!1;var a=t.getPrevSiblingKey();if(null!=a&&n.get(a).getNextSiblingKey()!==r)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is missing nextSibling pointer on %s's prevSibling",r),!1;var l=t.getNextSiblingKey();return null!=l&&n.get(l).getPrevSiblingKey()!==r?("production"!==process.env.NODE_ENV&&e(!0,"Tree is missing prevSibling pointer on %s's nextSibling",r),!1):null!==l&&null!==a&&a===l?("production"!==process.env.NODE_ENV&&e(!0,"Tree has a two-node cycle at %s",r),!1):!(""!=t.text&&t.getChildKeys().size>0&&("production"!==process.env.NODE_ENV&&e(!0,"Leaf node %s has children",r),1))},isConnectedTree:function(t){var n=t.toArray().filter(function(e){return null==e.getParentKey()&&null==e.getPrevSiblingKey()});if(1!==n.length)return"production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. More or less than one first node"),!1;for(var r=0,i=n.shift().getKey(),o=[];null!=i;){var a=t.get(i),l=a.getChildKeys(),c=a.getNextSiblingKey();if(l.size>0){null!=c&&o.unshift(c);var s=l.map(function(e){return t.get(e)}),d=s.find(function(e){return null==e.getPrevSiblingKey()});if(null==d)return"production"!==process.env.NODE_ENV&&e(!0,"%s has no first child",i),!1;i=d.getKey()}else i=null!=a.getNextSiblingKey()?a.getNextSiblingKey():o.shift();r++}return r===t.size||("production"!==process.env.NODE_ENV&&e(!0,"Tree is not connected. %s nodes were seen instead of %s",r,t.size),!1)},isValidTree:function(e){var t=this;return!!e.toArray().every(function(n){return t.isValidBlock(n,e)})&&this.isConnectedTree(e)}};return CZ=t}(),c=vz(),s=function(){if(yZ)return vZ;yZ=1;var e=YO(),t=GO().List;return vZ=function(n,r){var i=n.map(function(t,n){var i=r[n];return e.create({style:t,entity:i})});return t(i)}}(),d=function(){if(bZ)return wZ;bZ=1;var e=Tj().substr;return wZ=function(t,n){var r=Array(t.length).fill(null);return n&&n.forEach(function(n){for(var i=e(t,0,n.offset).length,o=i+e(t,n.offset,n.length).length,a=i;a<o;a++)r[a]=n.key}),r},wZ}(),u=function(){if(MZ)return EZ;MZ=1;var e=Tj(),t=GO().OrderedSet,n=e.substr,r=t();return EZ=function(e,t){var i=Array(e.length).fill(r);return t&&t.forEach(function(t){for(var r=n(e,0,t.offset).length,o=r+n(e,t.offset,t.length).length;r<o;)i[r]=i[r].add(t.style),r++}),i},EZ}(),f=rz(),h=yz(),p=GO(),m=tz(),C=h("draft_tree_data_support"),g=p.List,v=p.Map,y=p.OrderedMap,w=function(e,t){var n=e.key,r=e.type,i=e.data;return{text:e.text,depth:e.depth||0,type:r||"unstyled",key:n||f(),data:v(i),characterList:b(e,t)}},b=function(t,n){var r=t.text,i=t.entityRanges,o=t.inlineStyleRanges,a=i||[];return s(u(r,o||[]),d(r,a.filter(function(e){return n.hasOwnProperty(e.key)}).map(function(t){return e({},t,{key:n[t.key]})})))},E=function(t){return e({},t,{key:t.key||f()})},M=function(t,n,r){var i=n.map(function(t){return e({},t,{parentRef:r})});return t.concat(i.reverse())},A=function(t,i){var o=t.blocks.find(function(e){return Array.isArray(e.children)&&e.children.length>0}),c=C&&!o?a.fromRawStateToRawTreeState(t).blocks:t.blocks;if(!C)return function(e,t){return y(e.map(function(e){var r=new n(w(e,t));return[r.getKey(),r]}))}(o?a.fromRawTreeStateToRawState(t).blocks:c,i);var s=function(t,n){return t.map(E).reduce(function(i,o,a){Array.isArray(o.children)||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):m(!1));var l=o.children.map(E),c=new r(e({},w(o,n),{prevSibling:0===a?null:t[a-1].key,nextSibling:a===t.length-1?null:t[a+1].key,children:g(l.map(function(e){return e.key}))}));i=i.set(c.getKey(),c);for(var s=M([],l,c);s.length>0;){var d=s.pop(),u=d.parentRef,f=u.getChildKeys(),h=f.indexOf(d.key),p=Array.isArray(d.children);if(!p){p||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentBlock can not be converted to ContentBlockNode"):m(!1));break}var C=d.children.map(E),v=new r(e({},w(d,n),{parent:u.getKey(),children:g(C.map(function(e){return e.key})),prevSibling:0===h?null:f.get(h-1),nextSibling:h===f.size-1?null:f.get(h+1)}));i=i.set(v.getKey(),v),s=M(s,C,v)}return i},y())}(c,i);return"production"!==process.env.NODE_ENV&&(l.isValidTree(s)||("production"!==process.env.NODE_ENV?m(!1,"Should be a valid tree"):m(!1))),s};return AZ=function(e){Array.isArray(e.blocks)||("production"!==process.env.NODE_ENV?m(!1,"invalid RawDraftContentState"):m(!1));var t=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach(function(e){var r=t[e],i=r.type,a=r.mutability,l=r.data;n[e]=o.__create(i,a,l||{})}),n}(e),n=A(e,t),r=n.isEmpty()?new c:c.createEmpty(n.first().getKey());return new i({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})}}function ZZ(){if(_Z)return HZ;_Z=1;var e=function(){if(LZ)return kZ;LZ=1;var e=Fj();return kZ=function(t){var n=e(t),r=0,i=0,o=0,a=0;if(n.length){if(n.length>1&&0===n[0].width){var l=n[1];r=l.top,i=l.right,o=l.bottom,a=l.left}else{var c=n[0];r=c.top,i=c.right,o=c.bottom,a=c.left}for(var s=1;s<n.length;s++){var d=n[s];0!==d.height&&0!==d.width&&(r=Math.min(r,d.top),i=Math.max(i,d.right),o=Math.max(o,d.bottom),a=Math.min(a,d.left))}}return{top:r,right:i,bottom:o,left:a,width:i-a,height:o-r}},kZ}();return HZ=function(t){var n=t.getSelection();if(!n.rangeCount)return null;var r=n.getRangeAt(0),i=e(r),o=i.top,a=i.right,l=i.bottom,c=i.left;return 0===o&&0===a&&0===l&&0===c?null:i},HZ}function RZ(){if(VZ)return SZ;VZ=1;var e=Lz(),t=KO(),n=YO(),r=Hz(),i=JO(),o=bz(),a=Sz(),l=Vz(),c=iZ(),s=ST(),d=gz(),u=hz(),f=Cz(),h=kz(),p=Pj(),m=zZ(),C=$j(),g=vz(),v=TZ(),y=jZ(),w=rz(),b=rZ(),E=ZZ(),M=Xj();return SZ={Editor:c,EditorBlock:s,EditorState:h,CompositeDecorator:r,Entity:d,EntityInstance:f,BlockMapBuilder:t,CharacterMetadata:n,ContentBlock:i,ContentState:o,RawDraftContentState:m,SelectionState:g,AtomicBlockUtils:e,KeyBindingUtil:p,Modifier:u,RichUtils:C,DefaultDraftBlockRenderMap:a,DefaultDraftInlineStyle:l,convertFromHTML:M,convertFromRaw:y,convertToRaw:v,genKey:w,getDefaultKeyBinding:b,getVisibleSelectionRect:E}}var BZ=RZ(),PZ={exports:{}},FZ="@@__IMMUTABLE_INDEXED__@@";function UZ(e){return Boolean(e&&e[FZ])}var qZ="@@__IMMUTABLE_KEYED__@@";function WZ(e){return Boolean(e&&e[qZ])}function QZ(e){return WZ(e)||UZ(e)}var GZ="@@__IMMUTABLE_ITERABLE__@@";function KZ(e){return Boolean(e&&e[GZ])}var YZ=function(e){return KZ(e)?e:zR(e)},XZ=function(e){function t(e){return WZ(e)?e:NR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ),JZ=function(e){function t(e){return UZ(e)?e:IR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ),$Z=function(e){function t(e){return KZ(e)&&!QZ(e)?e:TR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(YZ);YZ.Keyed=XZ,YZ.Indexed=JZ,YZ.Set=$Z;var eR="function"==typeof Symbol&&Symbol.iterator,tR="@@iterator",nR=eR||tR,rR=function(e){this.next=e};function iR(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function oR(){return{value:void 0,done:!0}}function aR(e){return!!Array.isArray(e)||!!sR(e)}function lR(e){return!(!e||"function"!=typeof e.next)}function cR(e){var t=sR(e);return t&&t.call(e)}function sR(e){var t=e&&(eR&&e[eR]||e[tR]);if("function"==typeof t)return t}rR.prototype.toString=function(){return"[Iterator]"},rR.KEYS=0,rR.VALUES=1,rR.ENTRIES=2,rR.prototype.inspect=rR.prototype.toSource=function(){return this.toString()},rR.prototype[nR]=function(){return this};var dR="delete",uR=32,fR=31,hR={};function pR(e){e&&(e.value=!0)}function mR(){}function CR(e){return void 0===e.size&&(e.size=e.__iterate(vR)),e.size}function gR(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?CR(e)+t:t}function vR(){return!0}function yR(e,t,n){return(0===e&&!MR(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function wR(e,t){return ER(e,t,0)}function bR(e,t){return ER(e,t,t)}function ER(e,t,n){return void 0===e?n:MR(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function MR(e){return e<0||0===e&&1/e==-1/0}var AR="@@__IMMUTABLE_RECORD__@@";function xR(e){return Boolean(e&&e[AR])}function kR(e){return KZ(e)||xR(e)}var LR="@@__IMMUTABLE_ORDERED__@@";function HR(e){return Boolean(e&&e[LR])}var _R="@@__IMMUTABLE_SEQ__@@";function SR(e){return Boolean(e&&e[_R])}var VR=Object.prototype.hasOwnProperty;function OR(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var zR=function(e){function t(e){return null==e?BR():kR(e)?e.toSeq():function(e){var t=UR(e);if(t)return(r=sR(n=e))&&r===n.entries?t.fromEntrySeq():function(e){var t=sR(e);return t&&t===e.keys}(e)?t.toSetSeq():t;var n,r;if("object"==typeof e)return new jR(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var o=n[t?r-++i:i++];if(!1===e(o[1],o[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new rR(function(){if(i===r)return{value:void 0,done:!0};var o=n[t?r-++i:i++];return iR(e,o[0],o[1])})}return this.__iteratorUncached(e,t)},t}(YZ),NR=function(e){function t(e){return null==e?BR().toKeyedSeq():KZ(e)?WZ(e)?e.toSeq():e.fromEntrySeq():xR(e)?e.toSeq():PR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(zR),IR=function(e){function t(e){return null==e?BR():KZ(e)?WZ(e)?e.entrySeq():e.toIndexedSeq():xR(e)?e.toSeq().entrySeq():FR(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(zR),TR=function(e){function t(e){return(KZ(e)&&!QZ(e)?e:IR(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(zR);zR.isSeq=SR,zR.Keyed=NR,zR.Set=TR,zR.Indexed=IR,zR.prototype[_R]=!0;var DR=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[gR(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var o=t?r-++i:i++;if(!1===e(n[o],o,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new rR(function(){if(i===r)return{value:void 0,done:!0};var o=t?r-++i:i++;return iR(e,o,n[o])})},t}(IR),jR=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return VR.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,o=0;o!==i;){var a=r[t?i-++o:o++];if(!1===e(n[a],a,this))break}return o},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,o=0;return new rR(function(){if(o===i)return{value:void 0,done:!0};var a=r[t?i-++o:o++];return iR(e,a,n[a])})},t}(NR);jR.prototype[LR]=!0;var ZR,RR=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=cR(this._collection),r=0;if(lR(n))for(var i;!(i=n.next()).done&&!1!==e(i.value,r++,this););return r},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=cR(this._collection);if(!lR(n))return new rR(oR);var r=0;return new rR(function(){var t=n.next();return t.done?t:iR(e,r++,t.value)})},t}(IR);function BR(){return ZR||(ZR=new DR([]))}function PR(e){var t=UR(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new jR(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function FR(e){var t=UR(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function UR(e){return OR(e)?new DR(e):aR(e)?new RR(e):void 0}function qR(){return this.__ensureOwner()}function WR(){return this.__ownerID?this:this.__ensureOwner(new mR)}var QR="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function GR(e){return e>>>1&1073741824|3221225471&e}var KR=Object.prototype.valueOf;function YR(e){if(null==e)return XR(e);if("function"==typeof e.hashCode)return GR(e.hashCode(e));var t,n=(t=e).valueOf!==KR&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==n)return XR(n);switch(typeof n){case"boolean":return n?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;t!==e&&(t^=4294967295*e);for(;e>4294967295;)t^=e/=4294967295;return GR(t)}(n);case"string":return n.length>lB?function(e){var t=dB[e];void 0===t&&(t=JR(e),sB===cB&&(sB=0,dB={}),sB++,dB[e]=t);return t}(n):JR(n);case"object":case"function":return function(e){var t;if(rB&&void 0!==(t=nB.get(e)))return t;if(t=e[aB],void 0!==t)return t;if(!eB){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[aB]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=tB(),rB)nB.set(e,t);else{if(void 0!==$R&&!1===$R(e))throw new Error("Non-extensible objects are not allowed as keys.");if(eB)Object.defineProperty(e,aB,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[aB]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[aB]=t}}return t}(n);case"symbol":return function(e){var t=iB[e];if(void 0!==t)return t;return t=tB(),iB[e]=t,t}(n);default:if("function"==typeof n.toString)return JR(n.toString());throw new Error("Value type "+typeof n+" cannot be hashed.")}}function XR(e){return null===e?1108378658:1108378659}function JR(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return GR(t)}var $R=Object.isExtensible,eB=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function tB(){var e=++oB;return 1073741824&oB&&(oB=0),e}var nB,rB="function"==typeof WeakMap;rB&&(nB=new WeakMap);var iB=Object.create(null),oB=0,aB="__immutablehash__";"function"==typeof Symbol&&(aB=Symbol(aB));var lB=16,cB=255,sB=0,dB={},uB=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=gB(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=CB(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(NR);uB.prototype[LR]=!0;var fB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&CR(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&CR(this),new rR(function(){var o=r.next();return o.done?o:iR(e,t?n.size-++i:i++,o.value,o)})},t}(IR),hB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new rR(function(){var t=n.next();return t.done?t:iR(e,t.value,t.value,t)})},t}(TR),pB=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){HB(t);var r=KZ(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new rR(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){HB(r);var i=KZ(r);return iR(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(NR);function mB(e){var t=SB(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=VB,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new rR(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(1===t?0:1,n)},t}function CB(e,t,n){var r=SB(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,hR);return o===hR?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(2,i);return new rR(function(){var i=o.next();if(i.done)return i;var a=i.value,l=a[0];return iR(r,l,t.call(n,a[1],l,e),i)})},r}function gB(e,t){var n=this,r=SB(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=mB(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=VB,r.__iterate=function(n,r){var i=this,o=0;return r&&CR(e),e.__iterate(function(e,a){return n(e,t?a:r?i.size-++o:o++,i)},!r)},r.__iterator=function(r,i){var o=0;i&&CR(e);var a=e.__iterator(2,!i);return new rR(function(){var e=a.next();if(e.done)return e;var l=e.value;return iR(r,t?l[0]:i?n.size-++o:o++,l[1],e)})},r}function vB(e,t,n,r){var i=SB(e);return r&&(i.has=function(r){var i=e.get(r,hR);return i!==hR&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,hR);return o!==hR&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,l=0;return e.__iterate(function(e,o,c){if(t.call(n,e,o,c))return l++,i(e,r?o:l-1,a)},o),l},i.__iteratorUncached=function(i,o){var a=e.__iterator(2,o),l=0;return new rR(function(){for(;;){var o=a.next();if(o.done)return o;var c=o.value,s=c[0],d=c[1];if(t.call(n,d,s,e))return iR(i,r?s:l++,d,o)}})},i}function yB(e,t,n,r){var i=e.size;if(yR(t,n,i))return e;if(void 0===i&&(t<0||n<0))return yB(e.toSeq().cacheResult(),t,n,r);var o,a=wR(t,i),l=bR(n,i)-a;l==l&&(o=l<0?0:l);var c=SB(e);return c.size=0===o?o:e.size&&o||void 0,!r&&SR(e)&&o>=0&&(c.get=function(t,n){return(t=gR(this,t))>=0&&t<o?e.get(t+a,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===o)return 0;if(n)return this.cacheResult().__iterate(t,n);var l=0,c=!0,s=0;return e.__iterate(function(e,n){if(!c||!(c=l++<a))return s++,!1!==t(e,r?n:s-1,i)&&s!==o}),s},c.__iteratorUncached=function(t,n){if(0!==o&&n)return this.cacheResult().__iterator(t,n);if(0===o)return new rR(oR);var i=e.__iterator(t,n),l=0,c=0;return new rR(function(){for(;l++<a;)i.next();if(++c>o)return{value:void 0,done:!0};var e=i.next();return r||1===t||e.done?e:iR(t,c-1,0===t?void 0:e.value[1],e)})},c}function wB(e,t,n,r){var i=SB(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var l=!0,c=0;return e.__iterate(function(e,o,s){if(!l||!(l=t.call(n,e,o,s)))return c++,i(e,r?o:c-1,a)}),c},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var l=e.__iterator(2,o),c=!0,s=0;return new rR(function(){var e,o,d;do{if((e=l.next()).done)return r||1===i?e:iR(i,s++,0===i?void 0:e.value[1],e);var u=e.value;o=u[0],d=u[1],c&&(c=t.call(n,d,o,a))}while(c);return 2===i?e:iR(i,o,d,e)})},i}fB.prototype.cacheResult=uB.prototype.cacheResult=hB.prototype.cacheResult=pB.prototype.cacheResult=VB;var bB=function(e){function t(e){this._wrappedIterables=e.flatMap(function(e){return e._wrappedIterables?e._wrappedIterables:[e]}),this.size=this._wrappedIterables.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),this[qZ]=this._wrappedIterables[0][qZ],this[FZ]=this._wrappedIterables[0][FZ],this[LR]=this._wrappedIterables[0][LR]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(0!==this._wrappedIterables.length){if(t)return this.cacheResult().__iterate(e,t);for(var n=0,r=WZ(this),i=r?2:1,o=this._wrappedIterables[n].__iterator(i,t),a=!0,l=0;a;){for(var c=o.next();c.done;){if(++n===this._wrappedIterables.length)return l;c=(o=this._wrappedIterables[n].__iterator(i,t)).next()}a=!1!==(r?e(c.value[1],c.value[0],this):e(c.value,l,this)),l++}return l}},t.prototype.__iteratorUncached=function(e,t){var n=this;if(0===this._wrappedIterables.length)return new rR(oR);if(t)return this.cacheResult().__iterator(e,t);var r=0,i=this._wrappedIterables[r].__iterator(e,t);return new rR(function(){for(var o=i.next();o.done;){if(++r===n._wrappedIterables.length)return o;o=(i=n._wrappedIterables[r].__iterator(e,t)).next()}return o})},t}(zR);function EB(e,t,n){var r=SB(e);return r.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,l=!1;return function e(c,s){c.__iterate(function(o,c){return(!t||s<t)&&KZ(o)?e(o,s+1):(a++,!1===i(o,n?c:a-1,r)&&(l=!0)),!l},o)}(e,0),a},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(r,i),a=[],l=0;return new rR(function(){for(;o;){var e=o.next();if(!1===e.done){var c=e.value;if(2===r&&(c=c[1]),t&&!(a.length<t)||!KZ(c))return n?e:iR(r,l++,c,e);a.push(o),o=c.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}})},r}function MB(e,t,n){t||(t=OB);var r=WZ(e),i=0,o=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return o.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){o[t].length=2}:function(e,t){o[t]=e[1]}),r?NR(o):UZ(e)?IR(o):TR(o)}function AB(e,t,n){if(t||(t=OB),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return xB(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return xB(t,e,n)?n:e})}function xB(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function kB(e,t,n,r){var i=SB(e),o=new DR(n).map(function(e){return e.size});return i.size=r?o.max():o.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=n.map(function(e){return e=YZ(e),cR(i?e.reverse():e)}),a=0,l=!1;return new rR(function(){var n;return l||(n=o.map(function(e){return e.next()}),l=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),l?{value:void 0,done:!0}:iR(e,a++,t.apply(null,n.map(function(e){return e.value})))})},i}function LB(e,t){return e===t?e:SR(e)?t:e.constructor(t)}function HB(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function _B(e){return WZ(e)?XZ:UZ(e)?JZ:$Z}function SB(e){return Object.create((WZ(e)?NR:UZ(e)?IR:TR).prototype)}function VB(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):zR.prototype.cacheResult.call(this)}function OB(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function zB(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function NB(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(zB(e)&&zB(t)&&e.equals(t))}function IB(e,t,n,r){return NP(e,[t],n,r)}function TB(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return jB(this,e)}function DB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return jB(this,t,e)}function jB(e,t,n){for(var r=[],i=0;i<t.length;i++){var o=XZ(t[i]);0!==o.size&&r.push(o)}return 0===r.length?e:0!==e.toSeq().size||e.__ownerID||1!==r.length?e.withMutations(function(e){for(var t=n?function(t,r){IB(e,r,hR,function(e){return e===hR?t:n(e,t,r)})}:function(t,n){e.set(n,t)},i=0;i<r.length;i++)r[i].forEach(t)}):xR(e)?e:e.constructor(r[0])}var ZB=Object.prototype.toString;function RB(e){if(!e||"object"!=typeof e||"[object Object]"!==ZB.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t,r=Object.getPrototypeOf(t);null!==r;)n=r,r=Object.getPrototypeOf(n);return n===t}function BB(e){return"object"==typeof e&&(kR(e)||Array.isArray(e)||RB(e))}function PB(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function FB(e){if(Array.isArray(e))return PB(e);var t={};for(var n in e)VR.call(e,n)&&(t[n]=e[n]);return t}function UB(e,t,n){return qB(e,t,function(e){function t(n,r,i){return BB(n)&&BB(r)&&(o=r,a=zR(n),l=zR(o),UZ(a)===UZ(l)&&WZ(a)===WZ(l))?qB(n,[r],t):e?e(n,r,i):r;var o,a,l}return t}(n))}function qB(e,t,n){if(!BB(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(kR(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,o=r?JZ:XZ,a=r?function(t){i===e&&(i=FB(i)),i.push(t)}:function(t,r){var o=VR.call(i,r),a=o&&n?n(i[r],t,r):t;o&&a===i[r]||(i===e&&(i=FB(i)),i[r]=a)},l=0;l<t.length;l++)o(t[l]).forEach(a);return i}function WB(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return UB(this,e)}function QB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return UB(this,t,e)}function GB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return NP(this,e,vP(),function(e){return UB(e,t)})}function KB(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return NP(this,e,vP(),function(e){return qB(e,t)})}function YB(e,t,n){return NP(e,t,hR,function(){return n})}function XB(e,t){return YB(this,e,t)}function JB(e,t,n){return 1===arguments.length?e(this):IB(this,e,t,n)}function $B(e,t,n){return NP(this,e,t,n)}function eP(){return this.__altered}function tP(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var nP="@@__IMMUTABLE_MAP__@@";function rP(e){return Boolean(e&&e[nP])}function iP(e,t){if(!e)throw new Error(t)}function oP(e){iP(e!==1/0,"Cannot perform this action with an infinite size.")}var aP=function(e){function t(t){return null==t?vP():rP(t)&&!HR(t)?t:vP().withMutations(function(n){var r=e(t);oP(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return yP(this,e,t)},t.prototype.remove=function(e){return yP(this,e,hR)},t.prototype.deleteAll=function(e){var t=YZ(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vP()},t.prototype.sort=function(e){return eF(MB(this,e))},t.prototype.sortBy=function(e,t){return eF(MB(this,t,e))},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){r.forEach(function(i,o){r.set(o,e.call(t,i,o,n))})})},t.prototype.__iterator=function(e,t){return new pP(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?gP(this.size,this._root,e,this.__hash):0===this.size?vP():(this.__ownerID=e,this.__altered=!1,this)},t}(XZ);aP.isMap=rP;var lP=aP.prototype;lP[nP]=!0,lP[dR]=lP.remove,lP.removeAll=lP.deleteAll,lP.setIn=XB,lP.removeIn=lP.deleteIn=DP,lP.update=JB,lP.updateIn=$B,lP.merge=lP.concat=TB,lP.mergeWith=DB,lP.mergeDeep=WB,lP.mergeDeepWith=QB,lP.mergeIn=KB,lP.mergeDeepIn=GB,lP.withMutations=tP,lP.wasAltered=eP,lP.asImmutable=qR,lP["@@transducer/init"]=lP.asMutable=WR,lP["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},lP["@@transducer/result"]=function(e){return e.asImmutable()};var cP=function(e,t){this.ownerID=e,this.entries=t};cP.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(NB(n,i[o][0]))return i[o][1];return r},cP.prototype.update=function(e,t,n,r,i,o,a){for(var l=i===hR,c=this.entries,s=0,d=c.length;s<d&&!NB(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(pR(a),(l||!u)&&pR(o),!l||1!==c.length){if(!u&&!l&&c.length>=xP)return function(e,t,n,r){e||(e=new mR);for(var i=new fP(e,YR(n),[n,r]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}(e,c,r,i);var f=e&&e===this.ownerID,h=f?c:PB(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new cP(e,h)}};var sP=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};sP.prototype.get=function(e,t,n,r){void 0===t&&(t=YR(n));var i=1<<((0===e?t:t>>>e)&fR),o=this.bitmap;return 0===(o&i)?r:this.nodes[MP(o&i-1)].get(e+5,t,n,r)},sP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=(0===t?n:n>>>t)&fR,c=1<<l,s=this.bitmap,d=0!==(s&c);if(!d&&i===hR)return this;var u=MP(s&c-1),f=this.nodes,h=d?f[u]:void 0,p=wP(h,e,t+5,n,r,i,o,a);if(p===h)return this;if(!d&&p&&f.length>=kP)return function(e,t,n,r,i){for(var o=0,a=new Array(uR),l=0;0!==n;l++,n>>>=1)a[l]=1&n?t[o++]:void 0;return a[r]=i,new dP(e,o+1,a)}(e,f,s,l,p);if(d&&!p&&2===f.length&&bP(f[1^u]))return f[1^u];if(d&&p&&1===f.length&&bP(p))return p;var m=e&&e===this.ownerID,C=d?p?s:s^c:s|c,g=d?p?AP(f,u,p,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;a<r;a++)a===t&&(o=1),i[a]=e[a+o];return i}(f,u,m):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,l=0;l<i;l++)l===t?(o[l]=n,a=-1):o[l]=e[l+a];return o}(f,u,p,m);return m?(this.bitmap=C,this.nodes=g,this):new sP(e,C,g)};var dP=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};dP.prototype.get=function(e,t,n,r){void 0===t&&(t=YR(n));var i=(0===e?t:t>>>e)&fR,o=this.nodes[i];return o?o.get(e+5,t,n,r):r},dP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=(0===t?n:n>>>t)&fR,c=i===hR,s=this.nodes,d=s[l];if(c&&!d)return this;var u=wP(d,e,t+5,n,r,i,o,a);if(u===d)return this;var f=this.count;if(d){if(!u&&--f<LP)return function(e,t,n,r){for(var i=0,o=0,a=new Array(n),l=0,c=1,s=t.length;l<s;l++,c<<=1){var d=t[l];void 0!==d&&l!==r&&(i|=c,a[o++]=d)}return new sP(e,i,a)}(e,s,f,l)}else f++;var h=e&&e===this.ownerID,p=AP(s,l,u,h);return h?(this.count=f,this.nodes=p,this):new dP(e,f,p)};var uP=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};uP.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(NB(n,i[o][0]))return i[o][1];return r},uP.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=YR(r));var l=i===hR;if(n!==this.keyHash)return l?this:(pR(a),pR(o),EP(this,e,t,n,[r,i]));for(var c=this.entries,s=0,d=c.length;s<d&&!NB(r,c[s][0]);s++);var u=s<d;if(u?c[s][1]===i:l)return this;if(pR(a),(l||!u)&&pR(o),l&&2===d)return new fP(e,this.keyHash,c[1^s]);var f=e&&e===this.ownerID,h=f?c:PB(c);return u?l?s===d-1?h.pop():h[s]=h.pop():h[s]=[r,i]:h.push([r,i]),f?(this.entries=h,this):new uP(e,this.keyHash,h)};var fP=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};fP.prototype.get=function(e,t,n,r){return NB(n,this.entry[0])?this.entry[1]:r},fP.prototype.update=function(e,t,n,r,i,o,a){var l=i===hR,c=NB(r,this.entry[0]);return(c?i===this.entry[1]:l)?this:(pR(a),l?void pR(o):c?e&&e===this.ownerID?(this.entry[1]=i,this):new fP(e,this.keyHash,[r,i]):(pR(o),EP(this,e,t,YR(r),[r,i])))},cP.prototype.iterate=uP.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},sP.prototype.iterate=dP.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[t?i-r:r];if(o&&!1===o.iterate(e,t))return!1}},fP.prototype.iterate=function(e,t){return e(this.entry)};var hP,pP=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&CP(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return mP(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return mP(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var o=n.nodes[this._reverse?i-r:r];if(o){if(o.entry)return mP(e,o.entry);t=this._stack=CP(o,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(rR);function mP(e,t){return iR(e,t[0],t[1])}function CP(e,t){return{node:e,index:0,__prev:t}}function gP(e,t,n,r){var i=Object.create(lP);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function vP(){return hP||(hP=gP(0))}function yP(e,t,n){var r,i;if(e._root){var o={value:!1},a={value:!1};if(r=wP(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===hR?-1:1:0)}else{if(n===hR)return e;i=1,r=new cP(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?gP(i,r):vP()}function wP(e,t,n,r,i,o,a,l){return e?e.update(t,n,r,i,o,a,l):o===hR?e:(pR(l),pR(a),new fP(t,r,[i,o]))}function bP(e){return e.constructor===fP||e.constructor===uP}function EP(e,t,n,r,i){if(e.keyHash===r)return new uP(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&fR,l=(0===n?r:r>>>n)&fR,c=a===l?[EP(e,t,n+5,r,i)]:(o=new fP(t,r,i),a<l?[e,o]:[o,e]);return new sP(t,1<<a|1<<l,c)}function MP(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function AP(e,t,n,r){var i=r?e:PB(e);return i[t]=n,i}var xP=8,kP=16,LP=8;function HP(e){if(OR(e)&&"string"!=typeof e)return e;if(HR(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function _P(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function SP(e,t){return kR(e)?e.has(t):BB(e)&&VR.call(e,t)}function VP(e,t,n){return kR(e)?e.get(t,n):SP(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function OP(e,t){if(!BB(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(kR(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!VR.call(e,t))return e;var n=FB(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function zP(e,t,n){if(!BB(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(kR(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(VR.call(e,t)&&n===e[t])return e;var r=FB(e);return r[t]=n,r}function NP(e,t,n,r){r||(r=n,n=void 0);var i=IP(kR(e),e,HP(t),0,n,r);return i===hR?n:i}function IP(e,t,n,r,i,o){var a=t===hR;if(r===n.length){var l=a?i:t,c=o(l);return c===l?t:c}if(!a&&!BB(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(n).slice(0,r).map(_P)+"]: "+t);var s=n[r],d=a?hR:VP(t,s,hR),u=IP(d===hR?e:kR(d),d,n,r+1,i,o);return u===d?t:u===hR?OP(t,s):zP(a?e?vP():{}:t,s,u)}function TP(e,t){return NP(e,t,function(){return hR})}function DP(e){return TP(this,e)}var jP="@@__IMMUTABLE_LIST__@@";function ZP(e){return Boolean(e&&e[jP])}var RP=function(e){function t(t){var n=WP();if(null==t)return n;if(ZP(t))return t;var r=e(t),i=r.size;return 0===i?n:(oP(i),i>0&&i<uR?qP(0,i,5,null,new PP(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=gR(this,e))>=0&&e<this.size){var n=KP(this,e+=this._origin);return n&&n.array[e&fR]}return t},t.prototype.set=function(e,t){return function(e,t,n){if(t=gR(e,t),t!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?YP(e,t).set(0,n):YP(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o={value:!1};t>=XP(e._capacity)?r=QP(r,e.__ownerID,0,t,n,o):i=QP(i,e.__ownerID,e._level,t,n,o);if(!o.value)return e;if(e.__ownerID)return e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return qP(e._origin,e._capacity,e._level,i,r)}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):WP()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){YP(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return YP(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){YP(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return YP(this,1)},t.prototype.shuffle=function(e){return void 0===e&&(e=Math.random),this.withMutations(function(t){for(var n,r,i=t.size;i;)n=Math.floor(e()*i--),r=t.get(n),t.set(n,t.get(i)),t.set(i,r)})},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],o=e("string"!=typeof i&&aR(i)?i:[i]);0!==o.size&&n.push(o)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return YP(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,n))})},t.prototype.slice=function(e,t){var n=this.size;return yR(e,t,n)?this:YP(this,wR(e,n),bR(t,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=UP(this,t);return new rR(function(){var i=r();return i===FP?{value:void 0,done:!0}:iR(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=UP(this,t);(n=i())!==FP&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?qP(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?WP():(this.__ownerID=e,this.__altered=!1,this)},t}(JZ);RP.isList=ZP;var BP=RP.prototype;BP[jP]=!0,BP[dR]=BP.remove,BP.merge=BP.concat,BP.setIn=XB,BP.deleteIn=BP.removeIn=DP,BP.update=JB,BP.updateIn=$B,BP.mergeIn=KB,BP.mergeDeepIn=GB,BP.withMutations=tP,BP.wasAltered=eP,BP.asImmutable=qR,BP["@@transducer/init"]=BP.asMutable=WR,BP["@@transducer/step"]=function(e,t){return e.push(t)},BP["@@transducer/result"]=function(e){return e.asImmutable()};var PP=function(e,t){this.array=e,this.ownerID=t};PP.prototype.removeBefore=function(e,t,n){if(!(n&(1<<t+5)-1)||0===this.array.length)return this;var r=n>>>t&fR;if(r>=this.array.length)return new PP([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-5,n))===a&&o)return this}if(o&&!i)return this;var l=GP(this,e);if(!o)for(var c=0;c<r;c++)l.array[c]=void 0;return i&&(l.array[r]=i),l},PP.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t+5:uR)||0===this.array.length)return this;var r,i=n-1>>>t&fR;if(i>=this.array.length)return this;if(t>0){var o=this.array[i];if((r=o&&o.removeAfter(e,t-5,n))===o&&i===this.array.length-1)return this}var a=GP(this,e);return a.array.splice(i+1),r&&(a.array[i]=r),a};var FP={};function UP(e,t){var n=e._origin,r=e._capacity,i=XP(r),o=e._tail;return a(e._root,e._level,0);function a(e,l,c){return 0===l?function(e,a){var l=a===i?o&&o.array:e&&e.array,c=a>n?0:n-a,s=r-a;s>uR&&(s=uR);return function(){if(c===s)return FP;var e=t?--s:c++;return l&&l[e]}}(e,c):function(e,i,o){var l,c=e&&e.array,s=o>n?0:n-o>>i,d=1+(r-o>>i);d>uR&&(d=uR);return function(){for(;;){if(l){var e=l();if(e!==FP)return e;l=null}if(s===d)return FP;var n=t?--d:s++;l=a(c&&c[n],i-5,o+(n<<i))}}}(e,l,c)}}function qP(e,t,n,r,i,o,a){var l=Object.create(BP);return l.size=t-e,l._origin=e,l._capacity=t,l._level=n,l._root=r,l._tail=i,l.__ownerID=o,l.__hash=a,l.__altered=!1,l}function WP(){return qP(0,0,5)}function QP(e,t,n,r,i,o){var a,l=r>>>n&fR,c=e&&l<e.array.length;if(!c&&void 0===i)return e;if(n>0){var s=e&&e.array[l],d=QP(s,t,n-5,r,i,o);return d===s?e:((a=GP(e,t)).array[l]=d,a)}return c&&e.array[l]===i?e:(o&&pR(o),a=GP(e,t),void 0===i&&l===a.array.length-1?a.array.pop():a.array[l]=i,a)}function GP(e,t){return t&&e&&t===e.ownerID?e:new PP(e?e.array.slice():[],t)}function KP(e,t){if(t>=XP(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&fR],r-=5;return n}}function YP(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new mR,i=e._origin,o=e._capacity,a=i+t,l=void 0===n?o:n<0?o+n:i+n;if(a===i&&l===o)return e;if(a>=l)return e.clear();for(var c=e._level,s=e._root,d=0;a+d<0;)s=new PP(s&&s.array.length?[void 0,s]:[],r),d+=1<<(c+=5);d&&(a+=d,i+=d,l+=d,o+=d);for(var u=XP(o),f=XP(l);f>=1<<c+5;)s=new PP(s&&s.array.length?[s]:[],r),c+=5;var h=e._tail,p=f<u?KP(e,l-1):f>u?new PP([],r):h;if(h&&f>u&&a<o&&h.array.length){for(var m=s=GP(s,r),C=c;C>5;C-=5){var g=u>>>C&fR;m=m.array[g]=GP(m.array[g],r)}m.array[u>>>5&fR]=h}if(l<o&&(p=p&&p.removeAfter(r,0,l)),a>=f)a-=f,l-=f,c=5,s=null,p=p&&p.removeBefore(r,0,a);else if(a>i||f<u){for(d=0;s;){var v=a>>>c&fR;if(v!==f>>>c&fR)break;v&&(d+=(1<<c)*v),c-=5,s=s.array[v]}s&&a>i&&(s=s.removeBefore(r,c,a-d)),s&&f<u&&(s=s.removeAfter(r,c,f-d)),d&&(a-=d,l-=d)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=c,e._root=s,e._tail=p,e.__hash=void 0,e.__altered=!0,e):qP(a,l,c,s,p)}function XP(e){return e<uR?0:e-1>>>5<<5}function JP(e){return rP(e)&&HR(e)}var $P,eF=function(e){function t(e){return null==e?nF():JP(e)?e:nF().withMutations(function(t){var n=XZ(e);oP(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):nF()},t.prototype.set=function(e,t){return rF(this,e,t)},t.prototype.remove=function(e){return rF(this,e,hR)},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?tF(t,n,e,this.__hash):0===this.size?nF():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=n,this)},t}(aP);function tF(e,t,n,r){var i=Object.create(eF.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function nF(){return $P||($P=tF(vP(),WP()))}function rF(e,t,n){var r,i,o=e._map,a=e._list,l=o.get(t),c=void 0!==l;if(n===hR){if(!c)return e;a.size>=uR&&a.size>=2*o.size?(r=(i=a.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=l===a.size-1?a.pop():a.set(l,void 0))}else if(c){if(n===a.get(l)[1])return e;r=o,i=a.set(l,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e.__altered=!0,e):tF(r,i)}eF.isOrderedMap=JP,eF.prototype[LR]=!0,eF.prototype[dR]=eF.prototype.remove;var iF="@@__IMMUTABLE_STACK__@@";function oF(e){return Boolean(e&&e[iF])}var aF=function(e){function t(e){return null==e?dF():oF(e)?e:dF().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=gR(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):sF(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&oF(t))return t;oP(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):sF(n,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):dF()},t.prototype.slice=function(t,n){if(yR(t,n,this.size))return this;var r=wR(t,this.size);if(bR(n,this.size)!==this.size)return e.prototype.slice.call(this,t,n);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):sF(i,o)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?sF(this.size,this._head,e,this.__hash):0===this.size?dF():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new DR(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,this);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new DR(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new rR(function(){if(r){var t=r.value;return r=r.next,iR(e,n++,t)}return{value:void 0,done:!0}})},t}(JZ);aF.isStack=oF;var lF,cF=aF.prototype;function sF(e,t,n,r){var i=Object.create(cF);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function dF(){return lF||(lF=sF(0))}function uF(e,t,n,r,i,o){return oP(e.size),e.__iterate(function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)},o),n}function fF(e,t){return t}function hF(e,t){return[t,e]}function pF(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return!e.apply(this,t)}}function mF(e){return function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return-e.apply(this,t)}}function CF(e,t){return e<t?1:e>t?-1:0}function gF(e,t){if(e===t)return!0;if(!KZ(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||WZ(e)!==WZ(t)||UZ(e)!==UZ(t)||HR(e)!==HR(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!QZ(e);if(HR(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&NB(i[1],e)&&(n||NB(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,l=t.__iterate(function(t,r){if(n?!e.has(t):i?!NB(t,e.get(r,hR)):!NB(e.get(r,hR),t))return a=!1,!1});return a&&e.size===l}cF[iF]=!0,cF.shift=cF.pop,cF.unshift=cF.push,cF.unshiftAll=cF.pushAll,cF.withMutations=tP,cF.wasAltered=eP,cF.asImmutable=qR,cF["@@transducer/init"]=cF.asMutable=WR,cF["@@transducer/step"]=function(e,t){return e.unshift(t)},cF["@@transducer/result"]=function(e){return e.asImmutable()};var vF,yF=function(e){function t(e,n,r){if(void 0===r&&(r=1),!(this instanceof t))return new t(e,n,r);if(iP(0!==r,"Cannot step a Range by 0"),iP(void 0!==e,"You must define a start value when using Range"),iP(void 0!==n,"You must define an end value when using Range"),r=Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(vF)return vF;vF=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+gR(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){return yR(e,n,this.size)?this:(e=wR(e,this.size),(n=bR(n,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;o!==n&&!1!==e(i,t?n-++o:o++,this);)i+=t?-r:r;return o},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,o=0;return new rR(function(){if(o===n)return{value:void 0,done:!0};var a=i;return i+=t?-r:r,iR(e,t?n-++o:o++,a)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:gF(this,e)},t}(IR),wF="@@__IMMUTABLE_SET__@@";function bF(e){return Boolean(e&&e[wF])}var EF=function(e){function t(t){return null==t?LF():bF(t)&&!HR(t)?t:LF().withMutations(function(n){var r=e(t);oP(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(XZ(e).keySeq())},t.intersect=function(e){return(e=YZ(e).toArray()).length?AF.intersect.apply(t(e.pop()),e):LF()},t.union=function(e){return(e=YZ(e).toArray()).length?AF.union.apply(t(e.pop()),e):LF()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return xF(this,this._map.set(e,e))},t.prototype.remove=function(e){return xF(this,this._map.remove(e))},t.prototype.clear=function(){return xF(this,this._map.clear())},t.prototype.map=function(e,t){var n=this,r=!1,i=xF(this,this._map.mapEntries(function(i){var o=i[1],a=e.call(t,o,o,n);return a!==o&&(r=!0),[a,a]},t));return r?i:this},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)"string"==typeof t[r]?n.add(t[r]):e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return PF(MB(this,e))},t.prototype.sortBy=function(e,t){return PF(MB(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}($Z);EF.isSet=bF;var MF,AF=EF.prototype;function xF(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function kF(e,t){var n=Object.create(AF);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function LF(){return MF||(MF=kF(vP()))}function HF(e,t,n){for(var r=HP(t),i=0;i!==r.length;)if((e=VP(e,r[i++],hR))===hR)return n;return e}function _F(e,t){return HF(this,e,t)}function SF(e,t){return HF(e,t,hR)!==hR}function VF(){oP(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}function OF(e){if(!e||"object"!=typeof e)return e;if(!KZ(e)){if(!BB(e))return e;e=zR(e)}if(WZ(e)){var t={};return e.__iterate(function(e,n){t[n]=OF(e)}),t}var n=[];return e.__iterate(function(e){n.push(OF(e))}),n}function zF(e){if(e.size===1/0)return 0;var t=HR(e),n=WZ(e),r=t?1:0;return e.__iterate(n?t?function(e,t){r=31*r+NF(YR(e),YR(t))|0}:function(e,t){r=r+NF(YR(e),YR(t))|0}:t?function(e){r=31*r+YR(e)|0}:function(e){r=r+YR(e)|0}),function(e,t){return t=QR(t,3432918353),t=QR(t<<15|t>>>-15,461845907),t=QR(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=QR(t^t>>>16,2246822507),t=QR(t^t>>>13,3266489909),t=GR(t^t>>>16),t}(e.size,r)}function NF(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function IF(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}AF[wF]=!0,AF[dR]=AF.remove,AF.merge=AF.concat=AF.union,AF.withMutations=tP,AF.asImmutable=qR,AF["@@transducer/init"]=AF.asMutable=WR,AF["@@transducer/step"]=function(e,t){return e.add(t)},AF["@@transducer/result"]=function(e){return e.asImmutable()},AF.__empty=LF,AF.__make=kF,YZ.Iterator=rR,IF(YZ,{toArray:function(){oP(this.size);var e=new Array(this.size||0),t=WZ(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new fB(this)},toJS:function(){return OF(this)},toKeyedSeq:function(){return new uB(this,!0)},toMap:function(){return aP(this.toKeyedSeq())},toObject:VF,toOrderedMap:function(){return eF(this.toKeyedSeq())},toOrderedSet:function(){return PF(WZ(this)?this.valueSeq():this)},toSet:function(){return EF(WZ(this)?this.valueSeq():this)},toSetSeq:function(){return new hB(this)},toSeq:function(){return UZ(this)?this.toIndexedSeq():WZ(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return aF(WZ(this)?this.valueSeq():this)},toList:function(){return RP(WZ(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return LB(this,function(e,t){var n=WZ(e),r=[e].concat(t).map(function(e){return KZ(e)?n&&(e=XZ(e)):e=n?PR(e):FR(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&WZ(i)||UZ(e)&&UZ(i))return i}return new bB(r)}(this,e))},includes:function(e){return this.some(function(t){return NB(t,e)})},entries:function(){return this.__iterator(2)},every:function(e,t){oP(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return LB(this,vB(this,e,t,!0))},partition:function(e,t){return function(e,t,n){var r=WZ(e),i=[[],[]];e.__iterate(function(o,a){i[t.call(n,o,a,e)?1:0].push(r?[a,o]:o)});var o=_B(e);return i.map(function(t){return LB(e,o(t))})}(this,e,t)},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return oP(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){oP(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""}),t},keys:function(){return this.__iterator(0)},map:function(e,t){return LB(this,CB(this,e,t))},reduce:function(e,t,n){return uF(this,e,t,n,arguments.length<2,!1)},reduceRight:function(e,t,n){return uF(this,e,t,n,arguments.length<2,!0)},reverse:function(){return LB(this,gB(this,!0))},slice:function(e,t){return LB(this,yB(this,e,t,!0))},some:function(e,t){oP(this.size);var n=!1;return this.__iterate(function(r,i,o){if(e.call(t,r,i,o))return n=!0,!1}),n},sort:function(e){return LB(this,MB(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return CR(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=aP().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return gF(this,e)},entrySeq:function(){var e=this;if(e._cache)return new DR(e._cache);var t=e.toSeq().map(hF).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(pF(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(vR,null,e)},flatMap:function(e,t){return LB(this,function(e,t,n){var r=_B(e);return e.toSeq().map(function(i,o){return r(t.call(n,i,o,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return LB(this,EB(this,e,!0))},fromEntrySeq:function(){return new pB(this)},get:function(e,t){return this.find(function(t,n){return NB(n,e)},void 0,t)},getIn:_F,groupBy:function(e,t){return function(e,t,n){var r=WZ(e),i=(HR(e)?eF():aP()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return(e=e||[]).push(r?[a,o]:o),e})});var o=_B(e);return i.map(function(t){return LB(e,o(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,hR)!==hR},hasIn:function(e){return SF(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:YZ(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:YZ(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return NB(t,e)})},keySeq:function(){return this.toSeq().map(fF).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return AB(this,e)},maxBy:function(e,t){return AB(this,t,e)},min:function(e){return AB(this,e?mF(e):CF)},minBy:function(e,t){return AB(this,t?mF(t):CF,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return LB(this,wB(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(pF(e),t)},sortBy:function(e,t){return LB(this,MB(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return LB(this,function(e,t,n){var r=SB(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,l){return t.call(n,e,i,l)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(2,i),l=!0;return new rR(function(){if(!l)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var i=e.value,c=i[0],s=i[1];return t.call(n,s,c,o)?2===r?e:iR(r,c,s,e):(l=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(pF(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=zF(this))}});var TF=YZ.prototype;TF[GZ]=!0,TF[nR]=TF.values,TF.toJSON=TF.toArray,TF.__toStringMapper=_P,TF.inspect=TF.toSource=function(){return this.toString()},TF.chain=TF.flatMap,TF.contains=TF.includes,IF(XZ,{flip:function(){return LB(this,mB(this))},mapEntries:function(e,t){var n=this,r=0;return LB(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return LB(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var DF=XZ.prototype;DF[qZ]=!0,DF[nR]=TF.entries,DF.toJSON=VF,DF.__toStringMapper=function(e,t){return _P(t)+": "+_P(e)},IF(JZ,{toKeyedSeq:function(){return new uB(this,!1)},filter:function(e,t){return LB(this,vB(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return LB(this,gB(this,!1))},slice:function(e,t){return LB(this,yB(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(t||0,0),0===n||2===n&&!t)return this;e=wR(e,e<0?this.count():this.size);var r=this.slice(0,e);return LB(this,1===n?r:r.concat(PB(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return LB(this,EB(this,e,!1))},get:function(e,t){return(e=gR(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=gR(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return LB(this,function(e,t){var n=SB(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return e.__iterate(function(e){return(!o||!1!==n(t,o++,i))&&!1!==n(e,o++,i)},r),o},n.__iteratorUncached=function(n,r){var i,o=e.__iterator(1,r),a=0;return new rR(function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?iR(n,a++,t):iR(n,a++,i.value,i)})},n}(this,e))},interleave:function(){var e=[this].concat(PB(arguments)),t=kB(this.toSeq(),IR.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),LB(this,n)},keySeq:function(){return yF(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return LB(this,wB(this,e,t,!1))},zip:function(){return LB(this,kB(this,RF,[this].concat(PB(arguments))))},zipAll:function(){return LB(this,kB(this,RF,[this].concat(PB(arguments)),!0))},zipWith:function(e){var t=PB(arguments);return t[0]=this,LB(this,kB(this,e,t))}});var jF=JZ.prototype;jF[FZ]=!0,jF[LR]=!0,IF($Z,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var ZF=$Z.prototype;function RF(){return PB(arguments)}function BF(e){return bF(e)&&HR(e)}ZF.has=TF.includes,ZF.contains=ZF.includes,ZF.keys=ZF.values,IF(NR,DF),IF(IR,jF),IF(TR,ZF);var PF=function(e){function t(e){return null==e?WF():BF(e)?e:WF().withMutations(function(t){var n=$Z(e);oP(n.size),n.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(XZ(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(EF);PF.isOrderedSet=BF;var FF,UF=PF.prototype;function qF(e,t){var n=Object.create(UF);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function WF(){return FF||(FF=qF(nF()))}UF[LR]=!0,UF.zip=jF.zip,UF.zipWith=jF.zipWith,UF.zipAll=jF.zipAll,UF.__empty=WF,UF.__make=qF;var QF=function(e,t){var n;!function(e){if(xR(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(kR(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var r=function(o){var a=this;if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var l=Object.keys(e),c=i._indices={};i._name=t,i._keys=l,i._defaultValues=e;for(var s=0;s<l.length;s++){var d=l[s];c[d]=s,i[d]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+YF(this)+' with property "'+d+'" since that property name is part of the Record API.'):JF(i,d)}}return this.__ownerID=void 0,this._values=RP().withMutations(function(e){e.setSize(a._keys.length),XZ(o).forEach(function(t,n){e.set(a._indices[n],t===a._defaultValues[n]?void 0:t)})}),this},i=r.prototype=Object.create(GF);return i.constructor=r,t&&(r.displayName=t),r};QF.prototype.toString=function(){for(var e,t=YF(this)+" { ",n=this._keys,r=0,i=n.length;r!==i;r++)t+=(r?", ":"")+(e=n[r])+": "+_P(this.get(e));return t+" }"},QF.prototype.equals=function(e){return this===e||xR(e)&&XF(this).equals(XF(e))},QF.prototype.hashCode=function(){return XF(this).hashCode()},QF.prototype.has=function(e){return this._indices.hasOwnProperty(e)},QF.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._indices[e],r=this._values.get(n);return void 0===r?this._defaultValues[e]:r},QF.prototype.set=function(e,t){if(this.has(e)){var n=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(n!==this._values&&!this.__ownerID)return KF(this,n)}return this},QF.prototype.remove=function(e){return this.set(e)},QF.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:KF(this,e)},QF.prototype.wasAltered=function(){return this._values.wasAltered()},QF.prototype.toSeq=function(){return XF(this)},QF.prototype.toJS=function(){return OF(this)},QF.prototype.entries=function(){return this.__iterator(2)},QF.prototype.__iterator=function(e,t){return XF(this).__iterator(e,t)},QF.prototype.__iterate=function(e,t){return XF(this).__iterate(e,t)},QF.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?KF(this,t,e):(this.__ownerID=e,this._values=t,this)},QF.isRecord=xR,QF.getDescriptiveName=YF;var GF=QF.prototype;function KF(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._values=t,r.__ownerID=n,r}function YF(e){return e.constructor.displayName||e.constructor.name||"Record"}function XF(e){return PR(e._keys.map(function(t){return[t,e.get(t)]}))}function JF(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){iP(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}GF[AR]=!0,GF[dR]=GF.remove,GF.deleteIn=GF.removeIn=DP,GF.getIn=_F,GF.hasIn=TF.hasIn,GF.merge=TB,GF.mergeWith=DB,GF.mergeIn=KB,GF.mergeDeep=WB,GF.mergeDeepWith=QB,GF.mergeDeepIn=GB,GF.setIn=XB,GF.update=JB,GF.updateIn=$B,GF.withMutations=tP,GF.asMutable=WR,GF.asImmutable=qR,GF[nR]=GF.entries,GF.toJSON=GF.toObject=TF.toObject,GF.inspect=GF.toSource=function(){return this.toString()};var $F,eU=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if($F)return $F;$F=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return NB(this._value,e)},t.prototype.slice=function(e,n){var r=this.size;return yR(e,n,r)?this:new t(this._value,bR(n,r)-wR(e,r))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return NB(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return NB(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var n=this.size,r=0;r!==n&&!1!==e(this._value,t?n-++r:r++,this););return r},t.prototype.__iterator=function(e,t){var n=this,r=this.size,i=0;return new rR(function(){return i===r?{value:void 0,done:!0}:iR(e,t?r-++i:i++,n._value)})},t.prototype.equals=function(e){return e instanceof t?NB(this._value,e._value):gF(this,e)},t}(IR);function tU(e,t,n,r,i,o){if("string"!=typeof n&&!kR(n)&&(OR(n)||aR(n)||RB(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==r&&i.push(r);var a=t.call(o,r,zR(n).map(function(r,o){return tU(e,t,r,o,i,n)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return n}function nU(e,t){return UZ(t)?t.toList():WZ(t)?t.toMap():t.toSet()}var rU,iU=YZ,oU=_(Object.freeze({__proto__:null,Collection:YZ,Iterable:iU,List:RP,Map:aP,OrderedMap:eF,OrderedSet:PF,PairSorting:{LeftThenRight:-1,RightThenLeft:1},Range:yF,Record:QF,Repeat:eU,Seq:zR,Set:EF,Stack:aF,fromJS:function(e,t){return tU([],t||nU,e,"",t&&t.length>2?[]:void 0,{"":e})},get:VP,getIn:HF,has:SP,hasIn:SF,hash:YR,is:NB,isAssociative:QZ,isCollection:KZ,isImmutable:kR,isIndexed:UZ,isKeyed:WZ,isList:ZP,isMap:rP,isOrdered:HR,isOrderedMap:JP,isOrderedSet:BF,isPlainObject:RB,isRecord:xR,isSeq:SR,isSet:bF,isStack:oF,isValueObject:zB,merge:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return qB(e,t)},mergeDeep:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return UB(e,t)},mergeDeepWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return UB(t,n,e)},mergeWith:function(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return qB(t,n,e)},remove:OP,removeIn:TP,set:zP,setIn:YB,update:IB,updateIn:NP,version:"5.1.4"}));var aU=(rU||(rU=1,window,PZ.exports=function(e,t,n){return o={},r.m=i=[function(e,t,n){e.exports=n(10)()},function(t,n){t.exports=e},function(e,t,n){var r;
35
35
  /*!
36
36
  Copyright (c) 2017 Jed Watson.
37
37
  Licensed under the MIT License (MIT), see