pixel-react 1.20.1 → 1.20.2

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
@@ -25,7 +25,7 @@ object-assign
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */function Ig(){return zg||(zg=1,e=Tg,"production"!==process.env.NODE_ENV&&function(){function t(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var o=r-1>>>1,a=e[o];if(!(i(a,t)>0))return;e[o]=t,e[r]=a,r=o}}(e,t,n)}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(i(s,t)<0)c<o&&i(d,s)<0?(e[r]=d,e[c]=t,r=c):(e[r]=s,e[l]=t,r=l);else{if(!(c<o&&i(d,t)<0))return;e[r]=d,e[c]=t,r=c}}}(e,n,0)),t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error),"object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,p=!1,C=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))return;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function w(e){if(C=!1,y(e),!p)if(null!==n(s))p=!0,O(b);else{var t=n(c);null!==t&&z(w,t.startTime-e)}}function b(t,i){p=!1,C&&(C=!1,N()),h=!0;var o=f;try{return function(t,i){var o=i;for(y(o),u=n(s);null!==u&&(!(u.expirationTime>o)||t&&!k());){var a=u.callback;if("function"==typeof a){u.callback=null,f=u.priorityLevel;var l=a(u.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),y(o)}else r(s);u=n(s)}if(null!==u)return!0;var d=n(c);return null!==d&&z(w,d.startTime-o),!1}(t,i)}finally{u=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E=!1,M=null,A=-1,x=5,L=-1;function k(){return!(e.unstable_now()-L<x)}var H,S=function(){if(null!==M){var t=e.unstable_now();L=t;var n=!0;try{n=M(!0,t)}finally{n?H():(E=!1,M=null)}}else E=!1};if("function"==typeof v)H=function(){v(S)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,V=_.port2;_.port1.onmessage=S,H=function(){V.postMessage(null)}}else H=function(){m(S,0)};function O(e){M=e,E||(E=!0,H())}function z(t,n){A=m(function(){t(e.unstable_now())},n)}function N(){g(A),A=-1}var T=function(){};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(){p||h||(p=!0,O(b))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){var t;switch(f){case 1:case 2:case 3:t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=T,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a,l,u=e.unstable_now();if("object"==typeof o&&null!==o){var f=o.delay;a="number"==typeof f&&f>0?u+f:u}else a=u;switch(r){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}var m=a+l,g={id:d++,callback:i,priorityLevel:r,startTime:a,expirationTime:m,sortIndex:-1};return a>u?(g.sortIndex=a,t(c,g),null===n(s)&&g===n(c)&&(C?N():C=!0,z(w,a-u))):(g.sortIndex=m,t(s,g),p||h||(p=!0,O(b))),g},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Tg;var e}var Dg=(Ng||(Ng=1,"production"===process.env.NODE_ENV?Vg.exports=(_g||(_g=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(0>i(s,n))c<o&&0>i(d,s)?(e[r]=d,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<o&&0>i(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,p=!1,C=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function w(e){if(C=!1,y(e),!p)if(null!==n(s))p=!0,O(b);else{var t=n(c);null!==t&&z(w,t.startTime-e)}}function b(t,i){p=!1,C&&(C=!1,g(x),x=-1),h=!0;var o=f;try{for(y(i),u=n(s);null!==u&&(!(u.expirationTime>i)||t&&!H());){var a=u.callback;if("function"==typeof a){u.callback=null,f=u.priorityLevel;var l=a(u.expirationTime<=i);i=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),y(i)}else r(s);u=n(s)}if(null!==u)var d=!0;else{var m=n(c);null!==m&&z(w,m.startTime-i),d=!1}return d}finally{u=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,M=!1,A=null,x=-1,L=5,k=-1;function H(){return!(e.unstable_now()-k<L)}function S(){if(null!==A){var t=e.unstable_now();k=t;var n=!0;try{n=A(!0,t)}finally{n?E():(M=!1,A=null)}}else M=!1}if("function"==typeof v)E=function(){v(S)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,V=_.port2;_.port1.onmessage=S,E=function(){V.postMessage(null)}}else E=function(){m(S,0)};function O(e){A=e,M||(M=!0,E())}function z(t,n){x=m(function(){t(e.unstable_now())},n)}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(){p||h||(p=!0,O(b))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:d++,callback:i,priorityLevel:r,startTime:o,expirationTime:l=o+l,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(s)&&r===n(c)&&(C?(g(x),x=-1):C=!0,z(w,o-a))):(r.sortIndex=l,t(s,r),p||h||(p=!0,O(b))),r},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Og)),Og):Vg.exports=Ig()),Vg.exports);const Zg=Symbol(),jg=Symbol(),Rg="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,Bg=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 Pg(e,t){const n=d(e)[Zg];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,s]=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)||s(),Rg(()=>(o.add(s),()=>{o.delete(s)}),[o]),l[1]}const Fg=function(e){const t=s({[Zg]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[jg]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=a(e),i=a(0),[o,l]=c(null);o&&(o(e),l(null));const s=a();if(!s.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()};s.current={[Zg]:{v:r,n:i,l:e,u:t}}}return Rg(()=>{r.current=e,i.current+=1,Bg(()=>{s.current[Zg].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),C(n,{value:s.current},t)}),delete t.Consumer,t}([Hg,()=>{}]),Ug=({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})},qg=t=>e("tr",{...t}),Wg=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function Qg(){return Pg(Fg,([,e])=>e)}function Gg(e){return Pg(Fg,([t])=>e(t))}const Kg=({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"})})})},Yg=t=>function(n){const i=Qg(),o=r.useCallback(()=>i({type:Zp}),[i]),a=Gg(e=>e.selected instanceof bm);return e(t,{...n,selected:a,onSelect:o})},Xg=t=>function(n){const i=Qg(),o=r.useCallback((e,t)=>i(function(e,t){return{type:Dp,payload:{column:e,extend:t}}}(e,t)),[i]),a=Gg(e=>e.selected.hasEntireColumn(n.column)),l=Gg(e=>e.selectedColumn??void 0),s=Gg(e=>e.active?rm(e.active,e.model.data):void 0);return e(t,{...n,cell:s,selected:a,selectedColumn:l,onSelect:o,scrollToColumn:n.scrollToColumn})},Jg=Xg(({column:t,label:i,selected:o,onSelect:a,setContextMenu:l,deleteColumn:s,addColumnLeft:c,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:p,minimumColumnWidth:C,maxColLimit:m,disableDeleteOption:g,contextMenu:v,onAddColumn:y,onDeleteColumn:w,setVisibleRange:b,scrollToColumn:E})=>{const M=Qg(),A=Gg(e=>e.model.data),x=C,L=Gg(e=>e.columnDimensions[t]?.width||x),k=Gg(e=>e.model.data),{columnCount:H}=Ym(k),S=e=>{b(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return p&&E(p),n})},_=h(()=>[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{S("increment"),c(x),y?.(p??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:H>=m},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{S("increment"),d(x),y?.(p??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:H>=m},...g?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{S("decrement"),s(),w?.(p??t)},disableTooltip:"",visible:f?.contextDisable?.["Delete Column"]??!1,disable:!1}]],[p,t,A]),V=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,s=e=>{const t=Math.max(x,l+(e.clientX-o));M(LC(i,t))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),M($C())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),M(JC())},[t,L]),O=r.useCallback(e=>M(QC(e)),[M]),N=r.useCallback(e=>{a(t,e.shiftKey)},[a,t]),T=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"column",options:_})},[t,p,u,_]);return r.useEffect(()=>{void 0!==p&&"column"===v?.contextType&&l(e=>({open:e.open,contextType:"column",options:_}))},[t,p,u,_,"column"===v?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{minWidth:`${L}px`},onClick:N,onContextMenu:T,tabIndex:0,children:[e(F,{fontWeight:"medium",children:i??$g(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>V(e,!1),onDoubleClick:()=>M(LC(t,x)),onClick:()=>O({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>V(e,!0),onDoubleClick:()=>M(LC(t,x)),onClick:()=>O({row:-1,column:t})})]},t)});function $g(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const ev=({row:t,label:i,selected:o,onSelect:a,setContextMenu:l,addRowTop:s,addRowBottom:c,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:p,disableDeleteOption:C,contextMenu:m,setVisibleRange:g,scrollToRow:v})=>{const y=Qg(),w=Gg(e=>e.rowDimensions[t]?.height||32),b=Gg(e=>e.model.data),{rowCount:E}=Ym(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"),s()},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"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:E>=p},...C?[]:[{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,s=e=>{const t=Math.max(32,l+(e.clientY-o));y(xC(i,t))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),y($C())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),y($C())},[w,t]),L=r.useCallback(e=>y(QC(e)),[y]),k=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"===m?.contextType&&l(e=>({open:e.open,contextType:"row",options:A}))},[t,u,A,f,"row"===m?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{height:`${w}px`,minWidth:"60px"},onClick:k,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(xC(t,32)),onClick:()=>L({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>x(e,!1),onDoubleClick:()=>y(xC(t,32)),onClick:()=>L({row:t,column:-1})})]})},tv=t=>function(n){const i=Qg(),o=Gg(e=>e.selected.hasEntireRow(n.row)),a=Gg(e=>e.active?rm(e.active,e.model.data):void 0),l=Gg(e=>e.selectedRow??void 0),s=r.useCallback((e,t)=>i(function(e,t){return{type:Ip,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:o,cell:a,selectedRow:l,onSelect:s,scrollToRow:n.scrollToRow})},nv=({row:t,column:n,DataViewer:i,active:o,dragging:a,mode:l,data:s,evaluatedData:c,select:d,activate:u,setCellDimensions:f,setCellData:h})=>{const p=r.useRef(null),C=r.useMemo(()=>({row:t,column:n}),[t,n]),m=r.useCallback(e=>{e.preventDefault(),window.getSelection()?.removeAllRanges(),"view"===l&&(f(C,Vm(e.currentTarget)),e.shiftKey?d(C):u(C))},[l,f,C,d,u]),g=r.useCallback(e=>{a&&(f(C,Vm(e.currentTarget)),d(C))},[f,d,a,C]);return r.useEffect(()=>{const e=p.current;if(!e)return;const t=()=>{f(C,Vm(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[f,C]),s&&s.DataViewer&&(i=s.DataViewer),e("td",{ref:p,style:{...s?.style,..."dropDown"===s?.inputType?.type&&{fontSize:"12px"},textDecoration:"underline"===s?.style?.textDecoration?s?.style?.textDecoration:"none"},className:z("ff-spreadsheet-cell",s?.className,{"ff-spreadsheet-active-cell":o||a}),onMouseEnter:g,onMouseDown:m,tabIndex:0,children:e(i,{row:t,column:n,cell:s,active:o,evaluatedCell:c,setCellData:h,inputValue:()=>null})})},rv=t=>function(n){const{row:i,column:o}=n,a=Qg(),l=r.useMemo(()=>({row:i,column:o}),[i,o]),s=r.useCallback(e=>a(GC(l,e)),[a,l]),c=r.useCallback(e=>a(function(e){return{type:Rp,payload:{point:e}}}(e)),[a]),d=r.useCallback(e=>a(QC(e)),[a]),u=r.useCallback((e,t)=>a(KC(e,t)),[a]),f=Gg(e=>_m(e.active,l)),h=Gg(e=>f?e.mode:"view"),p=Gg(e=>rm(l,e.model.data)),C=Gg(e=>rm(l,e.model.evaluatedData)),m=Gg(e=>e.dragging),g=Gg(e=>e.copied?.has(l)||!1);return e(t,{...n,active:f,copied:g,dragging:m,mode:h,evaluatedData:C,data:p,select:c,activate:d,setCellDimensions:u,setCellData:s})},iv=({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:ov(a)}:{className:z("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":Fm(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(cn,{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 ov(e){return e?"TRUE":"FALSE"}const av=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:o={}},s)=>{const c=a(null);i.useImperativeHandle(s,()=>c.current),l(()=>{if(c.current&&document.activeElement!==c.current){const e=t.endsWith("\n")?`${t}\n`:t;e!==c.current.innerText&&(c.current.innerText=e)}},[t]);return e("div",{style:o,children:e("div",{ref:c,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),void document.execCommand("insertLineBreak");c.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:()=>{if(c.current){let e=c.current.innerText;e.endsWith("\n")&&(e=e.slice(0,-1)),n?.(e)}},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)},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:"24px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),lv=({onChange:t,cell:n})=>{const i=r.useRef(null),o=r.useCallback(e=>{const{contextDisable:r,...i}=n;t({...i,value:e,inputType:i.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(av,{ref:i,initialValue:n?.value??"",onChange:o,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},sv=t=>{const i=r.useRef(null),o=r.useRef(null),a=Qg(),l=r.useCallback((e,t)=>a(GC(e,t)),[a]),s=r.useCallback(e=>a(QC(e)),[a]),c=r.useCallback(()=>a({type:Qp}),[a]),d=r.useCallback(e=>a({type:yC,payload:{autofill:e}}),[a]),u=r.useCallback(e=>a(function(e){return{type:eC,payload:{changes:e}}}(e)),[a]),f=r.useCallback(()=>{a({type:Gp})},[a]),h=Gg(e=>e.rowDimensions),p=Gg(e=>e.active),C=Gg(e=>e.mode),m=Gg(e=>e.active?rm(e.active,e.model.data):void 0),g=Gg(e=>e.selected),v=Gg(e=>g&&jm(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),y=Gg(e=>{let t=p?Dm(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,L]=r.useState({value:"",name:""}),[k,H]=r.useState(!1),[S,_]=r.useState(),[V,O]=r.useState([]);r.useEffect(()=>{m&&p&&t.getActiveCell({value:m.value,active:p});const n=i.current;if(!w&&n){if(n.focus({preventScroll:!0}),"file"===m?.inputType?.type&&m?.value)try{const e=JSON.parse(m.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"===m?.inputType?.type){L({value:m?.value,name:m?.value}),H(e=>!e);const t=m?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value}));_(t)}}},[i,w,p?.row,p?.column]),r.useEffect(()=>{"dropDown"===m?.inputType?.type&&m?.value!==x.value&&L({value:m?.value,name:m?.value})},[m?.value,m?.inputType?.type,x.value]),r.useEffect(()=>{const e=E.current,t=M.current;if(E.current=p,M.current=m,!e||!t)return;const n=p?.row!==e.row||p?.column!==e.column;if(n||"edit"!==C){const e=b.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||m===t||u([{prevCell:t,nextCell:m||null}]),b.current=m}});const N=m&&m.DataEditor||t.DataEditor,T=m&&m.readOnly,I=r.useCallback(e=>{if(!p)return;const t=e.currentTarget.closest(".ff-excel-spreadsheet");if(!t)return void e.preventDefault();e.stopPropagation();const n=document.body.style.userSelect,r=document.body.style.overflow;document.body.style.userSelect="none",document.body.style.overflow="hidden";let i=null;const o=()=>{i&&(cancelAnimationFrame(i),i=null)},a=e=>{const n=t.getBoundingClientRect();let r=0,a=0;e.clientY<n.top+50?a=-12:e.clientY>n.bottom-50&&(a=12),e.clientX<n.left+50?r=-12:e.clientX>n.right-50&&(r=12),0!==r||0!==a?(e=>{o();const n=()=>{const{x:r,y:o}=e;0!==r&&(t.scrollLeft+=r),0!==o&&(t.scrollTop+=o),i=requestAnimationFrame(n)};i=requestAnimationFrame(n)})({x:r,y:a}):o()},l=()=>{o(),document.body.style.userSelect=n,document.body.style.overflow=r,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",l),d(!0)},[s,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]),Z=v?.height!==y?.height||v?.width!==y?.width,j=r.useCallback(e=>{p&&Z&&(KC(p,Vm(e.currentTarget)),s(p))},[p,Z]),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,P=["file","dropDown"].includes(m?.inputType?.type||"");return n("div",{ref:i,className:z("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${C}`,{"ff-spreadsheet-active-cell--hidden":w,"ff-spreadsheet-active-cell--dragging":Z&&"text"!==m?.inputType?.type}),onMouseDown:j,style:{...y,backgroundColor:m?.style?.backgroundColor,...P?{display:"flex",alignItems:m?.style?.alignContent,justifyContent:m?.style?.textAlign}:{},..."edit"===C&&p?{minWidth:Math.min(y?.width,t.maxWidth),minHeight:Math.min(y?.height,t.maxHeight),height:"auto",maxWidth:`${R}px`,maxHeight:`${B}px`,overflow:"auto",..."dropDown"===m?.inputType?.type?{}:{padding:"2px 4px 0px 4px",width:"max-content"}}:{}},onContextMenu:D,onClick:"view"!==C||T?void 0:c,tabIndex:0,children:[e("div",{className:P?"":"active-cell-main",children:"dropDown"===m?.inputType?.type?e(lr,{...m?.inputType?.inputProps,dropDownRef:o,showOptions:{open:!("edit"!==C||!p),toggle:k},selectedOption:x,optionsList:S||[],height:26,showLabel:!1,disabled:!t.editable,showBorder:!1,optionZIndex:5e3,onChange:e=>{L({value:e.value,name:e.label}),A({...m,value:e.value,style:m?.style,inputType:m?.inputType})}}):"file"===m?.inputType?.type?e(Lp,{...m?.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&&m?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(m.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"===m?.inputType?.type){let n=[];try{m?.value&&(n=JSON.parse(m.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 Za.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,s=l>0?25*l:1,c=[...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?(c.push(i),e++):"existing"===n&&i?.name?c.push(i):"memory_full"===n?o++:r++}else r++}),e>0||c.length>n.length){const e=c.length>0?JSON.stringify(c):"";A({...m,value:e,style:m?.style,inputType:m?.inputType}),a(xC(p?.row||0,Math.max(s,h?.[p.row]?.height||s))),O(c.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}o>0&&Za.info("No memory available to add the file"),e>0&&Za.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&Za.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),Za.error("Operation failed")}}else if("DELETE"===r&&"file"===m?.inputType?.type)try{let e=[...m&&JSON.parse(m.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),Za.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:o,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),Za.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";A({...m,value:t,style:m?.style,inputType:m?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),Za.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({...m,value:e,style:m?.style,inputType:m?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),Za.error("Failed to delete file(s). Invalid file data detected.")}else Za.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),Za.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),Za.error("Operation failed")}},disabled:!t.editable,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:t.editable,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:t.editable,isInfoIconRequired:!1,truncateMaxLimit:(y?.width??0)-60}):"edit"===C&&p&&t.editable?e(N,{row:p.row,column:p.column,cell:m,onChange:A,exitEditMode:f}):e(av,{initialValue:m?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...m?.style,textDecoration:"underline"===m?.style?.textDecoration?"underline":"none",backgroundColor:Z?"#1e161f00":m?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(m?.inputType?.type??"")&&("edit"===C||p&&e("div",{onMouseDown:I,className:"select_dot"}))]},`${p?.row}-${p?.column}`)},cv=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const o=Gg(e=>e.active),a=Gg(e=>e.autoFill),l=Gg(e=>o?Dm(o,e.rowDimensions,e.columnDimensions):void 0),{width:s,height:c,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,p=s,C=c;return a.open&&s&&c&&l&&(s-h>c-f?(p=s,C=l.height):(C=c,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:(C??0)+1,top:d,left:u}})},dv=({scrollPos:t={top:0,left:0}})=>{const n=Gg(e=>e.selected),i=Gg(e=>e.dragging),o=Gg(e=>e.selected.size(e.model.data)<2),a=Gg(e=>n&&jm(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(a)return{...a,top:a.top-1,left:a.left-1,height:a.height-1,width:a.width-1}},[a,t]);return e(cv,{variant:"selected",dimensions:l,dragging:i,hidden:o||!a})},uv=({scrollPos:t={top:0,left:0}})=>{const n=Gg(e=>e.copied),i=null===n,o=Gg(e=>n&&Zm(e.rowDimensions,e.columnDimensions,n)),a=r.useMemo(()=>{if(o)return{...o,top:o.top-1,left:o.left-1,height:o.height-1,width:o.width-1}},[o,t]);return e(cv,{variant:"copied",dimensions:a,hidden:i||!o,dragging:!1})},fv=i.forwardRef(({getColorValue:t,disabled:n,initialColor:r},o)=>{const l=a(null);i.useImperativeHandle(o,()=>l.current);const[s,d]=c(r);return e("div",{className:z("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:s},onClick:()=>{l.current&&!n&&l.current.click()},children:e("input",{type:"color",disabled:n,className:z("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:l,onChange:e=>{d(e.target.value),t(e.target.value.replace("#",""))}})})});fv.displayName="ColorBarSelector";const hv=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"}},pv=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"}},Cv=e=>Gm.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function mv(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:Um(Cv(String(e.size))),fontFamily:(a=e.name,Qm.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:hv(e.alignment.horizontal),alignContent:hv(e.alignment.vertical)};var a}const gv=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"},vv=e=>({name:e.fontFamily||"Arial",size:qm(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:gv(e.borderTop?e.borderTop.toString():void 0),right:gv(e.borderRight?e.borderRight.toString():void 0),bottom:gv(e.borderBottom?e.borderBottom.toString():void 0),left:gv(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:pv(e.textAlign),vertical:pv(e.alignContent),wrapText:!1}}),yv=({toolbar:t="show",editable:r,onBold:i,onItalic:o,setUnderlineType:s,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:p,setBorderType:C,setFormatePainter:m})=>{const g=Gg(e=>e.selected instanceof bm),[v,y]=c("disable"===t||!r),w=Gg(e=>e.active?rm(e.active,e.model.data):null),b=Gg(e=>e.model.data),E=Gg(e=>e.formattedStyle.open),M={...Wm.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[A,x]=c(w?.style||M),L=a(null);l(()=>{w?.style&&JSON.stringify(w.style)!==JSON.stringify(A)&&x(w?.style||M),g?y(!r):w&&"boolean"==typeof w.readOnly&&y(w.readOnly||"disable"===t||!r||"dropDown"===w?.inputType?.type)},[w,r]);const k=vv(A),[H,S]=c("border-none"),[_,V]=c({label:"",value:""}),[O,z]=c({label:"",value:""}),[N,T]=c({color:M.color,backgroundColor:M.backgroundColor,borderColor:M.borderColor}),I=[{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=Gm.map(e=>({label:e,value:e})),Z=a(null),j=a(null);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=`${qm(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(lr,{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:Qm,selectedOption:_})}),e("div",{className:"ff-excel-toolbar-font-size",children:e(lr,{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:k.bold?"dark":"light",hoverEffect:!k.bold,onClick:()=>i(b),name:"bold"})}),e(K,{placement:"top",title:"Italic",children:e(P,{disabled:v,variant:k.italic?"dark":"light",hoverEffect:!k.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:()=>s(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:()=>{m(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:10,onClick:()=>{d(b,N.color),Z.current?.click()},name:"text_color"}),e(fv,{ref:Z,disabled:v,getColorValue:e=>{T(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:10,onClick:()=>{p(b,N.backgroundColor),j.current?.click()},name:"fill_color"}),e(fv,{ref:j,disabled:v,getColorValue:e=>{T(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:()=>C(b,H,"var(--input-hover-border-color)"),name:(()=>{const e=I.find(e=>e.value===H);return e?e.icon:""})()})}),e("span",{ref:L,children:e(hr,{disabled:v,iconName:"arrow_down",targetRef:L,iconSize:12,zIndex:2e3,options:I,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;C(b,t,"var(--input-hover-border-color)"),S(t)}})})]})})]})},wv=(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},bv=r.forwardRef(function(t,i){const{className:o,columnLabels:a=[],rowLabels:l=[],toolbar:s,editable:c,onKeyDown:d,Table:u=Ug,Row:f=qg,sheetHeight:h,HeaderRow:p=Wg,DataEditor:C=lv,DataViewer:m=iv,onSelect:g=()=>{},onActivate:v=()=>{},onEvaluatedDataChange:y=()=>{},contextOption:w,attachmentAction:b,workRef:E,minimumColumnWidth:M,setContextMenu:A,maxRowLimit:x,maxColLimit:L,disableDeleteOption:k,contextMenu:H,getActiveCell:S,onAddColumn:_,onDeleteColumn:V}=t,O=M||100,N=r.useRef(!1),T=Gg(e=>e.model.data),[I,D]=r.useState(!1),[Z,j]=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||Jm,n=new rg(e,t.data);return D(e=>!e),{...Hg,model:n,selected:t.selected||Hg.selected}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(Sg,G),[Y,X]=K,J=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=um(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]);r.useEffect(()=>{X(function(e){return{type:wC,payload:{minimumColumnWidth:e}}}(M))},[M]);const oe=re(J.rows),ae=ie(J.columns),le=re($.start),se=oe-re($.end),ce=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(AC),Ce=he(tm),me=he(em),ge=he(nm),ve=he(YC),ye=he(XC),we=he(FC),be=he(JC),Ee=he($C),Me=he(UC),Ae=he(qC),xe=he(WC),Le=he(kC),ke=he(HC),He=he(_C),Se=he(zC),_e=he(VC),Ve=he(OC),Oe=he(SC),ze=he(NC),Ne=he(TC),Te=he(IC),Ie=he(MC),De=he(DC),Ze=he(ZC),je=he(jC),Re=he(RC),Be=he(BC),Pe=he(PC);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&&Pm(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(c),t.data!==Qe.current&&Me(t.data),Qe.current=t.data},[t.data,Me,c]);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(Hm,t)}(e,Rm(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]=rm({row:o,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Ye=r.useCallback(e=>{Bm(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),Ce())},[ue,Ke,Ce]),Xe=r.useCallback(e=>{Bm(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),me())},[ue,Ke,me]),Je=r.useCallback(e=>{if(Bm(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(Hm):""}(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(),Le(T)):t&&"i"===n?(e.preventDefault(),ke(T)):t&&"u"===n&&(e.preventDefault(),He(T)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==Mg(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),ye(e))},[Y,d,ye]),et=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Ie(Y.active)},[Y]),tt=r.useCallback(()=>{Ee(),document.removeEventListener("mouseup",tt)},[Ee]),nt=r.useCallback(e=>{Y.dragging||1!==e.buttons||"view"!==ue||(be(),document.addEventListener("mouseup",tt))},[Y,be,tt,ue]),rt=r.useMemo(()=>rv(t.Cell||nv),[t.Cell,I,c]),it=r.useMemo(()=>Yg(t.CornerIndicator||Kg),[t.CornerIndicator,I]),ot=r.useMemo(()=>tv(t.RowIndicator||ev),[t.RowIndicator,I]),at=r.useMemo(()=>Xg(t.ColumnIndicator||Jg),[t.ColumnIndicator,I]);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)),j(Math.min(fe.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},st=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 s=l===J.rows;q(s);let c=0;for(;c<J.columns&&ie(c)<i;)c++;let d=c;for(;d<J.columns&&ie(d)<i+o;)d++;c=Math.max(0,c-10),d=Math.min(J.columns,d+10),ne({start:c,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]),ct=r.useMemo(()=>wv(st,16),[st]),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=Sm($.end,$.start),ht=Sm(te.end,te.start),pt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${ce}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")," "]}),Ct=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:je,addColumnRight:Re,columnContextEnable:t.columnContextEnable,maxColLimit:L,disableDeleteOption:k,contextMenu:H,onAddColumn:_,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:Ze,deleteRow:Be,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:x,disableDeleteOption:k,contextMenu:H,setVisibleRange:ee,scrollToRow:dt},r),e("div",{className:"spacer left"}),ht.map(t=>e(rt,{row:r,column:t,DataViewer:m},t)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${se}px`}})]})]}),[u,J.rows,J.columns,f,p,it,a,at,l,ot,rt,m,$,te,le,se,ce,de,Y.rowDimensions,Y.columnDimensions]),mt=r.useMemo(()=>e(sv,{attachmentAction:b,contextOption:w,getActiveCell:S,setContextMenu:t.setContextMenu,DataEditor:C,visibleRowRange:$,visibleColRange:te,maxHeight:R-64,maxWidth:Z-M,totalHeight:oe,totalWidth:ae,isAtBottom:U,isAtRight:W,scrollPos:P,editable:c},Y.active?`${Y.active.row}-${Y.active.column}`:"no-active"),[C,$,te,Y.active,R,Z,oe,ae,U,W,c]),gt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${Z}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),e("div",{style:{height:`${R}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),"hide"!==s&&e("div",{className:"ff-excel-toolbar-container",children:e(yv,{editable:c,toolbar:s,onBold:Le,onItalic:ke,setUnderlineType:He,setColor:ze,setBorderType:Oe,setFontSize:_e,setFontFamily:Ve,setTextAlign:Se,setBackgroundColor:Ne,setFormatePainter:Te})}),n("div",{ref:fe,style:{height:h},className:z("ff-excel-spreadsheet",o),onKeyPress:we,onKeyDown:$e,onClick:et,onMouseMove:nt,onScroll:e=>ct(e),children:[Ct,mt,e(dv,{scrollPos:P}),e(uv,{scrollPos:P})]})]}),[o,we,$e,nt,Ct,mt,Z]);return e(Fg.Provider,{value:K,children:gt})}),Ev=({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})})},Mv=({excelData:r,contextOption:o,toolbar:s="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:p=!0,contextHeightPositioning:C=0,contextWidthPositioning:m=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:L=!1,maxRowLimit:k=1/0,maxColLimit:H=1/0,maxSheetLimit:S=1/0,getActiveCell:_=()=>{}})=>{const V=a(null),[O,N]=c([]),[T,I]=c(""),[D,Z]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[j,R]=c({name:"defaultSheet",index:0}),[B,U]=c({defaultSheet:[[Wm]]}),[q,W]=c([[Wm]]),[Q,Y]=c((g.length,{})),[X,J]=c({x:0,y:0}),$=a(""),ee=a(null),te=a(null),ne=a(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);N(t),G(t.length)||($.current=t[0]||"",R({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:Wm.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)?Wm.style:mv(e?.style),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const s=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=s.has(`r${n+1}`)||s.has(`c${r+1}`)||s.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||Wm);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||""}))}}),U(n),g.length>1&&Y(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&W(n[i])}},[r]),l(()=>{v&&v(T),"File saved"===T&&setTimeout(()=>{I("")},2e3)},[T]),l(()=>{I("Saving..."),re(le())},[B,$.current]);const re=i.useCallback(La(e=>{if(g.length>1){const t={...Q};O.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Y(t);const n=O.map(e=>({sheetName:e,headers:t[e]||[]}));g(e,n)}else g(e);I("File saved")},w),[g,Q,O]),ae=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),re(le()))},[g]);i.useEffect(()=>(document.addEventListener("keydown",ae),()=>{document.removeEventListener("keydown",ae)}),[ae]);const le=()=>O.map(e=>{const t=B[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:vv(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}}),[se,ce]=c(null),de=()=>O.length>=S,ue=()=>{if(de())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",O),t=Array.from({length:u},()=>Array.from({length:f},()=>Wm));N(t=>[...t,e]),R({index:O?.length,name:e}),U({...B,[e]:t}),W(t),g.length>1&&Y(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),$.current=e},fe=(e=[[Wm]])=>{W(e)},he=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void ce(null);const i=(r.textContent||"").trim();if(!i)return Za.warning("Sheet name cannot be empty."),r.textContent=j.name,void ce(null);if(i.length>50)return Za.warning("The sheet name cannot be greater than 50 characters"),r.textContent=j.name,void ce(null);if(O.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return Za.warning("Sheet name already exists"),r.textContent=j.name,void ce(null);let o=O;fe(B?.[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??[]}}(B,n,i);$.current=i,R(e=>({...e,name:i})),U(a),g.length>1&&Y(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),ce(null)};const pe=(e,t)=>{e!==j.name&&t!==j.index&&(R({index:t,name:e}),N(n=>{const r=[...n];return r[t]=e,r}),fe(B[e]),$.current=e)},Ce=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&D.open&&(Z({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[D.open]);i.useEffect(()=>(document.addEventListener("contextmenu",Ce),document.addEventListener("click",e=>Ce(e,!0)),()=>{document.removeEventListener("contextmenu",Ce),document.removeEventListener("click",e=>Ce(e,!0))}),[Ce]);const me=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ue(),disableTooltip:"Sheet limit reached",visible:!1,disable:de()},...L?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(O.length>1){let n=O.slice();n.splice(t,1);const r={...B};delete r[e];const i=Math.min(t,n.length-1);N(n),U(r),g.length>1&&Y(t=>{const n={...t};return delete n[e],n});const o=n[i]?n[i]:"";R({index:i,name:o}),fe(r?.[o]),$.current=o}else Za.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];Z(e=>({...e,open:!0,contextType:"sheet",options:r}))};l(()=>{ne.current?.removeSelect()},[j.name]);return e(t,{children:O.length>0&&n("div",{ref:ee,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=te.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,s=window.innerHeight,c=l-e.clientX,d=e.clientX,u=s-e.clientY,f=e.clientY;c<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")?J({x:i,y:o-(L?32:65)}):(i+a>l&&(i=l-a-2),i<0&&(i=2),J({x:i+m,y:o+C}))},onClick:e=>{e.stopPropagation(),D.open&&Z({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},children:[e("div",{ref:te,className:"ff-excel-sheet",children:e(bv,{ref:ne,editable:p,attachmentAction:y,toolbar:s,sheetHeight:h,setContextMenu:Z,contextOption:o,data:q,columnContextEnable:E,rowContextEnable:M,minimumColumnWidth:x,onEvaluatedDataChange:e=>{U(t=>({...t,[$.current]:e}))},workRef:ee,scroller:b,maxRowLimit:k,maxColLimit:H,disableDeleteOption:L,contextMenu:D,getActiveCell:_,onAddColumn:(e,t)=>{g.length>1&&Y(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&&Y(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&&n("div",{className:"ff-excel-add-sheet-set",children:[e(K,{title:de()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(P,{disabled:!p||de(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ue,name:"plus_icon",height:20,width:20})}),e(hr,{options:(t=>t.map((t,r)=>({label:n("div",{style:{display:"flex",gap:"8px"},children:[j?.name===t?e(P,{height:16,width:16,name:"tick"}):e("div",{style:{height:"16px",width:"24px"}}),e(K,{title:oe(t,20,"count")?t:"",children:e(F,{children:ie(t,20,"count")})})]}),name:r,value:t})))(O),targetRef:V,onOptionClick:e=>{const{value:t,name:n=""}=e;pe(t,parseInt(n))},dropdownPlacement:"top",iconName:"show_script",tooltipTitle:"All Sheets",tooltipPlacement:"top",dropdownHeight:215,selectedValue:j.name})]}),e("div",{className:"ff-excel-tab-container",children:O.map((t,n)=>e(F,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{pe(t,n),A&&me(e,t,n)},className:z("ff-excel-tab-list",{active:t===j.name}),onClick:()=>{pe(t,n)},suppressContentEditableWarning:se===n,onDoubleClick:e=>{"show"===d&&(ce(n),null===se&&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&&se===n,onBlur:e=>{he(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),he(e,n,t))},children:t})},t))})]}),D.open&&e(Ev,{contextMenu:D,position:X,editable:p}),e(Da,{})]})})},Av=({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})})},xv=({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),s=t+n*Math.sin(i),c=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 ${c} 1 ${l} ${s}`},Lv=({radius:t=15,lineWidth:r=5,label:i,percentageValue:o,icon:l,fontSize:s=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:p})=>{const[C,m]=c({x:0,y:0}),[g,v]=c(!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:xv({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:xv({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(o,w,t),A=()=>{v(!0)},x=()=>{m({x:0,y:0}),v(!1)},L=e=>{if(y.current){const t=y.current.getBoundingClientRect();m({x:e.clientX-t.left,y:e.clientY-t.top})}};return n("div",{ref:y,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${s}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:L}),e("path",{d:M,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:L}),h&&e("path",{d:M,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:L}),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:`${C.x+15}px`,top:C.y-5+"px"},children:[e(F,{children:`${i} : `}),n(F,{children:[o,"%"]})]})]})},kv=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:o,onDownloadClick:a,height:l="75px",width:s="79px",fileName:c,thumbnailMediaSrc:d,isDelete:u})=>e("div",{className:"ff-attach-media-container",style:{height:l,width:s},children:n("div",{className:"ff-media-wrapper",style:{height:l,width:s},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:c})]})}),Hv=({icon:r,status:i,count:o,text:a,style:s={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=c(!1),p=["total defects","defect density","open defects","closed defects","quality score"],C=p.includes(i.toLowerCase()),m=p.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:s,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 "+(m?"red-background":""),children:n(t,C?{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})]})})]})},Sv=({option:t})=>{const r=a(null),[i,o]=c(!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 s={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":s[e.type||""]||""})(t),height:24,width:24,hoverEffect:!0})]})};function _v(e){return()=>e}function Vv(e){e()}function Ov(e,t){return n=>e(t(n))}function zv(e,t){return()=>e(t)}function Nv(e){return void 0!==e}function Tv(){}function Iv(e,t){return t(e),e}function Dv(e,t){return t(e)}function Zv(...e){return e}function jv(e,t){return e(1,t)}function Rv(e,t){e(0,t)}function Bv(e){e(2)}function Pv(e){return e(4)}function Fv(e,t){return jv(e,function(e,t){return n=>e(t,n)}(t,0))}function Uv(e,t){const n=e(1,e=>{n(),t(e)});return n}function qv(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 Qv(e=Wv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Gv(e){return t=>n=>{e(n)&&t(n)}}function Kv(e){return t=>Ov(t,e)}function Yv(e){return t=>()=>{t(e)}}function Xv(e,...t){const n=function(...e){return t=>e.reduceRight(Dv,t)}(...t);return(t,r)=>{switch(t){case 2:return void Bv(e);case 1:return jv(e,n(r))}}}function Jv(e,t){return n=>r=>{n(t=e(t,r))}}function $v(e){return t=>n=>{e>0?e--:t(n)}}function ey(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function ty(...e){const t=new Array(e.length);let n=0,r=null;const i=2**e.length-1;return e.forEach((e,o)=>{const a=2**o;jv(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 ny(e){let t=e;const n=iy();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function ry(e,t){return Iv(ny(t),t=>Fv(e,t))}function iy(){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 oy(e){return Iv(iy(),t=>Fv(e,t))}function ay(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:ly(),singleton:n}}const ly=()=>Symbol();function sy(...e){const t=iy(),n=new Array(e.length);let r=0;const i=2**e.length-1;return e.forEach((e,o)=>{const a=2**o;jv(e,e=>{n[o]=e,r|=a,r===i&&Rv(t,n)})}),function(e,o){switch(e){case 2:return void Bv(t);case 1:return r===i&&o(n),jv(t,o)}}}function cy(e,t=Wv){return Xv(e,Qv(t))}function dy(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(Vv)}}(...e.map(e=>jv(e,n)))}}}const uy=0,fy=1,hy=2,py=3,Cy={[uy]:"debug",[py]:"error",[fy]:"log",[hy]:"warn"},my=ay(()=>{const e=ny(py);return{log:ny((t,n,r=fy)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??Pv(e))&&console[Cy[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function gy(e,t,n){return vy(e,t,n).callbackRef}function vy(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?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function yy(e,t,n,r,o,a,l,s,c){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),s=parseFloat(i.dataset.knownSize),c=t(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},py),c===s)continue;const d=o[o.length-1];0===o.length||d.size!==c||d.endIndex!==l-1?o.push({endIndex:l,size:c,startIndex:l}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",o);let c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;const d="window"===c.lastElementChild.dataset.viewportType;let u;d&&(u=c.ownerDocument.defaultView);const f=l?s?l.scrollLeft:l.scrollTop:d?s?u.scrollX||u.document.documentElement.scrollLeft:u.scrollY||u.document.documentElement.scrollTop:s?c.scrollLeft:c.scrollTop,h=l?s?l.scrollWidth:l.scrollHeight:d?s?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,p=l?s?l.offsetWidth:l.offsetHeight:d?s?u.innerWidth:u.innerHeight:s?c.offsetWidth:c.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(f,0),viewportHeight:p}),a?.(s?wy("column-gap",getComputedStyle(n).columnGap,o):wy("row-gap",getComputedStyle(n).rowGap,o)),null!==i&&e(i)},[e,t,o,a,l,r,s]);return vy(d,n,c)}function wy(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,hy),"normal"===t?0:parseInt(t??"0",10)}function by(e,t,n){const r=i.useRef(null),o=i.useCallback(n=>{if(!n?.offsetParent)return;const i=n.getBoundingClientRect(),o=i.width;let a,s;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;s=e.height-Math.max(0,n),a=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;s=e.innerHeight-Math.max(0,i.top),a=i.top+e.scrollY}r.current={offsetTop:a,visibleHeight:s,visibleWidth:o},e(r.current)},[e,t]),{callbackRef:a,ref:l}=vy(o,!0,n),s=i.useCallback(()=>{o(l.current)},[o,l]);return i.useEffect(()=>{if(t){t.addEventListener("scroll",s);const e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}const e=l.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,l]),a}const Ey=ay(()=>{const e=iy(),t=iy(),n=ny(0),r=iy(),i=ny(0),o=iy(),a=iy(),l=ny(0),s=ny(0),c=ny(0),d=ny(0),u=iy(),f=iy(),h=ny(!1),p=ny(!1),C=ny(!1);return Fv(Xv(e,Kv(({scrollTop:e})=>e)),t),Fv(Xv(e,Kv(({scrollHeight:e})=>e)),a),Fv(t,i),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:s,footerHeight:d,headerHeight:l,horizontalDirection:p,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:C,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),My={lvl:0};function Ay(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 xy(e){return e===My}function Ly(e,t){if(!xy(e))return t===e.k?e.v:t<e.k?Ly(e.l,t):Ly(e.r,t)}function ky(e,t,n="k"){if(xy(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=ky(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return ky(e.l,t,n)}function Hy(e,t,n){return xy(e)?jy(t,n,1):t===e.k?Ty(e,{k:t,v:n}):t<e.k?Ry(Ty(e,{l:Hy(e.l,t,n)})):Ry(Ty(e,{r:Hy(e.r,t,n)}))}function Sy(){return My}function _y(e,t,n){if(xy(e))return[];return function(e){return Ay(e,({k:e,v:t})=>({index:e,value:t}))}(zy(e,ky(e,t)[0],n))}function Vy(e,t){if(xy(e))return My;const{k:n,l:r,r:i}=e;if(t===n){if(xy(r))return i;if(xy(i))return r;const[t,n]=Zy(r);return Ny(Ty(e,{k:t,l:Iy(r),v:n}))}return Ny(Ty(e,t<n?{l:Vy(r,t)}:{r:Vy(i,t)}))}function Oy(e){return xy(e)?[]:[...Oy(e.l),{k:e.k,v:e.v},...Oy(e.r)]}function zy(e,t,n){if(xy(e))return[];const{k:r,l:i,r:o,v:a}=e;let l=[];return r>t&&(l=l.concat(zy(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:a}),r<=n&&(l=l.concat(zy(o,t,n))),l}function Ny(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(Dy(t))return By(Ty(e,{lvl:n-1}));if(!xy(t)&&!xy(t.r))return Ty(t.r,{l:Ty(t,{r:t.r.l}),lvl:n,r:Ty(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(Dy(e))return Py(Ty(e,{lvl:n-1}));if(!xy(r)&&!xy(r.l)){const t=r.l,i=Dy(t)?r.lvl-1:r.lvl;return Ty(t,{l:Ty(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Py(Ty(r,{l:t.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function Ty(e,t){return jy(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 Iy(e){return xy(e.r)?e.l:Ny(Ty(e,{r:Iy(e.r)}))}function Dy(e){return xy(e)||e.lvl>e.r.lvl}function Zy(e){return xy(e.r)?[e.k,e.v]:Zy(e.r)}function jy(e,t,n,r=My,i=My){return{k:e,l:r,lvl:n,r:i,v:t}}function Ry(e){return Py(By(e))}function By(e){const{l:t}=e;return xy(t)||t.lvl!==e.lvl?e:Ty(t,{r:Ty(e,{l:t.r})})}function Py(e){const{lvl:t,r:n}=e;return xy(n)||xy(n.r)||n.lvl!==t||n.r.lvl!==t?e:Ty(n,{l:Ty(e,{r:n.l}),lvl:t+1})}function Fy(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function Uy(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const qy=ay(()=>({recalcInProgress:ny(!1)}),[],{singleton:!0});function Wy(e,t,n){return e[Qy(e,t,n)]}function Qy(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 Gy(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ky(e){return!xy(e.groupOffsetTree)}function Yy({index:e},t){return t===e?0:t<e?-1:1}function Xy({offset:e},t){return t===e?0:t<e?-1:1}function Jy(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:o}=Wy(t,e,Yy),a=e-r,l=o*a+(a-1)*n+i;return l>0?l+n:l}function $y(e,t){if(!Ky(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ew(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;let r=$y("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function tw(e,t,n,r=0){return r>0&&(t=Math.max(t,Wy(e,r,Yy).offset)),Ay(function(e,t,n,r){const i=Qy(e,t,r),o=Qy(e,n,r,i);return e.slice(i,o+1)}(e,t,n,Xy),ow)}function nw(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,uy);const o=e.sizeTree;let a=o,l=0;if(n.length>0&&xy(o)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>Hy(Hy(t,n,e),n+1,r),a)}else[a,l]=function(e,t){let n=xy(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),xy(e)){e=Hy(e,0,i);continue}const a=_y(e,o-1,t+1);if(a.some(aw(r)))continue;let l=!1,s=!1;for(const{end:n,start:r,value:o}of a)l?(t>=r||i===o)&&(e=Vy(e,r)):(s=o!==i,l=!0),n>t&&t>=r&&o!==i&&(e=Hy(e,t+1,o));s&&(e=Hy(e,o,i))}return[e,n]}(a,t);if(a===o)return e;const{lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u}=iw(e.offsetTree,l,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Hy(e,t,Jy(t,u,i)),Sy()),lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u,sizeTree:a}}function rw(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 iw(e,t,n,r){let i=e,o=0,a=0,l=0,s=0;if(0!==t){s=Qy(i,t-1,Yy),l=i[s].offset;const e=ky(n,t-1);o=e[0],a=e[1],i.length&&i[s].size===ky(n,t)[1]&&(s-=1),i=i.slice(0,s+1)}else i=[];for(const{start:e,value:s}of _y(n,t,1/0)){const t=e-o,n=t*a+l+t*r;i.push({index:e,offset:n,size:s}),o=e,l=n,a=s}return{lastIndex:o,lastOffset:l,lastSize:a,offsetTree:i}}function ow(e){return{index:e.index,value:e}}function aw(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 lw={offsetHeight:"height",offsetWidth:"width"},sw=ay(([{log:e},{recalcInProgress:t}])=>{const n=iy(),r=iy(),i=ry(r,0),o=iy(),a=iy(),l=ny(0),s=ny([]),c=ny(void 0),d=ny(void 0),u=ny(void 0),f=ny(void 0),h=ny((e,t)=>Gy(e,lw[t])),p=ny(void 0),C=ny(0),m={groupIndices:[],groupOffsetTree:Sy(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Sy()},g=ry(Xv(n,ty(s,e,C),Jv(nw,m),Qv()),m),v=ry(Xv(s,Qv(),Jv((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Kv(({prev:e})=>e)),[]);Fv(Xv(s,Gv(e=>e.length>0),ty(g,C),Kv(([e,t,n])=>{const r=e.reduce((e,r,i)=>Hy(e,r,Jy(r,t.offsetTree,n)||i),Sy());return{...t,groupIndices:e,groupOffsetTree:r}})),g),Fv(Xv(r,ty(g),Gv(([e,{lastIndex:t}])=>e<t),Kv(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Fv(c,d);const y=ry(Xv(c,Kv(e=>void 0===e)),!0);Fv(Xv(d,Gv(e=>void 0!==e&&xy(Pv(g).sizeTree)),Kv(e=>{const t=Pv(u),n=Pv(s).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Fv(Xv(f,Gv(e=>void 0!==e&&e.length>0&&xy(Pv(g).sizeTree)),Kv(e=>{const t=[];let n=e[0],r=0;for(let i=1;i<e.length;i++){const o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Fv(Xv(s,ty(u,d),Gv(([,e,t])=>void 0!==e&&void 0!==t),Kv(([e,t,n])=>{const r=[];for(let i=0;i<e.length;i++){const o=e[i],a=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==a&&r.push({startIndex:o+1,endIndex:a-1,size:n})}return r})),n);const w=oy(Xv(n,ty(g),Jv(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),Kv(e=>e.changed)));jv(Xv(l,Jv((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Kv(e=>e.diff)),e=>{const{groupIndices:n}=Pv(g);if(e>0)Rv(t,!0),Rv(o,e+rw(e,n));else if(e<0){const t=Pv(v);t.length>0&&(e-=rw(-e,t)),Rv(a,e)}}),jv(Xv(l,ty(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},py)});const b=oy(o);Fv(Xv(o,ty(g),Kv(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=Ly(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=Oy(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 Oy(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 E=oy(Xv(a,ty(g,C),Kv(([e,{offsetTree:t},n])=>Jy(-e,t,n))));return Fv(Xv(a,ty(g,C),Kv(([e,t,n])=>{if(t.groupIndices.length>0){if(xy(t.sizeTree))return t;let r=Sy();const i=Pv(v);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=Oy(t.sizeTree).reduce((t,{k:n,v:r})=>Hy(t,Math.max(0,n+e),r),r),o!==-e){r=Hy(r,0,Ly(t.sizeTree,l));r=Hy(r,1,ky(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...iw(t.offsetTree,0,r,n)}}const r=Oy(t.sizeTree).reduce((t,{k:n,v:r})=>Hy(t,Math.max(0,n+e),r),Sy());return{...t,sizeTree:r,...iw(t.offsetTree,0,r,n)}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:d,firstItemIndex:l,fixedItemSize:c,fixedGroupSize:u,gap:C,groupIndices:s,heightEstimates:f,itemSize:h,listRefresh:w,shiftWith:a,shiftWithOffset:E,sizeRanges:n,sizes:g,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:o}},Zv(my,qy),{singleton:!0});function cw(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const dw=ay(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const o=iy(),a=iy(),l=oy(Xv(o,Kv(cw)));return Fv(Xv(l,Kv(e=>e.totalCount)),n),Fv(Xv(l,Kv(e=>e.groupIndices)),e),Fv(Xv(sy(i,t,r),Gv(([e,t])=>Ky(t)),Kv(([e,t,n])=>ky(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),Qv(),Kv(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},Zv(sw,Ey)),uw=ay(([{log:e}])=>{const t=ny(!1),n=oy(Xv(t,Gv(e=>e),Qv()));return jv(t,t=>{t&&Pv(e)("props updated",{},uy)}),{didMount:n,propsReady:t}},Zv(my),{singleton:!0}),fw=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function hw(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!fw)&&(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}const pw=ay(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:l,scrollingInProgress:s,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=iy(),p=iy(),C=ny(0);let m=null,g=null,v=null;function y(){null!==m&&(m(),m=null),null!==v&&(v(),v=null),g&&(clearTimeout(g),g=null),Rv(s,!1)}return Fv(Xv(h,ty(n,u,r,C,l,a,f),ty(e,o,i),Kv(([[e,n,r,i,o,a,l,c],u,f,C])=>{const w=hw(e),{align:b,behavior:E,offset:M}=w,A=i-1,x=ew(w,n,A);let L=Jy(x,n.offsetTree,u)+a;"end"===b?(L+=f+ky(n.sizeTree,x)[1]-r+C,x===A&&(L+=l)):"center"===b?L+=(f+ky(n.sizeTree,x)[1]-r+C)/2:L-=o,void 0!==M&&0!==M&&(L+=M);const k=t=>{y(),t?(c("retrying to scroll to",{location:e},uy),Rv(h,e)):(Rv(p,!0),c("list did not change, scroll successful",{},uy))};if(y(),"smooth"===E){let e=!1;v=jv(t,t=>{e=e||t}),m=Uv(d,()=>{k(e)})}else m=Uv(Xv(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),k);return g=setTimeout(()=>{y()},1200),Rv(s,!0),c("scrolling from index to",{behavior:E,index:x,top:L},uy),{behavior:E,top:L}})),c),{scrollTargetReached:p,scrollToIndex:h,topListHeight:C}},Zv(sw,Ey,my),{singleton:!0});function Cw(e,t){0===e?t():requestAnimationFrame(()=>{Cw(e-1,t)})}function mw(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const gw=ay(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const l=ny(!0),s=ny(0),c=ny(!0);return Fv(Xv(a,ty(s),Gv(([e,t])=>0!==t),Yv(!1)),l),Fv(Xv(a,ty(s),Gv(([e,t])=>0!==t),Yv(!1)),c),jv(Xv(sy(t,a),ty(l,n,e,c),Gv(([[,e],t,{sizeTree:n},r,i])=>e&&(!xy(n)||Nv(r))&&!t&&!i),ty(s)),([,e])=>{Uv(i,()=>{Rv(c,!0)}),Cw(4,()=>{Uv(r,()=>{Rv(l,!0)}),Rv(o,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:s,scrolledToInitialItem:l}},Zv(sw,Ey,pw,uw),{singleton:!0});function vw(e,t){return Math.abs(e-t)<1.01}const yw="up",ww="down",bw={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Ew=ay(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{const a=ny(!1),l=ny(!0),s=iy(),c=iy(),d=ny(4),u=ny(0),f=ry(Xv(dy(Xv(cy(i),$v(1),Yv(!0)),Xv(cy(i),$v(1),Yv(!1),qv(100))),Qv()),!1),h=ry(Xv(dy(Xv(n,Yv(!0)),Xv(n,Yv(!1),qv(200))),Qv()),!1);Fv(Xv(sy(cy(i),cy(u)),Kv(([e,t])=>e<=t),Qv()),l),Fv(Xv(l,ey(50)),c);const p=oy(Xv(sy(r,cy(o),cy(t),cy(e),cy(d)),Jv((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 s;return s=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:s,state:l}},bw),Qv((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),C=ry(Xv(r,Jv((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!vw(e.scrollHeight,t)){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}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Gv(e=>e.changed),Kv(e=>e.jump)),0);Fv(Xv(p,Kv(e=>e.atBottom)),a),Fv(Xv(a,ey(50)),s);const m=ny(ww);Fv(Xv(r,Kv(({scrollTop:e})=>e),Qv(),Jv((e,t)=>Pv(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?yw:ww,prevScrollTop:t},{direction:ww,prevScrollTop:0}),Kv(e=>e.direction)),m),Fv(Xv(r,ey(50),Yv("none")),m);const g=ny(0);return Fv(Xv(f,Gv(e=>!e),Yv(0)),g),Fv(Xv(i,ey(100),ty(f),Gv(([e,t])=>t),Jv(([e,t],[n])=>[t,n],[0,0]),Kv(([e,t])=>t-e)),g),{atBottomState:p,atBottomStateChange:s,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:u,isAtBottom:a,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:C,scrollDirection:m,scrollVelocity:g}},Zv(Ey)),Mw="top",Aw="bottom",xw="none";function Lw(e,t,n){return"number"==typeof e?n===yw&&t===Mw||n===ww&&t===Aw?e:0:n===yw?t===Mw?e.main:e.reverse:t===Aw?e.main:e.reverse}function kw(e,t){return"number"==typeof e?e:e[t]??0}const Hw=ay(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const o=iy(),a=ny(0),l=ny(0),s=ny(0),c=ry(Xv(sy(cy(r),cy(i),cy(n),cy(o,Uy),cy(s),cy(a),cy(t),cy(e),cy(l)),Kv(([e,t,n,[r,i],o,a,l,s,c])=>{const d=e-s,u=a+l,f=Math.max(n-d,0);let h=xw;const p=kw(c,Mw),C=kw(c,Aw);return r-=s,i+=n+l,(r+=n+l)>e+u-p&&(h=yw),(i-=s)<e-f+t+C&&(h=ww),h!==xw?[Math.max(d-n-Lw(o,Mw,h)-p,0),d-f-l+t+Lw(o,Aw,h)+C]:null}),Gv(e=>null!==e),Qv(Uy)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:s,topListHeight:a,visibleRange:c}},Zv(Ey),{singleton:!0});const Sw={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function _w(e,t,n,r,i,o){const{lastIndex:a,lastOffset:l,lastSize:s}=i;let c=0,d=0;if(e.length>0){c=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-a,f=c,h=l+u*s+(u-1)*r-d;return{bottom:d,firstItemIndex:o,items:Ow(e,i,o),offsetBottom:h,offsetTop:c,top:f,topItems:Ow(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function Vw(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,s=mw(t,l);return _w(Array.from({length:l}).map((e,t)=>({data:o[t+s],index:t+s,offset:0,size:0})),[],l,i,n,r)}function Ow(e,t,n){if(0===e.length)return[];if(!Ky(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=_y(t.groupOffsetTree,r,i);let l,s=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=a.shift(),s=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:s,type:"group"}:{groupIndex:s,index:r.index-(s+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function zw(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}const Nw=ay(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:l,visibleRange:s},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:p}])=>{const C=ny([]),m=ny(0),g=iy(),v=ny(0);Fv(o.topItemsIndexes,C);const y=ry(Xv(sy(h,p,cy(s,Uy),cy(i),cy(r),cy(c),d,cy(C),cy(t),cy(n),cy(v),e),Gv(([e,t,,n,,,,,,,,r])=>{const i=void 0!==r&&r.length!==n;return e&&!t&&!i}),Kv(([,,[e,t],n,r,i,o,a,l,s,c,d])=>{const u=r,{offsetTree:f,sizeTree:h}=u,p=Pv(m);if(0===n)return{...Sw,totalCount:n};if(0===e&&0===t)return 0===p?{...Sw,totalCount:n}:Vw(p,i,r,l,s,d||[]);if(xy(h))return p>0?null:_w(function(e,t,n){if(Ky(t)){const r=$y(e,t);return[{index:ky(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(mw(i,n),u,d),[],n,s,u,l);const C=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of _y(h,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++)C.push({data:d?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return _w([],C,n,s,u,l);const g=a.length>0?a[a.length-1]+1:0,v=tw(f,e,t,g);if(0===v.length)return null;const y=n-1,w=Iv([],n=>{for(const r of v){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+s)/(l+s));const t=a-r.start;o+=t*l+t*s}a<g&&(o+=(g-a)*l,a=g);const c=Math.min(r.end,y);for(let e=a;e<=c&&!(o>=t);e++)n.push({data:d?.[e],index:e,offset:o,size:l}),o+=l+s}}),b=zw(c,Mw),E=zw(c,Aw);if(w.length>0&&(b>0||E>0)){const e=w[0],t=w[w.length-1];if(b>0&&e.index>g){const t=Math.min(b,e.index-g),n=[];let r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){const t=_y(h,i,i)[0]?.value??e.size;r-=t+s,n.unshift({data:d?.[i],index:i,offset:r,size:t})}w.unshift(...n)}if(E>0&&t.index<y){const e=Math.min(E,y-t.index);let n=t.offset+t.size+s;for(let r=t.index+1;r<=t.index+e;r++){const e=_y(h,r,r)[0]?.value??t.size;w.push({data:d?.[r],index:r,offset:n,size:e}),n+=e+s}}}return _w(w,C,n,s,u,l)}),Gv(e=>null!==e),Qv()),Sw);Fv(Xv(e,Gv(Nv),Kv(e=>e?.length)),i),Fv(Xv(y,Kv(e=>e.topListHeight)),u),Fv(u,l),Fv(Xv(y,Kv(e=>[e.top,e.bottom])),a),Fv(Xv(y,Kv(e=>e.items)),g);const w=oy(Xv(y,Gv(({items:e})=>e.length>0),ty(i,e),Gv(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Kv(([,e,t])=>[e-1,t]),Qv(Uy),Kv(([e])=>e))),b=oy(Xv(y,ey(200),Gv(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Kv(({items:e})=>e[0].index),Qv())),E=oy(Xv(y,Gv(({items:e})=>e.length>0),Kv(({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}}),Qv(Fy)));return{endReached:w,initialItemCount:m,itemsRendered:g,listState:y,minOverscanItemCount:v,rangeChanged:E,startReached:b,topItemsIndexes:C,...f}},Zv(sw,dw,Hw,gw,pw,Ew,uw,qy),{singleton:!0}),Tw=ay(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const o=iy(),a=ry(Xv(sy(n,e,r,t,i),Kv(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Fv(cy(a),o),{totalListHeight:a,totalListHeightChanged:o}},Zv(Ey,Nw),{singleton:!0}),Iw=ay(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ny(!1);return{alignToBottom:n,paddingTopAddition:ry(Xv(sy(n,e,t),Gv(([e])=>e),Kv(([,e,t])=>Math.max(0,e-t)),ey(0),Qv()),0)}},Zv(Ey,Tw),{singleton:!0}),Dw=ay(()=>({context:ny(null)})),Zw=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:n??"start",...void 0!==r?{behavior:r}:{}}:e>o?{...i,align:n??"end",...void 0!==r?{behavior:r}:{}}:null,jw=ay(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:l,viewportHeight:s},{scrollToIndex:c}])=>{const d=iy();return Fv(Xv(d,ty(t,s,n,o,i,r,l),ty(e),Kv(([[e,t,n,r,i,o,l,s],c])=>{const{calculateViewLocation:d=Zw,done:u,...f}=e,h=ew(e,t,r-1),p=Jy(h,t.offsetTree,c)+i+o,C=d({itemBottom:p+ky(t.sizeTree,h)[1],itemTop:p,locationParams:f,viewportBottom:s+n-l,viewportTop:s+o});return null!==C?u&&Uv(Xv(a,Gv(e=>!e),$v(Pv(a)?1:2)),u):u?.(),C}),Gv(e=>null!==e)),c),{scrollIntoView:d}},Zv(sw,Ey,pw,Nw,my),{singleton:!0});function Rw(e){return!1!==e&&("smooth"===e?"smooth":"auto")}const Bw=ay(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:l},{didMount:s,propsReady:c},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const p=ny(!1),C=iy();let m=null;function g(e){Rv(a,{align:"end",behavior:e,index:"LAST"})}function v(e){const t=Uv(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(Pv(d)("scrolling to bottom due to increased size",{},uy),g("auto"))});setTimeout(t,100)}jv(Xv(sy(Xv(cy(t),$v(1)),s),ty(cy(p),o,l,u),Kv(([[e,t],n,r,i,o])=>{let a=t&&i,l="auto";return a&&(l=((e,t)=>"function"==typeof e?Rw(e(t)):t&&Rw(e))(n,r||o),a=a&&!1!==l),{followOutputBehavior:l,shouldFollow:a,totalCount:e}}),Gv(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0!==Pv(n)?requestAnimationFrame(()=>{Pv(d)("following output to ",{totalCount:r},uy),g(t)}):m=Uv(e,()=>{Pv(d)("following output to ",{totalCount:r},uy),g(t),m=null})}),jv(Xv(sy(cy(p),t,c),Gv(([e,,t])=>!1!==e&&t),Jv(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Gv(({refreshed:e})=>e),ty(p,t)),([,e])=>{Pv(l)&&v(!1!==e)}),jv(C,()=>{v(!1!==Pv(p))}),jv(sy(cy(p),i),([e,t])=>{!1!==e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&g("auto")});const y=ny(null),w=iy();return Fv(dy(Xv(cy(r),Kv(e=>e?.length??0)),Xv(cy(t))),w),jv(Xv(sy(Xv(w,$v(1)),s),ty(cy(y),l,u,f),Kv(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),Gv(e=>!!e),ey(0)),t=>{null!==m&&(m(),m=null),void 0!==Pv(n)?requestAnimationFrame(()=>{Pv(d)("scrolling into view",{}),Rv(h,t)}):m=Uv(e,()=>{Pv(d)("scrolling into view",{}),Rv(h,t),m=null})}),{autoscrollToBottom:C,followOutput:p,scrollIntoViewOnChange:y}},Zv(sw,Ew,pw,gw,uw,my,Ey,Dw,jw)),Pw=ay(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:l}])=>(Fv(Xv(l,ty(o),Gv(([,e])=>0!==e),ty(i,r,t,n,e),Kv(([[,e],t,n,r,i,o=[]])=>Vw(e,t,n,r,i,o))),a),{}),Zv(sw,gw,Nw,uw),{singleton:!0}),Fw=ay(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ny(0);return jv(Xv(e,ty(r),Gv(([,e])=>0!==e),Kv(([,e])=>({top:e}))),e=>{Uv(Xv(n,$v(1),Gv(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Rv(t,e)})})}),{initialScrollTop:r}},Zv(uw,Ey,Nw),{singleton:!0}),Uw=ay(([{scrollVelocity:e}])=>{const t=ny(!1),n=iy(),r=ny(!1);return Fv(Xv(e,ty(r,t,n),Gv(([e,t])=>!1!==t&&void 0!==t),Kv(([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}),Qv()),t),jv(Xv(sy(t,e,n),ty(r)),([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Zv(Ew),{singleton:!0}),qw=ay(([{scrollContainerState:e,scrollTo:t}])=>{const n=iy(),r=iy(),i=iy(),o=ny(!1),a=ny(void 0);return Fv(Xv(sy(n,r),Kv(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),Fv(Xv(t,ty(r),Kv(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Zv(Ey)),Ww=ay(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:l,windowViewportRect:s}])=>{const c=iy(),d=ny(void 0),u=ny(null),f=ny(null);return Fv(l,u),Fv(s,f),jv(Xv(c,ty(t,r,a,u,f,n)),([e,t,n,r,i,o,a])=>{const l=function(e){return Oy(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:void 0!==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})}),Fv(Xv(d,Gv(Nv),Kv(Qw)),i),Fv(Xv(o,ty(d),Gv(([,e])=>void 0!==e),Qv(),Kv(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:d}},Zv(sw,Ey,gw,uw,qw));function Qw(e){return{align:"start",index:0,offset:e.scrollTop}}const Gw=ay(([{topItemsIndexes:e}])=>{const t=ny(0);return Fv(Xv(t,Gv(e=>e>=0),Kv(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Zv(Nw));function Kw(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const Yw=Kw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Xw=ay(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:l},{listState:s},{beforeUnshiftWith:c,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:p}])=>{const C=oy(Xv(s,ty(a),Jv(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},l])=>{const s=r+o;let c=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(c=s-n,0!==c&&(c+=l))),[c,i,a,s]},[0,[],0,0]),Gv(([e])=>0!==e),ty(r,l,n,i,h,p),Gv(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===yw),Kv(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},uy),e))));function m(n){n>0?(Rv(t,{behavior:"auto",top:-n}),Rv(e,0)):(Rv(e,0),Rv(t,{behavior:"auto",top:-n}))}return jv(Xv(C,ty(e,o)),([t,n,r])=>{r&&Yw()?Rv(e,n-t):m(-t)}),jv(Xv(sy(ry(o,!1),e,p),Gv(([e,t,n])=>!e&&!n&&0!==t),Kv(([e,t])=>t),ey(1)),m),Fv(Xv(u,Kv(e=>({top:-e}))),t),jv(Xv(c,ty(f,d),Kv(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function o(e){return e*(n+i)}if(0===t.length)return o(e);let a=0;const l=Ly(r,0);let s=0,c=0;for(;s<e;){s++,a+=l;let n=t.length===c+1?1/0:t[c+1]-t[c]-1;s+n>e&&(a-=l,n=e-s+1),s+=n,a+=o(n),c++}return a})),n=>{Rv(e,n),requestAnimationFrame(()=>{Rv(t,{top:n}),requestAnimationFrame(()=>{Rv(e,0),Rv(p,!1)})})}),{deviation:e}},Zv(Ey,Ew,Nw,sw,my,qy)),Jw=ay(([e,t,n,r,i,o,a,l,s,c,d])=>({...e,...t,...n,...r,...i,...o,...a,...l,...s,...c,...d}),Zv(Hw,Pw,uw,Uw,Tw,Fw,Iw,qw,jw,my,Dw)),$w=ay(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:a,heightEstimates:l,itemSize:s,sizeRanges:c,sizes:d,statefulTotalCount:u,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:p,initialTopMostItemIndex:C,scrolledToInitialItem:m},g,v,y,w,{scrollToIndex:b},E,{topItemCount:M},{groupCounts:A},x])=>{const{listState:L,minOverscanItemCount:k,topItemsIndexes:H,rangeChanged:S,..._}=w;return Fv(S,x.scrollSeekRangeChanged),Fv(Xv(x.windowViewportRect,Kv(e=>e.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:A,heightEstimates:l,initialItemFinalLocationReached:p,initialTopMostItemIndex:C,scrolledToInitialItem:m,sizeRanges:c,topItemCount:M,topItemsIndexes:H,totalCount:f,...y,groupIndices:a,itemSize:s,listState:L,minOverscanItemCount:k,scrollToIndex:b,statefulTotalCount:u,trackItemSizes:h,rangeChanged:S,..._,...x,...g,sizes:d,...v}},Zv(sw,gw,Ey,Ww,Bw,Nw,pw,Xw,Gw,dw,Jw));function eb(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 tb=typeof document<"u"?i.useLayoutEffect:i.useEffect;function nb(t,n,r){const o=Object.keys(n.required||{}),a=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),s=Object.keys(n.events||{}),c=i.createContext({});function d(e,t){void 0!==e.propsReady&&Rv(e.propsReady,!1);for(const r of o){Rv(e[n.required[r]],t[r])}for(const r of a)if(r in t){Rv(e[n.optional[r]],t[r])}void 0!==e.propsReady&&Rv(e.propsReady,!0)}function u(e){return s.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>t?.();return function(i,o){switch(i){case 1:return o?n===o?void 0:(r(),n=o,t=jv(e,o),t):(r(),Tv);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef(function(f,h){const{children:p,...C}=f,[m]=i.useState(()=>Iv(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,C)})),[g]=i.useState(zv(u,m));var v;tb(()=>{for(const e of s)e in C&&jv(g[e],C[e]);return()=>{Object.values(g).map(Bv)}},[C,g,m]),tb(()=>{d(m,C)}),i.useImperativeHandle(h,_v((v=m,l.reduce((e,t)=>(e[t]=e=>{Rv(v[n.methods[t]],e)},e),{}))));const y=r;return e(c.Provider,{value:m,children:void 0!==r?e(y,{...eb([...o,...a,...s],C),children:p}):p})}),h=i.version.startsWith("18")?e=>{const t=i.useContext(c)[e],n=i.useCallback(e=>jv(t,e),[t]);return i.useSyncExternalStore(n,()=>Pv(t),()=>Pv(t))}:e=>{const t=i.useContext(c)[e],[n,r]=i.useState(zv(Pv,t));return tb(()=>jv(t,e=>{e!==n&&r(_v(e))}),[t,n]),n};return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(c)[e];tb(()=>jv(n,t),[t,n])},useEmitterValue:h,usePublisher:e=>{const t=i.useContext(c);return i.useCallback(n=>{Rv(t[e],n)},[t,e])}}}const rb=i.createContext(void 0),ib=i.createContext(void 0),ob="-webkit-sticky",ab="sticky",lb=Kw(()=>{if(typeof document>"u")return ab;const e=document.createElement("div");return e.style.position=ob,e.style.position===ob?ob:ab}),sb=typeof document<"u"?i.useLayoutEffect:i.useEffect;function cb(e){return"self"in e}function db(e,t,n,r=Tv,o,a){const l=i.useRef(null),s=i.useRef(null),c=i.useRef(null),d=i.useCallback(n=>{let r,i,o;const l=n.target;if(function(e){return"body"in e}(l)||cb(l)){const e=cb(l)?l:l.defaultView;o=!0===a?e.scrollX:e.scrollY,r=!0===a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===a?e.innerWidth:e.innerHeight}else o=!0===a?l.scrollLeft:l.scrollTop,r=!0===a?l.scrollWidth:l.scrollHeight,i=!0===a?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};!0===n.suppressFlushSync?d():M.flushSync(d),null!==s.current&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.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){!0===a&&(e={...void 0!==e.behavior?{behavior:e.behavior}:{},...void 0!==e.top?{left:e.top}:{}}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(!0===a?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let o,d,u;cb(r)?(d=Math.max(Gy(r.document.documentElement,!0===a?"width":"height"),!0===a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),o=!0===a?r.innerWidth:r.innerHeight,u=!0===a?window.scrollX:window.scrollY):(d=r[!0===a?"scrollWidth":"scrollHeight"],o=Gy(r,!0===a?"width":"height"),u=r[!0===a?"scrollLeft":"scrollTop"]);const f=d-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),vw(o,d)||n.top===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:o}),void(i&&t(!0));i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===a&&(n={...void 0!==n.behavior?{behavior:n.behavior}:{},left:n.top}),r.scrollTo(n)}}}function ub(e){return e}const fb=ay(()=>{const e=ny(e=>`Item ${e}`),t=ny(e=>`Group ${e}`),n=ny({}),r=ny(ub),i=ny("div"),o=ny(Tv),a=(e,t=null)=>ry(Xv(n,Kv(t=>t[e]),Qv()),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")}}),hb=ay(([e,t])=>({...e,...t}),Zv($w,fb)),pb=({height:t})=>e("div",{style:{height:t}}),Cb={overflowAnchor:"none",position:lb(),zIndex:1},mb={overflowAnchor:"none"},gb={...mb,display:"inline-block",height:"100%"},vb=i.memo(function({showTopList:t=!1}){const n=Tb("listState"),r=Ib("sizeRanges"),o=Tb("useWindowScroll"),a=Tb("customScrollParent"),l=Ib("windowScrollContainerState"),s=Ib("scrollContainerState"),c=a||o?l:s,d=Tb("itemContent"),u=Tb("context"),f=Tb("groupContent"),h=Tb("trackItemSizes"),p=Tb("itemSize"),m=Tb("log"),g=Ib("gap"),v=Tb("horizontalDirection"),{callbackRef:y}=yy(r,p,h,t?Tv:c,m,g,a,v,Tb("skipAnimationFrameInResizeObserver")),[w,b]=i.useState(0);Nb("deviation",e=>{w!==e&&b(e)});const E=Tb("EmptyPlaceholder"),M=Tb("ScrollSeekPlaceholder")??pb,A=Tb("ListComponent"),x=Tb("ItemComponent"),L=Tb("GroupComponent"),k=Tb("computeItemKey"),H=Tb("isSeeking"),S=Tb("groupIndices").length>0,_=Tb("alignToBottom"),V=Tb("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==w?w:_?"auto":0,paddingLeft:n.offsetTop,paddingRight:n.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==w?w:_?"auto":0,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...V?{}:{visibility:"hidden"}};return t||0!==n.totalCount||null==E?e(A,{...Mb(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=k(t+n.firstItemIndex,e.data,u);return H?C(M,{...Mb(M,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?C(L,{...Mb(L,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Cb},f(e.index,u)):C(x,{...Mb(x,u),...Ab(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?gb:mb},S?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})}):e(E,{...Mb(E,u)})}),yb={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},wb={outline:"none",overflowX:"auto",position:"relative"},bb=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),Eb={position:lb(),top:0,width:"100%",zIndex:1};function Mb(e,t){if("string"!=typeof e)return{context:t}}function Ab(e,t){return{item:"string"==typeof e?void 0:t}}const xb=i.memo(function(){const t=Tb("HeaderComponent"),n=Ib("headerHeight"),r=Tb("HeaderFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,Tb("skipAnimationFrameInResizeObserver")),a=Tb("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),Lb=i.memo(function(){const t=Tb("FooterComponent"),n=Ib("footerHeight"),r=Tb("HeaderFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,Tb("skipAnimationFrameInResizeObserver")),a=Tb("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null});function kb({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:o,context:a,...l}){const s=r("scrollContainerState"),c=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:C}=db(s,d,c,u,void 0,f);return t("scrollTo",C),t("scrollBy",h),e(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...f?wb:yb,...o},tabIndex:0,...l,...Mb(c,a),children:i})})}function Hb({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:o,style:a,context:l,...s}){const c=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),p=n("customScrollParent"),C=i.useRef(null),m=n("scrollerRef"),{scrollByCallback:g,scrollerRef:v,scrollToCallback:y}=db(c,u,d,m,p);return sb(()=>(v.current=p||C.current?.ownerDocument.defaultView,()=>{v.current=null}),[v,p]),t("windowScrollTo",y),t("scrollBy",g),e(d,{ref:C,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...0!==f?{height:f+h}:void 0},...s,...Mb(d,l),children:o})})}const Sb=({children:t})=>{const n=i.useContext(rb),r=Ib("viewportHeight"),o=Ib("fixedItemHeight"),a=Tb("alignToBottom"),l=Tb("horizontalDirection"),s=gy(i.useMemo(()=>Ov(r,e=>Gy(e,l?"width":"height")),[r,l]),!0,Tb("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),o(n.itemHeight))},[n,r,o]),e("div",{"data-viewport-type":"element",ref:s,style:bb(a),children:t})},_b=({children:t})=>{const n=i.useContext(rb),r=Ib("windowViewportRect"),o=Ib("fixedItemHeight"),a=Tb("customScrollParent"),l=by(r,a,Tb("skipAnimationFrameInResizeObserver")),s=Tb("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:bb(s),children:t})},Vb=({children:t})=>{const n=Tb("TopItemListComponent")??"div",r=Tb("headerHeight"),i={...Eb,marginTop:`${r}px`},o=Tb("context");return e(n,{style:i,...Mb(n,o),children:t})},Ob=i.memo(function(t){const r=Tb("useWindowScroll"),i=Tb("topItemsIndexes").length>0,o=Tb("customScrollParent"),a=Tb("context");return n(o||r?Zb:Db,{...t,context:a,children:[i&&e(Vb,{children:e(vb,{showTopList:!0})}),n(o||r?_b:Sb,{children:[e(xb,{}),e(vb,{}),e(Lb,{})]})]})}),{Component:zb,useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}=nb(hb,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",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"}},Ob),Db=kb({useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}),Zb=Hb({useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}),jb=zb,Rb=ay(()=>{const e=ny(e=>n("td",{children:["Item $",e]})),t=ny(null),r=ny(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=ny(null),o=ny(null),a=ny({}),l=ny(ub),s=ny(Tv),c=(e,t=null)=>ry(Xv(a,Kv(t=>t[e]),Qv()),t);return{components:a,computeItemKey:l,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:o,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});Zv($w,Rb),lb();const Bb={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Pb={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Fb,floor:Ub,max:qb,min:Wb,round:Qb}=Math;function Gb(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function Kb(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function Yb(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}const Xb=ay(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:l,scrollTo:s,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:p,propsReady:C},{customScrollParent:m,useWindowScroll:g,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w},b])=>{const E=ny(0),M=ny(0),A=ny(Bb),x=ny({height:0,width:0}),L=ny({height:0,width:0}),k=iy(),H=iy(),S=ny(0),_=ny(null),V=ny({column:0,row:0}),O=iy(),z=iy(),N=ny(!1),T=ny(0),I=ny(!0),D=ny(!1),Z=ny(!1);jv(Xv(p,ty(T),Gv(([e,t])=>0!==t)),()=>{Rv(I,!1)}),jv(Xv(sy(p,I,L,x,T,D),Gv(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{Rv(D,!0),Cw(1,()=>{Rv(k,e)}),Uv(Xv(c),()=>{Rv(t,[0,0]),Rv(I,!0)})}),Fv(Xv(z,Gv(e=>null!=e&&e.scrollTop>0),Yv(0)),M),jv(Xv(p,ty(z),Gv(([,e])=>null!=e)),([,e])=>{e&&(Rv(x,e.viewport),Rv(L,e.item),Rv(V,e.gap),e.scrollTop>0&&(Rv(N,!0),Uv(Xv(c,$v(1)),e=>{Rv(N,!1)}),Rv(s,{top:e.scrollTop})))}),Fv(Xv(x,Kv(({height:e})=>e)),u),Fv(Xv(sy(cy(x,Kb),cy(L,Kb),cy(V,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),cy(c)),Kv(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),Fv(Xv(sy(cy(E),r,cy(V,Yb),cy(L,Kb),cy(x,Kb),cy(_),cy(M),cy(N),cy(I),cy(T)),Gv(([,,,,,,,e])=>!e),Kv(([e,[t,n],r,i,o,a,l,,s,c])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:p}=o;if(0===l&&(0===e||0===p))return Bb;if(0===h){const t=mw(c,e);return function(e){return{...Pb,items:e}}(Gb(t,t+Math.max(l-1,0),a))}const C=Jb(p,h,d);let m,g;s?0===t&&0===n&&l>0?(m=0,g=l-1):(m=C*Ub((t+u)/(f+u)),g=C*Fb((n+u)/(f+u))-1,g=Wb(e-1,qb(g,C-1)),m=Wb(g,qb(0,m))):(m=0,g=-1);const v=Gb(m,g,a),{bottom:y,top:w}=$b(o,r,i,v),b=Fb(e/C);return{bottom:y,itemHeight:f,items:v,itemWidth:h,offsetBottom:b*f+(b-1)*u-y,offsetTop:w,top:w}})),A),Fv(Xv(_,Gv(e=>null!==e),Kv(e=>e.length)),E),Fv(Xv(sy(x,L,A,V),Gv(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Kv(([e,t,{items:n},r])=>{const{bottom:i,top:o}=$b(e,r,t,n);return[o,i]}),Qv(Uy)),t);const j=ny(!1);Fv(Xv(c,ty(j),Kv(([e,t])=>t||0!==e)),j);const R=oy(Xv(sy(A,E),Gv(([{items:e}])=>e.length>0),ty(j),Gv(([[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}),Kv(([[,e]])=>e-1),Qv())),B=oy(Xv(cy(A),Gv(({items:e})=>e.length>0&&0===e[0].index),Yv(0),Qv())),P=oy(Xv(cy(A),ty(N),Gv(([{items:e},t])=>e.length>0&&!t),Kv(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Qv(Fy),ey(0)));Fv(P,h.scrollSeekRangeChanged),Fv(Xv(k,ty(x,L,E,V),Kv(([e,t,n,r,i])=>{const o=hw(e),{align:a,behavior:l,offset:s}=o;let c=o.index;"LAST"===c&&(c=r-1),c=qb(0,c,Wb(r-1,c));let d=eE(t,i,n,c);return"end"===a?d=Qb(d-t.height+n.height):"center"===a&&(d=Qb(d-t.height/2+n.height/2)),void 0!==s&&0!==s&&(d+=s),{behavior:l,top:d}})),s);const F=ry(Xv(A,Kv(e=>e.offsetBottom+e.bottom)),0);return Fv(Xv(w,Kv(e=>({height:e.visibleHeight,width:e.visibleWidth}))),x),{customScrollParent:m,data:_,deviation:S,footerHeight:i,gap:V,headerHeight:o,increaseViewportBy:e,initialItemCount:M,itemDimensions:L,overscan:n,restoreStateFrom:z,scrollBy:a,scrollContainerState:l,scrollHeight:H,scrollTo:s,scrollToIndex:k,scrollTop:c,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:g,viewportDimensions:x,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w,...h,gridState:A,horizontalDirection:Z,initialTopMostItemIndex:T,totalListHeight:F,...f,endReached:R,propsReady:C,rangeChanged:P,startReached:B,stateChanged:O,stateRestoreInProgress:N,...b}},Zv(Hw,Ey,Ew,Uw,uw,qw,my));function Jb(e,t,n){return qb(1,Ub((e+n)/(Ub(t)+n)))}function $b(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const o=eE(e,t,n,r[0].index);return{bottom:eE(e,t,n,r[r.length-1].index)+i,top:o}}function eE(e,t,n,r){const i=Jb(e.width,n.width,t.column),o=Ub(r/i),a=o*n.height+qb(0,o-1)*t.row;return a>0?a+t.row:a}const tE=ay(()=>{const e=ny(e=>`Item ${e}`),t=ny({}),n=ny(null),r=ny("virtuoso-grid-item"),i=ny("virtuoso-grid-list"),o=ny(ub),a=ny("div"),l=ny(Tv),s=(e,n=null)=>ry(Xv(t,Kv(t=>t[e]),Qv()),n),c=ny(!1),d=ny(!1);return Fv(cy(d),c),{components:t,computeItemKey:o,context:n,FooterComponent:s("Footer"),HeaderComponent:s("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:s("Item","div"),itemContent:e,listClassName:i,ListComponent:s("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:s("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),nE=ay(([e,t])=>({...e,...t}),Zv(Xb,tE)),rE=i.memo(function(){const t=dE("gridState"),n=dE("listClassName"),r=dE("itemClassName"),o=dE("itemContent"),a=dE("computeItemKey"),l=dE("isSeeking"),s=uE("scrollHeight"),c=dE("ItemComponent"),d=dE("ListComponent"),u=dE("ScrollSeekPlaceholder"),f=dE("context"),h=uE("itemDimensions"),p=uE("gap"),m=dE("log"),g=dE("stateRestoreInProgress"),v=uE("reportReadyState"),y=gy(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(null!==n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}p({column:pE("column-gap",getComputedStyle(e).columnGap,m),row:pE("row-gap",getComputedStyle(e).rowGap,m)})},[s,h,p,m]),!0,!1);return sb(()=>{t.itemHeight>0&&t.itemWidth>0&&v(!0)},[t]),g?null:e(d,{className:n,ref:y,...Mb(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,{...Mb(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):C(c,{...Mb(c,f),className:r,"data-index":n.index,key:i},o(n.index,n.data,f))})})}),iE=i.memo(function(){const t=dE("HeaderComponent"),n=uE("headerHeight"),r=dE("headerFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,!1),a=dE("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),oE=i.memo(function(){const t=dE("FooterComponent"),n=uE("footerHeight"),r=dE("headerFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,!1),a=dE("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),aE=({children:t})=>{const n=i.useContext(ib),r=uE("itemDimensions"),o=uE("viewportDimensions"),a=gy(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:bb(!1),children:t})},lE=({children:t})=>{const n=i.useContext(ib),r=uE("windowViewportRect"),o=uE("itemDimensions"),a=dE("customScrollParent"),l=by(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:bb(!1),children:t})},sE=i.memo(function({...t}){const r=dE("useWindowScroll"),i=dE("customScrollParent"),o=i||r?hE:fE,a=i||r?lE:aE,l=dE("context");return e(o,{...t,...Mb(o,l),children:n(a,{children:[e(iE,{}),e(rE,{}),e(oE,{})]})})}),{useEmitter:cE,useEmitterValue:dE,usePublisher:uE}=nb(nE,{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"}},sE),fE=kb({useEmitter:cE,useEmitterValue:dE,usePublisher:uE}),hE=Hb({useEmitter:cE,useEmitterValue:dE,usePublisher:uE});function pE(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,hy),"normal"===t?0:parseInt(t??"0",10)}const CE=({optionsList:r=[],onSelectVariable:i,dropdownPosition:o,position:a="relative",width:l,height:s="160px",zIndex:c=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:s,zIndex:c}:{width:l,height:s,zIndex:c},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(jb,{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(Sv,{option:a})},`${a.id}-${o}`):null},style:{height:s,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},mE=({data:r=[],width:i,height:o,lineChartWidth:a,yAxisLabel:s,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:p,textSize:C,fontWeight:m,numberSize:g,chartName:v,shouldCenterSinglePoint:y,xAxisLabelGap:w=16,isLeftOverflow:b=!1})=>{const E=40,M=i-80,A=o-80,[x,L]=c(!1),[k,H]=c({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{L(!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:C,fontWeight:"semi-bold",children:s})}),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:C,fontWeight:m},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 S(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 _=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),V="date",O=_?"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=>S(e[O]))),5),T=e=>{if("memory"===v){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>S(e[O]))));return A-e*A/(t>1024?t:1024)}return A-e*A/(0===N?1024:N)},I=e=>{if(1===e?.length){const t=e?.[0],n=z(t[V]),r=T(S(t[O]));return`M 0 ${T(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[V]),o=T(S(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?T(S(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:C,fontWeight:"semi-bold",children:s})}),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 L(!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:T(S(r[O]))})}),L(!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:C,fontWeight:m},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:I(r.data),fill:"none",stroke:r.color,strokeWidth:a,opacity:(o=r.data,o.every(e=>0===S(e[O]))?.5:1)}),k.dotPositions[i]&&n(t,{children:[e("line",{x1:k.dotPositions[i].x,y1:0,x2:k.dotPositions[i].x,y2:A,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:k.dotPositions[i].x,cy:k.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:k.dotPositions[i].y,x2:M,y2:k.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:T(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:T(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:r.toFixed(0)},`y-${n}`)})})()]})}),x&&k.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",style:{left:b&&k.tooltip.left/2>i/1.75?k.tooltip.left-180:k.tooltip.left,top:k.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:k.currentXValue}),Object.entries(k.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))]})]})]})},gE=({onClose:t,top:r="100px",left:i="0px",className:o,description:a="Download and Install the fireflink client to run the script",onClick:s=()=>{},optionZIndex:c=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:c},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:()=>{s("mac_icon"===t?"mac":t)},children:e(P,{name:t,height:36,width:36})},t))})]})]})},vE=({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})]})}),yE=({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))}),wE=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],placeholder:s="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:p="",dropdownWidth:C="100%",dropdownHeight:m="160px",isHash:g=!1,isOnlyHash:v=!1,dataFiles:y=[],showAddVariableIcon:w=!0,helperText:E="",error:M,autoComplete:A="off",required:x=!1,zIndex:L=9999,truncateTextValue:k=34,formProps:H={},getSelectedVariable:S=()=>{},symbol:_="$",type:V="text",clearIcon:O=!0,inputTitle:N="",onBlur:T,helperTextWidth:I,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...Z},j)=>{const[R,B]=c(!1),[U,q]=c(!1),[W,Q]=c(!1),[Y,X]=c(null),[J,$]=c(0),[ee,te]=c(!1),[ne,re]=c([]),ie=a(null),oe=a(null),[ae,le]=c("auto"),se=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(j,()=>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 ce=()=>{ie.current&&$(ie.current.selectionStart||0)},de=ce,ue=ce;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),S(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(_,t-1),l=e.indexOf(_,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:[e(K,{title:N,style:{width:"100%"},children:e(rn,{...Z,name:"add_variable",ref:ie,type:V,className:z("ff-variable-input-container",{"ff-variable-input-container--show-icon":se}),value:p,onChange:d,onPaste:()=>{te(!0)},variant:"primary",label:t,placeholder:s,onClick:de,onKeyUp:ue,onFocus:()=>Q(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||Q(!1)})(e),T?.(e)},autoComplete:A,helperText:E,error:M,required:x,helperTextWidth:I,...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)",cursor:"pointer",children:"Create Variable"})}),!G(p)&&!v&&e("div",{className:z("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":se}),children:O&&e(K,{title:"Cancel",style:{zIndex:99999},children:e(P,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),se&&e("div",{className:"ff-info-icon-container",children:e(K,{title:se&&!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(CE,{position:"absolute",zIndex:L,truncateTextValue:k,width:ae,height:G(pe())?"auto":m,optionsList:pe(),onSelectVariable:fe}),R&&g&&W&&e(yE,{position:"relative",zIndex:L,truncateTextValue:k,width:ae,filteredOptions:ne,onSelectVariable:fe})]})}),bE=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:o,onValueChange:a,variableName:s,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:p,handleSubmit:C,mode:m="create",disabled:g,dataFiles:v=[],truncateTextValue:y=34,isEnterKeySubmit:w=!1})=>{const[b,E]=c(!1),[M,A]=c(""),[x,L]=c(),[k,H]=c(!1),[S,_]=c(!1),[V,O]=c({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===m&&O({name:s,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(s);E(!!e),A(e)},[s]),l(()=>{if("edit"!==m)return;const{name:e,value:t,isChecked:n}=V;_(s!==e||d!==t||h!==n)},[m,s,d,h,V]);const T=()=>{!k&&N(s)&&(H(!0),C())};l(()=>{if(!w)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!N(s)||k||"edit"===m&&!S||T()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[w,s,d,h,k,m,S,f]);return e(X,{zIndex:1350,onClose:i,isOpen:t,title:"create"===m?"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"===m?"Create":"Update",type:"submit",onClick:T,disabled:!N(s)||k||"edit"===m&&!S})]}),{}),children:n("div",{className:"ff-create-variable-slider",children:[e("div",{className:"ff-create-variable-slider-input",children:e(rn,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:s||"",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(lr,{label:"Variable Type",required:!0,onChange:e=>{u(e),H(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===m}),e(wE,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:y,dataFiles:v,dropdownWidth:"100%",setHashInputValue:L,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})})]})]})})},EE=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:o="row",noDataContent:a,height:l="100%",withFixedHeader:s=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,p]=c(-1),C=(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:"--"},m=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:C(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":s}),children:[e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":s}),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:m(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:m(i.data)})]},`column-accordion-${o}`)),i.length<=0&&e("div",{className:"no-data-content",style:{height:`calc(${l} - 50px)`},children:a})]})},ME=({progressPercentage:t,totalMemory:r,usedMemory:i,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:l=10,label:s,labelFontSize:c=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 C=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 m=0,g=s;if(void 0!==r&&void 0!==i){const e=C(i),t=C(r);t>0?(m=e/t*100,g=s||i):(m=0,g="0MB")}else m=t||0;const v=Math.max(0,Math.min(m,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:c,color:d,children:e(K,{title:oe(g,10,"count")?g:"",children:ie(g,10,"count")})})})]})},AE=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:o=!1,type:l="button",className:s="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:p="auto",buttonHeight:C="auto",selectedFile:m={},handleCloseIcon:g,isMandatory:v=!1})=>{const y=a(null),[w,b]=c(0);u(()=>{y.current&&b(y.current.getBoundingClientRect().width-10)},[p]);const E=m?.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:C,isChooseFile:h,size:n,disabled:o,className:s,iconName:f,style:d,iconPosition:"right",selectedFile:m,handleCloseIcon:g,isMandatory:v})})})},xE=({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)"})})})]})},LE=({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))}),kE=({onModalClose:t,MediaSrc:r,fileName:o,onDeleteClick:a,mediaType:s,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:p,isMediaIcon:C=!1,previewOnly:m=!1,iconName:g="video_preview",isDisabled:v=!1})=>{const[y,w]=c(!1),b=i.useRef(null),E=()=>{w(!0),h&&h(d)},M=()=>{t?.(),w(!1)},A=()=>{p&&p(d)};return l(()=>{m&&w(!0)},[m]),n("div",{children:[!m&&(C?e(P,{name:g,hoverEffect:!0,onClick:E,disabled:v}):e(kv,{mediaSrc:r,mediaType:s,onDownloadClick:A,onDeleteClick:()=>a?.(r),onExpandClick:E,fileName:o,fileId:d,thumbnailMediaSrc:u,isDelete:f})),y&&e(th,{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"===s&&e("img",{src:r,alt:"fileName",height:"auto"}),"video"===s&&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)})}}})]})})]})},HE=({children:t,orientation:r="",navBarIcons:o=[],mobileHeight:a=448,mobileWidth:l=220,UtilityBar:s,tooltip:c={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?a:l,p=f?l:a,C=s&&"top"===u,m=s&&"bottom"===u,g=s&&"left"===u;return n("div",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",g?"ff-side-nav-left":"",C?"navbar-top":"",m?"navbar-bottom":""].filter(Boolean).join(" "),children:[C&&e("div",{className:"ff-nav-bar top-nav-bar",children:o.map(({title:t,name:n,className:r,...i},a)=>{const l=c?.[n]??a;return e(K,{title:c?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${a===o.length-1?"last-icon":""} ${C?"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"}})})})}),s&&m&&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)})}),s&&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)})})]})},SE=o(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:o=16,placeholder:l="Enter text",iconName:s="right_arrow_filled_icon",iconPosition:c="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:p="send",submitPrompt:C,onPromptChange:m,onBlur:g,onFocus:v,disableInput:y,isAdditionalIcon:w=!1,additionalIconName:b,additionIconToolTip:E,onAdditionalIconClick:M},A)=>{const x=a(null);ce([{key:"Enter",action:()=>L()}],x);const L=e=>{f&&C?.(f.trim())};return n("div",{className:z("ff-prompt-container",{"icon-left":"left"===c,"icon-right":"left"!==c}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:x,children:[e(K,{placement:"top",title:p,children:e(P,{name:s,className:"ff-prompt-icon",height:i,width:o,onClick:C,color:h,disabled:G(f)})}),e("input",{ref:A,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:m,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})})]})}),_E=({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})})}),VE=({iconName:r,iconPosition:{top:i,left:o,bottom:a,right:l},hoverIconPosition:{top:s,left:d,bottom:u,right:f},modalPosition:{top:h,left:p,bottom:C,right:m},modalWidth:g,modalHeight:v,headerContent:y="Header Content",footerContent:w="Footer Content",iconWidth:b,iconHeight:E,modalHeading:M="Ask Fia",children:x,onClearChat:L})=>{const[k,H]=c(!1),[S,_]=c(!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:()=>{_(e=>!e),setTimeout(()=>H(e=>!e),10)},height:E,width:b}),e("div",{style:{top:void 0!==s?`${s}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})})]}),S&&A(e("div",{className:z("ff-dynamic-modal",{open:k}),style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==p?`${p}px`:void 0,bottom:void 0!==C?`${C}px`:void 0,right:void 0!==m?`${m}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:L})})}),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(()=>_(!1),300))})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:x}),w&&e("div",{className:"ff-dynamic-modal-footer",children:w})]})}),document.body)]})},OE=o(({iconName:r,hoverTitle:i,iconPosition:{top:o,left:s,bottom:d,right:u},hoverIconPosition:{top:f,left:h,bottom:p,right:C},modalPosition:{top:m,left:g,bottom:v,right:y},modalWidth:w,modalHeight:E,headerContent:M="Header Content",footerContent:x="Footer Content",iconWidth:L,iconHeight:k,children:H,onVisibilityChange:S},_)=>{const[V,O]=c(!1),[N,T]=c(!1),I=a(null),D=()=>{I.current&&clearTimeout(I.current),O(!1),I.current=setTimeout(()=>{T(!1),S?.(!1)},300)};return b(_,()=>({closeModal:D})),l(()=>()=>{I.current&&clearTimeout(I.current)},[]),n(t,{children:[n("div",{style:{top:void 0!==o?`${o}px`:void 0,left:void 0!==s?`${s}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:()=>{I.current&&clearTimeout(I.current),T(e=>!e),S?.(!N),I.current=setTimeout(()=>O(e=>!e),10)},height:k,width:L}),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!==C?`${C}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!==m?`${m}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)]})}),zE=({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})]})]})]}),NE=({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"})]})})})]}),TE=o(({name:t,height:n=30,width:r=30,path:i="",onClick:o,color:s="var(--brand-color)",hoverEffect:c=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:p,y:C,tabIndex:m=-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!==C&&y.current.setAttribute("y",String(C)))},[p,C]);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:m,...g};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:""})})}),IE=({id:r=0,serialNumber:i,activeId:o,setActiveId:s,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:p,onPreviousClick:C,disabled:m,isEditAccess:g,versionsLength:v,count:y,hiddenActions:w=[]})=>{const[b,E]=c(!1),[M,A]=c(!1),x=a(null),L=Array.isArray(w)?w:w?[w]:[],k=(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:()=>{s(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=>!L.includes(e.action)).map((t,n)=>{const r=g&&"delete"===t?.action||"regenerate"===t?.action&&(v??0)>=3||m;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=>k(e,C),cursorType:"pointer"}),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=>k(e,p),cursorType:"pointer"})]})]})]})},DE=o(({type:t="text",variant:r="primary",name:i="",label:o,disabled:a=!1,disableLinkIcon:l=!1,required:s=!1,placeholder:c="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:p="",onChange:C,onBlur:m,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:L,isViewMode:k=!1,...H},S)=>{const _=!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":_,"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:[s&&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:S,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:c,disabled:k||a,onChange:C,onFocus:g,onBlur:m,autoComplete:v,autoFocus:y,min:w,max:b,onClick:x,onKeyUp:L,...H}),e("div",{className:"input-link-icon",children:l||u||!_?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})]})}),ZE=({labelsList:r=[],height:i=""})=>{const o=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",style:i?{height:i}:void 0})}),r.length>1&&e(K,{title:e(F,{as:"div",children:o}),children:e(F,{as:"div",children:"+"+(r.length-1),className:"ff-chip-count",fontWeight:"medium"})})]})})};class jE 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 RE=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:o="To Add Group",disableButton:a=!1,stepCount:l=1,iconWidth:s=120,iconHeight:c=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:s,height:c})}),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(eh,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:a}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:o})]})]}),BE=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:o,noBorder:a=!1,noPadding:l=!1,titleSize:s="12px"})=>{const[d,u]=c(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:s,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})]})},PE=o(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:o=!1,variant:a="default",backgroundColor:l=!1,border:s=!1},c)=>{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 ${s?`ff-status-indicator--with-border ff-status-indicator--${a}-border`:""}\n `,ref:c,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})]})})}),FE=({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))})]})},UE=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:o=30})=>{const[s,d]=c(Array(6).fill("")),[u,f]=c(o),[h,p]=c(!0),C=a(Array(6).fill(null));l(()=>{h||C.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 m=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);C.current[r]?.focus()};return e(th,{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:s.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===s.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...s];r[t]=n,d(r),t<5&&C.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...s];n[t]="",d(n),t>0&&C.current[t-1]?.focus()}})(e,n),onPaste:m,ref:e=>C.current[n]=e,readOnly:!0},n))}),e(U,{variant:"primary",label:"Submit",onClick:()=>i(s.join("")),disabled:s.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)`:""]})]})})},qE=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:o,mediaType:s,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:C=!0,showDownload:m=!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,isFullscreen:L=!1})=>{const k=a(null),H=a(null),[S,_]=c(0),[V,O]=c(0),[z,N]=c(!1),[T,I]=c(0);l(()=>{"video"===s&&k.current&&!M&&(i?k.current.play():k.current.pause())},[i,s,M]);const D=p(()=>{if(k.current&&!z){const e=k.current.currentTime/k.current.duration*100;I(e||0),_(k.current.currentTime)}},[z]),Z=p(()=>{k.current&&O(k.current.duration)},[]),j=p(()=>{_(0),I(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,I(e),_(t)}},[]),U=p(e=>{if(z||!H.current)return;const t=H.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(!H.current)return;N(!0);const t=H.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||!H.current||!k.current)return;const t=H.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(zs,{isOpen:t,onClose:r,isMaximized:!1,showHeader:C,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"===s?e("video",{ref:k,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:Z,onEnded:j}):e("img",{src:d,alt:"Preview",className:"ff-media-image"})),n("div",{className:"ff-top-right-icons",children:[m&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f})}),g&&e(K,{title:L?"Minimize":"Maximize",children:e(P,{name:L?"collapse_icon":"expand_icon",color:"white",onClick:h})})]}),"video"===s&&w&&!M&&n("div",{className:"ff-media-controls",children:[e("button",{onClick:o,className:"ff-play-pause-btn",children:e(K,{title:i?"Pause":"Play",children:e(P,{width:35,height:35,name:i?"pause_button":"play_button",color:"white"})})}),n("div",{className:"ff-progress-bar",children:[e("span",{className:"ff-current-time",children:R(S)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:T,onChange:e=>B(parseFloat(e.target.value)),onClick:U,onMouseDown:q,ref:H}),e("span",{className:"ff-total-time",children:R(V)})]}),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:L?"Minimize":"Maximize",children:e(P,{name:L?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer"})})]})]})]})}):null},WE=({header:r,secondaryHeader:i,primaryCount:o,secondaryCount:a,primaryItems:l,secondaryItems:s,width:c,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:p,actions:C,tabsData:m,notchPosition:g="top-left"})=>{const v=i&&"secondary"===d?s: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,className:L=""}=C?.download||{},{tooltip:k="Delete",iconName:H="delete_icon",disabled:S=!1,onClick:_,className:V=""}=C?.delete||{},O=()=>n("div",{className:"ff-dropdown-header-icons",children:[C?.download&&e(K,{title:E,children:e(P,{name:M||"",className:`ff-dropdown-icon ff-download-icon ${L}`,onClick:x,width:18,height:20,disabled:A,hoverEffect:!0})}),C?.delete&&e(K,{title:k,children:e(P,{name:H||"",className:`ff-dropdown-icon ff-delete-icon ${V}`,onClick:_,width:25,height:25,disabled:S,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:c?{minWidth:c}:{},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&&m&&u?n(t,{children:[e(qs,{tabsData:m,activeTabId:u,onTabClick:e=>{p&&p(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),b&&O()]}):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})]}),O()]}):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))})]})},QE=(e,t)=>"string"==typeof e?ie(e,t):i.isValidElement(e)?i.cloneElement(e,{},QE(e.props.children,t)):Array.isArray(e)?e.map(e=>QE(e,t)):e,GE=(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:"--"},KE=(t,n=[],r,i,o)=>{let a=n;const l=void 0!==i?!i:r;return G(n)&&(isNaN(t)||(a=Array(t).fill(!0))),e("div",{className:"tree-table-fn-space-container",children:a?.map((n,r)=>e("span",{className:`tree-table-fn-space-block tree-table-fn-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${o?"folder":""}`},r))})},YE=i.memo(({treeRowRef:r,col:i,colIndex:o,columnMeta:a,node:l,selected:s,select:c,onCheckBoxChange:d,onToggleExpand:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,isExpanding:C,columnTextColor:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M})=>{const A={color:`${m||"var(--ff-primary-text-color)"}`,width:a?.width??i?.width,position:a?.sticky?"sticky":void 0,left:a?.sticky?a.left:void 0,zIndex:a?.sticky?a.zIndex:void 0};return n("div",{className:`ff-table-tree-fn-td ${i.isTree&&l.container?"folder":""} ${a?.sticky?"sticky-tree-column":""}`,"data-col-index":o,style:A,children:[i.isTree&&KE(l.hierarchy,l.parentSiblings,l.lastChild,l.nextSibling,l.container),n("div",{className:"tree-fn-title-container",children:[i.isTree&&e("span",{className:`tree-table-fn-space-block last-tree-fn-block last-tree-fn-block tree-table-fn-space-block-${l.hierarchy} ${l?.expanded?"tree-fn-row-expanded":"tree-fn-row-collapsed"} ${l.container&&l.expandable?"":"no-tree-folder"}`,children:l.container&&l.expandable&&n("span",{onClick:()=>u(l),children:[" ",e(C?js:N,{})]})}),n("span",{className:"tree-table-fn-td-content "+(i.isTree&&l.container?"folder":""),children:[!l?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===c&&!(g&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:"none"===l.selectedStatus?e(K,{title:l?.currentEnvId&&l?.envId&&l?.currentEnvId!==l?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(te,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable,isDefaultHover:"none"===l.selectedStatus&&!!l.machine})}):e(te,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})}),i.isTree&&"radio"===c&&!(g&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:e(Ra,{name:l.key,checked:s.includes(l.key),value:l.key,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})})]}),l.isNewNode&&i.isTree?e(Zs,{onCancel:h,onConfirm:f,value:l.value,label:l?.label,optionsList:l.options,selectedOption:l.selectedOption,withDropdown:"inputWithDropdown"===l.type,handleCustomError:p,inputFieldWidth:y,selectFieldWidth:w,confirmIconTooltip:l.confirmIconTooltip,cancelIconTooltip:l.cancelIconTooltip,isEditable:E,setIsEditable:M,isOnBlurTrue:!1,isDisable:{confirm:b},isTableTree:!0}):e("span",{className:"tree-table-fn-td-content-text",children:QE(GE(l,i),v)})]})]}),i.actions&&!l?.isNewNode&&e("div",{className:"table-tree-fn-row-action",children:i.actions(l,r)})]})});YE.displayName="TableCell";const XE=i.memo(({node:t,columnsData:n,columnMeta:r,selected:i,select:o,onRowClick:l,onToggleExpand:s,onCheckBoxChange:c,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,index:p,selectedNode:C,hideOnDisable:m,scriptLengthTruncate:g,addModuleInputWidth:v,addModuleSelectWidth:y,disableEditLabelConfirmIcon:w,isEditable:b,setIsEditable:E,style:M})=>{const A=a(null);return e("div",{"data-level":t.hierarchy,ref:A,className:"ff-table-tree-fn-row show-tree "+(C&&C===t.key?"fn-selected-node":""),onClick:e=>l(e,t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||l(e,t)},role:"button",tabIndex:0,id:0===p?"table-fn-first-row":t.key,style:M,children:n.map((n,a)=>e(YE,{treeRowRef:A,col:n,colIndex:a,node:t,selected:i,select:o,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,hideOnDisable:m,scriptLengthTruncate:g,addModuleInputWidth:v,addModuleSelectWidth:y,disableEditLabelConfirmIcon:w,isEditable:b,setIsEditable:E,columnMeta:r?.[a]},n.name))})});XE.displayName="TableRow";const JE=({flattenedTreeData:t,columnsData:n,columnMeta:r,rowHeight:i=32,startIndex:o=0,totalHeight:a=0,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,expanding:C,selectedNode:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M})=>e("div",{className:"ff-table-tree-fn-body",style:{height:`${a}px`,position:"relative"},children:t?.map((t,a)=>e(XE,{node:t,columnsData:n,columnMeta:r,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,isExpanding:t.key===C,index:o+a,selectedNode:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M,style:{transform:`translateY(${(o+a)*i}px)`,height:`${i}px`,position:"absolute",top:0,left:0,right:0}},t.key))}),$E=i.memo(({columnsData:t,columnMeta:r,totalWidth:i,rootNode:o,selected:s,onCheckBoxChange:d,selectedNode:u,tableHeaderBgColor:f,hideOnDisable:h,transparentHeader:p,scriptLengthTruncate:C=25,showHeader:m=!0})=>{const g=a(null),[v,y]=c(!1),[w,b]=c(!1);l(()=>{y(!0)},[]);const E=(e,t)=>{const n=r?.[e];return{width:n?.width??t,position:n?.sticky?"sticky":void 0,left:n?.sticky?n.left:void 0,zIndex:n?.sticky?n.zIndex:void 0}};return n("div",{className:"ff-table-tree-fn-head",children:[m&&e("div",{className:"ff-table-tree-fn-row no-hover",style:{minWidth:i},children:t.map(({name:t,width:n},i)=>e("div",{className:"ff-table-tree-fn-th "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:{...E(i,n),backgroundColor:p?"transparent":f,pointerEvents:p?"none":"auto"},children:t},t))}),o&&e("div",{className:"ff-table-tree-fn-row show-tree "+(u&&u===o?.node?.key?"hover":""),ref:g,onMouseEnter:e=>{e.stopPropagation(),b(!0)},onMouseLeave:e=>{e.stopPropagation(),b(!1)},children:t.map((t,i)=>e("div",{className:"ff-table-tree-fn-td "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:E(i,t.width),children:n("span",{className:"tree-table-fn-default-content",children:[0===i&&"checkbox"===o.select&&!(h&&o.node.isDisabled)&&e(te,{checked:"partially"!==o?.node?.selectedStatus&&("completely"===o?.node?.selectedStatus||!1),partial:"partially"===o.node.selectedStatus,onChange:e=>d(e,o.node),disabled:o.node.isDisabled}),0===i&&"radio"===o.select&&!(h&&o.node.isDisabled)&&e(Ra,{name:o.node.key,checked:s.includes(o.node.key),value:o.node.key,onChange:e=>d(e,o.node),disabled:o.node.isDisabled}),n("span",{className:"tree-table-fn-td-content-text",children:["name"===t.accessor?e("span",{children:o.node[t.accessor]}):e("span",{children:QE(GE(o.node,t),C)}),o.cell&&0===i&&e("span",{className:"table-tree--fn-root-cell",children:o.cell(o.node)})]}),w&&o.actions&&0===i&&v&&g.current&&e("div",{className:"table-tree-fn-row-action",children:o.actions(o.node,g)})]})},i))})]})});$E.displayName="TableHead";const eM=32,tM="__root__",nM=(e,t)=>{if(!e?.length)return[];const n=new Map,r=new Map,i=new Map,o=new Map;t&&t.key&&n.set(t.key,t),e.forEach(e=>{n.set(e.key,e);const t=e.parentId??tM;r.has(t)||(r.set(t,[]),o.set(t,{container:0,resource:0})),r.get(t)?.push(e);const i=o.get(t);i&&(e.container?i.container++:i.resource++)}),r.forEach(e=>{e.forEach((e,t)=>{i.set(e.key,t)})});const a=e=>{const t=e.parentId??tM,a=r.get(t);if(!a||0===a.length)return!1;if((i.get(e.key)??0)<a.length-1)return!0;const l=n.get(t),s=o.get(t);if(l&&s){const t=a.filter(e=>e.container).reduce((e,t)=>e+(t.totalResourceCount??0),0),n=a.filter(e=>!e.container).length,r=Math.max(0,(l.totalResourceCount??0)-(t+n));if(e.container){return s.container<(l.subContainerCount??0)||r>0}return s.resource<r}return!1},l=e=>{if(void 0!==e.selectedStatus)return e.selectedStatus;let r=e;for(;r?.parentId;){const e=n.get(r.parentId);if(!e)break;if("completely"===e.selectedStatus)return"completely";if("none"===e.selectedStatus)return"none";r=e}return"completely"===t?.selectedStatus?"completely":"none"===t?.selectedStatus?"none":e.selectedStatus};return e.map(e=>{const t=e,r=t.parentSiblings&&t.parentSiblings.length>0?t.parentSiblings:(e=>{const t=e.hierarchy??0;if(t<=0)return[];const r=[];let i=e;for(;i&&(r.unshift(i),i.parentId);){const e=n.get(i.parentId);if(!e)break;i=e}const o=r.map(e=>a(e));return o.length===t?o:o.length>t?o.slice(o.length-t):new Array(t-o.length).fill(!1).concat(o)})(e);return{...e,lastChild:!a(e),parentSiblings:r,selectedStatus:l(e)}})},rM=o(({treeData:t,columnsData:r,selected:i=[],select:o=null,onChange:s=()=>{},onClick:d=()=>{},onExpand:f=()=>{},loadMore:C=()=>{},tableBorder:m,height:g="calc(100vh - 134px)",newNode:v,onAddConfirm:y=()=>{},onAddCancel:w=()=>{},handleEditFieldError:b,loading:E=!1,rootNode:M,pagination:A=!0,selectedNode:x,tableHeaderBgColor:L="var(--border-color)",hideOnDisable:k=!1,freezeColumns:H,scriptLengthTruncate:S=25,addModuleInputWidth:_=150,addModuleSelectWidth:V,onScroll:O,onScrollEnd:z,disableEditLabelConfirmIcon:N=!1,transparentHeader:T=!1,navigateTreeNode:I=null,handleRemoveNavigateTreeNode:D=()=>{},scrollThreshold:Z=128,showHeader:j=!0},R)=>{const[B,P]=c(null),[F,U]=c(null),[q,W]=c({start:0,end:20}),[Q,K]=c(!1),Y=a(null),X=a(null),J=a(0),$=a(E),ee=a(null),te=a(null),ne=a({lastScrollTop:0}),re=a(null),ie=a(0),oe=a(null),ae=a(null),le=a(null),se=a({key:null,attempts:0}),ce=a(null),de=(e,t)=>{const n=String(e??t);return n.endsWith("%")?{value:parseFloat(n),unit:"%"}:{value:parseFloat(n)||0,unit:"px"}},ue=h(()=>{let e=0,t=0;return r.map((n,r)=>{const{value:i,unit:o}=de(n.width,400),a=!!H&&r<H,l="%"===o?`${i}%`:`${i}px`,s=`calc(${e}px + ${t}%)`;return a&&("%"===o?t+=i:e+=i),{width:l,sticky:a,left:s,zIndex:a?100+(H??0)-r:1}})},[r,H]),fe=h(()=>{let e=0,t=0;return r.forEach(n=>{const{value:r,unit:i}=de(n.width,400);"%"===i?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[r]),he=h(()=>{if(!H)return"0px";let e=0,t=0;return ue.slice(0,H).forEach(n=>{const r=parseFloat(n.width)||0;n.width.endsWith("%")?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[ue,H]),pe=h(()=>((e,t,n)=>{if(!t?.sourceId||!t.action)return e;const{sourceId:r,action:i,value:o="",error:a="",label:l,type:s,options:c,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t,p=t?.parentId,C=t?.hierarchy,m=c?.map(e=>({label:e,value:e})),g=d?{label:d,value:d}:void 0,v=new Map;e.forEach(e=>v.set(e.key,e)),n&&v.set(n.key,n);const y=v.get(r);let w;h&&(w=v.get(h));let b=y??("addInside"===i?w:void 0);!b&&"addInside"===i&&p&&(b=v.get(p));const E="addInside"===i&&!b&&e.length>=0;if(!b&&!E)return e;const M=[...e],A=b?e.findIndex(e=>e.key===b.key):-1;let x=null,L=0,k=A+1;switch(i){case"addAbove":{const t=b;if(!t)return e;x=t.parentId,L=t.hierarchy;break}case"addBelow":{const t=b;if(!t)return e;x=w?.parentId??t.parentId,L=w?.hierarchy??t.hierarchy;break}case"addInside":{if(E){x=p??h??r??null,L=C??1,k=M.length;break}const t=w??b;if(!t)return e;x=t.key,L=(t.hierarchy??0)+1;const n=M.findIndex(e=>e.key===r);-1!==n&&(k=n+1);break}}const H={hierarchy:L,parentId:x,sourceId:b?.key??r??h??"new-node",isNewNode:!0,key:"new-node",value:o,error:a,label:l,type:s,options:m,selectedOption:g,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":M.splice(A,0,H);break;case"addBelow":M.splice(A+1,0,H);break;case"addInside":M.splice(Math.max(0,k),0,H)}return M})(t,v,M?.node),[t,v,M]),Ce=h(()=>nM(pe,M?.node),[pe,M?.node]),me=h(()=>Ce.filter(e=>!e.hide),[Ce]),ge=h(()=>{const e=new Map;return Ce.forEach(t=>e.set(t.key,t)),e},[Ce]),ve=h(()=>{const e=new Map;return me.forEach((t,n)=>e.set(t.key,n)),e},[me]),ye=p(e=>{P(t=>t?e&&t!==e?t:null:t),e&&ae.current?.key!==e||(ae.current=null),le.current&&(clearTimeout(le.current),le.current=null)},[]);l(()=>{$.current=E},[E]),l(()=>{ee.current=F},[F]);const we=p(e=>{ee.current=e,U(e)},[]),be=p(()=>{const e=Y.current;if(!e)return;const t=J.current||0,n=Math.max(0,e.scrollTop-t),r=e.clientHeight-t;let i=Math.floor(n/eM)-6,o=Math.ceil((n+r)/eM)+6;i=Math.max(0,i),o=Math.min(me.length,o),W(e=>e.start===i&&e.end===o?e:{start:i,end:o})},[me.length]),Ee=p(()=>{null===te.current&&(te.current=requestAnimationFrame(()=>{te.current=null,be()}))},[be]);u(()=>{const e=Y.current;if(!e)return;const t=me.length*eM,n=Math.max(0,t-(e.clientHeight-J.current));ne.current.lastScrollTop>n&&me.length>0&&(v||I?(e.scrollTop=0,ne.current.lastScrollTop=0):B?(e.scrollTop=n,ne.current.lastScrollTop=n):ne.current.lastScrollTop-n>e.clientHeight&&(e.scrollTop=0,ne.current.lastScrollTop=0)),be()},[me.length,be,v,I,B]);const Me=p(()=>{const e=Y.current;if(!e)return;const n=e.scrollTop,r=n>ne.current.lastScrollTop?"down":"up";if(ne.current.lastScrollTop=n,Ee(),O?.(),oe.current?.(),!A||E||ee.current||G(t))return;const i=e.scrollHeight-(n+e.clientHeight)<Z,o=n<Z+J.current;"down"===r&&i&&!t[t.length-1]?.lastResource&&(we("below"),C("below")),"up"===r&&o&&!t[0]?.lastResource&&(we("above"),re.current=t[0]?.key??null,C("above"))},[t,A,E,F,Z,Ee,O,C,we]);l(()=>{if(E||!A||G(t))return;const e=t[0],n=!e?.lastResource,{totalSubContainerCount:r=0,totalResourceCount:i=0}=M?.node||{},o=r+i,a=me.length<10&&me.length<o;n&&a&&(re.current=e?.key??null,we("above"),C("above"))},[E,A,t,me.length,M,C,we]),u(()=>{if(E||"above"!==F)E||"below"!==F||we(null);else{const e=Y.current,t=re.current;if(e&&t){const n=ve.get(t);void 0!==n&&n>0&&(e.scrollTop+=n*eM)}re.current=null,we(null)}},[E,F,ve,we]),l(()=>{const e=Y.current;if(!e)return;const n=n=>{n.deltaY>=0||!A||G(t)||$.current||ee.current||e.scrollTop>1||t[0]?.lastResource||(re.current=t[0]?.key??null,we("above"),C("above"))};return e.addEventListener("wheel",n,{passive:!0}),()=>{e.removeEventListener("wheel",n)}},[A,t,C,we]),l(()=>{const e=Y.current;if(e)return oe.current=z?La(()=>{z?.()},150):null,e.addEventListener("scroll",Me,{passive:!0}),()=>{e.removeEventListener("scroll",Me),oe.current?.cancel()}},[Me,z]),l(()=>{const e=Y.current;if(!e)return;const t=e=>{Date.now()<ie.current&&e.stopImmediatePropagation()};return e.addEventListener("scroll",t,{passive:!0,capture:!0}),()=>{e.removeEventListener("scroll",t,!0)}},[]),l(()=>{const e=X.current;if(!e)return;const t=new ResizeObserver(()=>{J.current=e.getBoundingClientRect().height,be()});return t.observe(e),()=>t.disconnect()},[be]),u(()=>{if(!v||!Y.current)return;const e=Y.current,t=ve.get("new-node");if(void 0===t)return;const n=J.current||0,r=e.clientHeight-n;if(r<=0)return;const i=t*eM,o=i+eM,a=Math.max(0,e.scrollTop-n);let l=a;i<a?l=i:o>a+r&&(l=Math.max(0,o-r)),l!==a&&(ie.current=Date.now()+300,e.scrollTop=l+n,be());const s=requestAnimationFrame(()=>{K(!0)});return()=>cancelAnimationFrame(s)},[v,ve,be]),l(()=>{v||K(!1)},[v]),u(()=>{if(!B||E)return;const e=ae.current;if(!e||e.key!==B){const e=requestAnimationFrame(()=>{ye(B)});return()=>cancelAnimationFrame(e)}const t=ge.get(e.key);if(!t){const t=requestAnimationFrame(()=>{ye(e.key)});return()=>cancelAnimationFrame(t)}if(Boolean(t.expanded)!==e.expanded)return;const n=requestAnimationFrame(()=>{ye(e.key)});return()=>cancelAnimationFrame(n)},[ge,B,E,ye]),l(()=>{se.current.key!==I&&(se.current={key:I,attempts:0}),!I&&ce.current&&(clearTimeout(ce.current),ce.current=null)},[I]),u(()=>{if(!I||v)return;const e=Y.current;if(!e)return;const n=ve.get(I);if(void 0!==n){se.current={key:I,attempts:0};const t=J.current||0,r=Math.max(eM,e.clientHeight-t),i=n*eM+16,o=Math.max(0,i-r/2)+t;return ie.current=Date.now()+400,e.scrollTo({top:o,behavior:"smooth"}),Ee(),ce.current&&clearTimeout(ce.current),void(ce.current=setTimeout(()=>{D?.()},350))}if(E||F)return;const r=se.current;if(r.key!==I&&(r.key=I,r.attempts=0),r.attempts+=1,!(r.attempts>30))return A&&!0!==t[0]?.lastResource?(re.current=null,we("above"),void C("above")):void(r.attempts>2&&D?.());D?.()},[I,v,ve,E,F,A,t,C,Ee,D,we]);const Ae=p(e=>{if(B)return;const t=!e?.expanded;P(e.key),ae.current={key:e.key,expanded:t},le.current&&clearTimeout(le.current);const n=Date.now(),r=()=>{if(ae.current?.key!==e.key)return;const t=$.current,i=Date.now()-n>=2e3;!t||i?ye(e.key):le.current=setTimeout(r,1e3)};le.current=setTimeout(r,1e3),f?.(e)},[B,f,ye]),xe=p((e,t)=>{B||s?.(e,t)},[s,B]),Le=p((e,t)=>{B||d?.(e,t)},[d,B]);l(()=>()=>{null!==te.current&&(cancelAnimationFrame(te.current),te.current=null),le.current&&clearTimeout(le.current),ce.current&&clearTimeout(ce.current)},[]);const ke=me.length*eM,He=me.slice(q.start,q.end);return e("div",{className:"tree-table-wrapper-container table-tree-fn",children:e("div",{className:"tree-table-fn-wrap",ref:R,children:e("div",{className:"table-fn-scrollable "+(me.length?"":"table-fn-empty"),ref:Y,style:{"--table-height":me.length?g:"auto","--frozen-column-width":he,border:m},children:n("div",{className:"tree-table-fn",style:{width:fe},children:[e("div",{ref:X,style:{position:"sticky",top:0,zIndex:98},children:e($E,{columnsData:r,columnMeta:ue,totalWidth:fe,rootNode:M,onCheckBoxChange:xe,selected:i,selectedNode:x,tableHeaderBgColor:L,hideOnDisable:k,transparentHeader:T,scriptLengthTruncate:S,showHeader:j})}),e(JE,{flattenedTreeData:He,columnsData:r,columnMeta:ue,totalWidth:fe,rowHeight:eM,startIndex:q.start,totalHeight:ke,selected:i,select:o,onRowClick:Le,onToggleExpand:Ae,onCheckBoxChange:xe,onAddConfirm:y,onAddCancel:w,handleEditFieldError:b,expanding:B,selectedNode:x,hideOnDisable:k,scriptLengthTruncate:S,addModuleInputWidth:_,addModuleSelectWidth:V,disableEditLabelConfirmIcon:N,isEditable:v?Q:void 0,setIsEditable:v?e=>{K(Boolean(e))}:void 0})]})})})})});function iM(e,t,n,r,i,o="children"){return function e(a){for(let l=0;l<a.length;l++){const s=a[l];if(s&&s[t]===n){const e=[...a];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(s&&s[o]&&Array.isArray(s[o])){const t=e(s[o]);if(t)return{updatedArray:a.map((e,n)=>n===l?{...e,[o]:t.updatedArray}:e)}}}return null}(e)}rM.displayName="TableTreeFn";const oM=(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)=>oM(e,o[t]));{const n=new Set(o);return i.every(r=>n.has(r)&&oM(e[r],t[r]))}},aM=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return oM(e,r)}));function lM(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function sM(e,t){return e&t}function cM(e,t){return e|t}function dM(e,t){return e^t}function uM(e,t){return e&~t}function fM(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function hM(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var pM,CM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function mM(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=CM.charAt(n>>6)+CM.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=CM.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=CM.charAt(n>>2)+CM.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function gM(e){var t,n="",r=0,i=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t){var o=CM.indexOf(e.charAt(t));o<0||(0==r?(n+=lM(o>>2),i=3&o,r=1):1==r?(n+=lM(i<<2|o>>4),i=15&o,r=2):2==r?(n+=lM(i),n+=lM(o>>2),i=3&o,r=3):(n+=lM(i<<2|o>>4),n+=lM(15&o),r=0))}return 1==r&&(n+=lM(i<<2)),n}var vM,yM=function(e){var t;if(void 0===pM){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(pM={},t=0;t<16;++t)pM[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)pM[n.charAt(t)]=t;for(t=0;t<8;++t)pM[r.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var l=e.charAt(t);if("="==l)break;if(-1!=(l=pM[l])){if(void 0===l)throw new Error("Illegal character at offset "+t);o|=l,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i},wM={decode:function(e){var t;if(void 0===vM){var n="= \f\n\r\t \u2028\u2029";for(vM=Object.create(null),t=0;t<64;++t)vM["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(vM["-"]=62,vM._=63,t=0;t<9;++t)vM[n.charAt(t)]=-1}var r=[],i=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=vM[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);i|=a,++o>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=wM.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return wM.decode(e)}},bM=1e13,EM=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*e+t)<bM?t=0:r-=(t=0|r/bM)*bM,i[n]=r;t>0&&(i[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,i=r.length;for(t=0;t<i;++t)(n=r[t]-e)<0?(n+=bM,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(bM+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*bM+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),MM=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,AM=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function xM(e,t){return e.length>t&&(e=e.substring(0,t)+"…"),e}var LM,kM=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,i="",o=e;o<t;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),i=(n?MM:AM).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=r>127,o=i?255:0,a="";r==o&&++e<t;)r=this.get(e);if(0===(n=t-e))return i?-1:0;if(n>4){for(a=r,n<<=3;!(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var l=new EM(r),s=e+1;s<t;++s)l.mulAdd(256,this.get(s));return a+l.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",o="",a=e+1;a<t;++a){for(var l=this.get(a),s=a==t-1?r:0,c=7;c>=s;--c)o+=l>>c&1?"1":"0";if(o.length>n)return i+xM(o,n)}return i+o},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return xM(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return r>n&&(i+="…"),i},e.prototype.parseOID=function(e,t,n){for(var r="",i=new EM,o=0,a=e;a<t;++a){var l=this.get(a);if(i.mulAdd(128,127&l),o+=7,!(128&l)){if(""===r)if((i=i.simplify())instanceof EM)i.sub(80),r="2."+i.toString();else{var s=i<80?i<40?0:1:2;r=s+"."+(i-40*s)}else r+="."+i.toString();if(r.length>n)return xM(r,n);i=new EM,o=0}}return o>0&&(r+=".incomplete"),r},e}(),HM=function(){function e(e,t,n,r,i){if(!(r instanceof SM))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return xM(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return xM(this.stream.parseStringISO(t,t+n),e);case 30:return xM(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substring(t,t+n)},e.decode=function(t){var n;n=t instanceof kM?t:new kM(t,0);var r=new kM(n),i=new SM(n),o=e.decodeLength(n),a=n.pos,l=a-r.pos,s=null,c=function(){var t=[];if(null!==o){for(var r=a+o;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(n);if(i.tag.isEOC())break;t[t.length]=i}o=a-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)s=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var d=0;d<s.length;++d)if(s[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){s=null}if(null===s){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new e(r,l,o,i,s)},e}(),SM=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new EM;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),_M=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],VM=(1<<26)/_M[_M.length-1],OM=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,o="",a=this.t,l=this.DB-a*this.DB%t;if(a-- >0)for(l<this.DB&&(n=this[a]>>l)>0&&(i=!0,o=lM(n));a>=0;)l<t?(n=(this[a]&(1<<l)-1)<<t-l,n|=this[--a]>>(l+=this.DB-t)):(n=this[a]>>(l-=t)&r,l<=0&&(l+=this.DB,--a)),n>0&&(i=!0),i&&(o+=lM(n));return i?o:"0"},e.prototype.negate=function(){var t=DM();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qM(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=DM();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new NM(t):new TM(t),this.exp(e,n)},e.prototype.clone=function(){var e=DM();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=DM();return this.bitwiseTo(e,sM,t),t},e.prototype.or=function(e){var t=DM();return this.bitwiseTo(e,cM,t),t},e.prototype.xor=function(e){var t=DM();return this.bitwiseTo(e,dM,t),t},e.prototype.andNot=function(e){var t=DM();return this.bitwiseTo(e,uM,t),t},e.prototype.not=function(){for(var e=DM(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=DM();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=DM();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+fM(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=hM(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,cM)},e.prototype.clearBit=function(e){return this.changeBit(e,uM)},e.prototype.flipBit=function(e){return this.changeBit(e,dM)},e.prototype.add=function(e){var t=DM();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=DM();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=DM();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=DM();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=DM();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=DM(),n=DM();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),o=UM(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new NM(t):t.isEven()?new IM(t):new TM(t);var a=[],l=3,s=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var d=DM();for(r.sqrTo(a[1],d);l<=c;)a[l]=DM(),r.mulTo(d,a[l-2],a[l]),l+=2}var u,f,h=e.t-1,p=!0,C=DM();for(i=qM(e[h])-1;h>=0;){for(i>=s?u=e[h]>>i-s&c:(u=(e[h]&(1<<i+1)-1)<<s-i,h>0&&(u|=e[h-1]>>this.DB+i-s)),l=n;!(1&u);)u>>=1,--l;if((i-=l)<0&&(i+=this.DB,--h),p)a[u].copyTo(o),p=!1;else{for(;l>1;)r.sqrTo(o,C),r.sqrTo(C,o),l-=2;l>0?r.sqrTo(o,C):(f=o,o=C,C=f),r.mulTo(C,a[u],o)}for(;h>=0&&!(e[h]&1<<i);)r.sqrTo(o,C),f=o,o=C,C=f,--i<0&&(i=this.DB-1,--h)}return r.revert(o)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),i=this.clone(),o=UM(1),a=UM(0),l=UM(0),s=UM(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(l.isEven()&&s.isEven()||(l.addTo(this,l),s.subTo(t,s)),l.rShiftTo(1,l)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(l,o),a.subTo(s,a)):(i.subTo(r,i),n&&l.subTo(o,l),s.subTo(a,s))}return 0!=i.compareTo(e.ONE)?e.ZERO:s.compareTo(t)>=0?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},e.prototype.pow=function(e){return this.exp(e,new zM)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=_M[_M.length-1]){for(t=0;t<_M.length;++t)if(n[0]==_M[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<_M.length;){for(var r=_M[t],i=t+1;i<_M.length&&r<VM;)r*=_M[i++];for(r=n.modInt(r);t<i;)if(r%_M[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var l=8==r?255&+t[i]:FM(t,i);l<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=l:a+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),a=this.s<<n&this.DM,l=this.t-1;l>=0;--l)t[l+o+1]=this[l]>>r|a,a=(this[l]&i)<<n;for(l=o-1;l>=0;--l)t[l]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),i=t.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=DM());var a=DM(),l=this.s,s=t.s,c=this.DB-qM(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var d=a.t,u=a[d-1];if(0!=u){var f=u*(1<<this.F1)+(d>1?a[d-2]>>this.F2:0),h=this.FV/f,p=(1<<this.F1)/f,C=1<<this.F2,m=r.t,g=m-d,v=null==n?DM():n;for(a.dlShiftTo(g,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),e.ONE.dlShiftTo(d,v),v.subTo(a,a);a.t<d;)a[a.t++]=0;for(;--g>=0;){var y=r[--m]==u?this.DM:Math.floor(r[m]*h+(r[m-1]+C)*p);if((r[m]+=a.am(0,y,r,g,0,d))<y)for(a.dlShiftTo(g,v),r.subTo(v,r);r[m]<--y;)r.subTo(v,r)}null!=n&&(r.drShiftTo(d,n),l!=s&&e.ZERO.subTo(n,n)),r.t=d,r.clamp(),c>0&&r.rShiftTo(c,r),l<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=DM(),i=DM(),o=n.convert(this),a=qM(t)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(t&1<<a)>0)n.mulTo(i,o,r);else{var l=r;r=i,i=l}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=UM(n),i=DM(),o=DM(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(e).substring(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,l=0,s=0;s<t.length;++s){var c=FM(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(o=!0):(l=n*l+c,++a>=r&&(this.dMultiply(i),this.dAddOffset(l,0),a=0,l=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(l,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),cM,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],o=7&t;i.length=1+(t>>3),n.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(t=t+1>>1)>_M.length&&(t=_M.length);for(var o=DM(),a=0;a<t;++a){o.fromInt(_M[Math.floor(Math.random()*_M.length)]);var l=o.modPow(i,this);if(0!=l.compareTo(e.ONE)&&0!=l.compareTo(n)){for(var s=1;s++<r&&0!=l.compareTo(n);)if(0==(l=l.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=l.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=DM();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)t(n);else{o<a&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var l=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(l,0):(a>0&&r.lShiftTo(a,r),setTimeout(function(){t(r)},0))};setTimeout(l,10)}},e.prototype.fromNumberAsync=function(t,n,r,i){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),cM,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(e.ONE.shiftLeft(t-1),o),o.isProbablePrime(n)?setTimeout(function(){i()},0):setTimeout(a,0)};setTimeout(a,0)}else{var l=[],s=7&t;l.length=1+(t>>3),n.nextBytes(l),s>0?l[0]&=(1<<s)-1:l[0]=0,this.fromString(l,256)}},e}(),zM=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),NM=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),TM=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=DM();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(OM.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=DM();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),IM=function(){function e(e){this.m=e,this.r2=DM(),this.q3=DM(),OM.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=DM();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function DM(){return new OM(null)}function ZM(e,t){return new OM(e,t)}var jM="undefined"!=typeof navigator;jM&&"Microsoft Internet Explorer"==navigator.appName?(OM.prototype.am=function(e,t,n,r,i,o){for(var a=32767&t,l=t>>15;--o>=0;){var s=32767&this[e],c=this[e++]>>15,d=l*s+c*a;i=((s=a*s+((32767&d)<<15)+n[r]+(1073741823&i))>>>30)+(d>>>15)+l*c+(i>>>30),n[r++]=1073741823&s}return i},LM=30):jM&&"Netscape"!=navigator.appName?(OM.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},LM=26):(OM.prototype.am=function(e,t,n,r,i,o){for(var a=16383&t,l=t>>14;--o>=0;){var s=16383&this[e],c=this[e++]>>14,d=l*s+c*a;i=((s=a*s+((16383&d)<<14)+n[r]+i)>>28)+(d>>14)+l*c,n[r++]=268435455&s}return i},LM=28),OM.prototype.DB=LM,OM.prototype.DM=(1<<LM)-1,OM.prototype.DV=1<<LM;OM.prototype.FV=Math.pow(2,52),OM.prototype.F1=52-LM,OM.prototype.F2=2*LM-52;var RM,BM,PM=[];for(RM="0".charCodeAt(0),BM=0;BM<=9;++BM)PM[RM++]=BM;for(RM="a".charCodeAt(0),BM=10;BM<36;++BM)PM[RM++]=BM;for(RM="A".charCodeAt(0),BM=10;BM<36;++BM)PM[RM++]=BM;function FM(e,t){var n=PM[e.charCodeAt(t)];return null==n?-1:n}function UM(e){var t=DM();return t.fromInt(e),t}function qM(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}OM.ZERO=UM(0),OM.ONE=UM(1);var WM=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var QM,GM,KM=null;if(null==KM){KM=[],GM=0;var YM=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var XM=new Uint32Array(256);for(self.crypto.getRandomValues(XM),YM=0;YM<XM.length;++YM)KM[GM++]=255&XM[YM]}var JM=0,$M=function(e){if((JM=JM||0)>=256||GM>=256)self.removeEventListener?self.removeEventListener("mousemove",$M,!1):self.detachEvent&&self.detachEvent("onmousemove",$M);else try{var t=e.x+e.y;KM[GM++]=255&t,JM+=1}catch(e){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",$M,!1):self.attachEvent&&self.attachEvent("onmousemove",$M))}function eA(){if(null==QM){for(QM=new WM;GM<256;){var e=Math.floor(65536*Math.random());KM[GM++]=255&e}for(QM.init(KM),GM=0;GM<KM.length;++GM)KM[GM]=0;GM=0}return QM.next()}var tA=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=eA()},e}();function nA(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}(function(e,t){var n,r,i,o,a,l,s,c,d,u,f,h,p=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),C=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,d=0;d<e.length;d+=16){for(n=p[0],r=p[1],i=p[2],o=p[3],a=p[4],l=p[5],s=p[6],c=p[7],u=0;u<64;u++)C[u]=u<16?e[u+d]:hA(hA(hA(uA(C[u-2]),C[u-7]),dA(C[u-15])),C[u-16]),f=hA(hA(hA(hA(c,cA(a)),aA(a,l,s)),fA[u]),C[u]),h=hA(sA(n),lA(n,r,i)),c=s,s=l,l=a,a=hA(o,f),o=i,i=r,r=n,n=hA(f,h);p[0]=hA(n,p[0]),p[1]=hA(r,p[1]),p[2]=hA(i,p[2]),p[3]=hA(o,p[3]),p[4]=hA(a,p[4]),p[5]=hA(l,p[5]),p[6]=hA(s,p[6]),p[7]=hA(c,p[7])}return p}(function(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e),8*e.length))}function rA(e){for(var t="0123456789abcdef",n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);n+=t.charAt(i>>>4&15)+t.charAt(15&i)}return n}function iA(e,t){return e>>>t|e<<32-t}function oA(e,t){return e>>>t}function aA(e,t,n){return e&t^~e&n}function lA(e,t,n){return e&t^e&n^t&n}function sA(e){return iA(e,2)^iA(e,13)^iA(e,22)}function cA(e){return iA(e,6)^iA(e,11)^iA(e,25)}function dA(e){return iA(e,7)^iA(e,18)^oA(e,3)}function uA(e){return iA(e,17)^iA(e,19)^oA(e,10)}var fA=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function hA(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function pA(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new tA,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new OM(n)}function CA(e,t,n){for(var r="",i=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function mA(e,t){var n=nA;if(e.length+64+2>t)throw"Message too long for RSA";var r,i="";for(r=0;r<t-e.length-64-2;r+=1)i+="\0";var o=n("")+i+""+e,a=new Array(32);(new tA).nextBytes(a);var l=CA(a,o.length,n),s=[];for(r=0;r<o.length;r+=1)s[r]=o.charCodeAt(r)^l.charCodeAt(r);var c=CA(s,a.length,n),d=[0];for(r=0;r<a.length;r+=1)d[r+1]=a[r]^c.charCodeAt(r);return new OM(d.concat(s))}var gA=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e,t){void 0===t&&(t=pA);var n=this.n.bitLength()+7>>3,r=t(e,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var o=i.toString(16),a=o.length,l=0;l<2*n-a;l++)o="0"+o;return o},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16),this.d=ZM(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,i,o,a,l){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16),this.d=ZM(n,16),this.p=ZM(r,16),this.q=ZM(i,16),this.dmp1=ZM(o,16),this.dmq1=ZM(a,16),this.coeff=ZM(l,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new tA,r=e>>1;this.e=parseInt(t,16);for(var i=new OM(t,16);;){for(;this.p=new OM(e-r,1,n),0!=this.p.subtract(OM.ONE).gcd(i).compareTo(OM.ONE)||!this.p.isProbablePrime(10););for(;this.q=new OM(r,1,n),0!=this.q.subtract(OM.ONE).gcd(i).compareTo(OM.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(OM.ONE),l=this.q.subtract(OM.ONE),s=a.multiply(l);if(0==s.gcd(i).compareTo(OM.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=ZM(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new tA,i=e>>1;this.e=parseInt(t,16);var o=new OM(t,16),a=this,l=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(OM.ONE),r=a.q.subtract(OM.ONE),i=t.multiply(r);0==i.gcd(o).compareTo(OM.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(l,0)},s=function(){a.q=DM(),a.q.fromNumberAsync(i,1,r,function(){a.q.subtract(OM.ONE).gcda(o,function(e){0==e.compareTo(OM.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(s,0)})})},c=function(){a.p=DM(),a.p.fromNumberAsync(e-i,1,r,function(){a.p.subtract(OM.ONE).gcda(o,function(e){0==e.compareTo(OM.ONE)&&a.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(l,0)},e.prototype.sign=function(e,t,n){var r=(vA[n]||"")+t(e).toString(),i=this.n.bitLength()/4,o=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return ZM("0001"+r+"00"+e,16)}(r,i);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;for(var l=a.toString(16),s=l.length,c=0;c<i-s;c++)l="0"+l;return l},e.prototype.verify=function(e,t,n){var r=ZM(t,16),i=this.doPublic(r);return null==i?null:function(e){for(var t in vA)if(vA.hasOwnProperty(t)){var n=vA[t],r=n.length;if(e.substring(0,r)==n)return e.substring(r)}return e}(i.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var vA={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function yA(e,t,n){if(!t||!e)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}
28
+ */function Ig(){return zg||(zg=1,e=Tg,"production"!==process.env.NODE_ENV&&function(){function t(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;r>0;){var o=r-1>>>1,a=e[o];if(!(i(a,t)>0))return;e[o]=t,e[r]=a,r=o}}(e,t,n)}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(i(s,t)<0)c<o&&i(d,s)<0?(e[r]=d,e[c]=t,r=c):(e[r]=s,e[l]=t,r=l);else{if(!(c<o&&i(d,t)<0))return;e[r]=d,e[c]=t,r=c}}}(e,n,0)),t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error),"object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,p=!1,C=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))return;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function w(e){if(C=!1,y(e),!p)if(null!==n(s))p=!0,O(b);else{var t=n(c);null!==t&&z(w,t.startTime-e)}}function b(t,i){p=!1,C&&(C=!1,N()),h=!0;var o=f;try{return function(t,i){var o=i;for(y(o),u=n(s);null!==u&&(!(u.expirationTime>o)||t&&!k());){var a=u.callback;if("function"==typeof a){u.callback=null,f=u.priorityLevel;var l=a(u.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),y(o)}else r(s);u=n(s)}if(null!==u)return!0;var d=n(c);return null!==d&&z(w,d.startTime-o),!1}(t,i)}finally{u=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E=!1,M=null,A=-1,x=5,L=-1;function k(){return!(e.unstable_now()-L<x)}var H,S=function(){if(null!==M){var t=e.unstable_now();L=t;var n=!0;try{n=M(!0,t)}finally{n?H():(E=!1,M=null)}}else E=!1};if("function"==typeof v)H=function(){v(S)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,V=_.port2;_.port1.onmessage=S,H=function(){V.postMessage(null)}}else H=function(){m(S,0)};function O(e){M=e,E||(E=!0,H())}function z(t,n){A=m(function(){t(e.unstable_now())},n)}function N(){g(A),A=-1}var T=function(){};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(){p||h||(p=!0,O(b))},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=e>0?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){var t;switch(f){case 1:case 2:case 3:t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=T,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a,l,u=e.unstable_now();if("object"==typeof o&&null!==o){var f=o.delay;a="number"==typeof f&&f>0?u+f:u}else a=u;switch(r){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}var m=a+l,g={id:d++,callback:i,priorityLevel:r,startTime:a,expirationTime:m,sortIndex:-1};return a>u?(g.sortIndex=a,t(c,g),null===n(s)&&g===n(c)&&(C?N():C=!0,z(w,a-u))):(g.sortIndex=m,t(s,g),p||h||(p=!0,O(b))),g},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Tg;var e}var Dg=(Ng||(Ng=1,"production"===process.env.NODE_ENV?Vg.exports=(_g||(_g=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],c=l+1,d=e[c];if(0>i(s,n))c<o&&0>i(d,s)?(e[r]=d,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(c<o&&0>i(d,n)))break e;e[r]=d,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],d=1,u=null,f=3,h=!1,p=!1,C=!1,m="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(s,i)}i=n(c)}}function w(e){if(C=!1,y(e),!p)if(null!==n(s))p=!0,O(b);else{var t=n(c);null!==t&&z(w,t.startTime-e)}}function b(t,i){p=!1,C&&(C=!1,g(x),x=-1),h=!0;var o=f;try{for(y(i),u=n(s);null!==u&&(!(u.expirationTime>i)||t&&!H());){var a=u.callback;if("function"==typeof a){u.callback=null,f=u.priorityLevel;var l=a(u.expirationTime<=i);i=e.unstable_now(),"function"==typeof l?u.callback=l:u===n(s)&&r(s),y(i)}else r(s);u=n(s)}if(null!==u)var d=!0;else{var m=n(c);null!==m&&z(w,m.startTime-i),d=!1}return d}finally{u=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,M=!1,A=null,x=-1,L=5,k=-1;function H(){return!(e.unstable_now()-k<L)}function S(){if(null!==A){var t=e.unstable_now();k=t;var n=!0;try{n=A(!0,t)}finally{n?E():(M=!1,A=null)}}else M=!1}if("function"==typeof v)E=function(){v(S)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,V=_.port2;_.port1.onmessage=S,E=function(){V.postMessage(null)}}else E=function(){m(S,0)};function O(e){A=e,M||(M=!0,E())}function z(t,n){x=m(function(){t(e.unstable_now())},n)}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(){p||h||(p=!0,O(b))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,r){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return r={id:d++,callback:i,priorityLevel:r,startTime:o,expirationTime:l=o+l,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(s)&&r===n(c)&&(C?(g(x),x=-1):C=!0,z(w,o-a))):(r.sortIndex=l,t(s,r),p||h||(p=!0,O(b))),r},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(Og)),Og):Vg.exports=Ig()),Vg.exports);const Zg=Symbol(),jg=Symbol(),Rg="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?l:u,Bg=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 Pg(e,t){const n=d(e)[Zg];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,s]=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)||s(),Rg(()=>(o.add(s),()=>{o.delete(s)}),[o]),l[1]}const Fg=function(e){const t=s({[Zg]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});var n;return t[jg]=t.Provider,t.Provider=(n=t.Provider,({value:e,children:t})=>{const r=a(e),i=a(0),[o,l]=c(null);o&&(o(e),l(null));const s=a();if(!s.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()};s.current={[Zg]:{v:r,n:i,l:e,u:t}}}return Rg(()=>{r.current=e,i.current+=1,Bg(()=>{s.current[Zg].l.forEach(t=>{t({n:i.current,v:e})})})},[e]),C(n,{value:s.current},t)}),delete t.Consumer,t}([Hg,()=>{}]),Ug=({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})},qg=t=>e("tr",{...t}),Wg=t=>e("tr",{className:"ff-spreadsheet-row-header",...t});function Qg(){return Pg(Fg,([,e])=>e)}function Gg(e){return Pg(Fg,([t])=>e(t))}const Kg=({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"})})})},Yg=t=>function(n){const i=Qg(),o=r.useCallback(()=>i({type:Zp}),[i]),a=Gg(e=>e.selected instanceof bm);return e(t,{...n,selected:a,onSelect:o})},Xg=t=>function(n){const i=Qg(),o=r.useCallback((e,t)=>i(function(e,t){return{type:Dp,payload:{column:e,extend:t}}}(e,t)),[i]),a=Gg(e=>e.selected.hasEntireColumn(n.column)),l=Gg(e=>e.selectedColumn??void 0),s=Gg(e=>e.active?rm(e.active,e.model.data):void 0);return e(t,{...n,cell:s,selected:a,selectedColumn:l,onSelect:o,scrollToColumn:n.scrollToColumn})},Jg=Xg(({column:t,label:i,selected:o,onSelect:a,setContextMenu:l,deleteColumn:s,addColumnLeft:c,addColumnRight:d,columnContextEnable:u,cell:f,selectedColumn:p,minimumColumnWidth:C,maxColLimit:m,disableDeleteOption:g,contextMenu:v,onAddColumn:y,onDeleteColumn:w,setVisibleRange:b,scrollToColumn:E})=>{const M=Qg(),A=Gg(e=>e.model.data),x=C,L=Gg(e=>e.columnDimensions[t]?.width||x),k=Gg(e=>e.model.data),{columnCount:H}=Ym(k),S=e=>{b(t=>{const n={...t,end:"increment"===e?t.end+1:t.end-1};return p&&E(p),n})},_=h(()=>[{label:"Add Column Left",value:"Add Column Left",iconName:"plus_icon",action:()=>{S("increment"),c(x),y?.(p??t,!0)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Left"]??!1,disable:H>=m},{label:"Add Column Right",value:"Add Column Right",iconName:"plus_icon",action:()=>{S("increment"),d(x),y?.(p??t,!1)},disableTooltip:"Column limit reached",visible:f?.contextDisable?.["Add Column Right"]??!1,disable:H>=m},...g?[]:[{label:"Delete Column",value:"Delete Column",iconName:"delete",action:()=>{S("decrement"),s(),w?.(p??t)},disableTooltip:"",visible:f?.contextDisable?.["Delete Column"]??!1,disable:!1}]],[p,t,A]),V=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,s=e=>{const t=Math.max(x,l+(e.clientX-o));M(LC(i,t))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),M($C())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),M(JC())},[t,L]),O=r.useCallback(e=>M(QC(e)),[M]),N=r.useCallback(e=>{a(t,e.shiftKey)},[a,t]),T=r.useCallback(e=>{e.preventDefault(),a(t,e.shiftKey),l({open:u,contextType:"column",options:_})},[t,p,u,_]);return r.useEffect(()=>{void 0!==p&&"column"===v?.contextType&&l(e=>({open:e.open,contextType:"column",options:_}))},[t,p,u,_,"column"===v?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{minWidth:`${L}px`},onClick:N,onContextMenu:T,tabIndex:0,children:[e(F,{fontWeight:"medium",children:i??$g(t)}),e("div",{className:"drag-column-selector drag-column-left",onMouseDown:e=>V(e,!1),onDoubleClick:()=>M(LC(t,x)),onClick:()=>O({row:-1,column:t})}),e("div",{className:"drag-column-selector drag-column-right",onMouseDown:e=>V(e,!0),onDoubleClick:()=>M(LC(t,x)),onClick:()=>O({row:-1,column:t})})]},t)});function $g(e){let t="",n=e;for(;n>=0;)t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26)-1;return t}const ev=({row:t,label:i,selected:o,onSelect:a,setContextMenu:l,addRowTop:s,addRowBottom:c,deleteRow:d,rowContextEnable:u,selectedRow:f,cell:h,maxRowLimit:p,disableDeleteOption:C,contextMenu:m,setVisibleRange:g,scrollToRow:v})=>{const y=Qg(),w=Gg(e=>e.rowDimensions[t]?.height||32),b=Gg(e=>e.model.data),{rowCount:E}=Ym(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"),s()},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"),c()},disableTooltip:"Row limit reached",visible:h?.contextDisable?.["Add Row Bottom"]??!1,disable:E>=p},...C?[]:[{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,s=e=>{const t=Math.max(32,l+(e.clientY-o));y(xC(i,t))},c=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),y($C())};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),y($C())},[w,t]),L=r.useCallback(e=>y(QC(e)),[y]),k=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"===m?.contextType&&l(e=>({open:e.open,contextType:"row",options:A}))},[t,u,A,f,"row"===m?.contextType]),n("th",{className:z("ff-spreadsheet-header",{"ff-spreadsheet-header--selected":o}),style:{height:`${w}px`,minWidth:"60px"},onClick:k,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(xC(t,32)),onClick:()=>L({row:t,column:-1})}),e("div",{className:"drag-row-selector drag-row-up",onMouseDown:e=>x(e,!1),onDoubleClick:()=>y(xC(t,32)),onClick:()=>L({row:t,column:-1})})]})},tv=t=>function(n){const i=Qg(),o=Gg(e=>e.selected.hasEntireRow(n.row)),a=Gg(e=>e.active?rm(e.active,e.model.data):void 0),l=Gg(e=>e.selectedRow??void 0),s=r.useCallback((e,t)=>i(function(e,t){return{type:Ip,payload:{row:e,extend:t}}}(e,t)),[i]);return e(t,{...n,selected:o,cell:a,selectedRow:l,onSelect:s,scrollToRow:n.scrollToRow})},nv=({row:t,column:n,DataViewer:i,active:o,dragging:a,mode:l,data:s,evaluatedData:c,select:d,activate:u,setCellDimensions:f,setCellData:h})=>{const p=r.useRef(null),C=r.useMemo(()=>({row:t,column:n}),[t,n]),m=r.useCallback(e=>{e.preventDefault(),window.getSelection()?.removeAllRanges(),"view"===l&&(f(C,Vm(e.currentTarget)),e.shiftKey?d(C):u(C))},[l,f,C,d,u]),g=r.useCallback(e=>{a&&(f(C,Vm(e.currentTarget)),d(C))},[f,d,a,C]);return r.useEffect(()=>{const e=p.current;if(!e)return;const t=()=>{f(C,Vm(e))};t();const n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[f,C]),s&&s.DataViewer&&(i=s.DataViewer),e("td",{ref:p,style:{...s?.style,..."dropDown"===s?.inputType?.type&&{fontSize:"12px"},textDecoration:"underline"===s?.style?.textDecoration?s?.style?.textDecoration:"none"},className:z("ff-spreadsheet-cell",s?.className,{"ff-spreadsheet-active-cell":o||a}),onMouseEnter:g,onMouseDown:m,tabIndex:0,children:e(i,{row:t,column:n,cell:s,active:o,evaluatedCell:c,setCellData:h,inputValue:()=>null})})},rv=t=>function(n){const{row:i,column:o}=n,a=Qg(),l=r.useMemo(()=>({row:i,column:o}),[i,o]),s=r.useCallback(e=>a(GC(l,e)),[a,l]),c=r.useCallback(e=>a(function(e){return{type:Rp,payload:{point:e}}}(e)),[a]),d=r.useCallback(e=>a(QC(e)),[a]),u=r.useCallback((e,t)=>a(KC(e,t)),[a]),f=Gg(e=>_m(e.active,l)),h=Gg(e=>f?e.mode:"view"),p=Gg(e=>rm(l,e.model.data)),C=Gg(e=>rm(l,e.model.evaluatedData)),m=Gg(e=>e.dragging),g=Gg(e=>e.copied?.has(l)||!1);return e(t,{...n,active:f,copied:g,dragging:m,mode:h,evaluatedData:C,data:p,select:c,activate:d,setCellDimensions:u,setCellData:s})},iv=({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:ov(a)}:{className:z("ff-spreadsheet-data-viewer",{"ff-spreadsheet-data-viewer--preserve-breaks":Fm(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(cn,{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 ov(e){return e?"TRUE":"FALSE"}const av=i.forwardRef(({initialValue:t="",onChange:n,className:r="",style:o={}},s)=>{const c=a(null);i.useImperativeHandle(s,()=>c.current),l(()=>{if(c.current&&document.activeElement!==c.current){const e=String(t)?.endsWith("\n")?`${t}\n`:t;e!==c.current.innerText&&(c.current.innerText=e)}},[t]);return e("div",{style:o,children:e("div",{ref:c,className:`editable-cell ${r}`,contentEditable:!0,suppressContentEditableWarning:!0,onKeyDown:e=>{if("Enter"===e.key){if(e.altKey||e.shiftKey)return e.preventDefault(),void document.execCommand("insertLineBreak");c.current?.blur()}"Delete"!==e.key&&"Backspace"!==e.key||e.stopPropagation()},onInput:()=>{if(c.current){let e=c.current.innerText;e.endsWith("\n")&&(e=e.slice(0,-1)),n?.(e)}},onPaste:e=>{e.preventDefault();const t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)},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:"24px",verticalAlign:"middle",caretColor:"black",height:"inherit",maxHeight:"inherit",display:"block",position:"relative",paddingBottom:"2px"}})})}),lv=({onChange:t,cell:n})=>{const i=r.useRef(null),o=r.useCallback(e=>{const{contextDisable:r,...i}=n;t({...i,value:e,inputType:i.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(av,{ref:i,initialValue:n?.value??"",onChange:o,className:"ff-spreadsheet-cell-textarea",style:{...n?.style,borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})})},sv=t=>{const i=r.useRef(null),o=r.useRef(null),a=Qg(),l=r.useCallback((e,t)=>a(GC(e,t)),[a]),s=r.useCallback(e=>a(QC(e)),[a]),c=r.useCallback(()=>a({type:Qp}),[a]),d=r.useCallback(e=>a({type:yC,payload:{autofill:e}}),[a]),u=r.useCallback(e=>a(function(e){return{type:eC,payload:{changes:e}}}(e)),[a]),f=r.useCallback(()=>{a({type:Gp})},[a]),h=Gg(e=>e.rowDimensions),p=Gg(e=>e.active),C=Gg(e=>e.mode),m=Gg(e=>e.active?rm(e.active,e.model.data):void 0),g=Gg(e=>e.selected),v=Gg(e=>g&&jm(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),y=Gg(e=>{let t=p?Dm(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,L]=r.useState({value:"",name:""}),[k,H]=r.useState(!1),[S,_]=r.useState(),[V,O]=r.useState([]);r.useEffect(()=>{m&&p&&t.getActiveCell({value:m.value,active:p});const n=i.current;if(!w&&n){if(n.focus({preventScroll:!0}),"file"===m?.inputType?.type&&m?.value)try{const e=JSON.parse(m.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"===m?.inputType?.type){L({value:m?.value,name:m?.value}),H(e=>!e);const t=m?.inputType?.options?.map(t=>({disable:t.disable,label:e("span",{style:{color:t.color},children:t.label}),value:t.value}));_(t)}}},[i,w,p?.row,p?.column]),r.useEffect(()=>{"dropDown"===m?.inputType?.type&&m?.value!==x.value&&L({value:m?.value,name:m?.value})},[m?.value,m?.inputType?.type,x.value]),r.useEffect(()=>{const e=E.current,t=M.current;if(E.current=p,M.current=m,!e||!t)return;const n=p?.row!==e.row||p?.column!==e.column;if(n||"edit"!==C){const e=b.current;t!==e?u([{prevCell:e||null,nextCell:t}]):n||m===t||u([{prevCell:t,nextCell:m||null}]),b.current=m}});const N=m&&m.DataEditor||t.DataEditor,T=m&&m.readOnly,I=r.useCallback(e=>{if(!p)return;const t=e.currentTarget.closest(".ff-excel-spreadsheet");if(!t)return void e.preventDefault();e.stopPropagation();const n=document.body.style.userSelect,r=document.body.style.overflow;document.body.style.userSelect="none",document.body.style.overflow="hidden";let i=null;const o=()=>{i&&(cancelAnimationFrame(i),i=null)},a=e=>{const n=t.getBoundingClientRect();let r=0,a=0;e.clientY<n.top+50?a=-12:e.clientY>n.bottom-50&&(a=12),e.clientX<n.left+50?r=-12:e.clientX>n.right-50&&(r=12),0!==r||0!==a?(e=>{o();const n=()=>{const{x:r,y:o}=e;0!==r&&(t.scrollLeft+=r),0!==o&&(t.scrollTop+=o),i=requestAnimationFrame(n)};i=requestAnimationFrame(n)})({x:r,y:a}):o()},l=()=>{o(),document.body.style.userSelect=n,document.body.style.overflow=r,document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",l),d(!0)},[s,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]),Z=v?.height!==y?.height||v?.width!==y?.width,j=r.useCallback(e=>{p&&Z&&(KC(p,Vm(e.currentTarget)),s(p))},[p,Z]),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,P=["file","dropDown"].includes(m?.inputType?.type||"");return n("div",{ref:i,className:z("ff-spreadsheet-active-cell",`ff-spreadsheet-active-cell--${C}`,{"ff-spreadsheet-active-cell--hidden":w,"ff-spreadsheet-active-cell--dragging":Z&&"text"!==m?.inputType?.type}),onMouseDown:j,style:{...y,backgroundColor:m?.style?.backgroundColor,...P?{display:"flex",alignItems:m?.style?.alignContent,justifyContent:m?.style?.textAlign}:{},..."edit"===C&&p?{minWidth:Math.min(y?.width,t.maxWidth),minHeight:Math.min(y?.height,t.maxHeight),height:"auto",maxWidth:`${R}px`,maxHeight:`${B}px`,overflow:"auto",..."dropDown"===m?.inputType?.type?{}:{padding:"2px 4px 0px 4px",width:"max-content"}}:{}},onContextMenu:D,onClick:"view"!==C||T?void 0:c,tabIndex:0,children:[e("div",{className:P?"":"active-cell-main",children:"dropDown"===m?.inputType?.type?e(lr,{...m?.inputType?.inputProps,dropDownRef:o,showOptions:{open:!("edit"!==C||!p),toggle:k},selectedOption:x,optionsList:S||[],height:26,showLabel:!1,disabled:!t.editable,showBorder:!1,optionZIndex:5e3,onChange:e=>{L({value:e.value,name:e.label}),A({...m,value:e.value,style:m?.style,inputType:m?.inputType})}}):"file"===m?.inputType?.type?e(Lp,{...m?.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&&m?.value&&t.attachmentAction?.viewAttachment)try{const e=JSON.parse(m.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"===m?.inputType?.type){let n=[];try{m?.value&&(n=JSON.parse(m.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 Za.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,s=l>0?25*l:1,c=[...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?(c.push(i),e++):"existing"===n&&i?.name?c.push(i):"memory_full"===n?o++:r++}else r++}),e>0||c.length>n.length){const e=c.length>0?JSON.stringify(c):"";A({...m,value:e,style:m?.style,inputType:m?.inputType}),a(xC(p?.row||0,Math.max(s,h?.[p.row]?.height||s))),O(c.map(e=>new File([new Blob],e.name?.split("*")[0]??"default")))}o>0&&Za.info("No memory available to add the file"),e>0&&Za.success(`${e} file${e>1?"s":""} uploaded successfully`),r>0&&Za.info(`${r} unsupported ${r>1?"files":"file"}. Please check the file formats.`)}catch(e){console.error("Upload operation failed:",e),Za.error("Operation failed")}}else if("DELETE"===r&&"file"===m?.inputType?.type)try{let e=[...m&&JSON.parse(m.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),Za.error("Error deleting file")}else console.error(`Cannot delete ${i.name}: Invalid fileId or no match`,{index:n,fileId:o,hasDeleteAttachment:!!t.attachmentAction?.deleteAttachment}),Za.error("Failed to delete file: Invalid file data")}if(r>0){const t=e.length>0?JSON.stringify(e):"";A({...m,value:t,style:m?.style,inputType:m?.inputType}),O(e?.map(e=>new File([new Blob],e.name.split("*")[0]))),Za.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({...m,value:e,style:m?.style,inputType:m?.inputType}),O(t.map(e=>new File([new Blob],e.name.split("*")[0]))),Za.error("Failed to delete file(s). Invalid file data detected.")}else Za.error("Failed to delete file(s). No valid files removed.")}}catch(e){console.error("Delete operation failed:",e),Za.error("Delete operation failed")}}catch(e){console.error("handleFilesChange error:",e),Za.error("Operation failed")}},disabled:!t.editable,maxFiles:5,buttonLabel:"+ Attachments",buttonVariant:"tertiary",deleteButton:t.editable,selectedFileMessage:"Duplicate attachments not allowed within the same row",addAttachmentButton:t.editable,isInfoIconRequired:!1,truncateMaxLimit:(y?.width??0)-60}):"edit"===C&&p&&t.editable?e(N,{row:p.row,column:p.column,cell:m,onChange:A,exitEditMode:f}):e(av,{initialValue:m?.value,onChange:()=>{},className:"ff-spreadsheet-cell-textarea",style:{...m?.style,textDecoration:"underline"===m?.style?.textDecoration?"underline":"none",backgroundColor:Z?"#1e161f00":m?.style?.backgroundColor,pointerEvents:"none",borderTop:"",borderBottom:"",borderLeft:"",borderRight:""}})}),!["file"].includes(m?.inputType?.type??"")&&("edit"===C||p&&e("div",{onMouseDown:I,className:"select_dot"}))]},`${p?.row}-${p?.column}`)},cv=({dimensions:t,dragging:n,hidden:r,variant:i})=>{const o=Gg(e=>e.active),a=Gg(e=>e.autoFill),l=Gg(e=>o?Dm(o,e.rowDimensions,e.columnDimensions):void 0),{width:s,height:c,top:d,left:u}=t||{};let f=l?.height??0,h=l?.width??0,p=s,C=c;return a.open&&s&&c&&l&&(s-h>c-f?(p=s,C=l.height):(C=c,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:(C??0)+1,top:d,left:u}})},dv=({scrollPos:t={top:0,left:0}})=>{const n=Gg(e=>e.selected),i=Gg(e=>e.dragging),o=Gg(e=>e.selected.size(e.model.data)<2),a=Gg(e=>n&&jm(e.rowDimensions,e.columnDimensions,e.model.data,e.selected)),l=r.useMemo(()=>{if(a)return{...a,top:a.top-1,left:a.left-1,height:a.height-1,width:a.width-1}},[a,t]);return e(cv,{variant:"selected",dimensions:l,dragging:i,hidden:o||!a})},uv=({scrollPos:t={top:0,left:0}})=>{const n=Gg(e=>e.copied),i=null===n,o=Gg(e=>n&&Zm(e.rowDimensions,e.columnDimensions,n)),a=r.useMemo(()=>{if(o)return{...o,top:o.top-1,left:o.left-1,height:o.height-1,width:o.width-1}},[o,t]);return e(cv,{variant:"copied",dimensions:a,hidden:i||!o,dragging:!1})},fv=i.forwardRef(({getColorValue:t,disabled:n,initialColor:r},o)=>{const l=a(null);i.useImperativeHandle(o,()=>l.current);const[s,d]=c(r);return e("div",{className:z("ff-excel-color-selector",{"color-selector-disabled":n}),style:{backgroundColor:s},onClick:()=>{l.current&&!n&&l.current.click()},children:e("input",{type:"color",disabled:n,className:z("ff-excel-color-selector-picker",{"color-selector-disabled":n}),ref:l,onChange:e=>{d(e.target.value),t(e.target.value.replace("#",""))}})})});fv.displayName="ColorBarSelector";const hv=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"}},pv=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"}},Cv=e=>Gm.reduce((t,n)=>Math.abs(n-parseFloat(e))<Math.abs(t-parseFloat(e))?n:t);function mv(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:Um(Cv(String(e.size))),fontFamily:(a=e.name,Qm.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:hv(e.alignment.horizontal),alignContent:hv(e.alignment.vertical)};var a}const gv=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"},vv=e=>({name:e.fontFamily||"Arial",size:qm(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:gv(e.borderTop?e.borderTop.toString():void 0),right:gv(e.borderRight?e.borderRight.toString():void 0),bottom:gv(e.borderBottom?e.borderBottom.toString():void 0),left:gv(e.borderLeft?e.borderLeft.toString():void 0)},alignment:{horizontal:pv(e.textAlign),vertical:pv(e.alignContent),wrapText:!1}}),yv=({toolbar:t="show",editable:r,onBold:i,onItalic:o,setUnderlineType:s,setColor:d,setFontSize:u,setFontFamily:f,setTextAlign:h,setBackgroundColor:p,setBorderType:C,setFormatePainter:m})=>{const g=Gg(e=>e.selected instanceof bm),[v,y]=c("disable"===t||!r),w=Gg(e=>e.active?rm(e.active,e.model.data):null),b=Gg(e=>e.model.data),E=Gg(e=>e.formattedStyle.open),M={...Wm.style,color:"#1e161f",backgroundColor:"#ffffff",borderColor:"#1e161f"},[A,x]=c(w?.style||M),L=a(null);l(()=>{w?.style&&JSON.stringify(w.style)!==JSON.stringify(A)&&x(w?.style||M),g?y(!r):w&&"boolean"==typeof w.readOnly&&y(w.readOnly||"disable"===t||!r||"dropDown"===w?.inputType?.type)},[w,r]);const k=vv(A),[H,S]=c("border-none"),[_,V]=c({label:"",value:""}),[O,z]=c({label:"",value:""}),[N,T]=c({color:M.color,backgroundColor:M.backgroundColor,borderColor:M.borderColor}),I=[{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=Gm.map(e=>({label:e,value:e})),Z=a(null),j=a(null);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=`${qm(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(lr,{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:Qm,selectedOption:_})}),e("div",{className:"ff-excel-toolbar-font-size",children:e(lr,{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:k.bold?"dark":"light",hoverEffect:!k.bold,onClick:()=>i(b),name:"bold"})}),e(K,{placement:"top",title:"Italic",children:e(P,{disabled:v,variant:k.italic?"dark":"light",hoverEffect:!k.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:()=>s(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:()=>{m(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:10,onClick:()=>{d(b,N.color),Z.current?.click()},name:"text_color"}),e(fv,{ref:Z,disabled:v,getColorValue:e=>{T(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:10,onClick:()=>{p(b,N.backgroundColor),j.current?.click()},name:"fill_color"}),e(fv,{ref:j,disabled:v,getColorValue:e=>{T(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:()=>C(b,H,"var(--input-hover-border-color)"),name:(()=>{const e=I.find(e=>e.value===H);return e?e.icon:""})()})}),e("span",{ref:L,children:e(hr,{disabled:v,iconName:"arrow_down",targetRef:L,iconSize:12,zIndex:2e3,options:I,tooltipTitle:"Border Type",tooltipPlacement:"top",onOptionClick:e=>{let t=e.value;C(b,t,"var(--input-hover-border-color)"),S(t)}})})]})})]})},wv=(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},bv=r.forwardRef(function(t,i){const{className:o,columnLabels:a=[],rowLabels:l=[],toolbar:s,editable:c,onKeyDown:d,Table:u=Ug,Row:f=qg,sheetHeight:h,HeaderRow:p=Wg,DataEditor:C=lv,DataViewer:m=iv,onSelect:g=()=>{},onActivate:v=()=>{},onEvaluatedDataChange:y=()=>{},contextOption:w,attachmentAction:b,workRef:E,minimumColumnWidth:M,setContextMenu:A,maxRowLimit:x,maxColLimit:L,disableDeleteOption:k,contextMenu:H,getActiveCell:S,onAddColumn:_,onDeleteColumn:V}=t,O=M||100,N=r.useRef(!1),T=Gg(e=>e.model.data),[I,D]=r.useState(!1),[Z,j]=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||Jm,n=new rg(e,t.data);return D(e=>!e),{...Hg,model:n,selected:t.selected||Hg.selected}},[t.createFormulaParser,t.data,t.selected]),K=r.useReducer(Sg,G),[Y,X]=K,J=r.useMemo(()=>function(e,t,n){const{columns:r,rows:i}=um(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]);r.useEffect(()=>{X(function(e){return{type:wC,payload:{minimumColumnWidth:e}}}(M))},[M]);const oe=re(J.rows),ae=ie(J.columns),le=re($.start),se=oe-re($.end),ce=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(AC),Ce=he(tm),me=he(em),ge=he(nm),ve=he(YC),ye=he(XC),we=he(FC),be=he(JC),Ee=he($C),Me=he(UC),Ae=he(qC),xe=he(WC),Le=he(kC),ke=he(HC),He=he(_C),Se=he(zC),_e=he(VC),Ve=he(OC),Oe=he(SC),ze=he(NC),Ne=he(TC),Te=he(IC),Ie=he(MC),De=he(DC),Ze=he(ZC),je=he(jC),Re=he(RC),Be=he(BC),Pe=he(PC);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&&Pm(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(c),t.data!==Qe.current&&Me(t.data),Qe.current=t.data},[t.data,Me,c]);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(Hm,t)}(e,Rm(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]=rm({row:o,column:i},n)}return r}(i.start,i.end,r)))}},[Y]),Ye=r.useCallback(e=>{Bm(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),Ce())},[ue,Ke,Ce]),Xe=r.useCallback(e=>{Bm(fe.current,ue)&&(e.preventDefault(),e.stopPropagation(),Ke(e),me())},[ue,Ke,me]),Je=r.useCallback(e=>{if(Bm(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(Hm):""}(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(),Le(T)):t&&"i"===n?(e.preventDefault(),ke(T)):t&&"u"===n&&(e.preventDefault(),He(T)),d&&d(e),e.defaultPrevented||(function(e,t){return void 0!==Mg(e,t)}(Y,e)&&e.nativeEvent.preventDefault(),ye(e))},[Y,d,ye]),et=r.useCallback(()=>{Y.formattedStyle.open&&Y.active&&Ie(Y.active)},[Y]),tt=r.useCallback(()=>{Ee(),document.removeEventListener("mouseup",tt)},[Ee]),nt=r.useCallback(e=>{Y.dragging||1!==e.buttons||"view"!==ue||(be(),document.addEventListener("mouseup",tt))},[Y,be,tt,ue]),rt=r.useMemo(()=>rv(t.Cell||nv),[t.Cell,I,c]),it=r.useMemo(()=>Yg(t.CornerIndicator||Kg),[t.CornerIndicator,I]),ot=r.useMemo(()=>tv(t.RowIndicator||ev),[t.RowIndicator,I]),at=r.useMemo(()=>Xg(t.ColumnIndicator||Jg),[t.ColumnIndicator,I]);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)),j(Math.min(fe.current.clientWidth,t))}}}),n=e.current;n&&t.observe(n)},st=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 s=l===J.rows;q(s);let c=0;for(;c<J.columns&&ie(c)<i;)c++;let d=c;for(;d<J.columns&&ie(d)<i+o;)d++;c=Math.max(0,c-10),d=Math.min(J.columns,d+10),ne({start:c,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]),ct=r.useMemo(()=>wv(st,16),[st]),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=Sm($.end,$.start),ht=Sm(te.end,te.start),pt=n("colgroup",{children:[e("col",{style:{width:"60px"}},"row-indicator")," ",e("col",{style:{width:`${ce}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")," "]}),Ct=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:je,addColumnRight:Re,columnContextEnable:t.columnContextEnable,maxColLimit:L,disableDeleteOption:k,contextMenu:H,onAddColumn:_,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:Ze,deleteRow:Be,setContextMenu:t.setContextMenu,rowContextEnable:t.rowContextEnable,maxRowLimit:x,disableDeleteOption:k,contextMenu:H,setVisibleRange:ee,scrollToRow:dt},r),e("div",{className:"spacer left"}),ht.map(t=>e(rt,{row:r,column:t,DataViewer:m},t)),e("div",{className:"spacer right"})]},r)),e("tr",{style:{height:`${se}px`}})]})]}),[u,J.rows,J.columns,f,p,it,a,at,l,ot,rt,m,$,te,le,se,ce,de,Y.rowDimensions,Y.columnDimensions]),mt=r.useMemo(()=>e(sv,{attachmentAction:b,contextOption:w,getActiveCell:S,setContextMenu:t.setContextMenu,DataEditor:C,visibleRowRange:$,visibleColRange:te,maxHeight:R-64,maxWidth:Z-M,totalHeight:oe,totalWidth:ae,isAtBottom:U,isAtRight:W,scrollPos:P,editable:c},Y.active?`${Y.active.row}-${Y.active.column}`:"no-active"),[C,$,te,Y.active,R,Z,oe,ae,U,W,c]),gt=r.useMemo(()=>n("div",{className:"ff-excel-spreadsheet-container",children:[e("div",{style:{width:`${Z}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),e("div",{style:{height:`${R}px`},className:z("ff-excel-header-column-hider",{"ff-excel-header-extend":["show","disable"].includes(s||""),"ff-excel-header-hider":"hide"===s})}),"hide"!==s&&e("div",{className:"ff-excel-toolbar-container",children:e(yv,{editable:c,toolbar:s,onBold:Le,onItalic:ke,setUnderlineType:He,setColor:ze,setBorderType:Oe,setFontSize:_e,setFontFamily:Ve,setTextAlign:Se,setBackgroundColor:Ne,setFormatePainter:Te})}),n("div",{ref:fe,style:{height:h},className:z("ff-excel-spreadsheet",o),onKeyPress:we,onKeyDown:$e,onClick:et,onMouseMove:nt,onScroll:e=>ct(e),children:[Ct,mt,e(dv,{scrollPos:P}),e(uv,{scrollPos:P})]})]}),[o,we,$e,nt,Ct,mt,Z]);return e(Fg.Provider,{value:K,children:gt})}),Ev=({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})})},Mv=({excelData:r,contextOption:o,toolbar:s="show",sheetBar:d="show",rowCount:u=26,colCount:f=26,sheetHeight:h="100%",editable:p=!0,contextHeightPositioning:C=0,contextWidthPositioning:m=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:L=!1,maxRowLimit:k=1/0,maxColLimit:H=1/0,maxSheetLimit:S=1/0,getActiveCell:_=()=>{}})=>{const V=a(null),[O,N]=c([]),[T,I]=c(""),[D,Z]=i.useState({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",disable:!1,visible:!1}]}),[j,R]=c({name:"defaultSheet",index:0}),[B,U]=c({defaultSheet:[[Wm]]}),[q,W]=c([[Wm]]),[Q,Y]=c((g.length,{})),[X,J]=c({x:0,y:0}),$=a(""),ee=a(null),te=a(null),ne=a(null);l(()=>{const e=r;if(e){const t=e.map(e=>e.sheetName);N(t),G(t.length)||($.current=t[0]||"",R({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:Wm.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)?Wm.style:mv(e?.style),readOnly:!!e?.readOnly&&e?.readOnly,inputType:e?.inputType??void 0,contextDisable:e.contextDisable})})});const s=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=s.has(`r${n+1}`)||s.has(`c${r+1}`)||s.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||Wm);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||""}))}}),U(n),g.length>1&&Y(r);const i=Object.keys(n)[0];i&&void 0!==n[i]&&W(n[i])}},[r]),l(()=>{v&&v(T),"File saved"===T&&setTimeout(()=>{I("")},2e3)},[T]),l(()=>{I("Saving..."),re(le())},[B,$.current]);const re=i.useCallback(La(e=>{if(g.length>1){const t={...Q};O.forEach((n,r)=>{const i=(e[r].data[0]||[]).map(e=>e?.value||"");t[n]=(t[n]||[]).map((e,t)=>({...e,newData:i[t]||""}))}),Y(t);const n=O.map(e=>({sheetName:e,headers:t[e]||[]}));g(e,n)}else g(e);I("File saved")},w),[g,Q,O]),ae=i.useCallback(e=>{e.ctrlKey&&"s"===e.key&&(e.preventDefault(),e.stopPropagation(),re(le()))},[g]);i.useEffect(()=>(document.addEventListener("keydown",ae),()=>{document.removeEventListener("keydown",ae)}),[ae]);const le=()=>O.map(e=>{const t=B[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:vv(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}}),[se,ce]=c(null),de=()=>O.length>=S,ue=()=>{if(de())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",O),t=Array.from({length:u},()=>Array.from({length:f},()=>Wm));N(t=>[...t,e]),R({index:O?.length,name:e}),U({...B,[e]:t}),W(t),g.length>1&&Y(t=>({...t,[e]:Array.from({length:f},()=>({newData:"",oldData:""}))})),$.current=e},fe=(e=[[Wm]])=>{W(e)},he=(e,t,n)=>{const r=e.target;if(!r||r?.textContent?.trim()===n?.trim())return void ce(null);const i=(r.textContent||"").trim();if(!i)return Za.warning("Sheet name cannot be empty."),r.textContent=j.name,void ce(null);if(i.length>50)return Za.warning("The sheet name cannot be greater than 50 characters"),r.textContent=j.name,void ce(null);if(O.map(e=>e.toLowerCase()).includes(i.toLowerCase())&&n.trim()?.toLowerCase()!==i?.toLowerCase())return Za.warning("Sheet name already exists"),r.textContent=j.name,void ce(null);let o=O;fe(B?.[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??[]}}(B,n,i);$.current=i,R(e=>({...e,name:i})),U(a),g.length>1&&Y(e=>{const t={...e},r=t[n];return delete t[n],t[i]=r??[],t}),ce(null)};const pe=(e,t)=>{e!==j.name&&t!==j.index&&(R({index:t,name:e}),N(n=>{const r=[...n];return r[t]=e,r}),fe(B[e]),$.current=e)},Ce=i.useCallback((e,t=!1)=>{const n=e.target;(!n.closest(".ff-excel-tab-list")&&!n.closest(".ff-excel-sheet")||t)&&D.open&&(Z({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]}),t||(e.preventDefault(),e.stopPropagation()))},[D.open]);i.useEffect(()=>(document.addEventListener("contextmenu",Ce),document.addEventListener("click",e=>Ce(e,!0)),()=>{document.removeEventListener("contextmenu",Ce),document.removeEventListener("click",e=>Ce(e,!0))}),[Ce]);const me=(e,t,n)=>{e.preventDefault();const r=[{label:"Add Sheet",value:"Add Sheet",iconName:"plus_icon",action:()=>ue(),disableTooltip:"Sheet limit reached",visible:!1,disable:de()},...L?[]:[{label:"Delete Sheet",value:"Delete Sheet",iconName:"delete",action:()=>((e,t)=>{if(O.length>1){let n=O.slice();n.splice(t,1);const r={...B};delete r[e];const i=Math.min(t,n.length-1);N(n),U(r),g.length>1&&Y(t=>{const n={...t};return delete n[e],n});const o=n[i]?n[i]:"";R({index:i,name:o}),fe(r?.[o]),$.current=o}else Za.warning("Cannot delete the last sheet.")})(t,n),disableTooltip:"",visible:!1,disable:!1}]];Z(e=>({...e,open:!0,contextType:"sheet",options:r}))};l(()=>{ne.current?.removeSelect()},[j.name]);return e(t,{children:O.length>0&&n("div",{ref:ee,className:"ff-excel",onContextMenu:e=>{e.preventDefault();const t=te.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,s=window.innerHeight,c=l-e.clientX,d=e.clientX,u=s-e.clientY,f=e.clientY;c<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")?J({x:i,y:o-(L?32:65)}):(i+a>l&&(i=l-a-2),i<0&&(i=2),J({x:i+m,y:o+C}))},onClick:e=>{e.stopPropagation(),D.open&&Z({open:!1,contextType:null,options:[{label:"",value:"",iconName:"",action:()=>{},disableTooltip:"",visible:!1,disable:!1}]})},children:[e("div",{ref:te,className:"ff-excel-sheet",children:e(bv,{ref:ne,editable:p,attachmentAction:y,toolbar:s,sheetHeight:h,setContextMenu:Z,contextOption:o,data:q,columnContextEnable:E,rowContextEnable:M,minimumColumnWidth:x,onEvaluatedDataChange:e=>{U(t=>({...t,[$.current]:e}))},workRef:ee,scroller:b,maxRowLimit:k,maxColLimit:H,disableDeleteOption:L,contextMenu:D,getActiveCell:_,onAddColumn:(e,t)=>{g.length>1&&Y(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&&Y(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&&n("div",{className:"ff-excel-add-sheet-set",children:[e(K,{title:de()?"Sheet limit reached":"Add Sheet",placement:"top",children:e(P,{disabled:!p||de(),className:"ff-excel-add-sheet-icon",hoverEffect:!0,onClick:ue,name:"plus_icon",height:20,width:20})}),e(hr,{options:(t=>t.map((t,r)=>({label:n("div",{style:{display:"flex",gap:"8px"},children:[j?.name===t?e(P,{height:16,width:16,name:"tick"}):e("div",{style:{height:"16px",width:"24px"}}),e(K,{title:oe(t,20,"count")?t:"",children:e(F,{children:ie(t,20,"count")})})]}),name:r,value:t})))(O),targetRef:V,onOptionClick:e=>{const{value:t,name:n=""}=e;pe(t,parseInt(n))},dropdownPlacement:"top",iconName:"show_script",tooltipTitle:"All Sheets",tooltipPlacement:"top",dropdownHeight:215,selectedValue:j.name})]}),e("div",{className:"ff-excel-tab-container",children:O.map((t,n)=>e(F,{lineHeight:"16px",children:e("div",{onContextMenu:e=>{pe(t,n),A&&me(e,t,n)},className:z("ff-excel-tab-list",{active:t===j.name}),onClick:()=>{pe(t,n)},suppressContentEditableWarning:se===n,onDoubleClick:e=>{"show"===d&&(ce(n),null===se&&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&&se===n,onBlur:e=>{he(e,n,t)},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),he(e,n,t))},children:t})},t))})]}),D.open&&e(Ev,{contextMenu:D,position:X,editable:p}),e(Da,{})]})})},Av=({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})})},xv=({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),s=t+n*Math.sin(i),c=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 ${c} 1 ${l} ${s}`},Lv=({radius:t=15,lineWidth:r=5,label:i,percentageValue:o,icon:l,fontSize:s=10,labelColor:d="",arcColor:u="var(--brand-color)",backgroundArcColor:f="var(--ff-select-scroll-thumb-color)",isSelectedArch:h=!1,onSelect:p})=>{const[C,m]=c({x:0,y:0}),[g,v]=c(!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:xv({x:0,y:0,radius:n,startAngle:0,endAngle:2*Math.PI}),foregroundArcPath:xv({x:0,y:0,radius:n,startAngle:r,endAngle:i})}})(o,w,t),A=()=>{v(!0)},x=()=>{m({x:0,y:0}),v(!1)},L=e=>{if(y.current){const t=y.current.getBoundingClientRect();m({x:e.clientX-t.left,y:e.clientY-t.top})}};return n("div",{ref:y,className:"ff-icon-radial-chart-container",style:{"--fontSize":`${s}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:L}),e("path",{d:M,fill:"none",stroke:u,strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:L}),h&&e("path",{d:M,fill:"none",stroke:"var(--dotted-border-color)",strokeOpacity:"0.4",strokeWidth:r,onMouseEnter:A,onMouseLeave:x,onMouseMove:L}),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:`${C.x+15}px`,top:C.y-5+"px"},children:[e(F,{children:`${i} : `}),n(F,{children:[o,"%"]})]})]})},kv=({mediaSrc:t,fileId:r,onExpandClick:i,onDeleteClick:o,onDownloadClick:a,height:l="75px",width:s="79px",fileName:c,thumbnailMediaSrc:d,isDelete:u})=>e("div",{className:"ff-attach-media-container",style:{height:l,width:s},children:n("div",{className:"ff-media-wrapper",style:{height:l,width:s},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:c})]})}),Hv=({icon:r,status:i,count:o,text:a,style:s={width:"196.4px"},resetToggle:d,onSelectedStatus:u=e=>{}})=>{const[f,h]=c(!1),p=["total defects","defect density","open defects","closed defects","quality score"],C=p.includes(i.toLowerCase()),m=p.includes(i.toLowerCase());l(()=>{h(!d)},[d]);return n("div",{className:`ff-card-container ${i.toLowerCase()} ${f?"toggled":""}`,style:s,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 "+(m?"red-background":""),children:n(t,C?{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})]})})]})},Sv=({option:t})=>{const r=a(null),[i,o]=c(!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 s={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":s[e.type||""]||""})(t),height:24,width:24,hoverEffect:!0})]})};function _v(e){return()=>e}function Vv(e){e()}function Ov(e,t){return n=>e(t(n))}function zv(e,t){return()=>e(t)}function Nv(e){return void 0!==e}function Tv(){}function Iv(e,t){return t(e),e}function Dv(e,t){return t(e)}function Zv(...e){return e}function jv(e,t){return e(1,t)}function Rv(e,t){e(0,t)}function Bv(e){e(2)}function Pv(e){return e(4)}function Fv(e,t){return jv(e,function(e,t){return n=>e(t,n)}(t,0))}function Uv(e,t){const n=e(1,e=>{n(),t(e)});return n}function qv(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 Qv(e=Wv){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Gv(e){return t=>n=>{e(n)&&t(n)}}function Kv(e){return t=>Ov(t,e)}function Yv(e){return t=>()=>{t(e)}}function Xv(e,...t){const n=function(...e){return t=>e.reduceRight(Dv,t)}(...t);return(t,r)=>{switch(t){case 2:return void Bv(e);case 1:return jv(e,n(r))}}}function Jv(e,t){return n=>r=>{n(t=e(t,r))}}function $v(e){return t=>n=>{e>0?e--:t(n)}}function ey(e){let t,n=null;return r=>i=>{n=i,!t&&(t=setTimeout(()=>{t=void 0,r(n)},e))}}function ty(...e){const t=new Array(e.length);let n=0,r=null;const i=2**e.length-1;return e.forEach((e,o)=>{const a=2**o;jv(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 ny(e){let t=e;const n=iy();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function ry(e,t){return Iv(ny(t),t=>Fv(e,t))}function iy(){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 oy(e){return Iv(iy(),t=>Fv(e,t))}function ay(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:ly(),singleton:n}}const ly=()=>Symbol();function sy(...e){const t=iy(),n=new Array(e.length);let r=0;const i=2**e.length-1;return e.forEach((e,o)=>{const a=2**o;jv(e,e=>{n[o]=e,r|=a,r===i&&Rv(t,n)})}),function(e,o){switch(e){case 2:return void Bv(t);case 1:return r===i&&o(n),jv(t,o)}}}function cy(e,t=Wv){return Xv(e,Qv(t))}function dy(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(Vv)}}(...e.map(e=>jv(e,n)))}}}const uy=0,fy=1,hy=2,py=3,Cy={[uy]:"debug",[py]:"error",[fy]:"log",[hy]:"warn"},my=ay(()=>{const e=ny(py);return{log:ny((t,n,r=fy)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??Pv(e))&&console[Cy[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function gy(e,t,n){return vy(e,t,n).callbackRef}function vy(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?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function yy(e,t,n,r,o,a,l,s,c){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),s=parseFloat(i.dataset.knownSize),c=t(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},py),c===s)continue;const d=o[o.length-1];0===o.length||d.size!==c||d.endIndex!==l-1?o.push({endIndex:l,size:c,startIndex:l}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",o);let c=n.parentElement;for(;void 0===c.dataset.virtuosoScroller;)c=c.parentElement;const d="window"===c.lastElementChild.dataset.viewportType;let u;d&&(u=c.ownerDocument.defaultView);const f=l?s?l.scrollLeft:l.scrollTop:d?s?u.scrollX||u.document.documentElement.scrollLeft:u.scrollY||u.document.documentElement.scrollTop:s?c.scrollLeft:c.scrollTop,h=l?s?l.scrollWidth:l.scrollHeight:d?s?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight:s?c.scrollWidth:c.scrollHeight,p=l?s?l.offsetWidth:l.offsetHeight:d?s?u.innerWidth:u.innerHeight:s?c.offsetWidth:c.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(f,0),viewportHeight:p}),a?.(s?wy("column-gap",getComputedStyle(n).columnGap,o):wy("row-gap",getComputedStyle(n).rowGap,o)),null!==i&&e(i)},[e,t,o,a,l,r,s]);return vy(d,n,c)}function wy(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,hy),"normal"===t?0:parseInt(t??"0",10)}function by(e,t,n){const r=i.useRef(null),o=i.useCallback(n=>{if(!n?.offsetParent)return;const i=n.getBoundingClientRect(),o=i.width;let a,s;if(t){const e=t.getBoundingClientRect(),n=i.top-e.top;s=e.height-Math.max(0,n),a=n+t.scrollTop}else{const e=l.current.ownerDocument.defaultView;s=e.innerHeight-Math.max(0,i.top),a=i.top+e.scrollY}r.current={offsetTop:a,visibleHeight:s,visibleWidth:o},e(r.current)},[e,t]),{callbackRef:a,ref:l}=vy(o,!0,n),s=i.useCallback(()=>{o(l.current)},[o,l]);return i.useEffect(()=>{if(t){t.addEventListener("scroll",s);const e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}const e=l.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",s),e?.addEventListener("resize",s),()=>{e?.removeEventListener("scroll",s),e?.removeEventListener("resize",s)}},[s,t,l]),a}const Ey=ay(()=>{const e=iy(),t=iy(),n=ny(0),r=iy(),i=ny(0),o=iy(),a=iy(),l=ny(0),s=ny(0),c=ny(0),d=ny(0),u=iy(),f=iy(),h=ny(!1),p=ny(!1),C=ny(!1);return Fv(Xv(e,Kv(({scrollTop:e})=>e)),t),Fv(Xv(e,Kv(({scrollHeight:e})=>e)),a),Fv(t,i),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:s,footerHeight:d,headerHeight:l,horizontalDirection:p,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:h,scrollTo:u,scrollTop:t,skipAnimationFrameInResizeObserver:C,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),My={lvl:0};function Ay(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 xy(e){return e===My}function Ly(e,t){if(!xy(e))return t===e.k?e.v:t<e.k?Ly(e.l,t):Ly(e.r,t)}function ky(e,t,n="k"){if(xy(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=ky(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return ky(e.l,t,n)}function Hy(e,t,n){return xy(e)?jy(t,n,1):t===e.k?Ty(e,{k:t,v:n}):t<e.k?Ry(Ty(e,{l:Hy(e.l,t,n)})):Ry(Ty(e,{r:Hy(e.r,t,n)}))}function Sy(){return My}function _y(e,t,n){if(xy(e))return[];return function(e){return Ay(e,({k:e,v:t})=>({index:e,value:t}))}(zy(e,ky(e,t)[0],n))}function Vy(e,t){if(xy(e))return My;const{k:n,l:r,r:i}=e;if(t===n){if(xy(r))return i;if(xy(i))return r;const[t,n]=Zy(r);return Ny(Ty(e,{k:t,l:Iy(r),v:n}))}return Ny(Ty(e,t<n?{l:Vy(r,t)}:{r:Vy(i,t)}))}function Oy(e){return xy(e)?[]:[...Oy(e.l),{k:e.k,v:e.v},...Oy(e.r)]}function zy(e,t,n){if(xy(e))return[];const{k:r,l:i,r:o,v:a}=e;let l=[];return r>t&&(l=l.concat(zy(i,t,n))),r>=t&&r<=n&&l.push({k:r,v:a}),r<=n&&(l=l.concat(zy(o,t,n))),l}function Ny(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(Dy(t))return By(Ty(e,{lvl:n-1}));if(!xy(t)&&!xy(t.r))return Ty(t.r,{l:Ty(t,{r:t.r.l}),lvl:n,r:Ty(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(Dy(e))return Py(Ty(e,{lvl:n-1}));if(!xy(r)&&!xy(r.l)){const t=r.l,i=Dy(t)?r.lvl-1:r.lvl;return Ty(t,{l:Ty(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:Py(Ty(r,{l:t.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function Ty(e,t){return jy(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 Iy(e){return xy(e.r)?e.l:Ny(Ty(e,{r:Iy(e.r)}))}function Dy(e){return xy(e)||e.lvl>e.r.lvl}function Zy(e){return xy(e.r)?[e.k,e.v]:Zy(e.r)}function jy(e,t,n,r=My,i=My){return{k:e,l:r,lvl:n,r:i,v:t}}function Ry(e){return Py(By(e))}function By(e){const{l:t}=e;return xy(t)||t.lvl!==e.lvl?e:Ty(t,{r:Ty(e,{l:t.r})})}function Py(e){const{lvl:t,r:n}=e;return xy(n)||xy(n.r)||n.lvl!==t||n.r.lvl!==t?e:Ty(n,{l:Ty(e,{r:n.l}),lvl:t+1})}function Fy(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function Uy(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const qy=ay(()=>({recalcInProgress:ny(!1)}),[],{singleton:!0});function Wy(e,t,n){return e[Qy(e,t,n)]}function Qy(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 Gy(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ky(e){return!xy(e.groupOffsetTree)}function Yy({index:e},t){return t===e?0:t<e?-1:1}function Xy({offset:e},t){return t===e?0:t<e?-1:1}function Jy(e,t,n){if(0===t.length)return 0;const{index:r,offset:i,size:o}=Wy(t,e,Yy),a=e-r,l=o*a+(a-1)*n+i;return l>0?l+n:l}function $y(e,t){if(!Ky(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ew(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;let r=$y("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function tw(e,t,n,r=0){return r>0&&(t=Math.max(t,Wy(e,r,Yy).offset)),Ay(function(e,t,n,r){const i=Qy(e,t,r),o=Qy(e,n,r,i);return e.slice(i,o+1)}(e,t,n,Xy),ow)}function nw(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,uy);const o=e.sizeTree;let a=o,l=0;if(n.length>0&&xy(o)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>Hy(Hy(t,n,e),n+1,r),a)}else[a,l]=function(e,t){let n=xy(e)?0:1/0;for(const r of t){const{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),xy(e)){e=Hy(e,0,i);continue}const a=_y(e,o-1,t+1);if(a.some(aw(r)))continue;let l=!1,s=!1;for(const{end:n,start:r,value:o}of a)l?(t>=r||i===o)&&(e=Vy(e,r)):(s=o!==i,l=!0),n>t&&t>=r&&o!==i&&(e=Hy(e,t+1,o));s&&(e=Hy(e,o,i))}return[e,n]}(a,t);if(a===o)return e;const{lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u}=iw(e.offsetTree,l,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>Hy(e,t,Jy(t,u,i)),Sy()),lastIndex:s,lastOffset:c,lastSize:d,offsetTree:u,sizeTree:a}}function rw(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 iw(e,t,n,r){let i=e,o=0,a=0,l=0,s=0;if(0!==t){s=Qy(i,t-1,Yy),l=i[s].offset;const e=ky(n,t-1);o=e[0],a=e[1],i.length&&i[s].size===ky(n,t)[1]&&(s-=1),i=i.slice(0,s+1)}else i=[];for(const{start:e,value:s}of _y(n,t,1/0)){const t=e-o,n=t*a+l+t*r;i.push({index:e,offset:n,size:s}),o=e,l=n,a=s}return{lastIndex:o,lastOffset:l,lastSize:a,offsetTree:i}}function ow(e){return{index:e.index,value:e}}function aw(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 lw={offsetHeight:"height",offsetWidth:"width"},sw=ay(([{log:e},{recalcInProgress:t}])=>{const n=iy(),r=iy(),i=ry(r,0),o=iy(),a=iy(),l=ny(0),s=ny([]),c=ny(void 0),d=ny(void 0),u=ny(void 0),f=ny(void 0),h=ny((e,t)=>Gy(e,lw[t])),p=ny(void 0),C=ny(0),m={groupIndices:[],groupOffsetTree:Sy(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Sy()},g=ry(Xv(n,ty(s,e,C),Jv(nw,m),Qv()),m),v=ry(Xv(s,Qv(),Jv((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),Kv(({prev:e})=>e)),[]);Fv(Xv(s,Gv(e=>e.length>0),ty(g,C),Kv(([e,t,n])=>{const r=e.reduce((e,r,i)=>Hy(e,r,Jy(r,t.offsetTree,n)||i),Sy());return{...t,groupIndices:e,groupOffsetTree:r}})),g),Fv(Xv(r,ty(g),Gv(([e,{lastIndex:t}])=>e<t),Kv(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),Fv(c,d);const y=ry(Xv(c,Kv(e=>void 0===e)),!0);Fv(Xv(d,Gv(e=>void 0!==e&&xy(Pv(g).sizeTree)),Kv(e=>{const t=Pv(u),n=Pv(s).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),Fv(Xv(f,Gv(e=>void 0!==e&&e.length>0&&xy(Pv(g).sizeTree)),Kv(e=>{const t=[];let n=e[0],r=0;for(let i=1;i<e.length;i++){const o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),Fv(Xv(s,ty(u,d),Gv(([,e,t])=>void 0!==e&&void 0!==t),Kv(([e,t,n])=>{const r=[];for(let i=0;i<e.length;i++){const o=e[i],a=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==a&&r.push({startIndex:o+1,endIndex:a-1,size:n})}return r})),n);const w=oy(Xv(n,ty(g),Jv(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:m}),Kv(e=>e.changed)));jv(Xv(l,Jv((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),Kv(e=>e.diff)),e=>{const{groupIndices:n}=Pv(g);if(e>0)Rv(t,!0),Rv(o,e+rw(e,n));else if(e<0){const t=Pv(v);t.length>0&&(e-=rw(-e,t)),Rv(a,e)}}),jv(Xv(l,ty(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},py)});const b=oy(o);Fv(Xv(o,ty(g),Kv(([e,t])=>{const n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){const n=Ly(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=Oy(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 Oy(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 E=oy(Xv(a,ty(g,C),Kv(([e,{offsetTree:t},n])=>Jy(-e,t,n))));return Fv(Xv(a,ty(g,C),Kv(([e,t,n])=>{if(t.groupIndices.length>0){if(xy(t.sizeTree))return t;let r=Sy();const i=Pv(v);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=Oy(t.sizeTree).reduce((t,{k:n,v:r})=>Hy(t,Math.max(0,n+e),r),r),o!==-e){r=Hy(r,0,Ly(t.sizeTree,l));r=Hy(r,1,ky(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...iw(t.offsetTree,0,r,n)}}const r=Oy(t.sizeTree).reduce((t,{k:n,v:r})=>Hy(t,Math.max(0,n+e),r),Sy());return{...t,sizeTree:r,...iw(t.offsetTree,0,r,n)}})),g),{beforeUnshiftWith:b,data:p,defaultItemSize:d,firstItemIndex:l,fixedItemSize:c,fixedGroupSize:u,gap:C,groupIndices:s,heightEstimates:f,itemSize:h,listRefresh:w,shiftWith:a,shiftWithOffset:E,sizeRanges:n,sizes:g,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:o}},Zv(my,qy),{singleton:!0});function cw(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}const dw=ay(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{const o=iy(),a=iy(),l=oy(Xv(o,Kv(cw)));return Fv(Xv(l,Kv(e=>e.totalCount)),n),Fv(Xv(l,Kv(e=>e.groupIndices)),e),Fv(Xv(sy(i,t,r),Gv(([e,t])=>Ky(t)),Kv(([e,t,n])=>ky(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),Qv(),Kv(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},Zv(sw,Ey)),uw=ay(([{log:e}])=>{const t=ny(!1),n=oy(Xv(t,Gv(e=>e),Qv()));return jv(t,t=>{t&&Pv(e)("props updated",{},uy)}),{didMount:n,propsReady:t}},Zv(my),{singleton:!0}),fw=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function hw(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!fw)&&(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}const pw=ay(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:l,scrollingInProgress:s,scrollTo:c,smoothScrollTargetReached:d,viewportHeight:u},{log:f}])=>{const h=iy(),p=iy(),C=ny(0);let m=null,g=null,v=null;function y(){null!==m&&(m(),m=null),null!==v&&(v(),v=null),g&&(clearTimeout(g),g=null),Rv(s,!1)}return Fv(Xv(h,ty(n,u,r,C,l,a,f),ty(e,o,i),Kv(([[e,n,r,i,o,a,l,c],u,f,C])=>{const w=hw(e),{align:b,behavior:E,offset:M}=w,A=i-1,x=ew(w,n,A);let L=Jy(x,n.offsetTree,u)+a;"end"===b?(L+=f+ky(n.sizeTree,x)[1]-r+C,x===A&&(L+=l)):"center"===b?L+=(f+ky(n.sizeTree,x)[1]-r+C)/2:L-=o,void 0!==M&&0!==M&&(L+=M);const k=t=>{y(),t?(c("retrying to scroll to",{location:e},uy),Rv(h,e)):(Rv(p,!0),c("list did not change, scroll successful",{},uy))};if(y(),"smooth"===E){let e=!1;v=jv(t,t=>{e=e||t}),m=Uv(d,()=>{k(e)})}else m=Uv(Xv(t,function(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),k);return g=setTimeout(()=>{y()},1200),Rv(s,!0),c("scrolling from index to",{behavior:E,index:x,top:L},uy),{behavior:E,top:L}})),c),{scrollTargetReached:p,scrollToIndex:h,topListHeight:C}},Zv(sw,Ey,my),{singleton:!0});function Cw(e,t){0===e?t():requestAnimationFrame(()=>{Cw(e-1,t)})}function mw(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const gw=ay(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{const l=ny(!0),s=ny(0),c=ny(!0);return Fv(Xv(a,ty(s),Gv(([e,t])=>0!==t),Yv(!1)),l),Fv(Xv(a,ty(s),Gv(([e,t])=>0!==t),Yv(!1)),c),jv(Xv(sy(t,a),ty(l,n,e,c),Gv(([[,e],t,{sizeTree:n},r,i])=>e&&(!xy(n)||Nv(r))&&!t&&!i),ty(s)),([,e])=>{Uv(i,()=>{Rv(c,!0)}),Cw(4,()=>{Uv(r,()=>{Rv(l,!0)}),Rv(o,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:s,scrolledToInitialItem:l}},Zv(sw,Ey,pw,uw),{singleton:!0});function vw(e,t){return Math.abs(e-t)<1.01}const yw="up",ww="down",bw={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Ew=ay(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{const a=ny(!1),l=ny(!0),s=iy(),c=iy(),d=ny(4),u=ny(0),f=ry(Xv(dy(Xv(cy(i),$v(1),Yv(!0)),Xv(cy(i),$v(1),Yv(!1),qv(100))),Qv()),!1),h=ry(Xv(dy(Xv(n,Yv(!0)),Xv(n,Yv(!1),qv(200))),Qv()),!1);Fv(Xv(sy(cy(i),cy(u)),Kv(([e,t])=>e<=t),Qv()),l),Fv(Xv(l,ey(50)),c);const p=oy(Xv(sy(r,cy(o),cy(t),cy(e),cy(d)),Jv((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 s;return s=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:s,state:l}},bw),Qv((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),C=ry(Xv(r,Jv((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!vw(e.scrollHeight,t)){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}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Gv(e=>e.changed),Kv(e=>e.jump)),0);Fv(Xv(p,Kv(e=>e.atBottom)),a),Fv(Xv(a,ey(50)),s);const m=ny(ww);Fv(Xv(r,Kv(({scrollTop:e})=>e),Qv(),Jv((e,t)=>Pv(h)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?yw:ww,prevScrollTop:t},{direction:ww,prevScrollTop:0}),Kv(e=>e.direction)),m),Fv(Xv(r,ey(50),Yv("none")),m);const g=ny(0);return Fv(Xv(f,Gv(e=>!e),Yv(0)),g),Fv(Xv(i,ey(100),ty(f),Gv(([e,t])=>t),Jv(([e,t],[n])=>[t,n],[0,0]),Kv(([e,t])=>t-e)),g),{atBottomState:p,atBottomStateChange:s,atBottomThreshold:d,atTopStateChange:c,atTopThreshold:u,isAtBottom:a,isAtTop:l,isScrolling:f,lastJumpDueToItemResize:C,scrollDirection:m,scrollVelocity:g}},Zv(Ey)),Mw="top",Aw="bottom",xw="none";function Lw(e,t,n){return"number"==typeof e?n===yw&&t===Mw||n===ww&&t===Aw?e:0:n===yw?t===Mw?e.main:e.reverse:t===Aw?e.main:e.reverse}function kw(e,t){return"number"==typeof e?e:e[t]??0}const Hw=ay(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{const o=iy(),a=ny(0),l=ny(0),s=ny(0),c=ry(Xv(sy(cy(r),cy(i),cy(n),cy(o,Uy),cy(s),cy(a),cy(t),cy(e),cy(l)),Kv(([e,t,n,[r,i],o,a,l,s,c])=>{const d=e-s,u=a+l,f=Math.max(n-d,0);let h=xw;const p=kw(c,Mw),C=kw(c,Aw);return r-=s,i+=n+l,(r+=n+l)>e+u-p&&(h=yw),(i-=s)<e-f+t+C&&(h=ww),h!==xw?[Math.max(d-n-Lw(o,Mw,h)-p,0),d-f-l+t+Lw(o,Aw,h)+C]:null}),Gv(e=>null!==e),Qv(Uy)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:s,topListHeight:a,visibleRange:c}},Zv(Ey),{singleton:!0});const Sw={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function _w(e,t,n,r,i,o){const{lastIndex:a,lastOffset:l,lastSize:s}=i;let c=0,d=0;if(e.length>0){c=e[0].offset;const t=e[e.length-1];d=t.offset+t.size}const u=n-a,f=c,h=l+u*s+(u-1)*r-d;return{bottom:d,firstItemIndex:o,items:Ow(e,i,o),offsetBottom:h,offsetTop:c,top:f,topItems:Ow(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function Vw(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,s=mw(t,l);return _w(Array.from({length:l}).map((e,t)=>({data:o[t+s],index:t+s,offset:0,size:0})),[],l,i,n,r)}function Ow(e,t,n){if(0===e.length)return[];if(!Ky(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=_y(t.groupOffsetTree,r,i);let l,s=0;for(const r of e){let e;(!l||l.end<r.index)&&(l=a.shift(),s=t.groupIndices.indexOf(l.start)),e=r.index===l.start?{index:s,type:"group"}:{groupIndex:s,index:r.index-(s+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function zw(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}const Nw=ay(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:l,visibleRange:s},{initialTopMostItemIndex:c,scrolledToInitialItem:d},{topListHeight:u},f,{didMount:h},{recalcInProgress:p}])=>{const C=ny([]),m=ny(0),g=iy(),v=ny(0);Fv(o.topItemsIndexes,C);const y=ry(Xv(sy(h,p,cy(s,Uy),cy(i),cy(r),cy(c),d,cy(C),cy(t),cy(n),cy(v),e),Gv(([e,t,,n,,,,,,,,r])=>{const i=void 0!==r&&r.length!==n;return e&&!t&&!i}),Kv(([,,[e,t],n,r,i,o,a,l,s,c,d])=>{const u=r,{offsetTree:f,sizeTree:h}=u,p=Pv(m);if(0===n)return{...Sw,totalCount:n};if(0===e&&0===t)return 0===p?{...Sw,totalCount:n}:Vw(p,i,r,l,s,d||[]);if(xy(h))return p>0?null:_w(function(e,t,n){if(Ky(t)){const r=$y(e,t);return[{index:ky(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(mw(i,n),u,d),[],n,s,u,l);const C=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of _y(h,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++)C.push({data:d?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return _w([],C,n,s,u,l);const g=a.length>0?a[a.length-1]+1:0,v=tw(f,e,t,g);if(0===v.length)return null;const y=n-1,w=Iv([],n=>{for(const r of v){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+s)/(l+s));const t=a-r.start;o+=t*l+t*s}a<g&&(o+=(g-a)*l,a=g);const c=Math.min(r.end,y);for(let e=a;e<=c&&!(o>=t);e++)n.push({data:d?.[e],index:e,offset:o,size:l}),o+=l+s}}),b=zw(c,Mw),E=zw(c,Aw);if(w.length>0&&(b>0||E>0)){const e=w[0],t=w[w.length-1];if(b>0&&e.index>g){const t=Math.min(b,e.index-g),n=[];let r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){const t=_y(h,i,i)[0]?.value??e.size;r-=t+s,n.unshift({data:d?.[i],index:i,offset:r,size:t})}w.unshift(...n)}if(E>0&&t.index<y){const e=Math.min(E,y-t.index);let n=t.offset+t.size+s;for(let r=t.index+1;r<=t.index+e;r++){const e=_y(h,r,r)[0]?.value??t.size;w.push({data:d?.[r],index:r,offset:n,size:e}),n+=e+s}}}return _w(w,C,n,s,u,l)}),Gv(e=>null!==e),Qv()),Sw);Fv(Xv(e,Gv(Nv),Kv(e=>e?.length)),i),Fv(Xv(y,Kv(e=>e.topListHeight)),u),Fv(u,l),Fv(Xv(y,Kv(e=>[e.top,e.bottom])),a),Fv(Xv(y,Kv(e=>e.items)),g);const w=oy(Xv(y,Gv(({items:e})=>e.length>0),ty(i,e),Gv(([{items:e},t])=>e[e.length-1].originalIndex===t-1),Kv(([,e,t])=>[e-1,t]),Qv(Uy),Kv(([e])=>e))),b=oy(Xv(y,ey(200),Gv(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),Kv(({items:e})=>e[0].index),Qv())),E=oy(Xv(y,Gv(({items:e})=>e.length>0),Kv(({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}}),Qv(Fy)));return{endReached:w,initialItemCount:m,itemsRendered:g,listState:y,minOverscanItemCount:v,rangeChanged:E,startReached:b,topItemsIndexes:C,...f}},Zv(sw,dw,Hw,gw,pw,Ew,uw,qy),{singleton:!0}),Tw=ay(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{const o=iy(),a=ry(Xv(sy(n,e,r,t,i),Kv(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return Fv(cy(a),o),{totalListHeight:a,totalListHeightChanged:o}},Zv(Ey,Nw),{singleton:!0}),Iw=ay(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ny(!1);return{alignToBottom:n,paddingTopAddition:ry(Xv(sy(n,e,t),Gv(([e])=>e),Kv(([,e,t])=>Math.max(0,e-t)),ey(0),Qv()),0)}},Zv(Ey,Tw),{singleton:!0}),Dw=ay(()=>({context:ny(null)})),Zw=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:n??"start",...void 0!==r?{behavior:r}:{}}:e>o?{...i,align:n??"end",...void 0!==r?{behavior:r}:{}}:null,jw=ay(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:l,viewportHeight:s},{scrollToIndex:c}])=>{const d=iy();return Fv(Xv(d,ty(t,s,n,o,i,r,l),ty(e),Kv(([[e,t,n,r,i,o,l,s],c])=>{const{calculateViewLocation:d=Zw,done:u,...f}=e,h=ew(e,t,r-1),p=Jy(h,t.offsetTree,c)+i+o,C=d({itemBottom:p+ky(t.sizeTree,h)[1],itemTop:p,locationParams:f,viewportBottom:s+n-l,viewportTop:s+o});return null!==C?u&&Uv(Xv(a,Gv(e=>!e),$v(Pv(a)?1:2)),u):u?.(),C}),Gv(e=>null!==e)),c),{scrollIntoView:d}},Zv(sw,Ey,pw,Nw,my),{singleton:!0});function Rw(e){return!1!==e&&("smooth"===e?"smooth":"auto")}const Bw=ay(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:a},{scrolledToInitialItem:l},{didMount:s,propsReady:c},{log:d},{scrollingInProgress:u},{context:f},{scrollIntoView:h}])=>{const p=ny(!1),C=iy();let m=null;function g(e){Rv(a,{align:"end",behavior:e,index:"LAST"})}function v(e){const t=Uv(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===m&&(Pv(d)("scrolling to bottom due to increased size",{},uy),g("auto"))});setTimeout(t,100)}jv(Xv(sy(Xv(cy(t),$v(1)),s),ty(cy(p),o,l,u),Kv(([[e,t],n,r,i,o])=>{let a=t&&i,l="auto";return a&&(l=((e,t)=>"function"==typeof e?Rw(e(t)):t&&Rw(e))(n,r||o),a=a&&!1!==l),{followOutputBehavior:l,shouldFollow:a,totalCount:e}}),Gv(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{null!==m&&(m(),m=null),void 0!==Pv(n)?requestAnimationFrame(()=>{Pv(d)("following output to ",{totalCount:r},uy),g(t)}):m=Uv(e,()=>{Pv(d)("following output to ",{totalCount:r},uy),g(t),m=null})}),jv(Xv(sy(cy(p),t,c),Gv(([e,,t])=>!1!==e&&t),Jv(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),Gv(({refreshed:e})=>e),ty(p,t)),([,e])=>{Pv(l)&&v(!1!==e)}),jv(C,()=>{v(!1!==Pv(p))}),jv(sy(cy(p),i),([e,t])=>{!1!==e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&g("auto")});const y=ny(null),w=iy();return Fv(dy(Xv(cy(r),Kv(e=>e?.length??0)),Xv(cy(t))),w),jv(Xv(sy(Xv(w,$v(1)),s),ty(cy(y),l,u,f),Kv(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),Gv(e=>!!e),ey(0)),t=>{null!==m&&(m(),m=null),void 0!==Pv(n)?requestAnimationFrame(()=>{Pv(d)("scrolling into view",{}),Rv(h,t)}):m=Uv(e,()=>{Pv(d)("scrolling into view",{}),Rv(h,t),m=null})}),{autoscrollToBottom:C,followOutput:p,scrollIntoViewOnChange:y}},Zv(sw,Ew,pw,gw,uw,my,Ey,Dw,jw)),Pw=ay(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:l}])=>(Fv(Xv(l,ty(o),Gv(([,e])=>0!==e),ty(i,r,t,n,e),Kv(([[,e],t,n,r,i,o=[]])=>Vw(e,t,n,r,i,o))),a),{}),Zv(sw,gw,Nw,uw),{singleton:!0}),Fw=ay(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ny(0);return jv(Xv(e,ty(r),Gv(([,e])=>0!==e),Kv(([,e])=>({top:e}))),e=>{Uv(Xv(n,$v(1),Gv(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{Rv(t,e)})})}),{initialScrollTop:r}},Zv(uw,Ey,Nw),{singleton:!0}),Uw=ay(([{scrollVelocity:e}])=>{const t=ny(!1),n=iy(),r=ny(!1);return Fv(Xv(e,ty(r,t,n),Gv(([e,t])=>!1!==t&&void 0!==t),Kv(([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}),Qv()),t),jv(Xv(sy(t,e,n),ty(r)),([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Zv(Ew),{singleton:!0}),qw=ay(([{scrollContainerState:e,scrollTo:t}])=>{const n=iy(),r=iy(),i=iy(),o=ny(!1),a=ny(void 0);return Fv(Xv(sy(n,r),Kv(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),Fv(Xv(t,ty(r),Kv(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Zv(Ey)),Ww=ay(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:l,windowViewportRect:s}])=>{const c=iy(),d=ny(void 0),u=ny(null),f=ny(null);return Fv(l,u),Fv(s,f),jv(Xv(c,ty(t,r,a,u,f,n)),([e,t,n,r,i,o,a])=>{const l=function(e){return Oy(e).map(({k:e,v:t},n,r)=>{const i=r[n+1];return{endIndex:void 0!==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})}),Fv(Xv(d,Gv(Nv),Kv(Qw)),i),Fv(Xv(o,ty(d),Gv(([,e])=>void 0!==e),Qv(),Kv(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:d}},Zv(sw,Ey,gw,uw,qw));function Qw(e){return{align:"start",index:0,offset:e.scrollTop}}const Gw=ay(([{topItemsIndexes:e}])=>{const t=ny(0);return Fv(Xv(t,Gv(e=>e>=0),Kv(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Zv(Nw));function Kw(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const Yw=Kw(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Xw=ay(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:l},{listState:s},{beforeUnshiftWith:c,gap:d,shiftWithOffset:u,sizes:f},{log:h},{recalcInProgress:p}])=>{const C=oy(Xv(s,ty(a),Jv(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},l])=>{const s=r+o;let c=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||(c=s-n,0!==c&&(c+=l))),[c,i,a,s]},[0,[],0,0]),Gv(([e])=>0!==e),ty(r,l,n,i,h,p),Gv(([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===yw),Kv(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},uy),e))));function m(n){n>0?(Rv(t,{behavior:"auto",top:-n}),Rv(e,0)):(Rv(e,0),Rv(t,{behavior:"auto",top:-n}))}return jv(Xv(C,ty(e,o)),([t,n,r])=>{r&&Yw()?Rv(e,n-t):m(-t)}),jv(Xv(sy(ry(o,!1),e,p),Gv(([e,t,n])=>!e&&!n&&0!==t),Kv(([e,t])=>t),ey(1)),m),Fv(Xv(u,Kv(e=>({top:-e}))),t),jv(Xv(c,ty(f,d),Kv(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function o(e){return e*(n+i)}if(0===t.length)return o(e);let a=0;const l=Ly(r,0);let s=0,c=0;for(;s<e;){s++,a+=l;let n=t.length===c+1?1/0:t[c+1]-t[c]-1;s+n>e&&(a-=l,n=e-s+1),s+=n,a+=o(n),c++}return a})),n=>{Rv(e,n),requestAnimationFrame(()=>{Rv(t,{top:n}),requestAnimationFrame(()=>{Rv(e,0),Rv(p,!1)})})}),{deviation:e}},Zv(Ey,Ew,Nw,sw,my,qy)),Jw=ay(([e,t,n,r,i,o,a,l,s,c,d])=>({...e,...t,...n,...r,...i,...o,...a,...l,...s,...c,...d}),Zv(Hw,Pw,uw,Uw,Tw,Fw,Iw,qw,jw,my,Dw)),$w=ay(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:a,heightEstimates:l,itemSize:s,sizeRanges:c,sizes:d,statefulTotalCount:u,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:p,initialTopMostItemIndex:C,scrolledToInitialItem:m},g,v,y,w,{scrollToIndex:b},E,{topItemCount:M},{groupCounts:A},x])=>{const{listState:L,minOverscanItemCount:k,topItemsIndexes:H,rangeChanged:S,..._}=w;return Fv(S,x.scrollSeekRangeChanged),Fv(Xv(x.windowViewportRect,Kv(e=>e.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:A,heightEstimates:l,initialItemFinalLocationReached:p,initialTopMostItemIndex:C,scrolledToInitialItem:m,sizeRanges:c,topItemCount:M,topItemsIndexes:H,totalCount:f,...y,groupIndices:a,itemSize:s,listState:L,minOverscanItemCount:k,scrollToIndex:b,statefulTotalCount:u,trackItemSizes:h,rangeChanged:S,..._,...x,...g,sizes:d,...v}},Zv(sw,gw,Ey,Ww,Bw,Nw,pw,Xw,Gw,dw,Jw));function eb(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 tb=typeof document<"u"?i.useLayoutEffect:i.useEffect;function nb(t,n,r){const o=Object.keys(n.required||{}),a=Object.keys(n.optional||{}),l=Object.keys(n.methods||{}),s=Object.keys(n.events||{}),c=i.createContext({});function d(e,t){void 0!==e.propsReady&&Rv(e.propsReady,!1);for(const r of o){Rv(e[n.required[r]],t[r])}for(const r of a)if(r in t){Rv(e[n.optional[r]],t[r])}void 0!==e.propsReady&&Rv(e.propsReady,!0)}function u(e){return s.reduce((t,r)=>(t[r]=function(e){let t,n;const r=()=>t?.();return function(i,o){switch(i){case 1:return o?n===o?void 0:(r(),n=o,t=jv(e,o),t):(r(),Tv);case 2:return r(),void(n=null)}}}(e[n.events[r]]),t),{})}const f=i.forwardRef(function(f,h){const{children:p,...C}=f,[m]=i.useState(()=>Iv(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,C)})),[g]=i.useState(zv(u,m));var v;tb(()=>{for(const e of s)e in C&&jv(g[e],C[e]);return()=>{Object.values(g).map(Bv)}},[C,g,m]),tb(()=>{d(m,C)}),i.useImperativeHandle(h,_v((v=m,l.reduce((e,t)=>(e[t]=e=>{Rv(v[n.methods[t]],e)},e),{}))));const y=r;return e(c.Provider,{value:m,children:void 0!==r?e(y,{...eb([...o,...a,...s],C),children:p}):p})}),h=i.version.startsWith("18")?e=>{const t=i.useContext(c)[e],n=i.useCallback(e=>jv(t,e),[t]);return i.useSyncExternalStore(n,()=>Pv(t),()=>Pv(t))}:e=>{const t=i.useContext(c)[e],[n,r]=i.useState(zv(Pv,t));return tb(()=>jv(t,e=>{e!==n&&r(_v(e))}),[t,n]),n};return{Component:f,useEmitter:(e,t)=>{const n=i.useContext(c)[e];tb(()=>jv(n,t),[t,n])},useEmitterValue:h,usePublisher:e=>{const t=i.useContext(c);return i.useCallback(n=>{Rv(t[e],n)},[t,e])}}}const rb=i.createContext(void 0),ib=i.createContext(void 0),ob="-webkit-sticky",ab="sticky",lb=Kw(()=>{if(typeof document>"u")return ab;const e=document.createElement("div");return e.style.position=ob,e.style.position===ob?ob:ab}),sb=typeof document<"u"?i.useLayoutEffect:i.useEffect;function cb(e){return"self"in e}function db(e,t,n,r=Tv,o,a){const l=i.useRef(null),s=i.useRef(null),c=i.useRef(null),d=i.useCallback(n=>{let r,i,o;const l=n.target;if(function(e){return"body"in e}(l)||cb(l)){const e=cb(l)?l:l.defaultView;o=!0===a?e.scrollX:e.scrollY,r=!0===a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===a?e.innerWidth:e.innerHeight}else o=!0===a?l.scrollLeft:l.scrollTop,r=!0===a?l.scrollWidth:l.scrollHeight,i=!0===a?l.offsetWidth:l.offsetHeight;const d=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};!0===n.suppressFlushSync?d():M.flushSync(d),null!==s.current&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&(clearTimeout(c.current),c.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){!0===a&&(e={...void 0!==e.behavior?{behavior:e.behavior}:{},...void 0!==e.top?{left:e.top}:{}}),l.current.scrollBy(e)},scrollerRef:l,scrollToCallback:function(n){const r=l.current;if(!r||(!0===a?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const i="smooth"===n.behavior;let o,d,u;cb(r)?(d=Math.max(Gy(r.document.documentElement,!0===a?"width":"height"),!0===a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),o=!0===a?r.innerWidth:r.innerHeight,u=!0===a?window.scrollX:window.scrollY):(d=r[!0===a?"scrollWidth":"scrollHeight"],o=Gy(r,!0===a?"width":"height"),u=r[!0===a?"scrollLeft":"scrollTop"]);const f=d-o;if(n.top=Math.ceil(Math.max(Math.min(f,n.top),0)),vw(o,d)||n.top===u)return e({scrollHeight:d,scrollTop:u,viewportHeight:o}),void(i&&t(!0));i?(s.current=n.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,!0===a&&(n={...void 0!==n.behavior?{behavior:n.behavior}:{},left:n.top}),r.scrollTo(n)}}}function ub(e){return e}const fb=ay(()=>{const e=ny(e=>`Item ${e}`),t=ny(e=>`Group ${e}`),n=ny({}),r=ny(ub),i=ny("div"),o=ny(Tv),a=(e,t=null)=>ry(Xv(n,Kv(t=>t[e]),Qv()),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")}}),hb=ay(([e,t])=>({...e,...t}),Zv($w,fb)),pb=({height:t})=>e("div",{style:{height:t}}),Cb={overflowAnchor:"none",position:lb(),zIndex:1},mb={overflowAnchor:"none"},gb={...mb,display:"inline-block",height:"100%"},vb=i.memo(function({showTopList:t=!1}){const n=Tb("listState"),r=Ib("sizeRanges"),o=Tb("useWindowScroll"),a=Tb("customScrollParent"),l=Ib("windowScrollContainerState"),s=Ib("scrollContainerState"),c=a||o?l:s,d=Tb("itemContent"),u=Tb("context"),f=Tb("groupContent"),h=Tb("trackItemSizes"),p=Tb("itemSize"),m=Tb("log"),g=Ib("gap"),v=Tb("horizontalDirection"),{callbackRef:y}=yy(r,p,h,t?Tv:c,m,g,a,v,Tb("skipAnimationFrameInResizeObserver")),[w,b]=i.useState(0);Nb("deviation",e=>{w!==e&&b(e)});const E=Tb("EmptyPlaceholder"),M=Tb("ScrollSeekPlaceholder")??pb,A=Tb("ListComponent"),x=Tb("ItemComponent"),L=Tb("GroupComponent"),k=Tb("computeItemKey"),H=Tb("isSeeking"),S=Tb("groupIndices").length>0,_=Tb("alignToBottom"),V=Tb("initialItemFinalLocationReached"),O=t?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==w?w:_?"auto":0,paddingLeft:n.offsetTop,paddingRight:n.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==w?w:_?"auto":0,paddingBottom:n.offsetBottom,paddingTop:n.offsetTop},...V?{}:{visibility:"hidden"}};return t||0!==n.totalCount||null==E?e(A,{...Mb(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=k(t+n.firstItemIndex,e.data,u);return H?C(M,{...Mb(M,u),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?C(L,{...Mb(L,u),"data-index":t,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Cb},f(e.index,u)):C(x,{...Mb(x,u),...Ab(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?gb:mb},S?d(e.index,e.groupIndex,e.data,u):d(e.index,e.data,u))})}):e(E,{...Mb(E,u)})}),yb={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},wb={outline:"none",overflowX:"auto",position:"relative"},bb=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),Eb={position:lb(),top:0,width:"100%",zIndex:1};function Mb(e,t){if("string"!=typeof e)return{context:t}}function Ab(e,t){return{item:"string"==typeof e?void 0:t}}const xb=i.memo(function(){const t=Tb("HeaderComponent"),n=Ib("headerHeight"),r=Tb("HeaderFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,Tb("skipAnimationFrameInResizeObserver")),a=Tb("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),Lb=i.memo(function(){const t=Tb("FooterComponent"),n=Ib("footerHeight"),r=Tb("HeaderFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,Tb("skipAnimationFrameInResizeObserver")),a=Tb("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null});function kb({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:i,style:o,context:a,...l}){const s=r("scrollContainerState"),c=n("ScrollerComponent"),d=r("smoothScrollTargetReached"),u=n("scrollerRef"),f=n("horizontalDirection")||!1,{scrollByCallback:h,scrollerRef:p,scrollToCallback:C}=db(s,d,c,u,void 0,f);return t("scrollTo",C),t("scrollBy",h),e(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...f?wb:yb,...o},tabIndex:0,...l,...Mb(c,a),children:i})})}function Hb({useEmitter:t,useEmitterValue:n,usePublisher:r}){return i.memo(function({children:o,style:a,context:l,...s}){const c=r("windowScrollContainerState"),d=n("ScrollerComponent"),u=r("smoothScrollTargetReached"),f=n("totalListHeight"),h=n("deviation"),p=n("customScrollParent"),C=i.useRef(null),m=n("scrollerRef"),{scrollByCallback:g,scrollerRef:v,scrollToCallback:y}=db(c,u,d,m,p);return sb(()=>(v.current=p||C.current?.ownerDocument.defaultView,()=>{v.current=null}),[v,p]),t("windowScrollTo",y),t("scrollBy",g),e(d,{ref:C,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...0!==f?{height:f+h}:void 0},...s,...Mb(d,l),children:o})})}const Sb=({children:t})=>{const n=i.useContext(rb),r=Ib("viewportHeight"),o=Ib("fixedItemHeight"),a=Tb("alignToBottom"),l=Tb("horizontalDirection"),s=gy(i.useMemo(()=>Ov(r,e=>Gy(e,l?"width":"height")),[r,l]),!0,Tb("skipAnimationFrameInResizeObserver"));return i.useEffect(()=>{n&&(r(n.viewportHeight),o(n.itemHeight))},[n,r,o]),e("div",{"data-viewport-type":"element",ref:s,style:bb(a),children:t})},_b=({children:t})=>{const n=i.useContext(rb),r=Ib("windowViewportRect"),o=Ib("fixedItemHeight"),a=Tb("customScrollParent"),l=by(r,a,Tb("skipAnimationFrameInResizeObserver")),s=Tb("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:bb(s),children:t})},Vb=({children:t})=>{const n=Tb("TopItemListComponent")??"div",r=Tb("headerHeight"),i={...Eb,marginTop:`${r}px`},o=Tb("context");return e(n,{style:i,...Mb(n,o),children:t})},Ob=i.memo(function(t){const r=Tb("useWindowScroll"),i=Tb("topItemsIndexes").length>0,o=Tb("customScrollParent"),a=Tb("context");return n(o||r?Zb:Db,{...t,context:a,children:[i&&e(Vb,{children:e(vb,{showTopList:!0})}),n(o||r?_b:Sb,{children:[e(xb,{}),e(vb,{}),e(Lb,{})]})]})}),{Component:zb,useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}=nb(hb,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",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"}},Ob),Db=kb({useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}),Zb=Hb({useEmitter:Nb,useEmitterValue:Tb,usePublisher:Ib}),jb=zb,Rb=ay(()=>{const e=ny(e=>n("td",{children:["Item $",e]})),t=ny(null),r=ny(e=>n("td",{colSpan:1e3,children:["Group ",e]})),i=ny(null),o=ny(null),a=ny({}),l=ny(ub),s=ny(Tv),c=(e,t=null)=>ry(Xv(a,Kv(t=>t[e]),Qv()),t);return{components:a,computeItemKey:l,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:o,fixedHeaderContent:i,itemContent:e,groupContent:r,ScrollerComponent:c("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});Zv($w,Rb),lb();const Bb={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Pb={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Fb,floor:Ub,max:qb,min:Wb,round:Qb}=Math;function Gb(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function Kb(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function Yb(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}const Xb=ay(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:l,scrollTo:s,scrollTop:c,smoothScrollTargetReached:d,viewportHeight:u},f,h,{didMount:p,propsReady:C},{customScrollParent:m,useWindowScroll:g,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w},b])=>{const E=ny(0),M=ny(0),A=ny(Bb),x=ny({height:0,width:0}),L=ny({height:0,width:0}),k=iy(),H=iy(),S=ny(0),_=ny(null),V=ny({column:0,row:0}),O=iy(),z=iy(),N=ny(!1),T=ny(0),I=ny(!0),D=ny(!1),Z=ny(!1);jv(Xv(p,ty(T),Gv(([e,t])=>0!==t)),()=>{Rv(I,!1)}),jv(Xv(sy(p,I,L,x,T,D),Gv(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i)),([,,,,e])=>{Rv(D,!0),Cw(1,()=>{Rv(k,e)}),Uv(Xv(c),()=>{Rv(t,[0,0]),Rv(I,!0)})}),Fv(Xv(z,Gv(e=>null!=e&&e.scrollTop>0),Yv(0)),M),jv(Xv(p,ty(z),Gv(([,e])=>null!=e)),([,e])=>{e&&(Rv(x,e.viewport),Rv(L,e.item),Rv(V,e.gap),e.scrollTop>0&&(Rv(N,!0),Uv(Xv(c,$v(1)),e=>{Rv(N,!1)}),Rv(s,{top:e.scrollTop})))}),Fv(Xv(x,Kv(({height:e})=>e)),u),Fv(Xv(sy(cy(x,Kb),cy(L,Kb),cy(V,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),cy(c)),Kv(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),O),Fv(Xv(sy(cy(E),r,cy(V,Yb),cy(L,Kb),cy(x,Kb),cy(_),cy(M),cy(N),cy(I),cy(T)),Gv(([,,,,,,,e])=>!e),Kv(([e,[t,n],r,i,o,a,l,,s,c])=>{const{column:d,row:u}=r,{height:f,width:h}=i,{width:p}=o;if(0===l&&(0===e||0===p))return Bb;if(0===h){const t=mw(c,e);return function(e){return{...Pb,items:e}}(Gb(t,t+Math.max(l-1,0),a))}const C=Jb(p,h,d);let m,g;s?0===t&&0===n&&l>0?(m=0,g=l-1):(m=C*Ub((t+u)/(f+u)),g=C*Fb((n+u)/(f+u))-1,g=Wb(e-1,qb(g,C-1)),m=Wb(g,qb(0,m))):(m=0,g=-1);const v=Gb(m,g,a),{bottom:y,top:w}=$b(o,r,i,v),b=Fb(e/C);return{bottom:y,itemHeight:f,items:v,itemWidth:h,offsetBottom:b*f+(b-1)*u-y,offsetTop:w,top:w}})),A),Fv(Xv(_,Gv(e=>null!==e),Kv(e=>e.length)),E),Fv(Xv(sy(x,L,A,V),Gv(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),Kv(([e,t,{items:n},r])=>{const{bottom:i,top:o}=$b(e,r,t,n);return[o,i]}),Qv(Uy)),t);const j=ny(!1);Fv(Xv(c,ty(j),Kv(([e,t])=>t||0!==e)),j);const R=oy(Xv(sy(A,E),Gv(([{items:e}])=>e.length>0),ty(j),Gv(([[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}),Kv(([[,e]])=>e-1),Qv())),B=oy(Xv(cy(A),Gv(({items:e})=>e.length>0&&0===e[0].index),Yv(0),Qv())),P=oy(Xv(cy(A),ty(N),Gv(([{items:e},t])=>e.length>0&&!t),Kv(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),Qv(Fy),ey(0)));Fv(P,h.scrollSeekRangeChanged),Fv(Xv(k,ty(x,L,E,V),Kv(([e,t,n,r,i])=>{const o=hw(e),{align:a,behavior:l,offset:s}=o;let c=o.index;"LAST"===c&&(c=r-1),c=qb(0,c,Wb(r-1,c));let d=eE(t,i,n,c);return"end"===a?d=Qb(d-t.height+n.height):"center"===a&&(d=Qb(d-t.height/2+n.height/2)),void 0!==s&&0!==s&&(d+=s),{behavior:l,top:d}})),s);const F=ry(Xv(A,Kv(e=>e.offsetBottom+e.bottom)),0);return Fv(Xv(w,Kv(e=>({height:e.visibleHeight,width:e.visibleWidth}))),x),{customScrollParent:m,data:_,deviation:S,footerHeight:i,gap:V,headerHeight:o,increaseViewportBy:e,initialItemCount:M,itemDimensions:L,overscan:n,restoreStateFrom:z,scrollBy:a,scrollContainerState:l,scrollHeight:H,scrollTo:s,scrollToIndex:k,scrollTop:c,smoothScrollTargetReached:d,totalCount:E,useWindowScroll:g,viewportDimensions:x,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:w,...h,gridState:A,horizontalDirection:Z,initialTopMostItemIndex:T,totalListHeight:F,...f,endReached:R,propsReady:C,rangeChanged:P,startReached:B,stateChanged:O,stateRestoreInProgress:N,...b}},Zv(Hw,Ey,Ew,Uw,uw,qw,my));function Jb(e,t,n){return qb(1,Ub((e+n)/(Ub(t)+n)))}function $b(e,t,n,r){const{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};const o=eE(e,t,n,r[0].index);return{bottom:eE(e,t,n,r[r.length-1].index)+i,top:o}}function eE(e,t,n,r){const i=Jb(e.width,n.width,t.column),o=Ub(r/i),a=o*n.height+qb(0,o-1)*t.row;return a>0?a+t.row:a}const tE=ay(()=>{const e=ny(e=>`Item ${e}`),t=ny({}),n=ny(null),r=ny("virtuoso-grid-item"),i=ny("virtuoso-grid-list"),o=ny(ub),a=ny("div"),l=ny(Tv),s=(e,n=null)=>ry(Xv(t,Kv(t=>t[e]),Qv()),n),c=ny(!1),d=ny(!1);return Fv(cy(d),c),{components:t,computeItemKey:o,context:n,FooterComponent:s("Footer"),HeaderComponent:s("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:s("Item","div"),itemContent:e,listClassName:i,ListComponent:s("List","div"),readyStateChanged:c,reportReadyState:d,ScrollerComponent:s("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder","div")}}),nE=ay(([e,t])=>({...e,...t}),Zv(Xb,tE)),rE=i.memo(function(){const t=dE("gridState"),n=dE("listClassName"),r=dE("itemClassName"),o=dE("itemContent"),a=dE("computeItemKey"),l=dE("isSeeking"),s=uE("scrollHeight"),c=dE("ItemComponent"),d=dE("ListComponent"),u=dE("ScrollSeekPlaceholder"),f=dE("context"),h=uE("itemDimensions"),p=uE("gap"),m=dE("log"),g=dE("stateRestoreInProgress"),v=uE("reportReadyState"),y=gy(i.useMemo(()=>e=>{const t=e.parentElement.parentElement.scrollHeight;s(t);const n=e.firstChild;if(null!==n){const{height:e,width:t}=n.getBoundingClientRect();h({height:e,width:t})}p({column:pE("column-gap",getComputedStyle(e).columnGap,m),row:pE("row-gap",getComputedStyle(e).rowGap,m)})},[s,h,p,m]),!0,!1);return sb(()=>{t.itemHeight>0&&t.itemWidth>0&&v(!0)},[t]),g?null:e(d,{className:n,ref:y,...Mb(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,{...Mb(u,f),height:t.itemHeight,index:n.index,width:t.itemWidth},i):C(c,{...Mb(c,f),className:r,"data-index":n.index,key:i},o(n.index,n.data,f))})})}),iE=i.memo(function(){const t=dE("HeaderComponent"),n=uE("headerHeight"),r=dE("headerFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,!1),a=dE("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),oE=i.memo(function(){const t=dE("FooterComponent"),n=uE("footerHeight"),r=dE("headerFooterTag"),o=gy(i.useMemo(()=>e=>{n(Gy(e,"height"))},[n]),!0,!1),a=dE("context");return null!=t?e(r,{ref:o,children:e(t,{...Mb(t,a)})}):null}),aE=({children:t})=>{const n=i.useContext(ib),r=uE("itemDimensions"),o=uE("viewportDimensions"),a=gy(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:bb(!1),children:t})},lE=({children:t})=>{const n=i.useContext(ib),r=uE("windowViewportRect"),o=uE("itemDimensions"),a=dE("customScrollParent"),l=by(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:bb(!1),children:t})},sE=i.memo(function({...t}){const r=dE("useWindowScroll"),i=dE("customScrollParent"),o=i||r?hE:fE,a=i||r?lE:aE,l=dE("context");return e(o,{...t,...Mb(o,l),children:n(a,{children:[e(iE,{}),e(rE,{}),e(oE,{})]})})}),{useEmitter:cE,useEmitterValue:dE,usePublisher:uE}=nb(nE,{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"}},sE),fE=kb({useEmitter:cE,useEmitterValue:dE,usePublisher:uE}),hE=Hb({useEmitter:cE,useEmitterValue:dE,usePublisher:uE});function pE(e,t,n){return"normal"!==t&&!0!==t?.endsWith("px")&&n(`${e} was not resolved to pixel value correctly`,t,hy),"normal"===t?0:parseInt(t??"0",10)}const CE=({optionsList:r=[],onSelectVariable:i,dropdownPosition:o,position:a="relative",width:l,height:s="160px",zIndex:c=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:s,zIndex:c}:{width:l,height:s,zIndex:c},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(jb,{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(Sv,{option:a})},`${a.id}-${o}`):null},style:{height:s,fontSize:"12px"},overscan:10,fixedItemHeight:32})})},mE=({data:r=[],width:i,height:o,lineChartWidth:a,yAxisLabel:s,xAxisLabel:d,yAxisValueColor:u,xAxisColor:f,yAxisColor:h,yAxisLabelColor:p,textSize:C,fontWeight:m,numberSize:g,chartName:v,shouldCenterSinglePoint:y,xAxisLabelGap:w=16,isLeftOverflow:b=!1})=>{const E=40,M=i-80,A=o-80,[x,L]=c(!1),[k,H]=c({cursorX:null,hoverValues:{},dotPositions:{},tooltip:{visible:!1,left:0,top:0},currentXValue:null});l(()=>{const e=()=>{L(!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:C,fontWeight:"semi-bold",children:s})}),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:C,fontWeight:m},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 S(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 _=r?.[0]?.data?.[0]?.hasOwnProperty("date")&&r?.[0]?.data?.[0]?.hasOwnProperty("totalMemory"),V="date",O=_?"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=>S(e[O]))),5),T=e=>{if("memory"===v){const t=Math.max(...r?.flatMap(e=>e?.data?.map(e=>S(e[O]))));return A-e*A/(t>1024?t:1024)}return A-e*A/(0===N?1024:N)},I=e=>{if(1===e?.length){const t=e?.[0],n=z(t[V]),r=T(S(t[O]));return`M 0 ${T(0)} L ${n} ${r}`}return e?.reduce((t,n,r)=>{const i=z(n[V]),o=T(S(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?T(S(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:C,fontWeight:"semi-bold",children:s})}),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 L(!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:T(S(r[O]))})}),L(!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:C,fontWeight:m},children:d}),r.map((r,i)=>{return!1!==r.show?n("g",{children:[e("path",{d:I(r.data),fill:"none",stroke:r.color,strokeWidth:a,opacity:(o=r.data,o.every(e=>0===S(e[O]))?.5:1)}),k.dotPositions[i]&&n(t,{children:[e("line",{x1:k.dotPositions[i].x,y1:0,x2:k.dotPositions[i].x,y2:A,stroke:"gray",strokeWidth:.5,strokeDasharray:"4"}),e("circle",{cx:k.dotPositions[i].x,cy:k.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:k.dotPositions[i].y,x2:M,y2:k.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:T(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:T(r),textAnchor:"end",fill:u,className:"ff-line-chart-y-axis-text",style:{fontSize:g},children:r.toFixed(0)},`y-${n}`)})})()]})}),x&&k.tooltip.visible&&n("div",{className:"ff-line-chart-tooltip",style:{left:b&&k.tooltip.left/2>i/1.75?k.tooltip.left-180:k.tooltip.left,top:k.tooltip.top},children:[e("div",{className:"ff-line-chart-date",children:k.currentXValue}),Object.entries(k.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))]})]})]})},gE=({onClose:t,top:r="100px",left:i="0px",className:o,description:a="Download and Install the fireflink client to run the script",onClick:s=()=>{},optionZIndex:c=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:c},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:()=>{s("mac_icon"===t?"mac":t)},children:e(P,{name:t,height:36,width:36})},t))})]})]})},vE=({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})]})}),yE=({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))}),wE=o(({label:t="",hashInputValue:r="",setHashInputValue:i,variableList:o=[],placeholder:s="Enter text",onChange:d,onPaste:u,onCreateVariableClick:f,handleClearInput:h,value:p="",dropdownWidth:C="100%",dropdownHeight:m="160px",isHash:g=!1,isOnlyHash:v=!1,dataFiles:y=[],showAddVariableIcon:w=!0,helperText:E="",error:M,autoComplete:A="off",required:x=!1,zIndex:L=9999,truncateTextValue:k=34,formProps:H={},getSelectedVariable:S=()=>{},symbol:_="$",type:V="text",clearIcon:O=!0,inputTitle:N="",onBlur:T,helperTextWidth:I,iconProps:D={isShowIcon:!1,iconName:"",iconToolTipTitle:"",isIconDisable:!1,iconColor:"",onIconClick:()=>{}},...Z},j)=>{const[R,B]=c(!1),[U,q]=c(!1),[W,Q]=c(!1),[Y,X]=c(null),[J,$]=c(0),[ee,te]=c(!1),[ne,re]=c([]),ie=a(null),oe=a(null),[ae,le]=c("auto"),se=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(j,()=>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 ce=()=>{ie.current&&$(ie.current.selectionStart||0)},de=ce,ue=ce;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),S(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(_,t-1),l=e.indexOf(_,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:[e(K,{title:N,style:{width:"100%"},children:e(rn,{...Z,name:"add_variable",ref:ie,type:V,className:z("ff-variable-input-container",{"ff-variable-input-container--show-icon":se}),value:p,onChange:d,onPaste:()=>{te(!0)},variant:"primary",label:t,placeholder:s,onClick:de,onKeyUp:ue,onFocus:()=>Q(!0),onBlur:e=>{(e=>{e.relatedTarget&&e.relatedTarget.closest(".dropdown-container")||Q(!1)})(e),T?.(e)},autoComplete:A,helperText:E,error:M,required:x,helperTextWidth:I,...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)",cursor:"pointer",children:"Create Variable"})}),!G(p)&&!v&&e("div",{className:z("ff-cancel-icon-container",{"ff-cancel-icon-container--show-icon":se}),children:O&&e(K,{title:"Cancel",style:{zIndex:99999},children:e(P,{onClick:h,name:"close",height:16,width:16,hoverEffect:!0})})}),se&&e("div",{className:"ff-info-icon-container",children:e(K,{title:se&&!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(CE,{position:"absolute",zIndex:L,truncateTextValue:k,width:ae,height:G(pe())?"auto":m,optionsList:pe(),onSelectVariable:fe}),R&&g&&W&&e(yE,{position:"relative",zIndex:L,truncateTextValue:k,width:ae,filteredOptions:ne,onSelectVariable:fe})]})}),bE=({isOpen:t,variableTypesList:r=[],onClose:i,onNameChange:o,onValueChange:a,variableName:s,variableValue:d,onVariableTypeChange:u,selectedVariableType:f,hideValue:h=!1,onHideChange:p,handleSubmit:C,mode:m="create",disabled:g,dataFiles:v=[],truncateTextValue:y=34,isEnterKeySubmit:w=!1})=>{const[b,E]=c(!1),[M,A]=c(""),[x,L]=c(),[k,H]=c(!1),[S,_]=c(!1),[V,O]=c({name:"",value:"",isChecked:!1});l(()=>{t&&"edit"===m&&O({name:s,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(s);E(!!e),A(e)},[s]),l(()=>{if("edit"!==m)return;const{name:e,value:t,isChecked:n}=V;_(s!==e||d!==t||h!==n)},[m,s,d,h,V]);const T=()=>{!k&&N(s)&&(H(!0),C())};l(()=>{if(!w)return;const e=e=>{if("Enter"===e.key){e.preventDefault();!N(s)||k||"edit"===m&&!S||T()}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[w,s,d,h,k,m,S,f]);return e(X,{zIndex:1350,onClose:i,isOpen:t,title:"create"===m?"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"===m?"Create":"Update",type:"submit",onClick:T,disabled:!N(s)||k||"edit"===m&&!S})]}),{}),children:n("div",{className:"ff-create-variable-slider",children:[e("div",{className:"ff-create-variable-slider-input",children:e(rn,{label:"Variable Name",required:!0,type:"text",name:"variableName",value:s||"",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(lr,{label:"Variable Type",required:!0,onChange:e=>{u(e),H(!1)},selectedOption:f,optionsList:r,optionZIndex:99999,valueAccessor:"label",disabled:"edit"===m}),e(wE,{label:"Variable Value",placeholder:"Enter Variable value or select path using #",isHash:!0,isOnlyHash:!0,zIndex:99999,truncateTextValue:y,dataFiles:v,dropdownWidth:"100%",setHashInputValue:L,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})})]})]})})},EE=({highlightText:t="",tableMeta:r=[],tableData:i=[],accordionType:o="row",noDataContent:a,height:l="100%",withFixedHeader:s=!1,headerType:d,TableAccordionStateIconWidth:u=4,TableAccordionStateIconHeight:f=8})=>{const[h,p]=c(-1),C=(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:"--"},m=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:C(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":s}),children:[e("table",{cellSpacing:0,className:z("ff-accordion-table",{"ff-accordion-fixed-header":s}),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:m(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:m(i.data)})]},`column-accordion-${o}`)),i.length<=0&&e("div",{className:"no-data-content",style:{height:`calc(${l} - 50px)`},children:a})]})},ME=({progressPercentage:t,totalMemory:r,usedMemory:i,color:o="var(--brand-color)",trackColor:a="#f0f0f0",height:l=10,label:s,labelFontSize:c=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 C=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 m=0,g=s;if(void 0!==r&&void 0!==i){const e=C(i),t=C(r);t>0?(m=e/t*100,g=s||i):(m=0,g="0MB")}else m=t||0;const v=Math.max(0,Math.min(m,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:c,color:d,children:e(K,{title:oe(g,10,"count")?g:"",children:ie(g,10,"count")})})})]})},AE=({variant:t="primary",size:n="small",onClick:r,label:i="Choose File",disabled:o=!1,type:l="button",className:s="",style:d={},iconName:f,isChooseFile:h=!1,buttonWidth:p="auto",buttonHeight:C="auto",selectedFile:m={},handleCloseIcon:g,isMandatory:v=!1})=>{const y=a(null),[w,b]=c(0);u(()=>{y.current&&b(y.current.getBoundingClientRect().width-10)},[p]);const E=m?.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:C,isChooseFile:h,size:n,disabled:o,className:s,iconName:f,style:d,iconPosition:"right",selectedFile:m,handleCloseIcon:g,isMandatory:v})})})},xE=({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)"})})})]})},LE=({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))}),kE=({onModalClose:t,MediaSrc:r,fileName:o,onDeleteClick:a,mediaType:s,fileId:d,thumbnailMediaSrc:u,isDelete:f=!0,onExpandClick:h,onDownloadClick:p,isMediaIcon:C=!1,previewOnly:m=!1,iconName:g="video_preview",isDisabled:v=!1})=>{const[y,w]=c(!1),b=i.useRef(null),E=()=>{w(!0),h&&h(d)},M=()=>{t?.(),w(!1)},A=()=>{p&&p(d)};return l(()=>{m&&w(!0)},[m]),n("div",{children:[!m&&(C?e(P,{name:g,hoverEffect:!0,onClick:E,disabled:v}):e(kv,{mediaSrc:r,mediaType:s,onDownloadClick:A,onDeleteClick:()=>a?.(r),onExpandClick:E,fileName:o,fileId:d,thumbnailMediaSrc:u,isDelete:f})),y&&e(th,{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"===s&&e("img",{src:r,alt:"fileName",height:"auto"}),"video"===s&&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)})}}})]})})]})},HE=({children:t,orientation:r="",navBarIcons:o=[],mobileHeight:a=448,mobileWidth:l=220,UtilityBar:s,tooltip:c={},background:d,navBarPosition:u="bottom"})=>{const f="portrait"===r,h=f?a:l,p=f?l:a,C=s&&"top"===u,m=s&&"bottom"===u,g=s&&"left"===u;return n("div",{className:["ff-mobileskin-wrapper",f?"portrait":"landscape",g?"ff-side-nav-left":"",C?"navbar-top":"",m?"navbar-bottom":""].filter(Boolean).join(" "),children:[C&&e("div",{className:"ff-nav-bar top-nav-bar",children:o.map(({title:t,name:n,className:r,...i},a)=>{const l=c?.[n]??a;return e(K,{title:c?.[n]||"",placement:"top",children:e("div",{className:`ff-nav-bar-icon ${r||""} ${a===o.length-1?"last-icon":""} ${C?"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"}})})})}),s&&m&&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)})}),s&&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)})})]})},SE=o(({width:t=300,height:r=40,iconHeight:i=16,iconWidth:o=16,placeholder:l="Enter text",iconName:s="right_arrow_filled_icon",iconPosition:c="left",borderRadius:d=4,autoFocus:u=!1,value:f="",iconColor:h="var(--brand-color)",tooltipTitle:p="send",submitPrompt:C,onPromptChange:m,onBlur:g,onFocus:v,disableInput:y,isAdditionalIcon:w=!1,additionalIconName:b,additionIconToolTip:E,onAdditionalIconClick:M},A)=>{const x=a(null);ce([{key:"Enter",action:()=>L()}],x);const L=e=>{f&&C?.(f.trim())};return n("div",{className:z("ff-prompt-container",{"icon-left":"left"===c,"icon-right":"left"!==c}),style:{width:`${t}px`,height:`${r}px`,borderRadius:d},ref:x,children:[e(K,{placement:"top",title:p,children:e(P,{name:s,className:"ff-prompt-icon",height:i,width:o,onClick:C,color:h,disabled:G(f)})}),e("input",{ref:A,className:"ff-prompt-input",type:"text",placeholder:l,autoFocus:u,onChange:m,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})})]})}),_E=({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})})}),VE=({iconName:r,iconPosition:{top:i,left:o,bottom:a,right:l},hoverIconPosition:{top:s,left:d,bottom:u,right:f},modalPosition:{top:h,left:p,bottom:C,right:m},modalWidth:g,modalHeight:v,headerContent:y="Header Content",footerContent:w="Footer Content",iconWidth:b,iconHeight:E,modalHeading:M="Ask Fia",children:x,onClearChat:L})=>{const[k,H]=c(!1),[S,_]=c(!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:()=>{_(e=>!e),setTimeout(()=>H(e=>!e),10)},height:E,width:b}),e("div",{style:{top:void 0!==s?`${s}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})})]}),S&&A(e("div",{className:z("ff-dynamic-modal",{open:k}),style:{top:void 0!==h?`${h}px`:void 0,left:void 0!==p?`${p}px`:void 0,bottom:void 0!==C?`${C}px`:void 0,right:void 0!==m?`${m}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:L})})}),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(()=>_(!1),300))})})})]})]})}),e("div",{className:"ff-dynamic-modal-body",children:x}),w&&e("div",{className:"ff-dynamic-modal-footer",children:w})]})}),document.body)]})},OE=o(({iconName:r,hoverTitle:i,iconPosition:{top:o,left:s,bottom:d,right:u},hoverIconPosition:{top:f,left:h,bottom:p,right:C},modalPosition:{top:m,left:g,bottom:v,right:y},modalWidth:w,modalHeight:E,headerContent:M="Header Content",footerContent:x="Footer Content",iconWidth:L,iconHeight:k,children:H,onVisibilityChange:S},_)=>{const[V,O]=c(!1),[N,T]=c(!1),I=a(null),D=()=>{I.current&&clearTimeout(I.current),O(!1),I.current=setTimeout(()=>{T(!1),S?.(!1)},300)};return b(_,()=>({closeModal:D})),l(()=>()=>{I.current&&clearTimeout(I.current)},[]),n(t,{children:[n("div",{style:{top:void 0!==o?`${o}px`:void 0,left:void 0!==s?`${s}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:()=>{I.current&&clearTimeout(I.current),T(e=>!e),S?.(!N),I.current=setTimeout(()=>O(e=>!e),10)},height:k,width:L}),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!==C?`${C}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!==m?`${m}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)]})}),zE=({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})]})]})]}),NE=({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"})]})})})]}),TE=o(({name:t,height:n=30,width:r=30,path:i="",onClick:o,color:s="var(--brand-color)",hoverEffect:c=!1,className:d="",disabled:u=!1,variant:f="light",isSelected:h=!1,x:p,y:C,tabIndex:m=-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!==C&&y.current.setAttribute("y",String(C)))},[p,C]);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:m,...g};return e("span",{...w,children:e("img",{height:n,width:r,src:i,alt:""})})}),IE=({id:r=0,serialNumber:i,activeId:o,setActiveId:s,children:d,onIconClick:u,numberChildren:f,onContainerClick:h,onNextClick:p,onPreviousClick:C,disabled:m,isEditAccess:g,versionsLength:v,count:y,hiddenActions:w=[]})=>{const[b,E]=c(!1),[M,A]=c(!1),x=a(null),L=Array.isArray(w)?w:w?[w]:[],k=(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:()=>{s(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=>!L.includes(e.action)).map((t,n)=>{const r=g&&"delete"===t?.action||"regenerate"===t?.action&&(v??0)>=3||m;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=>k(e,C),cursorType:"pointer"}),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=>k(e,p),cursorType:"pointer"})]})]})]})},DE=o(({type:t="text",variant:r="primary",name:i="",label:o,disabled:a=!1,disableLinkIcon:l=!1,required:s=!1,placeholder:c="Attach Link",value:d,error:u,helperText:f,noBorder:h,className:p="",onChange:C,onBlur:m,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:L,isViewMode:k=!1,...H},S)=>{const _=!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":_,"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:[s&&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:S,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:c,disabled:k||a,onChange:C,onFocus:g,onBlur:m,autoComplete:v,autoFocus:y,min:w,max:b,onClick:x,onKeyUp:L,...H}),e("div",{className:"input-link-icon",children:l||u||!_?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})]})}),ZE=({labelsList:r=[],height:i=""})=>{const o=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",style:i?{height:i}:void 0})}),r.length>1&&e(K,{title:e(F,{as:"div",children:o}),children:e(F,{as:"div",children:"+"+(r.length-1),className:"ff-chip-count",fontWeight:"medium"})})]})})};class jE 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 RE=({iconName:t="",onButtonClick:r,buttonLabel:i="Label",buttonText:o="To Add Group",disableButton:a=!1,stepCount:l=1,iconWidth:s=120,iconHeight:c=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:s,height:c})}),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(eh,{label:i,onClick:r,iconName:"plus_user_icon",isDisable:a}),e(F,{fontSize:"12px",fontWeight:"semi-bold",lineHeight:"18px",children:o})]})]}),BE=({variant:t="default",tabsData:r,activeTabId:i,onTabClick:o,noBorder:a=!1,noPadding:l=!1,titleSize:s="12px"})=>{const[d,u]=c(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:s,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})]})},PE=o(({label:t="Status",iconName:r="update_icon",onClick:i,isDisable:o=!1,variant:a="default",backgroundColor:l=!1,border:s=!1},c)=>{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 ${s?`ff-status-indicator--with-border ff-status-indicator--${a}-border`:""}\n `,ref:c,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})]})})}),FE=({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))})]})},UE=({handleClose:t,handleResend:r,handleOtp:i,resendTimeout:o=30})=>{const[s,d]=c(Array(6).fill("")),[u,f]=c(o),[h,p]=c(!0),C=a(Array(6).fill(null));l(()=>{h||C.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 m=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);C.current[r]?.focus()};return e(th,{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:s.map((t,n)=>e("input",{type:"text",maxLength:1,className:`ff-otp-input ${t?"filled":""} ${n===s.findIndex(e=>""===e)?"active":""}`,value:t,onKeyDown:e=>((e,t)=>{const{key:n}=e;if(/^[0-9]$/.test(n)){e.preventDefault();const r=[...s];r[t]=n,d(r),t<5&&C.current[t+1]?.focus()}else if("Backspace"===n){e.preventDefault();const n=[...s];n[t]="",d(n),t>0&&C.current[t-1]?.focus()}})(e,n),onPaste:m,ref:e=>C.current[n]=e,readOnly:!0},n))}),e(U,{variant:"primary",label:"Submit",onClick:()=>i(s.join("")),disabled:s.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)`:""]})]})})},qE=({isOpen:t,onClose:r,isPlaying:i,onTogglePlay:o,mediaType:s,src:d,headerTitle:u,onDownload:f,onExpand:h,showHeader:C=!0,showDownload:m=!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,isFullscreen:L=!1})=>{const k=a(null),H=a(null),[S,_]=c(0),[V,O]=c(0),[z,N]=c(!1),[T,I]=c(0);l(()=>{"video"===s&&k.current&&!M&&(i?k.current.play():k.current.pause())},[i,s,M]);const D=p(()=>{if(k.current&&!z){const e=k.current.currentTime/k.current.duration*100;I(e||0),_(k.current.currentTime)}},[z]),Z=p(()=>{k.current&&O(k.current.duration)},[]),j=p(()=>{_(0),I(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,I(e),_(t)}},[]),U=p(e=>{if(z||!H.current)return;const t=H.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(!H.current)return;N(!0);const t=H.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||!H.current||!k.current)return;const t=H.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(zs,{isOpen:t,onClose:r,isMaximized:!1,showHeader:C,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"===s?e("video",{ref:k,src:d,className:"ff-media-video",onTimeUpdate:D,onLoadedMetadata:Z,onEnded:j}):e("img",{src:d,alt:"Preview",className:"ff-media-image"})),n("div",{className:"ff-top-right-icons",children:[m&&e(K,{title:"Download",children:e(P,{name:"download_file",color:"white",onClick:f})}),g&&e(K,{title:L?"Minimize":"Maximize",children:e(P,{name:L?"collapse_icon":"expand_icon",color:"white",onClick:h})})]}),"video"===s&&w&&!M&&n("div",{className:"ff-media-controls",children:[e("button",{onClick:o,className:"ff-play-pause-btn",children:e(K,{title:i?"Pause":"Play",children:e(P,{width:35,height:35,name:i?"pause_button":"play_button",color:"white"})})}),n("div",{className:"ff-progress-bar",children:[e("span",{className:"ff-current-time",children:R(S)}),e("input",{type:"range",className:"ff-seek-bar",min:0,max:100,value:T,onChange:e=>B(parseFloat(e.target.value)),onClick:U,onMouseDown:q,ref:H}),e("span",{className:"ff-total-time",children:R(V)})]}),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:L?"Minimize":"Maximize",children:e(P,{name:L?"collapse_icon":"expand_icon",color:"white",onClick:h,cursorType:"pointer"})})]})]})]})}):null},WE=({header:r,secondaryHeader:i,primaryCount:o,secondaryCount:a,primaryItems:l,secondaryItems:s,width:c,activeTab:d="primary",activeTabId:u,onPrimaryTabClick:f,onSecondaryTabClick:h,onTabClick:p,actions:C,tabsData:m,notchPosition:g="top-left"})=>{const v=i&&"secondary"===d?s: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,className:L=""}=C?.download||{},{tooltip:k="Delete",iconName:H="delete_icon",disabled:S=!1,onClick:_,className:V=""}=C?.delete||{},O=()=>n("div",{className:"ff-dropdown-header-icons",children:[C?.download&&e(K,{title:E,children:e(P,{name:M||"",className:`ff-dropdown-icon ff-download-icon ${L}`,onClick:x,width:18,height:20,disabled:A,hoverEffect:!0})}),C?.delete&&e(K,{title:k,children:e(P,{name:H||"",className:`ff-dropdown-icon ff-delete-icon ${V}`,onClick:_,width:25,height:25,disabled:S,hoverEffect:!0})})]});return n("div",{className:"ff-resolution-dropdown",style:c?{minWidth:c}:{},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&&m&&u?n(t,{children:[e(qs,{tabsData:m,activeTabId:u,onTabClick:e=>{p&&p(e),"tab-1"===e&&f?f():"tab-2"===e&&h&&h()}}),b&&O()]}):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})]}),O()]}):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))})]})},QE=(e,t)=>"string"==typeof e?ie(e,t):i.isValidElement(e)?i.cloneElement(e,{},QE(e.props.children,t)):Array.isArray(e)?e.map(e=>QE(e,t)):e,GE=(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:"--"},KE=(t,n=[],r,i,o)=>{let a=n;const l=void 0!==i?!i:r;return G(n)&&(isNaN(t)||(a=Array(t).fill(!0))),e("div",{className:"tree-table-fn-space-container",children:a?.map((n,r)=>e("span",{className:`tree-table-fn-space-block tree-table-fn-space-block-${r} ${n?"":"no-lines"} ${l&&r===t-1?"last-node":""} ${o?"folder":""}`},r))})},YE=i.memo(({treeRowRef:r,col:i,colIndex:o,columnMeta:a,node:l,selected:s,select:c,onCheckBoxChange:d,onToggleExpand:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,isExpanding:C,columnTextColor:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M})=>{const A={color:`${m||"var(--ff-primary-text-color)"}`,width:a?.width??i?.width,position:a?.sticky?"sticky":void 0,left:a?.sticky?a.left:void 0,zIndex:a?.sticky?a.zIndex:void 0};return n("div",{className:`ff-table-tree-fn-td ${i.isTree&&l.container?"folder":""} ${a?.sticky?"sticky-tree-column":""}`,"data-col-index":o,style:A,children:[i.isTree&&KE(l.hierarchy,l.parentSiblings,l.lastChild,l.nextSibling,l.container),n("div",{className:"tree-fn-title-container",children:[i.isTree&&e("span",{className:`tree-table-fn-space-block last-tree-fn-block last-tree-fn-block tree-table-fn-space-block-${l.hierarchy} ${l?.expanded?"tree-fn-row-expanded":"tree-fn-row-collapsed"} ${l.container&&l.expandable?"":"no-tree-folder"}`,children:l.container&&l.expandable&&n("span",{onClick:()=>u(l),children:[" ",e(C?js:N,{})]})}),n("span",{className:"tree-table-fn-td-content "+(i.isTree&&l.container?"folder":""),children:[!l?.isNewNode&&n(t,{children:[i.isTree&&"checkbox"===c&&!(g&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:"none"===l.selectedStatus?e(K,{title:l?.currentEnvId&&l?.envId&&l?.currentEnvId!==l?.envId?"This script is assigned to another environment. Selecting it will reassign it to the current environment.":void 0,children:e(te,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable,isDefaultHover:"none"===l.selectedStatus&&!!l.machine})}):e(te,{checked:"completely"===l.selectedStatus,partial:"partially"===l.selectedStatus,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})}),i.isTree&&"radio"===c&&!(g&&l.unselectable)&&e("span",{className:"tree-table-fn-td-content-select",children:e(Ra,{name:l.key,checked:s.includes(l.key),value:l.key,onChange:e=>d(e,l),disabled:l.unselectable||"REVIEW"===l.state||!0===l?.isDisable})})]}),l.isNewNode&&i.isTree?e(Zs,{onCancel:h,onConfirm:f,value:l.value,label:l?.label,optionsList:l.options,selectedOption:l.selectedOption,withDropdown:"inputWithDropdown"===l.type,handleCustomError:p,inputFieldWidth:y,selectFieldWidth:w,confirmIconTooltip:l.confirmIconTooltip,cancelIconTooltip:l.cancelIconTooltip,isEditable:E,setIsEditable:M,isOnBlurTrue:!1,isDisable:{confirm:b},isTableTree:!0}):e("span",{className:"tree-table-fn-td-content-text",children:QE(GE(l,i),v)})]})]}),i.actions&&!l?.isNewNode&&e("div",{className:"table-tree-fn-row-action",children:i.actions(l,r)})]})});YE.displayName="TableCell";const XE=i.memo(({node:t,columnsData:n,columnMeta:r,selected:i,select:o,onRowClick:l,onToggleExpand:s,onCheckBoxChange:c,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,index:p,selectedNode:C,hideOnDisable:m,scriptLengthTruncate:g,addModuleInputWidth:v,addModuleSelectWidth:y,disableEditLabelConfirmIcon:w,isEditable:b,setIsEditable:E,style:M})=>{const A=a(null);return e("div",{"data-level":t.hierarchy,ref:A,className:"ff-table-tree-fn-row show-tree "+(C&&C===t.key?"fn-selected-node":""),onClick:e=>l(e,t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||l(e,t)},role:"button",tabIndex:0,id:0===p?"table-fn-first-row":t.key,style:M,children:n.map((n,a)=>e(YE,{treeRowRef:A,col:n,colIndex:a,node:t,selected:i,select:o,onCheckBoxChange:c,onToggleExpand:s,onAddConfirm:d,onAddCancel:u,handleEditFieldError:f,isExpanding:h,hideOnDisable:m,scriptLengthTruncate:g,addModuleInputWidth:v,addModuleSelectWidth:y,disableEditLabelConfirmIcon:w,isEditable:b,setIsEditable:E,columnMeta:r?.[a]},n.name))})});XE.displayName="TableRow";const JE=({flattenedTreeData:t,columnsData:n,columnMeta:r,rowHeight:i=32,startIndex:o=0,totalHeight:a=0,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,expanding:C,selectedNode:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M})=>e("div",{className:"ff-table-tree-fn-body",style:{height:`${a}px`,position:"relative"},children:t?.map((t,a)=>e(XE,{node:t,columnsData:n,columnMeta:r,selected:l,select:s,onRowClick:c,onToggleExpand:d,onCheckBoxChange:u,onAddConfirm:f,onAddCancel:h,handleEditFieldError:p,isExpanding:t.key===C,index:o+a,selectedNode:m,hideOnDisable:g,scriptLengthTruncate:v,addModuleInputWidth:y,addModuleSelectWidth:w,disableEditLabelConfirmIcon:b,isEditable:E,setIsEditable:M,style:{transform:`translateY(${(o+a)*i}px)`,height:`${i}px`,position:"absolute",top:0,left:0,right:0}},t.key))}),$E=i.memo(({columnsData:t,columnMeta:r,totalWidth:i,rootNode:o,selected:s,onCheckBoxChange:d,selectedNode:u,tableHeaderBgColor:f,hideOnDisable:h,transparentHeader:p,scriptLengthTruncate:C=25,showHeader:m=!0})=>{const g=a(null),[v,y]=c(!1),[w,b]=c(!1);l(()=>{y(!0)},[]);const E=(e,t)=>{const n=r?.[e];return{width:n?.width??t,position:n?.sticky?"sticky":void 0,left:n?.sticky?n.left:void 0,zIndex:n?.sticky?n.zIndex:void 0}};return n("div",{className:"ff-table-tree-fn-head",children:[m&&e("div",{className:"ff-table-tree-fn-row no-hover",style:{minWidth:i},children:t.map(({name:t,width:n},i)=>e("div",{className:"ff-table-tree-fn-th "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:{...E(i,n),backgroundColor:p?"transparent":f,pointerEvents:p?"none":"auto"},children:t},t))}),o&&e("div",{className:"ff-table-tree-fn-row show-tree "+(u&&u===o?.node?.key?"hover":""),ref:g,onMouseEnter:e=>{e.stopPropagation(),b(!0)},onMouseLeave:e=>{e.stopPropagation(),b(!1)},children:t.map((t,i)=>e("div",{className:"ff-table-tree-fn-td "+(r?.[i]?.sticky?"sticky-tree-column":""),"data-col-index":i,style:E(i,t.width),children:n("span",{className:"tree-table-fn-default-content",children:[0===i&&"checkbox"===o.select&&!(h&&o.node.isDisabled)&&e(te,{checked:"partially"!==o?.node?.selectedStatus&&("completely"===o?.node?.selectedStatus||!1),partial:"partially"===o.node.selectedStatus,onChange:e=>d(e,o.node),disabled:o.node.isDisabled}),0===i&&"radio"===o.select&&!(h&&o.node.isDisabled)&&e(Ra,{name:o.node.key,checked:s.includes(o.node.key),value:o.node.key,onChange:e=>d(e,o.node),disabled:o.node.isDisabled}),n("span",{className:"tree-table-fn-td-content-text",children:["name"===t.accessor?e("span",{children:o.node[t.accessor]}):e("span",{children:QE(GE(o.node,t),C)}),o.cell&&0===i&&e("span",{className:"table-tree--fn-root-cell",children:o.cell(o.node)})]}),w&&o.actions&&0===i&&v&&g.current&&e("div",{className:"table-tree-fn-row-action",children:o.actions(o.node,g)})]})},i))})]})});$E.displayName="TableHead";const eM=32,tM="__root__",nM=(e,t)=>{if(!e?.length)return[];const n=new Map,r=new Map,i=new Map,o=new Map;t&&t.key&&n.set(t.key,t),e.forEach(e=>{n.set(e.key,e);const t=e.parentId??tM;r.has(t)||(r.set(t,[]),o.set(t,{container:0,resource:0})),r.get(t)?.push(e);const i=o.get(t);i&&(e.container?i.container++:i.resource++)}),r.forEach(e=>{e.forEach((e,t)=>{i.set(e.key,t)})});const a=e=>{const t=e.parentId??tM,a=r.get(t);if(!a||0===a.length)return!1;if((i.get(e.key)??0)<a.length-1)return!0;const l=n.get(t),s=o.get(t);if(l&&s){const t=a.filter(e=>e.container).reduce((e,t)=>e+(t.totalResourceCount??0),0),n=a.filter(e=>!e.container).length,r=Math.max(0,(l.totalResourceCount??0)-(t+n));if(e.container){return s.container<(l.subContainerCount??0)||r>0}return s.resource<r}return!1},l=e=>{if(void 0!==e.selectedStatus)return e.selectedStatus;let r=e;for(;r?.parentId;){const e=n.get(r.parentId);if(!e)break;if("completely"===e.selectedStatus)return"completely";if("none"===e.selectedStatus)return"none";r=e}return"completely"===t?.selectedStatus?"completely":"none"===t?.selectedStatus?"none":e.selectedStatus};return e.map(e=>{const t=e,r=t.parentSiblings&&t.parentSiblings.length>0?t.parentSiblings:(e=>{const t=e.hierarchy??0;if(t<=0)return[];const r=[];let i=e;for(;i&&(r.unshift(i),i.parentId);){const e=n.get(i.parentId);if(!e)break;i=e}const o=r.map(e=>a(e));return o.length===t?o:o.length>t?o.slice(o.length-t):new Array(t-o.length).fill(!1).concat(o)})(e);return{...e,lastChild:!a(e),parentSiblings:r,selectedStatus:l(e)}})},rM=o(({treeData:t,columnsData:r,selected:i=[],select:o=null,onChange:s=()=>{},onClick:d=()=>{},onExpand:f=()=>{},loadMore:C=()=>{},tableBorder:m,height:g="calc(100vh - 134px)",newNode:v,onAddConfirm:y=()=>{},onAddCancel:w=()=>{},handleEditFieldError:b,loading:E=!1,rootNode:M,pagination:A=!0,selectedNode:x,tableHeaderBgColor:L="var(--border-color)",hideOnDisable:k=!1,freezeColumns:H,scriptLengthTruncate:S=25,addModuleInputWidth:_=150,addModuleSelectWidth:V,onScroll:O,onScrollEnd:z,disableEditLabelConfirmIcon:N=!1,transparentHeader:T=!1,navigateTreeNode:I=null,handleRemoveNavigateTreeNode:D=()=>{},scrollThreshold:Z=128,showHeader:j=!0},R)=>{const[B,P]=c(null),[F,U]=c(null),[q,W]=c({start:0,end:20}),[Q,K]=c(!1),Y=a(null),X=a(null),J=a(0),$=a(E),ee=a(null),te=a(null),ne=a({lastScrollTop:0}),re=a(null),ie=a(0),oe=a(null),ae=a(null),le=a(null),se=a({key:null,attempts:0}),ce=a(null),de=(e,t)=>{const n=String(e??t);return n.endsWith("%")?{value:parseFloat(n),unit:"%"}:{value:parseFloat(n)||0,unit:"px"}},ue=h(()=>{let e=0,t=0;return r.map((n,r)=>{const{value:i,unit:o}=de(n.width,400),a=!!H&&r<H,l="%"===o?`${i}%`:`${i}px`,s=`calc(${e}px + ${t}%)`;return a&&("%"===o?t+=i:e+=i),{width:l,sticky:a,left:s,zIndex:a?100+(H??0)-r:1}})},[r,H]),fe=h(()=>{let e=0,t=0;return r.forEach(n=>{const{value:r,unit:i}=de(n.width,400);"%"===i?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[r]),he=h(()=>{if(!H)return"0px";let e=0,t=0;return ue.slice(0,H).forEach(n=>{const r=parseFloat(n.width)||0;n.width.endsWith("%")?t+=r:e+=r}),`calc(${e}px + ${t}%)`},[ue,H]),pe=h(()=>((e,t,n)=>{if(!t?.sourceId||!t.action)return e;const{sourceId:r,action:i,value:o="",error:a="",label:l,type:s,options:c,selectedOption:d,confirmIconTooltip:u,cancelIconTooltip:f,payloadSourceId:h}=t,p=t?.parentId,C=t?.hierarchy,m=c?.map(e=>({label:e,value:e})),g=d?{label:d,value:d}:void 0,v=new Map;e.forEach(e=>v.set(e.key,e)),n&&v.set(n.key,n);const y=v.get(r);let w;h&&(w=v.get(h));let b=y??("addInside"===i?w:void 0);!b&&"addInside"===i&&p&&(b=v.get(p));const E="addInside"===i&&!b&&e.length>=0;if(!b&&!E)return e;const M=[...e],A=b?e.findIndex(e=>e.key===b.key):-1;let x=null,L=0,k=A+1;switch(i){case"addAbove":{const t=b;if(!t)return e;x=t.parentId,L=t.hierarchy;break}case"addBelow":{const t=b;if(!t)return e;x=w?.parentId??t.parentId,L=w?.hierarchy??t.hierarchy;break}case"addInside":{if(E){x=p??h??r??null,L=C??1,k=M.length;break}const t=w??b;if(!t)return e;x=t.key,L=(t.hierarchy??0)+1;const n=M.findIndex(e=>e.key===r);-1!==n&&(k=n+1);break}}const H={hierarchy:L,parentId:x,sourceId:b?.key??r??h??"new-node",isNewNode:!0,key:"new-node",value:o,error:a,label:l,type:s,options:m,selectedOption:g,confirmIconTooltip:u,cancelIconTooltip:f};switch(i){case"addAbove":M.splice(A,0,H);break;case"addBelow":M.splice(A+1,0,H);break;case"addInside":M.splice(Math.max(0,k),0,H)}return M})(t,v,M?.node),[t,v,M]),Ce=h(()=>nM(pe,M?.node),[pe,M?.node]),me=h(()=>Ce.filter(e=>!e.hide),[Ce]),ge=h(()=>{const e=new Map;return Ce.forEach(t=>e.set(t.key,t)),e},[Ce]),ve=h(()=>{const e=new Map;return me.forEach((t,n)=>e.set(t.key,n)),e},[me]),ye=p(e=>{P(t=>t?e&&t!==e?t:null:t),e&&ae.current?.key!==e||(ae.current=null),le.current&&(clearTimeout(le.current),le.current=null)},[]);l(()=>{$.current=E},[E]),l(()=>{ee.current=F},[F]);const we=p(e=>{ee.current=e,U(e)},[]),be=p(()=>{const e=Y.current;if(!e)return;const t=J.current||0,n=Math.max(0,e.scrollTop-t),r=e.clientHeight-t;let i=Math.floor(n/eM)-6,o=Math.ceil((n+r)/eM)+6;i=Math.max(0,i),o=Math.min(me.length,o),W(e=>e.start===i&&e.end===o?e:{start:i,end:o})},[me.length]),Ee=p(()=>{null===te.current&&(te.current=requestAnimationFrame(()=>{te.current=null,be()}))},[be]);u(()=>{const e=Y.current;if(!e)return;const t=me.length*eM,n=Math.max(0,t-(e.clientHeight-J.current));ne.current.lastScrollTop>n&&me.length>0&&(B?(e.scrollTop=n,ne.current.lastScrollTop=n):ne.current.lastScrollTop-n>e.clientHeight&&(e.scrollTop=0,ne.current.lastScrollTop=0)),be()},[me.length,be,v,I,B]);const Me=p(()=>{const e=Y.current;if(!e)return;const n=e.scrollTop,r=n>ne.current.lastScrollTop?"down":"up";if(ne.current.lastScrollTop=n,Ee(),O?.(),oe.current?.(),!A||E||ee.current||G(t))return;const i=e.scrollHeight-(n+e.clientHeight)<Z,o=n<Z+J.current;"down"===r&&i&&!t[t.length-1]?.lastResource&&(we("below"),C("below")),"up"===r&&o&&!t[0]?.lastResource&&(we("above"),re.current=t[0]?.key??null,C("above"))},[t,A,E,F,Z,Ee,O,C,we]);l(()=>{if(E||!A||G(t))return;const e=t[0],n=!e?.lastResource,{totalSubContainerCount:r=0,totalResourceCount:i=0}=M?.node||{},o=r+i,a=me.length<10&&me.length<o;n&&a&&(re.current=e?.key??null,we("above"),C("above"))},[E,A,t,me.length,M,C,we]),u(()=>{if(E||"above"!==F)E||"below"!==F||we(null);else{const e=Y.current,t=re.current;if(e&&t){const n=ve.get(t);void 0!==n&&n>0&&(e.scrollTop+=n*eM)}re.current=null,we(null)}},[E,F,ve,we]),l(()=>{const e=Y.current;if(!e)return;const n=n=>{n.deltaY>=0||!A||G(t)||$.current||ee.current||e.scrollTop>1||t[0]?.lastResource||(re.current=t[0]?.key??null,we("above"),C("above"))};return e.addEventListener("wheel",n,{passive:!0}),()=>{e.removeEventListener("wheel",n)}},[A,t,C,we]),l(()=>{const e=Y.current;if(e)return oe.current=z?La(()=>{z?.()},150):null,e.addEventListener("scroll",Me,{passive:!0}),()=>{e.removeEventListener("scroll",Me),oe.current?.cancel()}},[Me,z]),l(()=>{const e=Y.current;if(!e)return;const t=e=>{Date.now()<ie.current&&e.stopImmediatePropagation()};return e.addEventListener("scroll",t,{passive:!0,capture:!0}),()=>{e.removeEventListener("scroll",t,!0)}},[]),l(()=>{const e=X.current;if(!e)return;const t=new ResizeObserver(()=>{J.current=e.getBoundingClientRect().height,be()});return t.observe(e),()=>t.disconnect()},[be]),u(()=>{if(!v||!Y.current)return;const e=Y.current,t=ve.get("new-node");if(void 0===t)return;const n=J.current||0,r=e.clientHeight-n;if(r<=0)return;const i=t*eM,o=i+eM,a=Math.max(0,e.scrollTop-n);let l=a;i<a?l=i:o>a+r&&(l=Math.max(0,o-r)),l!==a&&(ie.current=Date.now()+300,e.scrollTop=l+n,be());const s=requestAnimationFrame(()=>{K(!0)});return()=>cancelAnimationFrame(s)},[v,ve,be]),l(()=>{v||K(!1)},[v]),u(()=>{if(!B||E)return;const e=ae.current;if(!e||e.key!==B){const e=requestAnimationFrame(()=>{ye(B)});return()=>cancelAnimationFrame(e)}const t=ge.get(e.key);if(!t){const t=requestAnimationFrame(()=>{ye(e.key)});return()=>cancelAnimationFrame(t)}if(Boolean(t.expanded)!==e.expanded)return;const n=requestAnimationFrame(()=>{ye(e.key)});return()=>cancelAnimationFrame(n)},[ge,B,E,ye]),l(()=>{se.current.key!==I&&(se.current={key:I,attempts:0}),!I&&ce.current&&(clearTimeout(ce.current),ce.current=null)},[I]),u(()=>{if(!I||v)return;const e=Y.current;if(!e)return;const n=ve.get(I);if(void 0!==n){se.current={key:I,attempts:0};const t=J.current||0,r=Math.max(eM,e.clientHeight-t),i=n*eM+16,o=Math.max(0,i-r/2)+t;return ie.current=Date.now()+400,e.scrollTo({top:o,behavior:"smooth"}),Ee(),ce.current&&clearTimeout(ce.current),void(ce.current=setTimeout(()=>{D?.()},350))}if(E||F)return;const r=se.current;if(r.key!==I&&(r.key=I,r.attempts=0),r.attempts+=1,!(r.attempts>30))return A&&!0!==t[0]?.lastResource?(re.current=null,we("above"),void C("above")):void(r.attempts>2&&D?.());D?.()},[I,v,ve,E,F,A,t,C,Ee,D,we]);const Ae=p(e=>{if(B)return;const t=!e?.expanded;P(e.key),ae.current={key:e.key,expanded:t},le.current&&clearTimeout(le.current);const n=Date.now(),r=()=>{if(ae.current?.key!==e.key)return;const t=$.current,i=Date.now()-n>=2e3;!t||i?ye(e.key):le.current=setTimeout(r,1e3)};le.current=setTimeout(r,1e3),f?.(e)},[B,f,ye]),xe=p((e,t)=>{B||s?.(e,t)},[s,B]),Le=p((e,t)=>{B||d?.(e,t)},[d,B]);l(()=>()=>{null!==te.current&&(cancelAnimationFrame(te.current),te.current=null),le.current&&clearTimeout(le.current),ce.current&&clearTimeout(ce.current)},[]);const ke=me.length*eM,He=me.slice(q.start,q.end);return e("div",{className:"tree-table-wrapper-container table-tree-fn",children:e("div",{className:"tree-table-fn-wrap",ref:R,children:e("div",{className:"table-fn-scrollable "+(me.length?"":"table-fn-empty"),ref:Y,style:{"--table-height":me.length?g:"auto","--frozen-column-width":he,border:m},children:n("div",{className:"tree-table-fn",style:{width:fe},children:[e("div",{ref:X,style:{position:"sticky",top:0,zIndex:98},children:e($E,{columnsData:r,columnMeta:ue,totalWidth:fe,rootNode:M,onCheckBoxChange:xe,selected:i,selectedNode:x,tableHeaderBgColor:L,hideOnDisable:k,transparentHeader:T,scriptLengthTruncate:S,showHeader:j})}),e(JE,{flattenedTreeData:He,columnsData:r,columnMeta:ue,totalWidth:fe,rowHeight:eM,startIndex:q.start,totalHeight:ke,selected:i,select:o,onRowClick:Le,onToggleExpand:Ae,onCheckBoxChange:xe,onAddConfirm:y,onAddCancel:w,handleEditFieldError:b,expanding:B,selectedNode:x,hideOnDisable:k,scriptLengthTruncate:S,addModuleInputWidth:_,addModuleSelectWidth:V,disableEditLabelConfirmIcon:N,isEditable:v?Q:void 0,setIsEditable:v?e=>{K(Boolean(e))}:void 0})]})})})})});function iM(e,t,n,r,i,o="children"){return function e(a){for(let l=0;l<a.length;l++){const s=a[l];if(s&&s[t]===n){const e=[...a];return"replace"===i?e[l]=r:e.splice("above"===i?l:l+1,0,r),{updatedArray:e}}if(s&&s[o]&&Array.isArray(s[o])){const t=e(s[o]);if(t)return{updatedArray:a.map((e,n)=>n===l?{...e,[o]:t.updatedArray}:e)}}}return null}(e)}rM.displayName="TableTreeFn";const oM=(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)=>oM(e,o[t]));{const n=new Set(o);return i.every(r=>n.has(r)&&oM(e[r],t[r]))}},aM=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e.length===t.length&&e.every((e,n)=>{const r=t[n];return oM(e,r)}));function lM(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function sM(e,t){return e&t}function cM(e,t){return e|t}function dM(e,t){return e^t}function uM(e,t){return e&~t}function fM(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function hM(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var pM,CM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function mM(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=CM.charAt(n>>6)+CM.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=CM.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=CM.charAt(n>>2)+CM.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function gM(e){var t,n="",r=0,i=0;for(t=0;t<e.length&&"="!=e.charAt(t);++t){var o=CM.indexOf(e.charAt(t));o<0||(0==r?(n+=lM(o>>2),i=3&o,r=1):1==r?(n+=lM(i<<2|o>>4),i=15&o,r=2):2==r?(n+=lM(i),n+=lM(o>>2),i=3&o,r=3):(n+=lM(i<<2|o>>4),n+=lM(15&o),r=0))}return 1==r&&(n+=lM(i<<2)),n}var vM,yM=function(e){var t;if(void 0===pM){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(pM={},t=0;t<16;++t)pM[n.charAt(t)]=t;for(n=n.toLowerCase(),t=10;t<16;++t)pM[n.charAt(t)]=t;for(t=0;t<8;++t)pM[r.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var l=e.charAt(t);if("="==l)break;if(-1!=(l=pM[l])){if(void 0===l)throw new Error("Illegal character at offset "+t);o|=l,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i},wM={decode:function(e){var t;if(void 0===vM){var n="= \f\n\r\t \u2028\u2029";for(vM=Object.create(null),t=0;t<64;++t)vM["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(vM["-"]=62,vM._=63,t=0;t<9;++t)vM[n.charAt(t)]=-1}var r=[],i=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=vM[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);i|=a,++o>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=wM.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return wM.decode(e)}},bM=1e13,EM=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)(r=i[n]*e+t)<bM?t=0:r-=(t=0|r/bM)*bM,i[n]=r;t>0&&(i[n]=t)},e.prototype.sub=function(e){var t,n,r=this.buf,i=r.length;for(t=0;t<i;++t)(n=r[t]-e)<0?(n+=bM,e=1):e=0,r[t]=n;for(;0===r[r.length-1];)r.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;r>=0;--r)n+=(bM+t[r]).toString().substring(1);return n},e.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;n>=0;--n)t=t*bM+e[n];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),MM=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,AM=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function xM(e,t){return e.length>t&&(e=e.substring(0,t)+"…"),e}var LM,kM=function(){function e(t,n){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=n)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},e.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},e.prototype.parseStringBMP=function(e,t){for(var n,r,i="",o=e;o<t;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},e.prototype.parseTime=function(e,t,n){var r=this.parseStringISO(e,t),i=(n?MM:AM).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},e.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=r>127,o=i?255:0,a="";r==o&&++e<t;)r=this.get(e);if(0===(n=t-e))return i?-1:0;if(n>4){for(a=r,n<<=3;!(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var l=new EM(r),s=e+1;s<t;++s)l.mulAdd(256,this.get(s));return a+l.toString()},e.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",o="",a=e+1;a<t;++a){for(var l=this.get(a),s=a==t-1?r:0,c=7;c>=s;--c)o+=l>>c&1?"1":"0";if(o.length>n)return i+xM(o,n)}return i+o},e.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return xM(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return r>n&&(i+="…"),i},e.prototype.parseOID=function(e,t,n){for(var r="",i=new EM,o=0,a=e;a<t;++a){var l=this.get(a);if(i.mulAdd(128,127&l),o+=7,!(128&l)){if(""===r)if((i=i.simplify())instanceof EM)i.sub(80),r="2."+i.toString();else{var s=i<80?i<40?0:1:2;r=s+"."+(i-40*s)}else r+="."+i.toString();if(r.length>n)return xM(r,n);i=new EM,o=0}}return o>0&&(r+=".incomplete"),r},e}(),HM=function(){function e(e,t,n,r,i){if(!(r instanceof SM))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return xM(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return xM(this.stream.parseStringISO(t,t+n),e);case 30:return xM(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),n=127&t;if(n==t)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===n)return null;t=0;for(var r=0;r<n;++r)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substring(t,t+n)},e.decode=function(t){var n;n=t instanceof kM?t:new kM(t,0);var r=new kM(n),i=new SM(n),o=e.decodeLength(n),a=n.pos,l=a-r.pos,s=null,c=function(){var t=[];if(null!==o){for(var r=a+o;n.pos<r;)t[t.length]=e.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(n);if(i.tag.isEOC())break;t[t.length]=i}o=a-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)s=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var d=0;d<s.length;++d)if(s[d].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){s=null}if(null===s){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);n.pos=a+Math.abs(o)}return new e(r,l,o,i,s)},e}(),SM=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var n=new EM;do{t=e.get(),n.mulAdd(128,127&t)}while(128&t);this.tagNumber=n.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),_M=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],VM=(1<<26)/_M[_M.length-1],OM=function(){function e(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,o="",a=this.t,l=this.DB-a*this.DB%t;if(a-- >0)for(l<this.DB&&(n=this[a]>>l)>0&&(i=!0,o=lM(n));a>=0;)l<t?(n=(this[a]&(1<<l)-1)<<t-l,n|=this[--a]>>(l+=this.DB-t)):(n=this[a]>>(l-=t)&r,l<=0&&(l+=this.DB,--a)),n>0&&(i=!0),i&&(o+=lM(n));return i?o:"0"},e.prototype.negate=function(){var t=DM();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qM(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var n=DM();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n},e.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new NM(t):new TM(t),this.exp(e,n)},e.prototype.clone=function(){var e=DM();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),128&n&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=DM();return this.bitwiseTo(e,sM,t),t},e.prototype.or=function(e){var t=DM();return this.bitwiseTo(e,cM,t),t},e.prototype.xor=function(e){var t=DM();return this.bitwiseTo(e,dM,t),t},e.prototype.andNot=function(e){var t=DM();return this.bitwiseTo(e,uM,t),t},e.prototype.not=function(){for(var e=DM(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=DM();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=DM();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+fM(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=hM(this[n]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,cM)},e.prototype.clearBit=function(e){return this.changeBit(e,uM)},e.prototype.flipBit=function(e){return this.changeBit(e,dM)},e.prototype.add=function(e){var t=DM();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=DM();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=DM();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=DM();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=DM();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=DM(),n=DM();return this.divRemTo(e,t,n),[t,n]},e.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),o=UM(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new NM(t):t.isEven()?new IM(t):new TM(t);var a=[],l=3,s=n-1,c=(1<<n)-1;if(a[1]=r.convert(this),n>1){var d=DM();for(r.sqrTo(a[1],d);l<=c;)a[l]=DM(),r.mulTo(d,a[l-2],a[l]),l+=2}var u,f,h=e.t-1,p=!0,C=DM();for(i=qM(e[h])-1;h>=0;){for(i>=s?u=e[h]>>i-s&c:(u=(e[h]&(1<<i+1)-1)<<s-i,h>0&&(u|=e[h-1]>>this.DB+i-s)),l=n;!(1&u);)u>>=1,--l;if((i-=l)<0&&(i+=this.DB,--h),p)a[u].copyTo(o),p=!1;else{for(;l>1;)r.sqrTo(o,C),r.sqrTo(C,o),l-=2;l>0?r.sqrTo(o,C):(f=o,o=C,C=f),r.mulTo(C,a[u],o)}for(;h>=0&&!(e[h]&1<<i);)r.sqrTo(o,C),f=o,o=C,C=f,--i<0&&(i=this.DB-1,--h)}return r.revert(o)},e.prototype.modInverse=function(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var r=t.clone(),i=this.clone(),o=UM(1),a=UM(0),l=UM(0),s=UM(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(l.isEven()&&s.isEven()||(l.addTo(this,l),s.subTo(t,s)),l.rShiftTo(1,l)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(l,o),a.subTo(s,a)):(i.subTo(r,i),n&&l.subTo(o,l),s.subTo(a,s))}return 0!=i.compareTo(e.ONE)?e.ZERO:s.compareTo(t)>=0?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},e.prototype.pow=function(e){return this.exp(e,new zM)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},e.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=_M[_M.length-1]){for(t=0;t<_M.length;++t)if(n[0]==_M[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<_M.length;){for(var r=_M[t],i=t+1;i<_M.length&&r<VM;)r*=_M[i++];for(r=n.modInt(r);t<i;)if(r%_M[t++]==0)return!1}return n.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(t,n);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var l=8==r?255&+t[i]:FM(t,i);l<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=l:a+r>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),a=this.s<<n&this.DM,l=this.t-1;l>=0;--l)t[l+o+1]=this[l]>>r|a,a=(this[l]&i)<<n;for(l=o-1;l>=0;--l)t[l]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},e.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},e.prototype.multiplyTo=function(t,n){var r=this.abs(),i=t.abs(),o=r.t;for(n.t=o+i.t;--o>=0;)n[o]=0;for(o=0;o<i.t;++o)n[o+r.t]=r.am(0,i[o],n,o,0,r.t);n.s=0,n.clamp(),this.s!=t.s&&e.ZERO.subTo(n,n)},e.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,n,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=DM());var a=DM(),l=this.s,s=t.s,c=this.DB-qM(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var d=a.t,u=a[d-1];if(0!=u){var f=u*(1<<this.F1)+(d>1?a[d-2]>>this.F2:0),h=this.FV/f,p=(1<<this.F1)/f,C=1<<this.F2,m=r.t,g=m-d,v=null==n?DM():n;for(a.dlShiftTo(g,v),r.compareTo(v)>=0&&(r[r.t++]=1,r.subTo(v,r)),e.ONE.dlShiftTo(d,v),v.subTo(a,a);a.t<d;)a[a.t++]=0;for(;--g>=0;){var y=r[--m]==u?this.DM:Math.floor(r[m]*h+(r[m-1]+C)*p);if((r[m]+=a.am(0,y,r,g,0,d))<y)for(a.dlShiftTo(g,v),r.subTo(v,r);r[m]<--y;)r.subTo(v,r)}null!=n&&(r.drShiftTo(d,n),l!=s&&e.ZERO.subTo(n,n)),r.t=d,r.clamp(),c>0&&r.rShiftTo(c,r),l<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,n){if(t>4294967295||t<1)return e.ONE;var r=DM(),i=DM(),o=n.convert(this),a=qM(t)-1;for(o.copyTo(r);--a>=0;)if(n.sqrTo(r,i),(t&1<<a)>0)n.mulTo(i,o,r);else{var l=r;r=i,i=l}return n.revert(r)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=UM(n),i=DM(),o=DM(),a="";for(this.divRemTo(r,i,o);i.signum()>0;)a=(n+o.intValue()).toString(e).substring(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),o=!1,a=0,l=0,s=0;s<t.length;++s){var c=FM(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(o=!0):(l=n*l+c,++a>=r&&(this.dMultiply(i),this.dAddOffset(l,0),a=0,l=0))}a>0&&(this.dMultiply(Math.pow(n,a)),this.dAddOffset(l,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,n,r){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),cM,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],o=7&t;i.length=1+(t>>3),n.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},e.prototype.changeBit=function(t,n){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,n,r),r},e.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},e.prototype.multiplyUpperTo=function(e,t,n){--t;var r=n.t=this.t+e.t-t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},e.prototype.millerRabin=function(t){var n=this.subtract(e.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(t=t+1>>1)>_M.length&&(t=_M.length);for(var o=DM(),a=0;a<t;++a){o.fromInt(_M[Math.floor(Math.random()*_M.length)]);var l=o.modPow(i,this);if(0!=l.compareTo(e.ONE)&&0!=l.compareTo(n)){for(var s=1;s++<r&&0!=l.compareTo(n);)if(0==(l=l.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=l.compareTo(n))return!1}}return!0},e.prototype.square=function(){var e=DM();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var o=n.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)t(n);else{o<a&&(a=o),a>0&&(n.rShiftTo(a,n),r.rShiftTo(a,r));var l=function(){(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(l,0):(a>0&&r.lShiftTo(a,r),setTimeout(function(){t(r)},0))};setTimeout(l,10)}},e.prototype.fromNumberAsync=function(t,n,r,i){if("number"==typeof n)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),cM,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(e.ONE.shiftLeft(t-1),o),o.isProbablePrime(n)?setTimeout(function(){i()},0):setTimeout(a,0)};setTimeout(a,0)}else{var l=[],s=7&t;l.length=1+(t>>3),n.nextBytes(l),s>0?l[0]&=(1<<s)-1:l[0]=0,this.fromString(l,256)}},e}(),zM=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),NM=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),TM=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=DM();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(OM.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=DM();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),IM=function(){function e(e){this.m=e,this.r2=DM(),this.q3=DM(),OM.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=DM();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function DM(){return new OM(null)}function ZM(e,t){return new OM(e,t)}var jM="undefined"!=typeof navigator;jM&&"Microsoft Internet Explorer"==navigator.appName?(OM.prototype.am=function(e,t,n,r,i,o){for(var a=32767&t,l=t>>15;--o>=0;){var s=32767&this[e],c=this[e++]>>15,d=l*s+c*a;i=((s=a*s+((32767&d)<<15)+n[r]+(1073741823&i))>>>30)+(d>>>15)+l*c+(i>>>30),n[r++]=1073741823&s}return i},LM=30):jM&&"Netscape"!=navigator.appName?(OM.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},LM=26):(OM.prototype.am=function(e,t,n,r,i,o){for(var a=16383&t,l=t>>14;--o>=0;){var s=16383&this[e],c=this[e++]>>14,d=l*s+c*a;i=((s=a*s+((16383&d)<<14)+n[r]+i)>>28)+(d>>14)+l*c,n[r++]=268435455&s}return i},LM=28),OM.prototype.DB=LM,OM.prototype.DM=(1<<LM)-1,OM.prototype.DV=1<<LM;OM.prototype.FV=Math.pow(2,52),OM.prototype.F1=52-LM,OM.prototype.F2=2*LM-52;var RM,BM,PM=[];for(RM="0".charCodeAt(0),BM=0;BM<=9;++BM)PM[RM++]=BM;for(RM="a".charCodeAt(0),BM=10;BM<36;++BM)PM[RM++]=BM;for(RM="A".charCodeAt(0),BM=10;BM<36;++BM)PM[RM++]=BM;function FM(e,t){var n=PM[e.charCodeAt(t)];return null==n?-1:n}function UM(e){var t=DM();return t.fromInt(e),t}function qM(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}OM.ZERO=UM(0),OM.ONE=UM(1);var WM=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)n=n+this.S[t]+e[t%e.length]&255,r=this.S[t],this.S[t]=this.S[n],this.S[n]=r;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();var QM,GM,KM=null;if(null==KM){KM=[],GM=0;var YM=void 0;if("undefined"!=typeof window&&self.crypto&&self.crypto.getRandomValues){var XM=new Uint32Array(256);for(self.crypto.getRandomValues(XM),YM=0;YM<XM.length;++YM)KM[GM++]=255&XM[YM]}var JM=0,$M=function(e){if((JM=JM||0)>=256||GM>=256)self.removeEventListener?self.removeEventListener("mousemove",$M,!1):self.detachEvent&&self.detachEvent("onmousemove",$M);else try{var t=e.x+e.y;KM[GM++]=255&t,JM+=1}catch(e){}};"undefined"!=typeof window&&(self.addEventListener?self.addEventListener("mousemove",$M,!1):self.attachEvent&&self.attachEvent("onmousemove",$M))}function eA(){if(null==QM){for(QM=new WM;GM<256;){var e=Math.floor(65536*Math.random());KM[GM++]=255&e}for(QM.init(KM),GM=0;GM<KM.length;++GM)KM[GM]=0;GM=0}return QM.next()}var tA=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=eA()},e}();function nA(e){return function(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}(function(e,t){var n,r,i,o,a,l,s,c,d,u,f,h,p=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),C=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,d=0;d<e.length;d+=16){for(n=p[0],r=p[1],i=p[2],o=p[3],a=p[4],l=p[5],s=p[6],c=p[7],u=0;u<64;u++)C[u]=u<16?e[u+d]:hA(hA(hA(uA(C[u-2]),C[u-7]),dA(C[u-15])),C[u-16]),f=hA(hA(hA(hA(c,cA(a)),aA(a,l,s)),fA[u]),C[u]),h=hA(sA(n),lA(n,r,i)),c=s,s=l,l=a,a=hA(o,f),o=i,i=r,r=n,n=hA(f,h);p[0]=hA(n,p[0]),p[1]=hA(r,p[1]),p[2]=hA(i,p[2]),p[3]=hA(o,p[3]),p[4]=hA(a,p[4]),p[5]=hA(l,p[5]),p[6]=hA(s,p[6]),p[7]=hA(c,p[7])}return p}(function(e){for(var t=Array(e.length>>2),n=0;n<t.length;n++)t[n]=0;for(n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}(e),8*e.length))}function rA(e){for(var t="0123456789abcdef",n="",r=0;r<e.length;r++){var i=e.charCodeAt(r);n+=t.charAt(i>>>4&15)+t.charAt(15&i)}return n}function iA(e,t){return e>>>t|e<<32-t}function oA(e,t){return e>>>t}function aA(e,t,n){return e&t^~e&n}function lA(e,t,n){return e&t^e&n^t&n}function sA(e){return iA(e,2)^iA(e,13)^iA(e,22)}function cA(e){return iA(e,6)^iA(e,11)^iA(e,25)}function dA(e){return iA(e,7)^iA(e,18)^oA(e,3)}function uA(e){return iA(e,17)^iA(e,19)^oA(e,10)}var fA=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function hA(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function pA(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new tA,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new OM(n)}function CA(e,t,n){for(var r="",i=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function mA(e,t){var n=nA;if(e.length+64+2>t)throw"Message too long for RSA";var r,i="";for(r=0;r<t-e.length-64-2;r+=1)i+="\0";var o=n("")+i+""+e,a=new Array(32);(new tA).nextBytes(a);var l=CA(a,o.length,n),s=[];for(r=0;r<o.length;r+=1)s[r]=o.charCodeAt(r)^l.charCodeAt(r);var c=CA(s,a.length,n),d=[0];for(r=0;r<a.length;r+=1)d[r+1]=a[r]^c.charCodeAt(r);return new OM(d.concat(s))}var gA=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e,t){void 0===t&&(t=pA);var n=this.n.bitLength()+7>>3,r=t(e,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;for(var o=i.toString(16),a=o.length,l=0;l<2*n-a;l++)o="0"+o;return o},e.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16),this.d=ZM(n,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,n,r,i,o,a,l){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=ZM(e,16),this.e=parseInt(t,16),this.d=ZM(n,16),this.p=ZM(r,16),this.q=ZM(i,16),this.dmp1=ZM(o,16),this.dmq1=ZM(a,16),this.coeff=ZM(l,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var n=new tA,r=e>>1;this.e=parseInt(t,16);for(var i=new OM(t,16);;){for(;this.p=new OM(e-r,1,n),0!=this.p.subtract(OM.ONE).gcd(i).compareTo(OM.ONE)||!this.p.isProbablePrime(10););for(;this.q=new OM(r,1,n),0!=this.q.subtract(OM.ONE).gcd(i).compareTo(OM.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(OM.ONE),l=this.q.subtract(OM.ONE),s=a.multiply(l);if(0==s.gcd(i).compareTo(OM.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=ZM(e,16),n=this.doPrivate(t);return null==n?null:function(e,t){var n=e.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,n){var r=new tA,i=e>>1;this.e=parseInt(t,16);var o=new OM(t,16),a=this,l=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(OM.ONE),r=a.q.subtract(OM.ONE),i=t.multiply(r);0==i.gcd(o).compareTo(OM.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){n()},0)):setTimeout(l,0)},s=function(){a.q=DM(),a.q.fromNumberAsync(i,1,r,function(){a.q.subtract(OM.ONE).gcda(o,function(e){0==e.compareTo(OM.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(s,0)})})},c=function(){a.p=DM(),a.p.fromNumberAsync(e-i,1,r,function(){a.p.subtract(OM.ONE).gcda(o,function(e){0==e.compareTo(OM.ONE)&&a.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(c,0)})})};setTimeout(c,0)};setTimeout(l,0)},e.prototype.sign=function(e,t,n){var r=(vA[n]||"")+t(e).toString(),i=this.n.bitLength()/4,o=function(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return ZM("0001"+r+"00"+e,16)}(r,i);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;for(var l=a.toString(16),s=l.length,c=0;c<i-s;c++)l="0"+l;return l},e.prototype.verify=function(e,t,n){var r=ZM(t,16),i=this.doPublic(r);return null==i?null:function(e){for(var t in vA)if(vA.hasOwnProperty(t)){var n=vA[t],r=n.length;if(e.substring(0,r)==n)return e.substring(r)}return e}(i.toString(16).replace(/^1f+00/,""))==n(e).toString()},e}();var vA={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function yA(e,t,n){if(!t||!e)throw new Error("extend failed, please check that all dependencies are included.");var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}
29
29
  /**
30
30
  * @fileOverview
31
31
  * @name asn1-1.0.js
@@ -45,5 +45,5 @@ let r=n?.map(e=>({...e,stepId:Wt()}));const i=new Set(["group","pre","post","scr
45
45
  Copyright (c) 2017 Jed Watson.
46
46
  Licensed under the MIT License (MIT), see
47
47
  http://jedwatson.github.io/classnames
48
- */!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,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(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 A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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 L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=N(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==N(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return I}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.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"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp("&nbsp;","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="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 V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(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)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var I=function(){!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&&z(e,t)}(o,r.Component);var e,t,n=N(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="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 Z(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)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},I.defaultProps={activeClassName:""},n(12);var P=function(){!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&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="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 U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(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)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!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&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="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 X(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)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!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&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(I,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="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 re(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)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!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&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="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 ce(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)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!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&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(I,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="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 me(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)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!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&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="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 Me(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)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!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&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="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 Se(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)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!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&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ne(e){return(Ne="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 Te(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)}}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!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&&Ie(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="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 Pe(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)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!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&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="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 Ge(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)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!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&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(I,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(I,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(I,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(I,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(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)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!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&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="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 at(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)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!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&&lt(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(I,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(I,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(I,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(I,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="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 ft(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)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!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&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="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 vt(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)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!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&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(I,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(I,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="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 xt(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)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!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&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="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 Nt(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)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!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&&Tt(e,t)}(o,r.Component);var e,t,n=It(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(I,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(I,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="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 Bt(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)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(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 Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!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&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="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 $t(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)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!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&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="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 ln(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)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!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&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="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 pn(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)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!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&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="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 bn(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)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!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&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="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 Hn(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)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!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&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function Nn(e){return(Nn="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 Tn(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)}}function In(e,t){return(In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!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&&In(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(I,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="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 Un(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)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!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&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="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 Yn(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)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!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&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(I,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(I,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="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 nr(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)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!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&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="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 fr(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)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!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&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="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 Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(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)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!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&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Nr=Vr;function Tr(e){return(Tr="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 Ir(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)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!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&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(I,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(I,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(I,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Ir(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="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 qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(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 Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(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)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(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 Xr(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)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!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&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,IB(),tW)),ZB.exports);const rW=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},iW=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new DB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:rW}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:DB.convertToRaw(DB.ContentState.createFromText(e))}catch(t){return DB.convertToRaw(DB.ContentState.createFromText(e))}};l(()=>{let e;try{if(G(t))e="view"===h||g&&!L?DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O):DB.EditorState.createEmpty(O);else{const n=z(t);e=n?DB.EditorState.createWithContent(DB.convertFromRaw(n),O):DB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=DB.EditorState.createWithContent(DB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=DB.ContentState.createFromText("---");e=DB.EditorState.createWithContent(t,O)}else e=DB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);Y(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O);b(t)}},[V]);const N=nW.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(F,{className:"required-asterisk",children:"* "}),d&&e(F,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(K,{title:"Update",placement:"bottom",children:e(P,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=DB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(DB.convertToRaw(DB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(K,{title:"Cancel",placement:"bottom",children:e(P,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?DB.EditorState.createEmpty(O):e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createEmpty(O);b(n)}},children:w&&e(N,{editorState:w,onEditorStateChange:e=>{b(e);const t=DB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=DB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(F,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},oW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(P,{name:t,width:r,height:i}),e(F,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),aW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},lW=e=>Lt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),sW=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},cW=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!G(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return G(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function dW(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function uW(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const fW=e=>new Promise(t=>setTimeout(t,e)),hW=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},pW=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Za.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Za.error(r)}catch(e){Za.error(n),console.error("Permission query error:",e)}},CW=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(U,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(qs,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(P,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(F,{children:r?.[C]})})]})]})};CW.displayName="DebugToolsPanel";const mW=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(K,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(P,{className:"ff-session-manager-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-session-manager-container__modal"})]})},a)})})});mW.displayName="SessionManager";const gW=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(K,{title:`${Op(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(P,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(F,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},vW=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(F,{children:t.label}),o&&s&&e(P,{name:s})]},t.value)})}),yW=({value:t,min:r=10,max:i=200,step:o=10,onChange:a,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:o,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));a(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(P,{onClick:()=>{const e=Math.max(t-o,r);a(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(F,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(P,{onClick:()=>{const e=Math.min(t+o,i);a(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]});var wW="top",bW="bottom",EW="right",MW="left",AW="auto",xW=[wW,bW,EW,MW],LW="start",kW="end",HW="viewport",SW="popper",_W=xW.reduce(function(e,t){return e.concat([t+"-"+LW,t+"-"+kW])},[]),VW=[].concat(xW,[AW]).reduce(function(e,t){return e.concat([t,t+"-"+LW,t+"-"+kW])},[]),OW=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zW(e){return e?(e.nodeName||"").toLowerCase():null}function NW(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function TW(e){return e instanceof NW(e).Element||e instanceof Element}function IW(e){return e instanceof NW(e).HTMLElement||e instanceof HTMLElement}function DW(e){return"undefined"!=typeof ShadowRoot&&(e instanceof NW(e).ShadowRoot||e instanceof ShadowRoot)}var ZW={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];IW(i)&&zW(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});IW(r)&&zW(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function jW(e){return e.split("-")[0]}var RW=Math.max,BW=Math.min,PW=Math.round;function FW(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function UW(){return!/^((?!chrome|android).)*safari/i.test(FW())}function qW(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&IW(e)&&(i=e.offsetWidth>0&&PW(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&PW(r.height)/e.offsetHeight||1);var a=(TW(e)?NW(e):window).visualViewport,l=!UW()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,u=r.height/o;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s,x:s,y:c}}function WW(e){var t=qW(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function QW(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&DW(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function GW(e){return NW(e).getComputedStyle(e)}function KW(e){return["table","td","th"].indexOf(zW(e))>=0}function YW(e){return((TW(e)?e.ownerDocument:e.document)||window.document).documentElement}function XW(e){return"html"===zW(e)?e:e.assignedSlot||e.parentNode||(DW(e)?e.host:null)||YW(e)}function JW(e){return IW(e)&&"fixed"!==GW(e).position?e.offsetParent:null}function $W(e){for(var t=NW(e),n=JW(e);n&&KW(n)&&"static"===GW(n).position;)n=JW(n);return n&&("html"===zW(n)||"body"===zW(n)&&"static"===GW(n).position)?t:n||function(e){var t=/firefox/i.test(FW());if(/Trident/i.test(FW())&&IW(e)&&"fixed"===GW(e).position)return null;var n=XW(e);for(DW(n)&&(n=n.host);IW(n)&&["html","body"].indexOf(zW(n))<0;){var r=GW(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function eQ(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tQ(e,t,n){return RW(e,BW(t,n))}function nQ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function rQ(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var iQ={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=jW(n.placement),s=eQ(l),c=[MW,EW].indexOf(l)>=0?"height":"width";if(o&&a){var d=function(e,t){return nQ("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:rQ(e,xW))}(i.padding,n),u=WW(o),f="y"===s?wW:MW,h="y"===s?bW:EW,p=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],C=a[s]-n.rects.reference[s],m=$W(o),g=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,v=p/2-C/2,y=d[f],w=g-u[c]-d[h],b=g/2-u[c]/2+v,E=tQ(y,b,w),M=s;n.modifiersData[r]=((t={})[M]=E,t.centerOffset=E-b,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&QW(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oQ(e){return e.split("-")[1]}var aQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lQ(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,f=a.x,h=void 0===f?0:f,p=a.y,C=void 0===p?0:p,m="function"==typeof d?d({x:h,y:C}):{x:h,y:C};h=m.x,C=m.y;var g=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),y=MW,w=wW,b=window;if(c){var E=$W(n),M="clientHeight",A="clientWidth";if(E===NW(n)&&"static"!==GW(E=YW(n)).position&&"absolute"===l&&(M="scrollHeight",A="scrollWidth"),i===wW||(i===MW||i===EW)&&o===kW)w=bW,C-=(u&&E===b&&b.visualViewport?b.visualViewport.height:E[M])-r.height,C*=s?1:-1;if(i===MW||(i===wW||i===bW)&&o===kW)y=EW,h-=(u&&E===b&&b.visualViewport?b.visualViewport.width:E[A])-r.width,h*=s?1:-1}var x,L=Object.assign({position:l},c&&aQ),k=!0===d?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:PW(n*i)/i||0,y:PW(r*i)/i||0}}({x:h,y:C},NW(n)):{x:h,y:C};return h=k.x,C=k.y,s?Object.assign({},L,((x={})[w]=v?"0":"",x[y]=g?"0":"",x.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+C+"px)":"translate3d("+h+"px, "+C+"px, 0)",x)):Object.assign({},L,((t={})[w]=v?C+"px":"",t[y]=g?h+"px":"",t.transform="",t))}var sQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,l=n.roundOffsets,s=void 0===l||l,c={placement:jW(t.placement),variation:oQ(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,lQ(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lQ(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},cQ={passive:!0};var dQ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,l=void 0===a||a,s=NW(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,cQ)}),l&&s.addEventListener("resize",n.update,cQ),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,cQ)}),l&&s.removeEventListener("resize",n.update,cQ)}},data:{}},uQ={left:"right",right:"left",bottom:"top",top:"bottom"};function fQ(e){return e.replace(/left|right|bottom|top/g,function(e){return uQ[e]})}var hQ={start:"end",end:"start"};function pQ(e){return e.replace(/start|end/g,function(e){return hQ[e]})}function CQ(e){var t=NW(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(e){return qW(YW(e)).left+CQ(e).scrollLeft}function gQ(e){var t=GW(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vQ(e){return["html","body","#document"].indexOf(zW(e))>=0?e.ownerDocument.body:IW(e)&&gQ(e)?e:vQ(XW(e))}function yQ(e,t){var n;void 0===t&&(t=[]);var r=vQ(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=NW(r),a=i?[o].concat(o.visualViewport||[],gQ(r)?r:[]):r,l=t.concat(a);return i?l:l.concat(yQ(XW(a)))}function wQ(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function bQ(e,t,n){return t===HW?wQ(function(e,t){var n=NW(e),r=YW(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;var c=UW();(c||!c&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:l+mQ(e),y:s}}(e,n)):TW(t)?function(e,t){var n=qW(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):wQ(function(e){var t,n=YW(e),r=CQ(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=RW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=RW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+mQ(e),s=-r.scrollTop;return"rtl"===GW(i||n).direction&&(l+=RW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:l,y:s}}(YW(e)))}function EQ(e,t,n,r){var i="clippingParents"===t?function(e){var t=yQ(XW(e)),n=["absolute","fixed"].indexOf(GW(e).position)>=0&&IW(e)?$W(e):e;return TW(n)?t.filter(function(e){return TW(e)&&QW(e,n)&&"body"!==zW(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],l=o.reduce(function(t,n){var i=bQ(e,n,r);return t.top=RW(i.top,t.top),t.right=BW(i.right,t.right),t.bottom=BW(i.bottom,t.bottom),t.left=RW(i.left,t.left),t},bQ(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function MQ(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?jW(i):null,a=i?oQ(i):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case wW:t={x:l,y:n.y-r.height};break;case bW:t={x:l,y:n.y+n.height};break;case EW:t={x:n.x+n.width,y:s};break;case MW:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=o?eQ(o):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case LW:t[c]=t[c]-(n[d]/2-r[d]/2);break;case kW:t[c]=t[c]+(n[d]/2-r[d]/2)}}return t}function AQ(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,l=n.boundary,s=void 0===l?"clippingParents":l,c=n.rootBoundary,d=void 0===c?HW:c,u=n.elementContext,f=void 0===u?SW:u,h=n.altBoundary,p=void 0!==h&&h,C=n.padding,m=void 0===C?0:C,g=nQ("number"!=typeof m?m:rQ(m,xW)),v=f===SW?"reference":SW,y=e.rects.popper,w=e.elements[p?v:f],b=EQ(TW(w)?w:w.contextElement||YW(e.elements.popper),s,d,a),E=qW(e.elements.reference),M=MQ({reference:E,element:y,placement:i}),A=wQ(Object.assign({},y,M)),x=f===SW?A:E,L={top:b.top-x.top+g.top,bottom:x.bottom-b.bottom+g.bottom,left:b.left-x.left+g.left,right:x.right-b.right+g.right},k=e.modifiersData.offset;if(f===SW&&k){var H=k[i];Object.keys(L).forEach(function(e){var t=[EW,bW].indexOf(e)>=0?1:-1,n=[wW,bW].indexOf(e)>=0?"y":"x";L[e]+=H[n]*t})}return L}function xQ(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?VW:s,d=oQ(r),u=d?l?_W:_W.filter(function(e){return oQ(e)===d}):xW,f=u.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=u);var h=f.reduce(function(t,n){return t[n]=AQ(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[jW(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}var LQ={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,l=void 0===a||a,s=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,C=n.allowedAutoPlacements,m=t.options.placement,g=jW(m),v=s||(g===m||!p?[fQ(m)]:function(e){if(jW(e)===AW)return[];var t=fQ(e);return[pQ(e),t,pQ(t)]}(m)),y=[m].concat(v).reduce(function(e,n){return e.concat(jW(n)===AW?xQ(t,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:C}):n)},[]),w=t.rects.reference,b=t.rects.popper,E=new Map,M=!0,A=y[0],x=0;x<y.length;x++){var L=y[x],k=jW(L),H=oQ(L)===LW,S=[wW,bW].indexOf(k)>=0,_=S?"width":"height",V=AQ(t,{placement:L,boundary:d,rootBoundary:u,altBoundary:f,padding:c}),O=S?H?EW:MW:H?bW:wW;w[_]>b[_]&&(O=fQ(O));var z=fQ(O),N=[];if(o&&N.push(V[k]<=0),l&&N.push(V[O]<=0,V[z]<=0),N.every(function(e){return e})){A=L,M=!1;break}E.set(L,N)}if(M)for(var T=function(e){var t=y.find(function(t){var n=E.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},I=p?3:1;I>0;I--){if("break"===T(I))break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kQ(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HQ(e){return[wW,EW,bW,MW].some(function(t){return e[t]>=0})}var SQ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=VW.reduce(function(e,n){return e[n]=function(e,t,n){var r=jW(e),i=[MW,wW].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*i,[MW,EW].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,o),e},{}),l=a[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var _Q={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,l=void 0!==a&&a,s=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,f=n.tether,h=void 0===f||f,p=n.tetherOffset,C=void 0===p?0:p,m=AQ(t,{boundary:s,rootBoundary:c,padding:u,altBoundary:d}),g=jW(t.placement),v=oQ(t.placement),y=!v,w=eQ(g),b="x"===w?"y":"x",E=t.modifiersData.popperOffsets,M=t.rects.reference,A=t.rects.popper,x="function"==typeof C?C(Object.assign({},t.rects,{placement:t.placement})):C,L="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(E){if(o){var S,_="y"===w?wW:MW,V="y"===w?bW:EW,O="y"===w?"height":"width",z=E[w],N=z+m[_],T=z-m[V],I=h?-A[O]/2:0,D=v===LW?M[O]:A[O],Z=v===LW?-A[O]:-M[O],j=t.elements.arrow,R=h&&j?WW(j):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},P=B[_],F=B[V],U=tQ(0,M[O],R[O]),q=y?M[O]/2-I-U-P-L.mainAxis:D-U-P-L.mainAxis,W=y?-M[O]/2+I+U+F+L.mainAxis:Z+U+F+L.mainAxis,Q=t.elements.arrow&&$W(t.elements.arrow),G=Q?"y"===w?Q.clientTop||0:Q.clientLeft||0:0,K=null!=(S=null==k?void 0:k[w])?S:0,Y=z+W-K,X=tQ(h?BW(N,z+q-K-G):N,z,h?RW(T,Y):T);E[w]=X,H[w]=X-z}if(l){var J,$="x"===w?wW:MW,ee="x"===w?bW:EW,te=E[b],ne="y"===b?"height":"width",re=te+m[$],ie=te-m[ee],oe=-1!==[wW,MW].indexOf(g),ae=null!=(J=null==k?void 0:k[b])?J:0,le=oe?re:te-M[ne]-A[ne]-ae+L.altAxis,se=oe?te+M[ne]+A[ne]-ae-L.altAxis:ie,ce=h&&oe?function(e,t,n){var r=tQ(e,t,n);return r>n?n:r}(le,te,se):tQ(h?le:re,te,h?se:ie);E[b]=ce,H[b]=ce-te}t.modifiersData[r]=H}},requiresIfExists:["offset"]};function VQ(e,t,n){void 0===n&&(n=!1);var r,i,o=IW(t),a=IW(t)&&function(e){var t=e.getBoundingClientRect(),n=PW(t.width)/e.offsetWidth||1,r=PW(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=YW(t),s=qW(e,a,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(o||!o&&!n)&&(("body"!==zW(t)||gQ(l))&&(c=(r=t)!==NW(r)&&IW(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:CQ(r)),IW(t)?((d=qW(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):l&&(d.x=mQ(l))),{x:s.left+c.scrollLeft-d.x,y:s.top+c.scrollTop-d.y,width:s.width,height:s.height}}function OQ(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}function zQ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var NQ={placement:"bottom",modifiers:[],strategy:"absolute"};function TQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function IQ(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?NQ:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},NQ,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],l=!1,s={state:i,setOptions:function(n){var l="function"==typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,l),i.scrollParents={reference:TW(e)?yQ(e):e.contextElement?yQ(e.contextElement):[],popper:yQ(t)};var d,u,f=function(e){var t=OQ(e);return OW.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((d=[].concat(r,i.options.modifiers),u=d.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return i.orderedModifiers=f.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var l=o({state:i,name:t,instance:s,options:r}),c=function(){};a.push(l||c)}}),s.update()},forceUpdate:function(){if(!l){var e=i.elements,t=e.reference,n=e.popper;if(TQ(t,n)){i.rects={reference:VQ(t,$W(n),"fixed"===i.options.strategy),popper:WW(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,c=o.options,d=void 0===c?{}:c,u=o.name;"function"==typeof a&&(i=a({state:i,options:d,name:u,instance:s})||i)}else i.reset=!1,r=-1}}},update:zQ(function(){return new Promise(function(e){s.forceUpdate(),e(i)})}),destroy:function(){c(),l=!0}};if(!TQ(e,t))return s;function c(){a.forEach(function(e){return e()}),a=[]}return s.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),s}}var DQ=IQ({defaultModifiers:[dQ,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=MQ({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},sQ,ZW,SQ,LQ,_Q,iQ,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=AQ(t,{elementContext:"reference"}),l=AQ(t,{altBoundary:!0}),s=kQ(a,r),c=kQ(l,i,o),d=HQ(s),u=HQ(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]}),ZQ="tippy-content",jQ="tippy-arrow",RQ="tippy-svg-arrow",BQ={passive:!0,capture:!0},PQ=function(){return document.body};function FQ(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function UQ(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function qQ(e,t){return"function"==typeof e?e.apply(void 0,t):e}function WQ(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)};var n}function QQ(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}function GQ(e){return[].concat(e)}function KQ(e,t){-1===e.indexOf(t)&&e.push(t)}function YQ(e){return[].slice.call(e)}function XQ(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function JQ(){return document.createElement("div")}function $Q(e){return["Element","Fragment"].some(function(t){return UQ(e,t)})}function eG(e){return $Q(e)?[e]:function(e){return UQ(e,"NodeList")}(e)?YQ(e):Array.isArray(e)?e:YQ(document.querySelectorAll(e))}function tG(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function nG(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function rG(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function iG(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var oG={isTouch:!1},aG=0;function lG(){oG.isTouch||(oG.isTouch=!0,window.performance&&document.addEventListener("mousemove",sG))}function sG(){var e=performance.now();e-aG<20&&(oG.isTouch=!1,document.removeEventListener("mousemove",sG)),aG=e}function cG(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var dG,uG=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function fG(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function hG(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function pG(e){return hG("\n %ctippy.js\n\n %c"+hG(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function CG(e){return[pG(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function mG(e,t){var n;e&&!dG.has(t)&&(dG.add(t),(n=console).warn.apply(n,CG(t)))}function gG(e,t){var n;e&&!dG.has(t)&&(dG.add(t),(n=console).error.apply(n,CG(t)))}"production"!==process.env.NODE_ENV&&(dG=new Set);var vG={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},yG=Object.assign({appendTo:PQ,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},vG,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wG=Object.keys(yG);function bG(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=yG[i])?r:o);return t},{});return Object.assign({},e,t)}function EG(e,t){var n=Object.assign({},t,{content:qQ(t.content,[e])},t.ignoreAttributes?{}:function(e,t){var n=(t?Object.keys(bG(Object.assign({},yG,{plugins:t}))):wG).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t},{});return n}(e,t.plugins));return n.aria=Object.assign({},yG.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function MG(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var n=!function(e,t){return{}.hasOwnProperty.call(e,t)}(QQ(yG,Object.keys(vG)),e);n&&(n=0===t.filter(function(t){return t.name===e}).length),mG(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function AG(e,t){e.innerHTML=t}function xG(e){var t=JQ();return!0===e?t.className=jQ:(t.className=RQ,$Q(e)?t.appendChild(e):AG(t,e)),t}function LG(e,t){$Q(t.content)?(AG(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?AG(e,t.content):e.textContent=t.content)}function kG(e){var t=e.firstElementChild,n=YQ(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(ZQ)}),arrow:n.find(function(e){return e.classList.contains(jQ)||e.classList.contains(RQ)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function HG(e){var t=JQ(),n=JQ();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=JQ();function i(n,r){var i=kG(t),o=i.box,a=i.content,l=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||LG(a,e.props),r.arrow?l?n.arrow!==r.arrow&&(o.removeChild(l),o.appendChild(xG(r.arrow))):o.appendChild(xG(r.arrow)):l&&o.removeChild(l)}return r.className=ZQ,r.setAttribute("data-state","hidden"),LG(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}HG.$$tippy=!0;var SG=1,_G=[],VG=[];function OG(e,t){var n,r,i,o,a,l,s,c,d=EG(e,Object.assign({},yG,bG(XQ(t)))),u=!1,f=!1,h=!1,p=!1,C=[],m=WQ(Q,d.interactiveDebounce),g=SG++,v=(c=d.plugins).filter(function(e,t){return c.indexOf(e)===t}),y={id:g,reference:e,popper:JQ(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("setProps"));if(y.state.isDestroyed)return;z("onBeforeUpdate",[y,t]),q();var n=y.props,r=EG(e,Object.assign({},n,XQ(t),{ignoreAttributes:!0}));y.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(I(),m=WQ(Q,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?GQ(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded");T(),O(),E&&E(n,r);y.popperInstance&&(X(),$().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));z("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("show"));var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=oG.isTouch&&!y.props.touch,i=FQ(y.props.duration,0,yG.duration);if(e||t||n||r)return;if(H().hasAttribute("disabled"))return;if(z("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,k()&&(b.style.visibility="visible");O(),R(),y.state.isMounted||(b.style.transition="none");if(k()){var o=_();tG([o.box,o.content],0)}l=function(){var e;if(y.state.isVisible&&!p){if(p=!0,b.offsetHeight,b.style.transition=y.props.moveTransition,k()&&y.props.animation){var t=_(),n=t.box,r=t.content;tG([n,r],i),nG([n,r],"visible")}N(),T(),KQ(VG,y),null==(e=y.popperInstance)||e.forceUpdate(),z("onMount",[y]),y.props.animation&&k()&&function(e,t){P(e,t)}(i,function(){y.state.isShown=!0,z("onShown",[y])})}},function(){var e,t=y.props.appendTo,n=H();e=y.props.interactive&&t===PQ||"parent"===t?n.parentNode:qQ(t,[n]);e.contains(b)||e.appendChild(b);y.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&mG(y.props.interactive&&t===yG.appendTo&&n.nextElementSibling!==b,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("hide"));var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=FQ(y.props.duration,1,yG.duration);if(e||t||n)return;if(z("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,u=!1,k()&&(b.style.visibility="hidden");if(I(),B(),O(!0),k()){var i=_(),o=i.box,a=i.content;y.props.animation&&(tG([o,a],r),nG([o,a],"hidden"))}N(),T(),y.props.animation?k()&&function(e,t){P(e,function(){!y.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&t()})}(r,y.unmount):y.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("hideWithInteractivity"));S().addEventListener("mousemove",m),KQ(_G,m),m(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("unmount"));y.state.isVisible&&y.hide();if(!y.state.isMounted)return;J(),$().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b);VG=VG.filter(function(e){return e!==y}),y.state.isMounted=!1,z("onHidden",[y])},destroy:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("destroy"));if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),q(),delete e._tippy,y.state.isDestroyed=!0,z("onDestroy",[y])}};if(!d.render)return"production"!==process.env.NODE_ENV&&gG(!0,"render() function has not been supplied."),y;var w=d.render(y),b=w.popper,E=w.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+y.id,y.popper=b,e._tippy=y,b._tippy=y;var M=v.map(function(e){return e.fn(y)}),A=e.hasAttribute("aria-expanded");return U(),T(),O(),z("onCreate",[y]),d.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",m)}),y;function x(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===x()[0]}function k(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function H(){return s||e}function S(){var e,t,n=H().parentNode;return n?null!=(t=GQ(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function _(){return kG(b)}function V(e){return y.state.isMounted&&!y.state.isVisible||oG.isTouch||o&&"focus"===o.type?0:FQ(y.props.delay,e?0:1,yG.delay)}function O(e){void 0===e&&(e=!1),b.style.pointerEvents=y.props.interactive&&!e?"":"none",b.style.zIndex=""+y.props.zIndex}function z(e,t,n){var r;(void 0===n&&(n=!0),M.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(r=y.props)[e].apply(r,t)}function N(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=b.id;GQ(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function T(){!A&&y.props.aria.expanded&&GQ(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===H()?"true":"false"):e.removeAttribute("aria-expanded")})}function I(){S().removeEventListener("mousemove",m),_G=_G.filter(function(e){return e!==m})}function D(t){if(!oG.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!iG(b,n)){if(GQ(y.props.triggerTarget||e).some(function(e){return iG(e,n)})){if(oG.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else z("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),f=!0,setTimeout(function(){f=!1}),y.state.isMounted||B())}}}function Z(){h=!0}function j(){h=!1}function R(){var e=S();e.addEventListener("mousedown",D,!0),e.addEventListener("touchend",D,BQ),e.addEventListener("touchstart",j,BQ),e.addEventListener("touchmove",Z,BQ)}function B(){var e=S();e.removeEventListener("mousedown",D,!0),e.removeEventListener("touchend",D,BQ),e.removeEventListener("touchstart",j,BQ),e.removeEventListener("touchmove",Z,BQ)}function P(e,t){var n=_().box;function r(e){e.target===n&&(rG(n,"remove",r),t())}if(0===e)return t();rG(n,"remove",a),rG(n,"add",r),a=r}function F(t,n,r){void 0===r&&(r=!1),GQ(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),C.push({node:e,eventType:t,handler:n,options:r})})}function U(){var e;L()&&(F("touchstart",W,{passive:!0}),F("touchend",G,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,W),e){case"mouseenter":F("mouseleave",G);break;case"focus":F(uG?"focusout":"blur",K);break;case"focusin":F("focusout",K)}})}function q(){C.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),C=[]}function W(e){var t,n=!1;if(y.state.isEnabled&&!Y(e)&&!f){var r="focus"===(null==(t=o)?void 0:t.type);o=e,s=e.currentTarget,T(),!y.state.isVisible&&UQ(e,"MouseEvent")&&_G.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||u)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(u=!n),n&&!r&&te(e)}}function Q(e){var t=e.target,n=H().contains(t)||b.contains(t);if("mousemove"!==e.type||!n){var r=$().concat(b).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:d}:null}).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=i.placement.split("-")[0],l=i.modifiersData.offset;if(!l)return!0;var s="bottom"===a?l.top.y:0,c="top"===a?l.bottom.y:0,d="right"===a?l.left.x:0,u="left"===a?l.right.x:0,f=t.top-r+s>o,h=r-t.bottom-c>o,p=t.left-n+d>o,C=n-t.right-u>o;return f||h||p||C})})(r,e)&&(I(),te(e))}}function G(e){Y(e)||y.props.trigger.indexOf("click")>=0&&u||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function K(e){y.props.trigger.indexOf("focusin")<0&&e.target!==H()||y.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||te(e)}function Y(e){return!!oG.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){J();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=k()?kG(b).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||H()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=_().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},d];k()&&s&&u.push({name:"arrow",options:{element:s,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),y.popperInstance=DQ(c,b,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:u}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function $(){return YQ(b.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&z("onTrigger",[y,e]),R();var t=V(!0),r=x(),i=r[0],o=r[1];oG.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),z("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&u)){var t=V(!1);t?r=setTimeout(function(){y.state.isVisible&&y.hide()},t):i=requestAnimationFrame(function(){y.hide()})}}else B()}}function zG(e,t){void 0===t&&(t={});var n=yG.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;gG(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),gG(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),MG(t,n)),document.addEventListener("touchstart",lG,BQ),window.addEventListener("blur",cG);var r=Object.assign({},t,{plugins:n}),i=eG(e);if("production"!==process.env.NODE_ENV){var o=$Q(r.content),a=i.length>1;mG(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var l=i.reduce(function(e,t){var n=t&&OG(t,r);return n&&e.push(n),e},[]);return $Q(e)?l[0]:l}zG.defaultProps=yG,zG.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&MG(e,[]),Object.keys(e).forEach(function(t){yG[t]=e[t]})},zG.currentInput=oG,Object.assign({},ZW,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});var NG={mouseover:"mouseenter",focusin:"focus",click:"click"};function TG(e,t){"production"!==process.env.NODE_ENV&&gG(!(t&&t.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var n=[],r=[],i=!1,o=t.target,a=QQ(t,["target"]),l=Object.assign({},a,{trigger:"manual",touch:!1}),s=Object.assign({touch:yG.touch},a,{showOnCreate:!0}),c=zG(e,l);function d(e){if(e.target&&!i){var n=e.target.closest(o);if(n){var a=n.getAttribute("data-tippy-trigger")||t.trigger||yG.trigger;if(!n._tippy&&!("touchstart"===e.type&&"boolean"==typeof s.touch||"touchstart"!==e.type&&a.indexOf(NG[e.type])<0)){var l=zG(n,s);l&&(r=r.concat(l))}}}}function u(e,t,r,i){void 0===i&&(i=!1),e.addEventListener(t,r,i),n.push({node:e,eventType:t,handler:r,options:i})}return GQ(c).forEach(function(e){var t=e.destroy,o=e.enable,a=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&r.forEach(function(e){e.destroy()}),r=[],n.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),n=[],t()},e.enable=function(){o(),r.forEach(function(e){return e.enable()}),i=!1},e.disable=function(){a(),r.forEach(function(e){return e.disable()}),i=!0},function(e){var t=e.reference;u(t,"touchstart",d,BQ),u(t,"mouseover",d),u(t,"focusin",d),u(t,"click",d)}(e)}),c}zG.setDefaultProps({render:HG});const IG=new Set(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]),DG=()=>(l(()=>{const e=TG(document.body,{target:"[data-tooltip], [data-tooltip-id]",appendTo:()=>document.body,arrow:!1,placement:"bottom",maxWidth:"90vw",animation:!0,interactive:!0,theme:"ff-global-tooltip",content(e){const t=document.createElement("div"),n=e.getAttribute("data-tooltip-id");if(n){const e=document.getElementById(n);if(e)return t.innerHTML=e.innerHTML,t}const r=e.getAttribute("data-tooltip")||"";return r?(r.startsWith("<")&&r.endsWith(">")?t.innerHTML=r:(t.style.whiteSpace="pre-wrap",t.style.wordBreak="break-word",t.textContent=r),t):""},onShow(e){const{reference:t}=e;if(!t.hasAttribute("data-tooltip")&&!t.hasAttribute("data-tooltip-id"))return!1;const n=e.reference.hasAttribute("data-tooltip-interactive"),r=e.reference.getAttribute("data-tooltip-placement"),i=r?.trim().toLowerCase(),o=i&&IG.has(i)?i:"bottom";e.setProps({interactive:n,placement:o})}});return()=>{Array.isArray(e)?e.forEach(e=>e.destroy()):e.destroy()}},[]),null);var ZG=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function N(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function I(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())N(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let jG=!0,RG=!0;function BG(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function PG(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function FG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(jG=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function UG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(RG=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function qG(){if("object"==typeof window){if(jG)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function WG(e,t){RG&&console.warn(e+" is deprecated, please use "+t+" instead.")}function QG(e){return"[object Object]"===Object.prototype.toString.call(e)}function GG(e){return QG(e)?Object.keys(e).reduce(function(t,n){const r=QG(e[n]),i=r?GG(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function KG(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?KG(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{KG(e,e.get(t),n)})}))}function YG(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&KG(e,n,i)})}),i}const XG=qG;function JG(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),XG("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return XG("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function $G(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function eK(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else PG(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function tK(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function nK(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>YG(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),PG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>YG(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function rK(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function iK(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return rK(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function oK(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function aK(e,t){PG(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var lK=Object.freeze({__proto__:null,fixNegotiationNeeded:aK,shimAddTrackRemoveTrack:iK,shimAddTrackRemoveTrackWithNative:rK,shimGetSendersWithDtmf:tK,shimGetUserMedia:JG,shimMediaStream:$G,shimOnTrack:eK,shimPeerConnection:oK,shimSenderReceiverGetStats:nK});function sK(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){WG("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function cK(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function dK(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function uK(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function fK(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),PG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function hK(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){WG("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function pK(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function CK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function mK(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function gK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function vK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var yK=Object.freeze({__proto__:null,shimAddTransceiver:CK,shimCreateAnswer:vK,shimCreateOffer:gK,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:mK,shimGetUserMedia:sK,shimOnTrack:cK,shimPeerConnection:dK,shimRTCDataChannel:pK,shimReceiverGetStats:fK,shimRemoveStream:hK,shimSenderGetStats:uK});function wK(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function bK(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function EK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function MK(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(AK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function AK(e){return e&&void 0!==e.video?Object.assign({},e,{video:GG(e.video)}):e}function xK(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(WG("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function LK(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function kK(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function HK(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var SK,_K=Object.freeze({__proto__:null,shimAudioContext:HK,shimCallbacksAPI:EK,shimConstraints:AK,shimCreateOfferLegacy:kK,shimGetUserMedia:MK,shimLocalStreamsAPI:wK,shimRTCIceServerUrls:xK,shimRemoteStreamsAPI:bK,shimTrackEventTransceiver:LK}),VK={exports:{}};var OK=(SK||(SK=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(VK)),VK.exports),zK=H(OK),NK=L({__proto__:null,default:zK},[OK]);function TK(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=zK.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,PG(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function IK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||PG(e,"icecandidate",e=>{if(e.candidate){const t=zK.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function DK(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=zK.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=zK.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=zK.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function ZK(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},PG(e,"datachannel",e=>(t(e.channel,e.target),e))}function jK(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function RK(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function BK(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function PK(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var FK=Object.freeze({__proto__:null,removeExtmapAllowMixed:RK,shimAddIceCandidateNullOrEmpty:BK,shimConnectionState:jK,shimMaxMessageSize:DK,shimParameterlessSetLocalDescription:PK,shimRTCIceCandidate:TK,shimRTCIceCandidateRelayProtocol:IK,shimSendThrowTypeError:ZK});const UK=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=qG,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(BG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(BG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(BG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=BG(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:FK,extractVersion:BG,disableLog:FG,disableWarnings:UG,sdp:NK};switch(r.browser){case"chrome":if(!lK||!oK||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=lK,BK(e,r),PK(e),JG(e,r),$G(e),oK(e,r),eK(e),iK(e,r),tK(e),nK(e),aK(e,r),TK(e),IK(e),jK(e),DK(e,r),ZK(e),RK(e,r);break;case"firefox":if(!yK||!dK||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=yK,BK(e,r),PK(e),sK(e,r),dK(e,r),cK(e),hK(e),uK(e),fK(e),pK(e),CK(e),mK(e),gK(e),vK(e),TK(e),jK(e),DK(e,r),ZK(e);break;case"safari":if(!_K||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=_K,BK(e,r),PK(e),xK(e),kK(e),EK(e),wK(e),bK(e),LK(e),MK(e),HK(e),TK(e),IK(e),DK(e,r),ZK(e),RK(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),qK=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(F,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},WK=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},QK=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n},GK=({used:t,total:r,unit:i="GB",showValue:o=!0,width:a="216px"})=>{const l=((e,t)=>t>0?Math.min(e/t*100,100):0)(t,r);return e("div",{className:"ff-storage-bar",style:{width:a},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${l}%`},children:o&&n("span",{className:"ff-storage-bar__value",children:[t,i]})})})})};export{je as AADHAAR_REGEX,ye as ALPHABET_ONLY_REGEX,Bt as ALPHABET_WITH_SPACES_ONLY_REGEX,ht as ALPHANUMERIC_PARENTHESIS_REGEX,be as ALPHANUMERIC_REGEX,jt as ALPHANUMERIC_WITH_DOT_REGEX,Ee as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,Zt as ALPHA_NUM_EXTENDED_REGEX,Ot as ALPHA_NUM_REGEX,$ as Accordion,RE as AddContentButton,Sa as AddResourceButton,NE as AiToggle,ah as AllProjectsDropdown,TE as AnimatedSetting,hh as AppHeader,kv as AttachMedia,Lp as AttachmentButton,Hp as Avatar,Ye as BASE64_REGEX,ze as BIG_END_WHITESPACE,Xe as BINARY_NUMBER_REGEX,Mt as BODY_TAG_TYPE_VALIDATION,_A as BarChart,aW as Box,Ws as BrowserTabs,U as Button,Ct as CAMEL_CASE_REGEX,bt as CERTIFICATES_NAME_REGEX,Lt as CHECK_CAMEL_CASE,ke as CREDIT_CARD_REGEX,et as CURRENCY_GENERIC_REGEX,VE as ChatModal,OE as ChatModalAi,te as Checkbox,nn as Chip,ZE as ChipWithCount,AE as ChooseFile,en as Col,nk as Comments,sk as ConditionalDropdown,YL as ConnectingBranch,Jt as Container,_p as ContentCard,bE as CreateVariableSlider,Me as DATE_REGEX,We as DECIMAL_NUMBER_REGEX,Ue as DRIVING_LICENSE_REGEX,vt as DYNAMIC_VALUE_PATTERN_REGEX,yt as DYNAMIC_VALUE_TYPE_REGEX,wt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,gt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,wh as DashboardDonutChart,Jf as DatePicker,CW as DebugToolsPanel,za as DonutChart,gE as DownloadClient,ih as DragAndDrop,X as Drawer,Fa as Dropzone,dt as ELEMENTS_TRAILING_SPACE_REGEX,ut as ELEMENTS_WHITE_SPACE_REGEX,qt as EMAIL_FORMAT_REGEX,de as EMAIL_REGEX,It as EMAIL_VALIDATION_REGEX,Rt as EXCEL_SPACING_REGEX,Zs as EditLabel,zp as EditTextField,UL as Editor,jE as ErrorBoundary,Mv as Excel,ln as ExpandableMenu,Pt as FILENAME_VALIDATION_REGEX,xe as FILE_EXTENSION_REGEX,ct as FILE_NAME_REGEX,vE as FieldSet,qa as FileDropzone,Ua as FilePreview,_s as Form,ak as FormatString,De as GSTIN_REGEX,Je as HEXADECIMAL_NUMBER_REGEX,me as HEX_COLOR_REGEX,Ke as HSL_COLOR_REGEX,Qe as HTML_ATTRIBUTE_REGEX,Et as HTML_FILE_TYPE_VALIDATION,_e as HTML_TAG_REGEX,J as HighlightText,zE as HistoryCard,Be as INDIAN_CURRENCY_REGEX,Fe as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,Ie as INDIAN_PIN_CODE_REGEX,Pe as INTERNATIONAL_PHONE_REGEX,pe as IPV4_REGEX,Ce as IPV6_REGEX,P as Icon,eh as IconButton,Lv as IconRadialChart,vp as IconRadioGroup,rn as Input,Vs as InputWithDropdown,xt as JAVASCRIPT_FILE_TYPE_VALIDATION,ZG as Janus,tt as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,Vp as LabelEditTextField,nr as LazyLoad,mE as LineChart,Sp as LineLoader,DE as Link,Le as MAC_ADDRESS_REGEX,at as MEMORY_VALIDATION_REGEX,yp as MachineInputField,kE as MediaPreview,qE as MediaViewerModel,hr as MenuOption,_E as MessageBox,Os as MiniModal,HE as MobileSkin,th as Modal,Av as ModuleChip,OA as MultiRadialChart,Yt as MultiSelect,gp as NLPInput,st as NLP_DESCRIPTION_REGEX,Ft as NO_LEADING_TRAILING_SPACE_REGEX,we as NUMBERS_ONLY_REGEX,rt as NUMBER_REGEX,oW as NoDataContent,FE as OsTree,UE as OtpVerification,zs as OverviewModal,Ze as PAN_CARD_REGEX,ft as PARAMETER_ALPHANUMERIC_REGEX,ve as PASSWORD_COMPLEX_REGEX,ge as PASSWORD_SIMPLE_REGEX,fe as PHONE_REGEX,he as POSTAL_CODE_REGEX,ph as Paper,xO as PhoneInputField,sh as PieChart,ik as PopUpModal,UO as PrePostTable,ME as ProgressBar,SE as Prompt,IE as PromptContainer,Ge as RGB_COLOR_REGEX,$e as ROMAN_NUMERALS_REGEX,an as RadialChart,Ra as RadioButton,Ba as RadioGroup,fp as Recaptcha,$t as Row,ot as SCRIPT_REGEX,Ut as SERVER_HOST_REGEX,He as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,lt as STEP_GROUP_NAME_REGEX,qK as ScriptGenerationLoader,xE as ScriptSwitchButton,Qs as Search,lr as Select,vW as SelectionSwitcher,xp as SequentialConnectingBranch,WE as SessionDropdown,mW as SessionManager,$f as StateDropdown,gW as StatusBadge,dr as StatusButton,Hv as StatusCard,PE as StatusIndicator,oz as StepLandingTable,rz as StepResultStats,GK as StorageUsageBar,LE as SwitchButton,Ae as TIME_REGEX,nt as TWITTER_HANDLE_REGEX,ka as Table,Us as TableTree,rM as TableTreeFn,EE as TableWithAccordion,qs as Tabs,BE as TabsWithSilder,cr as TextArea,iW as TextEditor,Q as ThemeProvider,Xt as Toaster,Da as Toastify,tn as Toggle,kp as ToggleSwitch,K as Tooltip,DG as TooltipService,cn as TruncatedTooltip,F as Typography,it as UNIT_REGEX,ue as URL_REGEX,Ne as USERNAME_REGEX,qe as USERNAME_SPECIAL_REGEX,Oe as US_ZIP_CODE_REGEX,Se as UUID_REGEX,Re as VEHICLE_REGISTRATION_REGEX,CE as VariableDropdown,oh as VariableInput,wE as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,At as XML_FILE_TYPE_VALIDATION,yW as ZoomControl,UK as adapter,IO as addPrePostStepGroup,DO as addStepGroup,sW as autoScrollToTableLastRow,Op as capitalize,G as checkEmpty,pW as checkMicrophoneAccess,fh as clearStore,aM as compareArrays,oM as compareObjects,HO as convertFormDataToObject,HA as convertToBytes,SA as convertToGB,ZO as convertToISO,QK as copyToClipboard,La as debounce,uh as deleteStoreValue,Wt as ffid,iM as findAndInsert,TO as formatDate,kO as formatResponseDate,kA as getEncryptedData,Na as getExtension,Ta as getExtensionWithPeriod,hW as getNavigateToKey,qL as getSequentialPayload,dh as getStoreValue,uW as getTopVisibleNodeKey,SO as getTreeDetails,jO as handleTimeZoneChange,cW as handleTreeExpandAllCollapseAll,NO as handleTreeNodeExpandCollapse,OO as handleTreeNodeSect,zO as handleUnCheckAllTreeNodesWithUpdates,ck as hasDuplicateFile,bp as isEmptyObject,oe as isTextTruncated,fW as nlpInputDelay,LO as rearrangeDragItem,XL as saveFileFromBlob,FO as scrollToView,ch as setStoreValue,wv as throttle,lW as toCamelCase,Za as toast,dW as toggleShowHideEntity,ie as truncateText,_O as updateTreeState,VO as useBeforeUnload,Y as useClickOutside,WK as useDeviceType,ja as useFileDropzone,ce as useKeyboardActions,Wa as useTheme,rk as useTriggerControl};
48
+ */!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,n){e.exports=t},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(3),o=n(5),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(0),i=n(1);function o(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getStartKey(),i=t.getEndKey(),o=n.getBlockMap();return o.toSeq().skipUntil(function(e,t){return t===r}).takeUntil(function(e,t){return t===i}).concat([[i,o.get(i)]])}function a(e){return o(e).toList()}function l(e){if(e)return a(e).get(0)}function s(e){if(e){var t=l(e),n=e.getCurrentContent().getBlockMap().toSeq().toList(),r=0;if(n.forEach(function(e,n){e.get("key")===t.get("key")&&(r=n-1)}),-1<r)return n.get(r)}}function c(e){return e?e.getCurrentContent().getBlockMap().toList():new i.List}function d(e){var t=a(e);if(!t.some(function(e){return e.type!==t.get(0).type}))return t.get(0).type}function u(e){var t=r.RichUtils.tryToRemoveBlockStyle(e);return t?r.EditorState.push(e,t,"change-block-type"):e}function f(e){var t="",n=e.getSelection(),r=n.getAnchorOffset(),i=n.getFocusOffset(),o=a(e);if(0<o.size){if(n.getIsBackward()){var l=r;r=i,i=l}for(var s=0;s<o.size;s+=1){var c=0===s?r:0,d=s===o.size-1?i:o.get(s).getText().length;t+=o.get(s).getText().slice(c,d)}}return t}function h(e){var t=e.getCurrentContent(),n=e.getSelection(),i=r.Modifier.removeRange(t,n,"forward"),o=i.getSelectionAfter(),a=i.getBlockForKey(o.getStartKey());return i=r.Modifier.insertText(i,o,"\n",a.getInlineStyleAt(o.getStartOffset()),null),r.EditorState.push(e,i,"insert-fragment")}function p(e){var t=r.Modifier.splitBlock(e.getCurrentContent(),e.getSelection());return u(r.EditorState.push(e,t,"split-block"))}function C(e){var t=e.getCurrentContent().getBlockMap().toList(),n=e.getSelection().merge({anchorKey:t.first().get("key"),anchorOffset:0,focusKey:t.last().get("key"),focusOffset:t.last().getLength()}),i=r.Modifier.removeRange(e.getCurrentContent(),n,"forward");return r.EditorState.push(e,i,"remove-range")}function m(e,t){var n=r.Modifier.setBlockData(e.getCurrentContent(),e.getSelection(),t);return r.EditorState.push(e,n,"change-block-data")}function g(e){var t=new i.Map({}),n=a(e);if(n&&0<n.size)for(var r=function(e){var r=n.get(e).getData();if(!r||0===r.size)return t=t.clear(),"break";if(0===e)t=r;else if(t.forEach(function(e,n){r.get(n)&&r.get(n)===e||(t=t.delete(n))}),0===t.size)return t=t.clear(),"break"},o=0;o<n.size&&"break"!==r(o);o+=1);return t}var v=Object(i.Map)({code:{element:"pre"}}),y=r.DefaultDraftBlockRenderMap.merge(v);function w(e){if(e){var t=e.getType();return"unordered-list-item"===t||"ordered-list-item"===t}return!1}function b(e,t,n){var i,a=e.getSelection();i=a.getIsBackward()?a.getFocusKey():a.getAnchorKey();var l=e.getCurrentContent(),s=l.getBlockForKey(i),c=s.getType();if("unordered-list-item"!==c&&"ordered-list-item"!==c)return e;var d=l.getBlockBefore(i);if(!d)return e;if(d.getType()!==c)return e;var u=s.getDepth();if(1===t&&u===n)return e;var f,h,p,C,m,g,v,y=Math.min(d.getDepth()+1,n),w=(h=t,p=y,C=(f=e).getSelection(),g=(m=f.getCurrentContent()).getBlockMap(),v=o(f).map(function(e){var t=e.getDepth()+h;return t=Math.max(0,Math.min(t,p)),e.set("depth",t)}),g=g.merge(v),m.merge({blockMap:g,selectionBefore:C,selectionAfter:C}));return r.EditorState.push(e,w,"adjust-depth")}function E(e,t){var n;return 13===(n=t).which&&(n.getModifierState("Shift")||n.getModifierState("Alt")||n.getModifierState("Control"))?e.getSelection().isCollapsed()?r.RichUtils.insertSoftNewline(e):h(e):function(e){var t=e.getSelection();if(t.isCollapsed()){var n=e.getCurrentContent(),r=t.getStartKey(),i=n.getBlockForKey(r);if(!w(i)&&"unstyled"!==i.getType()&&i.getLength()===t.getStartOffset())return p(e);if(w(i)&&0===i.getLength()){var o=i.getDepth();if(0===o)return u(e);if(0<o)return b(e,-1,o)}}}(e)}function M(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 A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){return(x="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 L(e){var t=e.getSelection();if(t.isCollapsed()){var n={},r=e.getCurrentInlineStyle().toList().toJS();if(r)return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(e){n[e]=0<=r.indexOf(e)}),n}var i=t.getStartOffset(),o=t.getEndOffset(),l=a(e);if(0<l.size){var s=function(){for(var e={BOLD:!0,ITALIC:!0,UNDERLINE:!0,STRIKETHROUGH:!0,CODE:!0,SUPERSCRIPT:!0,SUBSCRIPT:!0},t=0;t<l.size;t+=1){var n=0===t?i:0,r=t===l.size-1?o:l.get(t).getText().length;n===r&&0===n?(n=1,r=2):n===r&&--n;for(var a=function(n){var r=l.get(t).getInlineStyleAt(n);["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","CODE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(t){e[t]=e[t]&&r.get(t)===t})},s=n;s<r;s+=1)a(s)}return{v:e}}();if("object"===x(s))return s.v}return{}}function k(e){var t,n=e.getSelection(),r=n.getStartOffset(),i=n.getEndOffset();r===i&&0===r?i=1:r===i&&--r;for(var o=l(e),a=r;a<i;a+=1){var s=o.getEntityAt(a);if(!s){t=void 0;break}if(a===r)t=s;else if(t!==s){t=void 0;break}}return t}function H(e,t){var n,r=l(e);return r.findEntityRanges(function(e){return e.get("entity")===t},function(e,t){n={start:e,end:t,text:r.get("text").slice(e,t)}}),n}function S(e,t,n){V[e]["".concat(e.toLowerCase(),"-").concat(n)]=A({},"".concat(t),n)}function _(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},V.color,{},V.bgcolor,{},V.fontSize,{},V.fontFamily,{CODE:V.CODE,SUPERSCRIPT:V.SUPERSCRIPT,SUBSCRIPT:V.SUBSCRIPT})}var V={color:{},bgcolor:{},fontSize:{},fontFamily:{},CODE:{fontFamily:"monospace",wordWrap:"break-word",background:"#f1f1f1",borderRadius:3,padding:"1px 3px"},SUPERSCRIPT:{fontSize:11,position:"relative",top:-8,display:"inline-flex"},SUBSCRIPT:{fontSize:11,position:"relative",bottom:-8,display:"inline-flex"}};function O(e,t,n){var i=e.getSelection(),o=Object.keys(V[t]).reduce(function(e,t){return r.Modifier.removeInlineStyle(e,i,t)},e.getCurrentContent()),a=r.EditorState.push(e,o,"changeinline-style"),l=e.getCurrentInlineStyle();if(i.isCollapsed()&&(a=l.reduce(function(e,t){return r.RichUtils.toggleInlineStyle(e,t)},a)),"SUPERSCRIPT"===t||"SUBSCRIPT"==t)l.has(n)||(a=r.RichUtils.toggleInlineStyle(a,n));else{var s="bgcolor"===t?"backgroundColor":t;l.has("".concat(s,"-").concat(n))||(a=r.RichUtils.toggleInlineStyle(a,"".concat(t.toLowerCase(),"-").concat(n)),S(t,s,n))}return a}function z(e){e&&e.getCurrentContent().getBlockMap().map(function(e){return e.get("characterList")}).toList().flatten().forEach(function(e){e&&0===e.indexOf("color-")?S("color","color",e.substr(6)):e&&0===e.indexOf("bgcolor-")?S("bgcolor","backgroundColor",e.substr(8)):e&&0===e.indexOf("fontsize-")?S("fontSize","fontSize",+e.substr(9)):e&&0===e.indexOf("fontfamily-")&&S("fontFamily","fontFamily",e.substr(11))})}function N(e,t,n){var r=e.getInlineStyleAt(n).toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(r&&0<r.size)return r.get(0)}function T(e,t){if(e&&t&&0<t.length){var n=function(){var n=e.getSelection(),r={};if(n.isCollapsed())return t.forEach(function(t){r[t]=function(e,t){var n=e.getCurrentInlineStyle().toList().filter(function(e){return e.startsWith(t.toLowerCase())});if(n&&0<n.size)return n.get(0)}(e,t)}),{v:r};var i=n.getStartOffset(),o=n.getEndOffset(),l=a(e);if(0<l.size){for(var s=function(e){var n=0===e?i:0,a=e===l.size-1?o:l.get(e).getText().length;n===a&&0===n?(n=1,a=2):n===a&&--n;for(var s=function(i){i===n?t.forEach(function(t){r[t]=N(l.get(e),t,i)}):t.forEach(function(t){r[t]&&r[t]!==N(l.get(e),t,i)&&(r[t]=void 0)})},c=n;c<a;c+=1)s(c)},c=0;c<l.size;c+=1)s(c);return{v:r}}}();if("object"===x(n))return n.v}return{}}function I(e){var t=e.getCurrentInlineStyle(),n=e.getCurrentContent();return t.forEach(function(t){n=r.Modifier.removeInlineStyle(n,e.getSelection(),t)}),r.EditorState.push(e,n,"change-inline-style")}n.d(t,"isListBlock",function(){return w}),n.d(t,"changeDepth",function(){return b}),n.d(t,"handleNewLine",function(){return E}),n.d(t,"getEntityRange",function(){return H}),n.d(t,"getCustomStyleMap",function(){return _}),n.d(t,"toggleCustomInlineStyle",function(){return O}),n.d(t,"getSelectionEntity",function(){return k}),n.d(t,"extractInlineStyle",function(){return z}),n.d(t,"removeAllInlineStyles",function(){return I}),n.d(t,"getSelectionInlineStyle",function(){return L}),n.d(t,"getSelectionCustomInlineStyle",function(){return T}),n.d(t,"getSelectedBlocksMap",function(){return o}),n.d(t,"getSelectedBlocksList",function(){return a}),n.d(t,"getSelectedBlock",function(){return l}),n.d(t,"getBlockBeforeSelectedBlock",function(){return s}),n.d(t,"getAllBlocks",function(){return c}),n.d(t,"getSelectedBlocksType",function(){return d}),n.d(t,"removeSelectedBlocksStyle",function(){return u}),n.d(t,"getSelectionText",function(){return f}),n.d(t,"addLineBreakRemovingSelection",function(){return h}),n.d(t,"insertNewUnstyledBlock",function(){return p}),n.d(t,"clearEditorContent",function(){return C}),n.d(t,"setBlockData",function(){return m}),n.d(t,"getSelectedBlocksMetadata",function(){return g}),n.d(t,"blockRenderMap",function(){return y})}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t){e.exports=n},function(e,t,n){function r(e){if(l[e])return l[e].exports;var t=l[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o,a,l;e.exports=(i=n(5),o=n(3),l={},r.m=a=[function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){e.exports=n(3)},function(e,t,n){n.r(t);var r=n(1),i=n(0),o=function(e,t,n){var r,o=e.textContent;return""===o.trim()?{chunk:(r=n,{text:" ",inlines:[new i.OrderedSet],entities:[r],blocks:[]})}:{chunk:{text:o,inlines:Array(o.length).fill(t),entities:Array(o.length).fill(n),blocks:[]}}},a=function(){return{text:"\n",inlines:[new i.OrderedSet],entities:new Array(1),blocks:[]}},l=function(){return{text:"",inlines:[],entities:[],blocks:[]}},s=function(e,t){return{text:"",inlines:[],entities:[],blocks:[{type:e,depth:0,data:t||new i.Map({})}]}},c=function(e,t,n){return{text:"\r",inlines:[],entities:[],blocks:[{type:e,depth:Math.max(0,Math.min(4,t)),data:n||new i.Map({})}]}},d=function(e){return{text:"\r ",inlines:[new i.OrderedSet],entities:[e],blocks:[{type:"atomic",depth:0,data:new i.Map({})}]}},u=function(e,t){return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},f=new i.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"},"unordered-list-item":{element:"li",wrapper:"ul"},"ordered-list-item":{element:"li",wrapper:"ol"},blockquote:{element:"blockquote"},code:{element:"pre"},atomic:{element:"figure"},unstyled:{element:"p",aliasedElements:["div"]}}),h={code:"CODE",del:"STRIKETHROUGH",em:"ITALIC",strong:"BOLD",ins:"UNDERLINE",sub:"SUBSCRIPT",sup:"SUPERSCRIPT"};function p(e){return e.style.textAlign?new i.Map({"text-align":e.style.textAlign}):e.style.marginLeft?new i.Map({"margin-left":e.style.marginLeft}):void 0}var C=function(e){var t=void 0;if(e instanceof HTMLAnchorElement){var n={};t=e.dataset&&void 0!==e.dataset.mention?(n.url=e.href,n.text=e.innerHTML,n.value=e.dataset.value,r.Entity.__create("MENTION","IMMUTABLE",n)):(n.url=e.getAttribute&&e.getAttribute("href")||e.href,n.title=e.innerHTML,n.targetOption=e.target,r.Entity.__create("LINK","MUTABLE",n))}return t};n.d(t,"default",function(){return y});var m=" ",g=new RegExp("&nbsp;","g"),v=!0;function y(e,t){var n,y,w=(n=t,(y=function(e){var t,n=null;return document.implementation&&document.implementation.createHTMLDocument&&((t=document.implementation.createHTMLDocument("foo")).documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}(e.trim().replace(g,m)))?(v=!0,{chunk:function e(t,n,i,m,g,y){var w=t.nodeName.toLowerCase();if(y){var b=y(w,t);if(b){var E=r.Entity.__create(b.type,b.mutability,b.data||{});return{chunk:d(E)}}}if("#text"===w&&"\n"!==t.textContent)return o(t,n,g);if("br"===w)return{chunk:a()};if("img"===w&&t instanceof HTMLImageElement){var M={};M.src=t.getAttribute&&t.getAttribute("src")||t.src,M.alt=t.alt,M.height=t.style.height,M.width=t.style.width,t.style.float&&(M.alignment=t.style.float);var A=r.Entity.__create("IMAGE","MUTABLE",M);return{chunk:d(A)}}if("video"===w&&t instanceof HTMLVideoElement){var x={};x.src=t.getAttribute&&t.getAttribute("src")||t.src,x.alt=t.alt,x.height=t.style.height,x.width=t.style.width,t.style.float&&(x.alignment=t.style.float);var L=r.Entity.__create("VIDEO","MUTABLE",x);return{chunk:d(L)}}if("iframe"===w&&t instanceof HTMLIFrameElement){var k={};k.src=t.getAttribute&&t.getAttribute("src")||t.src,k.height=t.height,k.width=t.width;var H=r.Entity.__create("EMBEDDED_LINK","MUTABLE",k);return{chunk:d(H)}}var S,_=function(e,t){var n=f.filter(function(n){return n.element===e&&(!n.wrapper||n.wrapper===t)||n.wrapper===e||n.aliasedElements&&-1<n.aliasedElements.indexOf(e)}).keySeq().toSet().toArray();if(1===n.length)return n[0]}(w,m);_&&("ul"===w||"ol"===w?(m=w,i+=1):("unordered-list-item"!==_&&"ordered-list-item"!==_&&(m="",i=-1),v?(S=s(_,p(t)),v=!1):S=c(_,i,p(t)))),S=S||l(),n=function(e,t,n){var r,i=h[e];if(i)r=n.add(i).toOrderedSet();else if(t instanceof HTMLElement){var o=t;r=(r=n).withMutations(function(e){var t=o.style.color,n=o.style.backgroundColor,r=o.style.fontSize,i=o.style.fontFamily.replace(/^"|"$/g,""),a=o.style.fontWeight,l=o.style.textDecoration,s=o.style.fontStyle;t&&e.add("color-".concat(t.replace(/ /g,""))),n&&e.add("bgcolor-".concat(n.replace(/ /g,""))),r&&e.add("fontsize-".concat(r.replace(/px$/g,""))),i&&e.add("fontfamily-".concat(i)),"bold"===a&&e.add(h.strong),"underline"===l&&e.add(h.ins),"italic"===s&&e.add(h.em)}).toOrderedSet()}return r}(w,t,n);for(var V=t.firstChild;V;){var O=e(V,n,i,m,C(V)||g,y).chunk;S=u(S,O),V=V.nextSibling}return{chunk:S}}(y,new i.OrderedSet,-1,"",void 0,n).chunk}):null);if(w){var b=w.chunk,E=new i.OrderedMap({});b.entities&&b.entities.forEach(function(e){e&&(E=E.set(e,r.Entity.__get(e)))});var M=0;return{contentBlocks:b.text.split("\r").map(function(e,t){var n=M+e.length,o=b&&b.inlines.slice(M,n),a=b&&b.entities.slice(M,n),l=new i.List(o.map(function(e,t){var n={style:e,entity:null};return a[t]&&(n.entity=a[t]),r.CharacterMetadata.create(n)}));return M=n,new r.ContentBlock({key:Object(r.genKey)(),type:b&&b.blocks[t]&&b.blocks[t].type||"unstyled",depth:b&&b.blocks[t]&&b.blocks[t].depth,data:b&&b.blocks[t]&&b.blocks[t].data||new i.Map({}),text:e,characterList:l})}),entityMap:E}}return null}}],r.c=l,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2))},function(e,t,n){function r(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},s={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?3<=t&&":"===e[t-3]||3<=t&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(){return function(e,t){t.normalize(e)}}function f(e){var t=e.re=n(21)(e.__opts__),r=e.__tlds__.slice();function l(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(l(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(l(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(l(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(l(t.tpl_host_fuzzy_test),"i");var s=[];function d(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r,a={validate:null,link:null};if(e.__compiled__[t]=a,"[object Object]"===i(n))return"[object RegExp]"===i(n.validate)?a.validate=(r=n.validate,function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}):o(n.validate)?a.validate=n.validate:d(t,n),void(o(n.normalize)?a.normalize=n.normalize:n.normalize?d(t,n):a.normalize=u());"[object String]"!==i(n)?d(t,n):s.push(t)}}),s.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:u()};var f,h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),(f=e).__index__=-1,f.__text_cache__=""}function h(e,t){var n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function p(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function C(e,t){if(!(this instanceof C))return new C(e,t);var n;t||(n=e,Object.keys(n||{}).reduce(function(e,t){return e||l.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=r({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},s,e),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},f(this)}C.prototype.add=function(e,t){return this.__schemas__[e]=t,f(this),this},C.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},C.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,i,o,a,l,s;if(this.re.schema_test.test(e))for((l=this.re.schema_search).lastIndex=0;null!==(t=l.exec(e));)if(i=this.testSchemaAt(e,t[2],l.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(s=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||s<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&0<=e.indexOf("@")&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,a=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),0<=this.__index__},C.prototype.pretest=function(e){return this.re.pretest.test(e)},C.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},C.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},C.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),f(this),this},C.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},C.prototype.onCompile=function(){},e.exports=C},function(e,t,n){e.exports=n(40)},function(e,t,n){},function(e,t,n){var r=n(11);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n}},function(e,t,n){e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){e.exports=function(e){var t={};t.src_Any=n(22).source,t.src_Cc=n(23).source,t.src_Z=n(24).source,t.src_P=n(25).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,4}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){n.r(t),n.d(t,"Editor",function(){return ni});var r=n(1),i=n.n(r),o=n(0),a=n.n(o),l=n(3),s=n(4),c=n(2),d=n.n(c);function u(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f=u(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.callBacks=[],this.suggestionCallback=void 0,this.editorFlag=!1,this.suggestionFlag=!1,this.closeAllModals=function(e){t.callBacks.forEach(function(t){t(e)})},this.init=function(e){var n=document.getElementById(e);n&&n.addEventListener("click",function(){t.editorFlag=!0}),document&&(document.addEventListener("click",function(){t.editorFlag?t.editorFlag=!1:(t.closeAllModals(),t.suggestionCallback&&t.suggestionCallback())}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.closeAllModals()}))},this.onEditorClick=function(){t.closeModals(),!t.suggestionFlag&&t.suggestionCallback?t.suggestionCallback():t.suggestionFlag=!1},this.closeModals=function(e){t.closeAllModals(e)},this.registerCallBack=function(e){t.callBacks.push(e)},this.deregisterCallBack=function(e){t.callBacks=t.callBacks.filter(function(t){return t!==e})},this.setSuggestionCallback=function(e){t.suggestionCallback=e},this.removeSuggestionCallback=function(){t.suggestionCallback=void 0},this.onSuggestionClick=function(){t.suggestionFlag=!0}});function h(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var p,C=h(function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.inputFocused=!1,this.editorMouseDown=!1,this.onEditorMouseDown=function(){t.editorFocused=!0},this.onInputMouseDown=function(){t.inputFocused=!0},this.isEditorBlur=function(e){return"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName||t.editorFocused?!("INPUT"===e.target.tagName&&"LABEL"===e.target.tagName&&"TEXTAREA"===e.target.tagName||t.inputFocused||(t.editorFocused=!1)):!(t.inputFocused=!1)},this.isEditorFocused=function(){return!t.inputFocused||(t.inputFocused=!1)},this.isToolbarFocused=function(){return!t.editorFocused||(t.editorFocused=!1)},this.isInputFocused=function(){return t.inputFocused}}),m=[],g={onKeyDown:function(e){m.forEach(function(t){t(e)})},registerCallBack:function(e){m.push(e)},deregisterCallBack:function(e){m=m.filter(function(t){return t!==e})}},v=function(){p=!0},y=function(){p=!1},w=function(){return p};function b(e){var t=e.getData()&&e.getData().get("text-align");return t?"rdw-".concat(t,"-aligned-block"):""}function E(e,t){if(e)for(var n in e)!{}.hasOwnProperty.call(e,n)||t(n,e[n])}function M(e,t){var n=!1;if(e)for(var r in e)if({}.hasOwnProperty.call(e,r)&&t===r){n=!0;break}return n}function A(e){e.stopPropagation()}function x(e){return e[e.options[0]].icon}function L(e,t){if(e&&void 0===t)return e;var n={};return E(e,function(e,r){var i;i=r,"[object Object]"===Object.prototype.toString.call(i)?n[e]=L(r,t[e]):n[e]=void 0!==t[e]?t[e]:r}),n}var k=n(6),H=n.n(k),S=n(5);function _(e){return(_="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 V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(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)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var i=T(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===_(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(9);var I=function(){!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&&z(e,t)}(o,r.Component);var e,t,n=N(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(){var t=e.props,n=t.disabled,r=t.onClick,i=t.value;n||r(i)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.className,o=t.activeClassName,a=t.active,l=t.disabled,s=t.title;return i.a.createElement("div",{className:d()("rdw-option-wrapper",r,(V(e={},"rdw-option-active ".concat(o),a),V(e,"rdw-option-disabled",l),e)),onClick:this.onClick,"aria-selected":a,title:s},n)}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function D(e){return(D="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 Z(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)}}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}I.propTypes={onClick:a.a.func.isRequired,children:a.a.any,value:a.a.string,className:a.a.string,activeClassName:a.a.string,active:a.a.bool,disabled:a.a.bool,title:a.a.string},I.defaultProps={activeClassName:""},n(12);var P=function(){!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&&j(e,t)}(o,r.Component);var e,t,n=R(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={highlighted:-1},e.onChange=function(t){var n=e.props.onChange;n&&n(t),e.toggleExpansion()},e.setHighlighted=function(t){e.setState({highlighted:t})},e.toggleExpansion=function(){var t=e.props,n=t.doExpand,r=t.doCollapse;t.expanded?r():n()},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.expanded;e.expanded&&!t&&this.setState({highlighted:-1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.expanded,r=t.children,o=t.className,a=t.optionWrapperClassName,l=t.ariaLabel,s=t.onExpandEvent,c=t.title,u=this.state.highlighted,f=r.slice(1,r.length);return i.a.createElement("div",{className:d()("rdw-dropdown-wrapper",o),"aria-expanded":n,"aria-label":l||"rdw-dropdown"},i.a.createElement("a",{className:"rdw-dropdown-selectedtext",onClick:s,title:c},r[0],i.a.createElement("div",{className:d()({"rdw-dropdown-carettoclose":n,"rdw-dropdown-carettoopen":!n})})),n?i.a.createElement("ul",{className:d()("rdw-dropdown-optionwrapper",a),onClick:A},i.a.Children.map(f,function(t,n){return t&&i.a.cloneElement(t,{onSelect:e.onChange,highlighted:u===n,setHighlighted:e.setHighlighted,index:n})})):void 0)}}])&&Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function F(e){return(F="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 U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(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)}}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===F(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}P.propTypes={children:a.a.any,onChange:a.a.func,className:a.a.string,expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,optionWrapperClassName:a.a.string,ariaLabel:a.a.string,title:a.a.string},n(13);var K=function(){!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&&W(e,t)}(o,r.Component);var e,t,n=Q(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onClick=function(t){var n=e.props,r=n.onSelect,i=n.onClick,o=n.value;n.disabled||(r&&r(o),i&&(t.stopPropagation(),i(o)))},e.setHighlighted=function(){var t=e.props;(0,t.setHighlighted)(t.index)},e.resetHighlighted=function(){(0,e.props.setHighlighted)(-1)},e}return e=o,(t=[{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.active,o=t.disabled,a=t.highlighted,l=t.className,s=t.activeClassName,c=t.disabledClassName,u=t.highlightedClassName,f=t.title;return i.a.createElement("li",{className:d()("rdw-dropdownoption-default",l,(U(e={},"rdw-dropdownoption-active ".concat(s),r),U(e,"rdw-dropdownoption-highlighted ".concat(u),a),U(e,"rdw-dropdownoption-disabled ".concat(c),o),e)),onMouseEnter:this.setHighlighted,onMouseLeave:this.resetHighlighted,onClick:this.onClick,title:f},n)}}])&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Y(e){return(Y="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 X(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)}}function J(e,t){return(J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Y(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}K.propTypes={children:a.a.any,value:a.a.any,onClick:a.a.func,onSelect:a.a.func,setHighlighted:a.a.func,index:a.a.number,disabled:a.a.bool,active:a.a.bool,highlighted:a.a.bool,className:a.a.string,activeClassName:a.a.string,disabledClassName:a.a.string,highlightedClassName:a.a.string,title:a.a.string},K.defaultProps={activeClassName:"",disabledClassName:"",highlightedClassName:""},n(14);var te=function(){!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&&J(e,t)}(o,r.Component);var e,t,n=$(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState,r=e.onChange,o=e.translations;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",t.className),"aria-label":"rdw-inline-control"},t.options.map(function(e,a){return i.a.createElement(I,{key:a,value:e,onClick:r,className:d()(t[e].className),active:!0===n[e]||"MONOSPACE"===e&&n.CODE,title:t[e].title||o["components.controls.inline.".concat(e)]},i.a.createElement("img",{alt:"",src:t[e].icon}))}))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=e.onChange,c=e.translations,u=t.className,f=t.dropdownClassName,h=t.title;return i.a.createElement(P,{className:d()("rdw-inline-dropdown",u),optionWrapperClassName:d()(f),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-inline-control",title:h},i.a.createElement("img",{src:x(t),alt:""}),t.options.map(function(e,n){return i.a.createElement(K,{key:n,value:e,className:d()("rdw-inline-dropdownoption",t[e].className),active:!0===l[e]||"MONOSPACE"===e&&l.CODE,title:t[e].title||c["components.controls.inline.".concat(e)]},i.a.createElement("img",{src:t[e].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&X(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ne(e){return(ne="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 re(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)}}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var i=ae(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ne(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}te.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var le=function(){!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&&ie(e,t)}(o,r.Component);var e,t,n=oe(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.toggleInlineStyle=function(e){var n="monospace"===e?"CODE":e.toUpperCase(),r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleInlineStyle(i,n);if("subscript"===e||"superscript"===e){var s="subscript"===e?"SUPERSCRIPT":"SUBSCRIPT",c=l.Modifier.removeInlineStyle(a.getCurrentContent(),a.getSelection(),s);a=l.EditorState.push(a,c,"change-inline-style")}a&&o(a)},t.changeKeys=function(e){if(e){var t={};return E(e,function(e,n){t["CODE"===e?"monospace":e.toLowerCase()]=n}),t}},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={currentStyles:i?t.changeKeys(Object(s.getSelectionInlineStyle)(i)):{}},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentStyles:this.changeKeys(Object(s.getSelectionInlineStyle)(t))})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentStyles,l=t.component||te;return i.a.createElement(l,{config:t,translations:n,currentState:a,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.toggleInlineStyle})}}])&&re(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function se(e){return(se="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 ce(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)}}function de(e,t){return(de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var i=fe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===se(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}le.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(15);var he=function(){!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&&de(e,t)}(o,r.Component);var e,t,n=ue(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).getBlockTypes=function(e){return[{label:"Normal",displayName:e["components.controls.blocktype.normal"]},{label:"H1",displayName:e["components.controls.blocktype.h1"]},{label:"H2",displayName:e["components.controls.blocktype.h2"]},{label:"H3",displayName:e["components.controls.blocktype.h3"]},{label:"H4",displayName:e["components.controls.blocktype.h4"]},{label:"H5",displayName:e["components.controls.blocktype.h5"]},{label:"H6",displayName:e["components.controls.blocktype.h6"]},{label:"Blockquote",displayName:e["components.controls.blocktype.blockquote"]},{label:"Code",displayName:e["components.controls.blocktype.code"]}]},t.state={blockTypes:t.getBlockTypes(e.translations)},t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.translations;t!==e.translations&&this.setState({blockTypes:this.getBlockTypes(t)})}},{key:"renderFlat",value:function(e){var t=this.props,n=t.config.className,r=t.onChange,o=t.currentState.blockType;return i.a.createElement("div",{className:d()("rdw-inline-wrapper",n)},e.map(function(e,t){return i.a.createElement(I,{key:t,value:e.label,active:o===e.label,onClick:r},e.displayName)}))}},{key:"renderInDropdown",value:function(e){var t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.title,l=t.currentState.blockType,s=t.expanded,c=t.doExpand,u=t.onExpandEvent,f=t.doCollapse,h=t.onChange,p=t.translations,C=this.state.blockTypes.filter(function(e){return e.label===l}),m=C&&C[0]&&C[0].displayName;return i.a.createElement("div",{className:"rdw-block-wrapper","aria-label":"rdw-block-control"},i.a.createElement(P,{className:d()("rdw-block-dropdown",r),optionWrapperClassName:d()(o),onChange:h,expanded:s,doExpand:c,doCollapse:f,onExpandEvent:u,title:a||p["components.controls.blocktype.blocktype"]},i.a.createElement("span",null,m||p["components.controls.blocktype.blocktype"]),e.map(function(e,t){return i.a.createElement(K,{active:l===e.label,value:e.label,key:t},e.displayName)})))}},{key:"render",value:function(){var e=this.props.config,t=e.inDropdown,n=this.state.blockTypes.filter(function(t){var n=t.label;return-1<e.options.indexOf(n)});return t?this.renderInDropdown(n):this.renderFlat(n)}}])&&ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();he.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var pe=he;function Ce(e){return(Ce="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 me(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)}}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ye(e);if(t){var i=ye(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ce(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var we=function(){!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&&ge(e,t)}(o,r.Component);var e,t,n=ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.blocksTypes=[{label:"Normal",style:"unstyled"},{label:"H1",style:"header-one"},{label:"H2",style:"header-two"},{label:"H3",style:"header-three"},{label:"H4",style:"header-four"},{label:"H5",style:"header-five"},{label:"H6",style:"header-six"},{label:"Blockquote",style:"blockquote"},{label:"Code",style:"code"}],t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.blocksTypes.find(function(t){return t.label===e}).style,r=t.props,i=r.editorState,o=r.onChange,a=l.RichUtils.toggleBlockType(i,n);a&&o(a)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:!1,currentBlockType:r?Object(s.getSelectedBlocksType)(r):"unstyled"},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlockType:Object(s.getSelectedBlocksType)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentBlockType,l=t.component||pe,s=this.blocksTypes.find(function(e){return e.style===a});return i.a.createElement(l,{config:t,translations:n,currentState:{blockType:s&&s.label},onChange:this.toggleBlockType,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();we.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var be=we;function Ee(e){return(Ee="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 Me(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)}}function Ae(e,t){return(Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Le(e);if(t){var i=Le(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ee(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(16);var ke=function(){!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&&Ae(e,t)}(o,r.Component);var e,t,n=xe(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontSize:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-size");t=t.substring(0,t.length-2),this.setState({defaultFontSize:t})}}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.dropdownClassName,a=t.options,l=t.title,s=e.onChange,c=e.expanded,u=e.doCollapse,f=e.onExpandEvent,h=e.doExpand,p=e.translations,C=this.props.currentState.fontSize,m=this.state.defaultFontSize;return m=Number(m),C=C||a&&0<=a.indexOf(m)&&m,i.a.createElement("div",{className:"rdw-fontsize-wrapper","aria-label":"rdw-font-size-control"},i.a.createElement(P,{className:d()("rdw-fontsize-dropdown",r),optionWrapperClassName:d()(o),onChange:s,expanded:c,doExpand:h,doCollapse:u,onExpandEvent:f,title:l||p["components.controls.fontsize.fontsize"]},C?i.a.createElement("span",null,C):i.a.createElement("img",{src:n,alt:""}),a.map(function(e,t){return i.a.createElement(K,{className:"rdw-fontsize-option",active:C===e,value:e,key:t},e)})))}}])&&Me(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function He(e){return(He="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 Se(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)}}function _e(e,t){return(_e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var i=Oe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===He(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ke.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var ze=function(){!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&&_e(e,t)}(o,r.Component);var e,t,n=Ve(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontSize=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontSize",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontSize:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTSIZE"]).FONTSIZE:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontSize:Object(s.getSelectionCustomInlineStyle)(t,["FONTSIZE"]).FONTSIZE})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontSize,l=t.component||ke,s=a&&Number(a.substring(9));return i.a.createElement(l,{config:t,translations:n,currentState:{fontSize:s},onChange:this.toggleFontSize,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ne(e){return(Ne="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 Te(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)}}function Ie(e,t){return(Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ne(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ze.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(17);var je=function(){!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&&Ie(e,t)}(o,r.Component);var e,t,n=De(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={defaultFontFamily:void 0},e}return e=o,(t=[{key:"componentDidMount",value:function(){var e=document.getElementsByClassName("DraftEditor-root");if(e&&0<e.length){var t=window.getComputedStyle(e[0]).getPropertyValue("font-family");this.setState({defaultFontFamily:t})}}},{key:"render",value:function(){var e=this.state.defaultFontFamily,t=this.props,n=t.config,r=n.className,o=n.dropdownClassName,a=n.options,l=n.title,s=t.translations,c=t.onChange,u=t.expanded,f=t.doCollapse,h=t.onExpandEvent,p=t.doExpand,C=this.props.currentState.fontFamily;return C=C||a&&e&&a.some(function(t){return t.toLowerCase()===e.toLowerCase()})&&e,i.a.createElement("div",{className:"rdw-fontfamily-wrapper","aria-label":"rdw-font-family-control"},i.a.createElement(P,{className:d()("rdw-fontfamily-dropdown",r),optionWrapperClassName:d()("rdw-fontfamily-optionwrapper",o),onChange:c,expanded:u,doExpand:p,doCollapse:f,onExpandEvent:h,title:l||s["components.controls.fontfamily.fontfamily"]},i.a.createElement("span",{className:"rdw-fontfamily-placeholder"},C||s["components.controls.fontfamily.fontfamily"]),a.map(function(e,t){return i.a.createElement(K,{active:C===e,value:e,key:t},e)})))}}])&&Te(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();je.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doExpand:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Re=je;function Be(e){return(Be="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 Pe(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)}}function Fe(e,t){return(Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=qe(e);if(t){var i=qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Be(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(){!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&&Fe(e,t)}(o,r.Component);var e,t,n=Ue(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleFontFamily=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=Object(s.toggleCustomInlineStyle)(r,"fontFamily",e);o&&i(o)};var r=e.editorState,i=e.modalHandler;return t.state={expanded:void 0,currentFontFamily:r?Object(s.getSelectionCustomInlineStyle)(r,["FONTFAMILY"]).FONTFAMILY:void 0},i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentFontFamily:Object(s.getSelectionCustomInlineStyle)(t,["FONTFAMILY"]).FONTFAMILY})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentFontFamily,l=t.component||Re,s=a&&a.substring(11);return i.a.createElement(l,{translations:n,config:t,currentState:{fontFamily:s},onChange:this.toggleFontFamily,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Qe(e){return(Qe="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 Ge(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)}}function Ke(e,t){return(Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}We.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(18);var Je=function(){!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&&Ke(e,t)}(o,r.Component);var e,t,n=Ye(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).options=["unordered","ordered","indent","outdent"],e.toggleBlockType=function(t){(0,e.props.onChange)(t)},e.indent=function(){(0,e.props.onChange)("indent")},e.outdent=function(){(0,e.props.onChange)("outdent")},e}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=e.currentState.listType,r=e.translations,o=e.indentDisabled,a=e.outdentDisabled,l=t.options,s=t.unordered,c=t.ordered,u=t.indent,f=t.outdent,h=t.className;return i.a.createElement("div",{className:d()("rdw-list-wrapper",h),"aria-label":"rdw-list-control"},0<=l.indexOf("unordered")&&i.a.createElement(I,{value:"unordered",onClick:this.toggleBlockType,className:d()(s.className),active:"unordered"===n,title:s.title||r["components.controls.list.unordered"]},i.a.createElement("img",{src:s.icon,alt:""})),0<=l.indexOf("ordered")&&i.a.createElement(I,{value:"ordered",onClick:this.toggleBlockType,className:d()(c.className),active:"ordered"===n,title:c.title||r["components.controls.list.ordered"]},i.a.createElement("img",{src:c.icon,alt:""})),0<=l.indexOf("indent")&&i.a.createElement(I,{onClick:this.indent,disabled:o,className:d()(u.className),title:u.title||r["components.controls.list.indent"]},i.a.createElement("img",{src:u.icon,alt:""})),0<=l.indexOf("outdent")&&i.a.createElement(I,{onClick:this.outdent,disabled:a,className:d()(f.className),title:f.title||r["components.controls.list.outdent"]},i.a.createElement("img",{src:f.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this,t=this.props,n=t.config,r=t.expanded,o=t.doCollapse,a=t.doExpand,l=t.onExpandEvent,s=t.onChange,c=t.currentState.listType,u=t.translations,f=n.options,h=n.className,p=n.dropdownClassName,C=n.title;return i.a.createElement(P,{className:d()("rdw-list-dropdown",h),optionWrapperClassName:d()(p),onChange:s,expanded:r,doExpand:a,doCollapse:o,onExpandEvent:l,"aria-label":"rdw-list-control",title:C||u["components.controls.list.list"]},i.a.createElement("img",{src:x(n),alt:""}),this.options.filter(function(e){return 0<=f.indexOf(e)}).map(function(t,r){return i.a.createElement(K,{key:r,value:t,disabled:e.props["".concat(t,"Disabled")],className:d()("rdw-list-dropdownOption",n[t].className),active:c===t,title:n[t].title||u["components.controls.list.".concat(t)]},i.a.createElement("img",{src:n[t].icon,alt:""}))}))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(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)}}function tt(e,t){return(tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===$e(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Je.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object,indentDisabled:a.a.bool,outdentDisabled:a.a.bool};var it=function(){!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&&tt(e,t)}(o,r.Component);var e,t,n=nt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){"unordered"===e?t.toggleBlockType("unordered-list-item"):"ordered"===e?t.toggleBlockType("ordered-list-item"):"indent"===e?t.adjustDepth(1):t.adjustDepth(-1)},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleBlockType=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=l.RichUtils.toggleBlockType(i,e);o&&r(o)},t.adjustDepth=function(e){var n=t.props,r=n.onChange,i=n.editorState,o=Object(s.changeDepth)(i,e,4);o&&r(o)},t.isIndentDisabled=function(){var e=t.props.editorState,n=t.state.currentBlock,r=Object(s.getBlockBeforeSelectedBlock)(e);return!r||!Object(s.isListBlock)(n)||r.get("type")!==n.get("type")||r.get("depth")<n.get("depth")},t.isOutdentDisabled=function(){var e=t.state.currentBlock;return!e||!Object(s.isListBlock)(e)||e.get("depth")<=0};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,currentBlock:i?Object(s.getSelectedBlock)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentBlock:Object(s.getSelectedBlock)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e,t=this.props,n=t.config,r=t.translations,o=this.state,a=o.expanded,l=o.currentBlock,s=n.component||Je;"unordered-list-item"===l.get("type")?e="unordered":"ordered-list-item"===l.get("type")&&(e="ordered");var c=this.isIndentDisabled(),d=this.isOutdentDisabled();return i.a.createElement(s,{config:n,translations:r,currentState:{listType:e},expanded:a,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange,indentDisabled:c,outdentDisabled:d})}}])&&et(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ot(e){return(ot="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 at(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)}}function lt(e,t){return(lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function st(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ot(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}it.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(19);var dt=function(){!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&&lt(e,t)}(o,r.Component);var e,t,n=st(o);function o(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n.apply(this,arguments)}return e=o,(t=[{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.left,o=t.center,a=t.right,l=t.justify,s=t.className,c=e.onChange,u=e.currentState.textAlignment,f=e.translations;return i.a.createElement("div",{className:d()("rdw-text-align-wrapper",s),"aria-label":"rdw-textalign-control"},0<=n.indexOf("left")&&i.a.createElement(I,{value:"left",className:d()(r.className),active:"left"===u,onClick:c,title:r.title||f["components.controls.textalign.left"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("center")&&i.a.createElement(I,{value:"center",className:d()(o.className),active:"center"===u,onClick:c,title:o.title||f["components.controls.textalign.center"]},i.a.createElement("img",{src:o.icon,alt:""})),0<=n.indexOf("right")&&i.a.createElement(I,{value:"right",className:d()(a.className),active:"right"===u,onClick:c,title:a.title||f["components.controls.textalign.right"]},i.a.createElement("img",{src:a.icon,alt:""})),0<=n.indexOf("justify")&&i.a.createElement(I,{value:"justify",className:d()(l.className),active:"justify"===u,onClick:c,title:l.title||f["components.controls.textalign.justify"]},i.a.createElement("img",{src:l.icon,alt:""})))}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState.textAlignment,s=e.onChange,c=e.translations,u=t.options,f=t.left,h=t.center,p=t.right,C=t.justify,m=t.className,g=t.dropdownClassName,v=t.title;return i.a.createElement(P,{className:d()("rdw-text-align-dropdown",m),optionWrapperClassName:d()(g),onChange:s,expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-textalign-control",title:v||c["components.controls.textalign.textalign"]},i.a.createElement("img",{src:l&&t[l]&&t[l].icon||x(t),alt:""}),0<=u.indexOf("left")&&i.a.createElement(K,{value:"left",active:"left"===l,className:d()("rdw-text-align-dropdownOption",f.className),title:f.title||c["components.controls.textalign.left"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("center")&&i.a.createElement(K,{value:"center",active:"center"===l,className:d()("rdw-text-align-dropdownOption",h.className),title:h.title||c["components.controls.textalign.center"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=u.indexOf("right")&&i.a.createElement(K,{value:"right",active:"right"===l,className:d()("rdw-text-align-dropdownOption",p.className),title:p.title||c["components.controls.textalign.right"]},i.a.createElement("img",{src:p.icon,alt:""})),0<=u.indexOf("justify")&&i.a.createElement(K,{value:"justify",active:"justify"===l,className:d()("rdw-text-align-dropdownOption",C.className),title:C.title||c["components.controls.textalign.justify"]},i.a.createElement("img",{src:C.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function ut(e){return(ut="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 ft(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)}}function ht(e,t){return(ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ct(e);if(t){var i=Ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ut(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}dt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var mt=function(){!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&&ht(e,t)}(o,r.Component);var e,t,n=pt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.addBlockAlignmentData=function(e){var n=t.props,r=n.editorState;(0,n.onChange)(t.state.currentTextAlignment!==e?Object(s.setBlockData)(r,{"text-align":e}):Object(s.setBlockData)(r,{"text-align":void 0}))};var r=t.props.modalHandler;return t.state={currentTextAlignment:void 0},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t!==e.editorState&&this.setState({currentTextAlignment:Object(s.getSelectedBlocksMetadata)(t).get("text-align")})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.expanded,a=r.currentTextAlignment,l=t.component||dt;return i.a.createElement(l,{config:t,translations:n,expanded:o,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{textAlignment:a},onChange:this.addBlockAlignmentData})}}])&&ft(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function gt(e){return(gt="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 vt(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)}}function yt(e,t){return(yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=bt(e);if(t){var i=bt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===gt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function bt(e){return(bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}mt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(20);var Et=function(){!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&&yt(e,t)}(o,r.Component);var e,t,n=wt(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))).state={currentStyle:"color"},e.onChange=function(t){(0,e.props.onChange)(e.state.currentStyle,t)},e.setCurrentStyleColor=function(){e.setState({currentStyle:"color"})},e.setCurrentStyleBgcolor=function(){e.setState({currentStyle:"bgcolor"})},e.renderModal=function(){var t=e.props,n=t.config,r=n.popupClassName,o=n.colors,a=t.currentState,l=a.color,s=a.bgColor,c=t.translations,u=e.state.currentStyle,f="color"===u?l:s;return i.a.createElement("div",{className:d()("rdw-colorpicker-modal",r),onClick:A},i.a.createElement("span",{className:"rdw-colorpicker-modal-header"},i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"color"===u}),onClick:e.setCurrentStyleColor},c["components.controls.colorpicker.text"]),i.a.createElement("span",{className:d()("rdw-colorpicker-modal-style-label",{"rdw-colorpicker-modal-style-label-active":"bgcolor"===u}),onClick:e.setCurrentStyleBgcolor},c["components.controls.colorpicker.background"])),i.a.createElement("span",{className:"rdw-colorpicker-modal-options"},o.map(function(t,n){return i.a.createElement(I,{value:t,key:n,className:"rdw-colorpicker-option",activeClassName:"rdw-colorpicker-option-active",active:f===t,onClick:e.onChange},i.a.createElement("span",{style:{backgroundColor:t},className:"rdw-colorpicker-cube"}))})))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){this.props.expanded&&!e.expanded&&this.setState({currentStyle:"color"})}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-colorpicker-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-color-picker",title:o||s["components.controls.colorpicker.colorpicker"]},i.a.createElement(I,{onClick:l,className:d()(r)},i.a.createElement("img",{src:n,alt:""})),a?this.renderModal():void 0)}}])&&vt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Et.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,currentState:a.a.object,translations:a.a.object};var Mt=Et;function At(e){return(At="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 xt(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)}}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ht(e);if(t){var i=Ht(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===At(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ht(e){return(Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){!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&&Lt(e,t)}(o,r.Component);var e,t,n=kt(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).state={expanded:!1,currentColor:void 0,currentBgColor:void 0},t.onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.toggleColor=function(e,n){var r=t.props,i=r.editorState,o=r.onChange,a=Object(s.toggleCustomInlineStyle)(i,e,n);a&&o(a),t.doCollapse()};var r=e.editorState,i=e.modalHandler,a={expanded:!1,currentColor:void 0,currentBgColor:void 0};return r&&(a.currentColor=Object(s.getSelectionCustomInlineStyle)(r,["COLOR"]).COLOR,a.currentBgColor=Object(s.getSelectionCustomInlineStyle)(r,["BGCOLOR"]).BGCOLOR),t.state=a,i.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentColor:Object(s.getSelectionCustomInlineStyle)(t,["COLOR"]).COLOR,currentBgColor:Object(s.getSelectionCustomInlineStyle)(t,["BGCOLOR"]).BGCOLOR})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.currentColor,a=r.currentBgColor,l=r.expanded,s=t.component||Mt,c=o&&o.substring(6),d=a&&a.substring(8);return i.a.createElement(s,{config:t,translations:n,onChange:this.toggleColor,expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{color:c,bgColor:d}})}}])&&xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();St.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var _t=St,Vt=n(7),Ot=n.n(Vt);function zt(e){return(zt="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 Nt(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)}}function Tt(e,t){return(Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var i=Dt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===zt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(26);var Zt=function(){!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&&Tt(e,t)}(o,r.Component);var e,t,n=It(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:e.props.config.defaultTargetOption},e.removeLink=function(){(0,e.props.onChange)("unlink")},e.addLink=function(){var t=e.props.onChange,n=e.state;t("link",n.linkTitle,n.linkTarget,n.linkTargetOption)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.updateTargetOption=function(t){e.setState({linkTargetOption:t.target.checked?"_blank":"_self"})},e.hideModal=function(){e.setState({showModal:!1})},e.signalExpandShowModal=function(){var t=e.props,n=t.onExpandEvent,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target||"",linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e.forceExpandAndShowModal=function(){var t=e.props,n=t.doExpand,r=t.currentState,i=r.link,o=r.selectionText,a=e.state.linkTargetOption;n(),e.setState({showModal:!0,linkTarget:i&&i.target,linkTargetOption:i&&i.targetOption||a,linkTitle:i&&i.title||o})},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){e.expanded&&!this.props.expanded&&this.setState({showModal:!1,linkTarget:"",linkTitle:"",linkTargetOption:this.props.config.defaultTargetOption})}},{key:"renderAddLinkModal",value:function(){var e=this.props,t=e.config.popupClassName,n=e.doCollapse,r=e.translations,o=this.state,a=o.linkTitle,l=o.linkTarget,s=o.linkTargetOption;return i.a.createElement("div",{className:d()("rdw-link-modal",t),onClick:A},i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTitle"},r["components.controls.link.linkTitle"]),i.a.createElement("input",{id:"linkTitle",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTitle",value:a}),i.a.createElement("label",{className:"rdw-link-modal-label",htmlFor:"linkTarget"},r["components.controls.link.linkTarget"]),i.a.createElement("input",{id:"linkTarget",className:"rdw-link-modal-input",onChange:this.updateValue,onBlur:this.updateValue,name:"linkTarget",value:l}),i.a.createElement("label",{className:"rdw-link-modal-target-option",htmlFor:"openLinkInNewWindow"},i.a.createElement("input",{id:"openLinkInNewWindow",type:"checkbox",defaultChecked:"_blank"===s,value:"_blank",onChange:this.updateTargetOption}),i.a.createElement("span",null,r["components.controls.link.linkTargetOption"])),i.a.createElement("span",{className:"rdw-link-modal-buttonsection"},i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:this.addLink,disabled:!l||!a},r["generic.add"]),i.a.createElement("button",{className:"rdw-link-modal-btn",onClick:n},r["generic.cancel"])))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.link,o=t.unlink,a=t.className,l=e.currentState,s=e.expanded,c=e.translations,u=this.state.showModal;return i.a.createElement("div",{className:d()("rdw-link-wrapper",a),"aria-label":"rdw-link-control"},0<=n.indexOf("link")&&i.a.createElement(I,{value:"unordered-list-item",className:d()(r.className),onClick:this.signalExpandShowModal,"aria-haspopup":"true","aria-expanded":u,title:r.title||c["components.controls.link.link"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("unlink")&&i.a.createElement(I,{disabled:!l.link,value:"ordered-list-item",className:d()(o.className),onClick:this.removeLink,title:o.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:o.icon,alt:""})),s&&u?this.renderAddLinkModal():void 0)}},{key:"renderInDropDown",value:function(){var e=this.props,t=e.expanded,n=e.onExpandEvent,r=e.doCollapse,o=e.doExpand,a=e.onChange,l=e.config,s=e.currentState,c=e.translations,u=l.options,f=l.link,h=l.unlink,p=l.className,C=l.dropdownClassName,m=l.title,g=this.state.showModal;return i.a.createElement("div",{className:"rdw-link-wrapper","aria-haspopup":"true","aria-label":"rdw-link-control","aria-expanded":t,title:m},i.a.createElement(P,{className:d()("rdw-link-dropdown",p),optionWrapperClassName:d()(C),onChange:a,expanded:t&&!g,doExpand:o,doCollapse:r,onExpandEvent:n},i.a.createElement("img",{src:x(l),alt:""}),0<=u.indexOf("link")&&i.a.createElement(K,{onClick:this.forceExpandAndShowModal,className:d()("rdw-link-dropdownoption",f.className),title:f.title||c["components.controls.link.link"]},i.a.createElement("img",{src:f.icon,alt:""})),0<=u.indexOf("unlink")&&i.a.createElement(K,{onClick:this.removeLink,disabled:!s.link,className:d()("rdw-link-dropdownoption",h.className),title:h.title||c["components.controls.link.unlink"]},i.a.createElement("img",{src:h.icon,alt:""}))),t&&g?this.renderAddLinkModal():void 0)}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Zt.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var jt=Zt;function Rt(e){return(Rt="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 Bt(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)}}function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Rt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qt(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 Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){var t=Kt.match(e.target);return Wt(Wt({},e),{},{target:t&&t[0]&&t[0].url||e.target})}var Kt=Ot()(),Yt=function(){!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&&Pt(e,t)}(o,r.Component);var e,t,n=Ft(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e,n,r,i){var o=t.props.config.linkCallback;if("link"===e){var a=(o||Gt)({title:n,target:r,targetOption:i});t.addLink(a.title,a.target,a.targetOption)}else t.removeLink()},t.getCurrentValues=function(){var e=t.props.editorState,n=t.state.currentEntity,r=e.getCurrentContent(),i={};if(n&&"LINK"===r.getEntity(n).get("type")){i.link={};var o=n&&Object(s.getEntityRange)(e,n);i.link.target=n&&r.getEntity(n).get("data").url,i.link.targetOption=n&&r.getEntity(n).get("data").targetOption,i.link.title=o&&o.text}return i.selectionText=Object(s.getSelectionText)(e),i},t.doExpand=function(){t.setState({expanded:!0})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.doCollapse=function(){t.setState({expanded:!1})},t.removeLink=function(){var e=t.props,n=e.editorState,r=e.onChange,i=t.state.currentEntity,o=n.getSelection();if(i){var a=Object(s.getEntityRange)(n,i);o=o.getIsBackward()?o.merge({anchorOffset:a.end,focusOffset:a.start}):o.merge({anchorOffset:a.start,focusOffset:a.end}),r(l.RichUtils.toggleLink(n,o,null))}},t.addLink=function(e,n,r){var i=t.props,o=i.editorState,a=i.onChange,c=t.state.currentEntity,d=o.getSelection();if(c){var u=Object(s.getEntityRange)(o,c);d=d.getIsBackward()?d.merge({anchorOffset:u.end,focusOffset:u.start}):d.merge({anchorOffset:u.start,focusOffset:u.end})}var f=o.getCurrentContent().createEntity("LINK","MUTABLE",{url:n,targetOption:r}).getLastCreatedEntityKey(),h=l.Modifier.replaceText(o.getCurrentContent(),d,"".concat(e),o.getCurrentInlineStyle(),f),p=l.EditorState.push(o,h,"insert-characters");d=p.getSelection().merge({anchorOffset:d.get("anchorOffset")+e.length,focusOffset:d.get("anchorOffset")+e.length}),p=l.EditorState.acceptSelection(p,d),h=l.Modifier.insertText(p.getCurrentContent(),d," ",p.getCurrentInlineStyle(),void 0),a(l.EditorState.push(p,h,"insert-characters")),t.doCollapse()};var r=t.props,i=r.editorState,a=r.modalHandler;return t.state={expanded:!1,link:void 0,selectionText:void 0,currentEntity:i?Object(s.getSelectionEntity)(i):void 0},a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&t!==e.editorState&&this.setState({currentEntity:Object(s.getSelectionEntity)(t)})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=this.getCurrentValues(),a=o.link,l=o.selectionText,s=t.component||jt;return i.a.createElement(s,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,currentState:{link:a,selectionText:l},onChange:this.onChange})}}])&&Bt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();Yt.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Xt=Yt;function Jt(e){return(Jt="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 $t(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)}}function en(e,t){return(en=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=nn(e);if(t){var i=nn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Jt(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function nn(e){return(nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(27);var rn=function(){!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&&en(e,t)}(o,r.Component);var e,t,n=tn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={embeddedLink:"",height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width},e.onChange=function(){var t=e.props.onChange,n=e.state;t(n.embeddedLink,n.height,n.width)},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.expanded,r=t.config;if(!n&&e.expanded){var i=r.defaultSize,o=i.height,a=i.width;this.setState({embeddedLink:"",height:o,width:a})}}},{key:"rendeEmbeddedLinkModal",value:function(){var e=this.state,t=e.embeddedLink,n=e.height,r=e.width,o=this.props,a=o.config.popupClassName,l=o.doCollapse,s=o.translations;return i.a.createElement("div",{className:d()("rdw-embedded-modal",a),onClick:A},i.a.createElement("div",{className:"rdw-embedded-modal-header"},i.a.createElement("span",{className:"rdw-embedded-modal-header-option"},s["components.controls.embedded.embeddedlink"],i.a.createElement("span",{className:"rdw-embedded-modal-header-label"}))),i.a.createElement("div",{className:"rdw-embedded-modal-link-section"},i.a.createElement("span",{className:"rdw-embedded-modal-link-input-wrapper"},i.a.createElement("input",{className:"rdw-embedded-modal-link-input",placeholder:s["components.controls.embedded.enterlink"],onChange:this.updateValue,onBlur:this.updateValue,value:t,name:"embeddedLink"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("div",{className:"rdw-embedded-modal-size"},i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:n,name:"height",className:"rdw-embedded-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",null,i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:r,name:"width",className:"rdw-embedded-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")))),i.a.createElement("span",{className:"rdw-embedded-modal-btn-section"},i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:this.onChange,disabled:!t||!n||!r},s["generic.add"]),i.a.createElement("button",{type:"button",className:"rdw-embedded-modal-btn",onClick:l},s["generic.cancel"])))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-embedded-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-embedded-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.embedded.embedded"]},i.a.createElement("img",{src:n,alt:""})),a?this.rendeEmbeddedLinkModal():void 0)}}])&&$t(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();rn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object,doCollapse:a.a.func};var on=rn;function an(e){return(an="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 ln(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)}}function sn(e,t){return(sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=dn(e);if(t){var i=dn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===an(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var un=function(){!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&&sn(e,t)}(o,r.Component);var e,t,n=cn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmbeddedLink=function(t,n,r){var i=e.props,o=i.editorState,a=i.onChange,s=i.config.embedCallback,c=s?s(t):t,d=o.getCurrentContent().createEntity("EMBEDDED_LINK","MUTABLE",{src:c,height:n,width:r}).getLastCreatedEntityKey();a(l.AtomicBlockUtils.insertAtomicBlock(o,d," ")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||on;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmbeddedLink,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&ln(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();un.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var fn=un;function hn(e){return(hn="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 pn(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)}}function Cn(e,t){return(Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var i=gn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===hn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function gn(e){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(28);var vn=function(){!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&&Cn(e,t)}(o,r.Component);var e,t,n=mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t.target.innerHTML)},e}return e=o,(t=[{key:"renderEmojiModal",value:function(){var e=this,t=this.props.config,n=t.popupClassName,r=t.emojis;return i.a.createElement("div",{className:d()("rdw-emoji-modal",n),onClick:A},r.map(function(t,n){return i.a.createElement("span",{key:n,className:"rdw-emoji-icon",alt:"",onClick:e.onChange},t)}))}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-emoji-wrapper","aria-haspopup":"true","aria-label":"rdw-emoji-control","aria-expanded":a,title:o||s["components.controls.emoji.emoji"]},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l},i.a.createElement("img",{src:n,alt:""})),a?this.renderEmojiModal():void 0)}}])&&pn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();vn.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var yn=vn;function wn(e){return(wn="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 bn(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)}}function En(e,t){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var i=An(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===wn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xn=function(){!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&&En(e,t)}(o,r.Component);var e,t,n=Mn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e.addEmoji=function(t){var n=e.props,r=n.editorState,i=n.onChange,o=l.Modifier.replaceText(r.getCurrentContent(),r.getSelection(),t,r.getCurrentInlineStyle());i(l.EditorState.push(r,o,"insert-characters")),e.doCollapse()},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||yn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addEmoji,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onCollpase:this.closeModal})}}])&&bn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Ln(){return i.a.createElement("div",{className:"rdw-spinner"},i.a.createElement("div",{className:"rdw-bounce1"}),i.a.createElement("div",{className:"rdw-bounce2"}),i.a.createElement("div",{className:"rdw-bounce3"}))}function kn(e){return(kn="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 Hn(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)}}function Sn(e,t){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Vn(e);if(t){var i=Vn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===kn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object},n(29),n(30);var On=function(){!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&&Sn(e,t)}(o,r.Component);var e,t,n=_n(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={imgSrc:"",dragEnter:!1,uploadHighlighted:e.props.config.uploadEnabled&&!!e.props.config.uploadCallback,showImageLoading:!1,height:e.props.config.defaultSize.height,width:e.props.config.defaultSize.width,alt:""},e.onDragEnter=function(t){e.stopPropagation(t),e.setState({dragEnter:!0})},e.onImageDrop=function(t){var n,r;t.preventDefault(),t.stopPropagation(),e.setState({dragEnter:!1}),r=t.dataTransfer.items?(n=t.dataTransfer.items,!0):(n=t.dataTransfer.files,!1);for(var i=0;i<n.length;i+=1)if((!r||"file"===n[i].kind)&&n[i].type.match("^image/")){var o=r?n[i].getAsFile():n[i];e.uploadImage(o)}},e.showImageUploadOption=function(){e.setState({uploadHighlighted:!0})},e.addImageFromState=function(){var t=e.state,n=t.imgSrc,r=t.alt,i=e.state,o=i.height,a=i.width,l=e.props.onChange;isNaN(o)||(o+="px"),isNaN(a)||(a+="px"),l(n,o,a,r)},e.showImageURLOption=function(){e.setState({uploadHighlighted:!1})},e.toggleShowImageLoading=function(){var t=!e.state.showImageLoading;e.setState({showImageLoading:t})},e.updateValue=function(t){var n,r,i;e.setState((n={},r="".concat(t.target.name),i=t.target.value,r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n))},e.selectImage=function(t){t.target.files&&0<t.target.files.length&&e.uploadImage(t.target.files[0])},e.uploadImage=function(t){e.toggleShowImageLoading(),(0,e.props.config.uploadCallback)(t).then(function(t){var n=t.data;e.setState({showImageLoading:!1,dragEnter:!1,imgSrc:n.link||n.url}),e.fileUpload=!1}).catch(function(){e.setState({showImageLoading:!1,dragEnter:!1})})},e.fileUploadClick=function(t){e.fileUpload=!0,t.stopPropagation()},e.stopPropagation=function(t){e.fileUpload?e.fileUpload=!1:(t.preventDefault(),t.stopPropagation())},e}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.config;e.expanded&&!this.props.expanded?this.setState({imgSrc:"",dragEnter:!1,uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback,showImageLoading:!1,height:t.defaultSize.height,width:t.defaultSize.width,alt:""}):t.uploadCallback===e.config.uploadCallback&&t.uploadEnabled===e.config.uploadEnabled||this.setState({uploadHighlighted:t.uploadEnabled&&!!t.uploadCallback})}},{key:"renderAddImageModal",value:function(){var e=this.state,t=e.imgSrc,n=e.uploadHighlighted,r=e.showImageLoading,o=e.dragEnter,a=e.height,l=e.width,s=e.alt,c=this.props,u=c.config,f=u.popupClassName,h=u.uploadCallback,p=u.uploadEnabled,C=u.urlEnabled,m=u.previewImage,g=u.inputAccept,v=u.alt,y=c.doCollapse,w=c.translations;return i.a.createElement("div",{className:d()("rdw-image-modal",f),onClick:this.stopPropagation},i.a.createElement("div",{className:"rdw-image-modal-header"},p&&h&&i.a.createElement("span",{onClick:this.showImageUploadOption,className:"rdw-image-modal-header-option"},w["components.controls.image.fileUpload"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":n})})),C&&i.a.createElement("span",{onClick:this.showImageURLOption,className:"rdw-image-modal-header-option"},w["components.controls.image.byURL"],i.a.createElement("span",{className:d()("rdw-image-modal-header-label",{"rdw-image-modal-header-label-highlighted":!n})}))),n?i.a.createElement("div",{onClick:this.fileUploadClick},i.a.createElement("div",{onDragEnter:this.onDragEnter,onDragOver:this.stopPropagation,onDrop:this.onImageDrop,className:d()("rdw-image-modal-upload-option",{"rdw-image-modal-upload-option-highlighted":o})},i.a.createElement("label",{htmlFor:"file",className:"rdw-image-modal-upload-option-label"},m&&t?i.a.createElement("img",{src:t,alt:t,className:"rdw-image-modal-upload-option-image-preview"}):t||w["components.controls.image.dropFileText"])),i.a.createElement("input",{type:"file",id:"file",accept:g,onChange:this.selectImage,className:"rdw-image-modal-upload-option-input"})):i.a.createElement("div",{className:"rdw-image-modal-url-section"},i.a.createElement("input",{className:"rdw-image-modal-url-input",placeholder:w["components.controls.image.enterlink"],name:"imgSrc",onChange:this.updateValue,onBlur:this.updateValue,value:t}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),v.present&&i.a.createElement("div",{className:"rdw-image-modal-size"},i.a.createElement("span",{className:"rdw-image-modal-alt-lbl"},"Alt Text"),i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:s,name:"alt",className:"rdw-image-modal-alt-input",placeholder:"alt"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},v.mandatory&&"*")),i.a.createElement("div",{className:"rdw-image-modal-size"},"↕ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:a,name:"height",className:"rdw-image-modal-size-input",placeholder:"Height"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")," ↔ ",i.a.createElement("input",{onChange:this.updateValue,onBlur:this.updateValue,value:l,name:"width",className:"rdw-image-modal-size-input",placeholder:"Width"}),i.a.createElement("span",{className:"rdw-image-mandatory-sign"},"*")),i.a.createElement("span",{className:"rdw-image-modal-btn-section"},i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:this.addImageFromState,disabled:!t||!a||!l||v.mandatory&&!s},w["generic.add"]),i.a.createElement("button",{className:"rdw-image-modal-btn",onClick:y},w["generic.cancel"])),r?i.a.createElement("div",{className:"rdw-image-modal-spinner"},i.a.createElement(Ln,null)):void 0)}},{key:"render",value:function(){var e=this.props,t=e.config,n=t.icon,r=t.className,o=t.title,a=e.expanded,l=e.onExpandEvent,s=e.translations;return i.a.createElement("div",{className:"rdw-image-wrapper","aria-haspopup":"true","aria-expanded":a,"aria-label":"rdw-image-control"},i.a.createElement(I,{className:d()(r),value:"unordered-list-item",onClick:l,title:o||s["components.controls.image.image"]},i.a.createElement("img",{src:n,alt:""})),a?this.renderAddImageModal():void 0)}}])&&Hn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();On.propTypes={expanded:a.a.bool,onExpandEvent:a.a.func,doCollapse:a.a.func,onChange:a.a.func,config:a.a.object,translations:a.a.object};var zn=On;function Nn(e){return(Nn="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 Tn(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)}}function In(e,t){return(In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Zn(e);if(t){var i=Zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Nn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Zn(e){return(Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jn=function(){!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&&In(e,t)}(o,r.Component);var e,t,n=Dn(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})},t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1},t.addImage=function(e,n,r,i){var o=t.props,a=o.editorState,s=o.onChange,c={src:e,height:n,width:r};o.config.alt.present&&(c.alt=i);var d=a.getCurrentContent().createEntity("IMAGE","MUTABLE",c).getLastCreatedEntityKey();s(l.AtomicBlockUtils.insertAtomicBlock(a,d," ")),t.doCollapse()};var r=t.props.modalHandler;return t.state={expanded:!1},r.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||zn;return i.a.createElement(o,{config:t,translations:n,onChange:this.addImage,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse})}}])&&Tn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Rn(e){var t=e.config,n=e.onChange,r=e.translations,o=t.icon,a=t.className,l=t.title;return i.a.createElement("div",{className:"rdw-remove-wrapper","aria-label":"rdw-remove-control"},i.a.createElement(I,{className:d()(a),onClick:n,title:l||r["components.controls.remove.remove"]},i.a.createElement("img",{src:o,alt:""})))}jn.propTypes={editorState:a.a.object.isRequired,onChange:a.a.func.isRequired,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var Bn=jn;n(31),Rn.propTypes={onChange:a.a.func,config:a.a.object,translations:a.a.object};var Pn=Rn;function Fn(e){return(Fn="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 Un(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)}}function qn(e,t){return(qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Qn(e);if(t){var i=Qn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Fn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Qn(e){return(Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=function(){!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&&qn(e,t)}(o,r.Component);var e,t,n=Wn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={expanded:!1},e.onExpandEvent=function(){e.signalExpanded=!e.state.expanded},e.expandCollapse=function(){e.setState({expanded:e.signalExpanded}),e.signalExpanded=!1},e.removeInlineStyles=function(){var t=e.props,n=t.editorState;(0,t.onChange)(e.removeAllInlineStyles(n))},e.removeAllInlineStyles=function(e){var t=e.getCurrentContent();return["BOLD","ITALIC","UNDERLINE","STRIKETHROUGH","MONOSPACE","SUPERSCRIPT","SUBSCRIPT"].forEach(function(n){t=l.Modifier.removeInlineStyle(t,e.getSelection(),n)}),E(Object(s.getSelectionCustomInlineStyle)(e,["FONTSIZE","FONTFAMILY","COLOR","BGCOLOR"]),function(n,r){r&&(t=l.Modifier.removeInlineStyle(t,e.getSelection(),r))}),l.EditorState.push(e,t,"change-inline-style")},e.doExpand=function(){e.setState({expanded:!0})},e.doCollapse=function(){e.setState({expanded:!1})},e}return e=o,(t=[{key:"componentDidMount",value:function(){this.props.modalHandler.registerCallBack(this.expandCollapse)}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state.expanded,o=t.component||Pn;return i.a.createElement(o,{config:t,translations:n,expanded:r,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.removeInlineStyles})}}])&&Un(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function Kn(e){return(Kn="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 Yn(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)}}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var i=$n(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Kn(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gn.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object.isRequired,config:a.a.object,translations:a.a.object,modalHandler:a.a.object},n(32);var er=function(){!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&&Xn(e,t)}(o,r.Component);var e,t,n=Jn(o);function o(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).onChange=function(t){(0,e.props.onChange)(t)},e}return e=o,(t=[{key:"renderInDropDown",value:function(){var e=this.props,t=e.config,n=e.expanded,r=e.doExpand,o=e.onExpandEvent,a=e.doCollapse,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations,f=t.options,h=t.undo,p=t.redo,C=t.className,m=t.dropdownClassName,g=t.title;return i.a.createElement(P,{className:d()("rdw-history-dropdown",C),optionWrapperClassName:d()(m),expanded:n,doExpand:r,doCollapse:a,onExpandEvent:o,"aria-label":"rdw-history-control",title:g||u["components.controls.history.history"]},i.a.createElement("img",{src:x(t),alt:""}),0<=f.indexOf("undo")&&i.a.createElement(K,{value:"undo",onClick:this.onChange,disabled:s,className:d()("rdw-history-dropdownoption",h.className),title:h.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:h.icon,alt:""})),0<=f.indexOf("redo")&&i.a.createElement(K,{value:"redo",onClick:this.onChange,disabled:c,className:d()("rdw-history-dropdownoption",p.className),title:p.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:p.icon,alt:""})))}},{key:"renderInFlatList",value:function(){var e=this.props,t=e.config,n=t.options,r=t.undo,o=t.redo,a=t.className,l=e.currentState,s=l.undoDisabled,c=l.redoDisabled,u=e.translations;return i.a.createElement("div",{className:d()("rdw-history-wrapper",a),"aria-label":"rdw-history-control"},0<=n.indexOf("undo")&&i.a.createElement(I,{value:"undo",onClick:this.onChange,className:d()(r.className),disabled:s,title:r.title||u["components.controls.history.undo"]},i.a.createElement("img",{src:r.icon,alt:""})),0<=n.indexOf("redo")&&i.a.createElement(I,{value:"redo",onClick:this.onChange,className:d()(o.className),disabled:c,title:o.title||u["components.controls.history.redo"]},i.a.createElement("img",{src:o.icon,alt:""})))}},{key:"render",value:function(){return this.props.config.inDropdown?this.renderInDropDown():this.renderInFlatList()}}])&&Yn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();function tr(e){return(tr="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 nr(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)}}function rr(e,t){return(rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ir(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=or(e);if(t){var i=or(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===tr(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function or(e){return(or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}er.propTypes={expanded:a.a.bool,doExpand:a.a.func,doCollapse:a.a.func,onExpandEvent:a.a.func,config:a.a.object,onChange:a.a.func,currentState:a.a.object,translations:a.a.object};var ar=function(){!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&&rr(e,t)}(o,r.Component);var e,t,n=ir(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onExpandEvent=function(){t.signalExpanded=!t.state.expanded},t.onChange=function(e){var n=t.props,r=n.editorState,i=n.onChange,o=l.EditorState[e](r);o&&i(o)},t.doExpand=function(){t.setState({expanded:!0})},t.doCollapse=function(){t.setState({expanded:!1})};var r={expanded:!(t.expandCollapse=function(){t.setState({expanded:t.signalExpanded}),t.signalExpanded=!1}),undoDisabled:!1,redoDisabled:!1},i=e.editorState,a=e.modalHandler;return i&&(r.undoDisabled=0===i.getUndoStack().size,r.redoDisabled=0===i.getRedoStack().size),t.state=r,a.registerCallBack(t.expandCollapse),t}return e=o,(t=[{key:"componentDidUpdate",value:function(e){var t=this.props.editorState;t&&e.editorState!==t&&this.setState({undoDisabled:0===t.getUndoStack().size,redoDisabled:0===t.getRedoStack().size})}},{key:"componentWillUnmount",value:function(){this.props.modalHandler.deregisterCallBack(this.expandCollapse)}},{key:"render",value:function(){var e=this.props,t=e.config,n=e.translations,r=this.state,o=r.undoDisabled,a=r.redoDisabled,l=r.expanded,s=t.component||er;return i.a.createElement(s,{config:t,translations:n,currentState:{undoDisabled:o,redoDisabled:a},expanded:l,onExpandEvent:this.onExpandEvent,doExpand:this.doExpand,doCollapse:this.doCollapse,onChange:this.onChange})}}])&&nr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ar.propTypes={onChange:a.a.func.isRequired,editorState:a.a.object,modalHandler:a.a.object,config:a.a.object,translations:a.a.object};var lr={inline:le,blockType:be,fontSize:ze,fontFamily:We,list:it,textAlign:mt,colorPicker:_t,link:Xt,embedded:fn,emoji:xn,image:Bn,remove:Gn,history:ar},sr=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,cr=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function dr(e){return String(e).replace(sr,"").match(cr)?e:"#"}function ur(e){return(ur="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 fr(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)}}function hr(e,t){return(hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Cr(e);if(t){var i=Cr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===ur(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Cr(e){return(Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mr(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)}function gr(e){var t,n=e.showOpenOptionOnHover;return(t=function(){!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&&hr(e,t)}(a,r.Component);var e,t,o=pr(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.call.apply(o,[this].concat(n))).state={showPopOver:!1},e.openLink=function(){var t=e.props,n=t.entityKey,r=t.contentState.getEntity(n).getData().url,i=window.open(dr(r),"blank");i&&i.focus()},e.toggleShowPopOver=function(){var t=!e.state.showPopOver;e.setState({showPopOver:t})},e}return e=a,(t=[{key:"render",value:function(){var e=this.props,t=e.children,r=e.entityKey,o=e.contentState.getEntity(r).getData(),a=o.url,l=o.targetOption,s=this.state.showPopOver;return i.a.createElement("span",{className:"rdw-link-decorator-wrapper",onMouseEnter:this.toggleShowPopOver,onMouseLeave:this.toggleShowPopOver},i.a.createElement("a",{href:dr(a),target:l},t),s&&n?i.a.createElement("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuMDcyIDBIOC45MTVhLjkyNS45MjUgMCAwIDAgMCAxLjg0OWgyLjkyNUw2Ljk2MSA2LjcyN2EuOTE4LjkxOCAwIDAgMC0uMjcuNjU0YzAgLjI0Ny4wOTUuNDguMjcuNjU0YS45MTguOTE4IDAgMCAwIC42NTQuMjcuOTE4LjkxOCAwIDAgMCAuNjUzLS4yN2w0Ljg4LTQuODh2Mi45MjZhLjkyNS45MjUgMCAwIDAgMS44NDggMFYuOTI0QS45MjUuOTI1IDAgMCAwIDE0LjA3MiAweiIvPjxwYXRoIGQ9Ik0xMC42MjMgMTMuNDExSDEuNTg1VjQuMzcyaDYuNzk4bDEuNTg0LTEuNTg0SC43OTJBLjc5Mi43OTIgMCAwIDAgMCAzLjU4djEwLjYyNGMwIC40MzcuMzU1Ljc5Mi43OTIuNzkyaDEwLjYyNGEuNzkyLjc5MiAwIDAgMCAuNzkyLS43OTJWNS4wMjlsLTEuNTg1IDEuNTg0djYuNzk4eiIvPjwvZz48L3N2Zz4=",alt:"",onClick:this.openLink,className:"rdw-link-decorator-icon"}):void 0)}}])&&fr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),a}()).propTypes={entityKey:a.a.string.isRequired,children:a.a.array,contentState:a.a.object},t}function vr(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}n(33),n(34);var yr=vr(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getMentionComponent=function(){function e(e){var n=e.entityKey,r=e.children,o=e.contentState.getEntity(n).getData(),a=o.url,l=o.value;return i.a.createElement("a",{href:a||l,className:d()("rdw-mention-link",t)},r)}var t=n.className;return e.propTypes={entityKey:a.a.number,children:a.a.array,contentState:a.a.object},e},this.getMentionDecorator=function(){return{strategy:n.findMentionEntities,component:n.getMentionComponent()}},this.className=t});yr.prototype.findMentionEntities=function(e,t,n){e.findEntityRanges(function(e){var t=e.getEntity();return null!==t&&"MENTION"===n.getEntity(t).getType()},t)};var wr=yr;function br(e){return(br="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 Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=Ar(e);if(t){var i=Ar(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===br(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function Ar(e){return(Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(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)}}function Lr(e,t,n){return t&&xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n(35);var Hr=Lr(function e(t){var n=this;kr(this,e),this.findSuggestionEntities=function(e,t){if(n.config.getEditorState()){var r=n.config,i=r.separator,o=r.trigger,a=r.getSuggestions,l=(0,r.getEditorState)().getSelection();if(l.get("anchorKey")===e.get("key")&&l.get("anchorKey")===l.get("focusKey")){var s=e.getText(),c=(s=s.substr(0,l.get("focusOffset")===s.length-1?s.length:l.get("focusOffset")+1)).lastIndexOf(i+o),d=i+o;if((void 0===c||c<0)&&s[0]===o&&(c=0,d=o),0<=c){var u=s.substr(c+d.length,s.length);a().some(function(e){return!!e.value&&(n.config.caseSensitive?0<=e.value.indexOf(u):0<=e.value.toLowerCase().indexOf(u&&u.toLowerCase()))})&&t(0===c?0:c+1,s.length)}}}},this.getSuggestionComponent=function(){var e,t=this.config;return(e=function(){!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&&Er(e,t)}(n,r.Component);var e=Mr(n);function n(){var r;kr(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(r=e.call.apply(e,[this].concat(o))).state={style:{left:15},activeOption:-1,showSuggestions:!0},r.onEditorKeyDown=function(e){var t=r.state.activeOption,n={};"ArrowDown"===e.key?(e.preventDefault(),t===r.filteredSuggestions.length-1?n.activeOption=0:n.activeOption=t+1):"ArrowUp"===e.key?n.activeOption=t<=0?r.filteredSuggestions.length-1:t-1:"Escape"===e.key?(n.showSuggestions=!1,y()):"Enter"===e.key&&r.addMention(),r.setState(n)},r.onOptionMouseEnter=function(e){var t=e.target.getAttribute("data-index");r.setState({activeOption:t})},r.onOptionMouseLeave=function(){r.setState({activeOption:-1})},r.setSuggestionReference=function(e){r.suggestion=e},r.setDropdownReference=function(e){r.dropdown=e},r.closeSuggestionDropdown=function(){r.setState({showSuggestions:!1})},r.filteredSuggestions=[],r.filterSuggestions=function(e){var n=e.children[0].props.text.substr(1),i=t.getSuggestions();r.filteredSuggestions=i&&i.filter(function(e){return!n||0===n.length||(t.caseSensitive?0<=e.value.indexOf(n):0<=e.value.toLowerCase().indexOf(n&&n.toLowerCase()))})},r.addMention=function(){var e=r.state.activeOption,n=t.getEditorState(),i=t.onChange,o=t.separator,a=t.trigger,c=r.filteredSuggestions[e];c&&function(e,t,n,r,i){var o=i.value,a=i.url,c=e.getCurrentContent().createEntity("MENTION","IMMUTABLE",{text:"".concat(r).concat(o),value:o,url:a}).getLastCreatedEntityKey(),d=Object(s.getSelectedBlock)(e).getText(),u=e.getSelection().focusOffset,f=(d.lastIndexOf(n+r,u)||0)+1,h=!1;d.length===f+1&&(u=d.length)," "===d[u]&&(h=!0);var p=e.getSelection().merge({anchorOffset:f,focusOffset:u}),C=l.EditorState.acceptSelection(e,p),m=l.Modifier.replaceText(C.getCurrentContent(),p,"".concat(r).concat(o),C.getCurrentInlineStyle(),c);C=l.EditorState.push(C,m,"insert-characters"),h||(p=C.getSelection().merge({anchorOffset:f+o.length+r.length,focusOffset:f+o.length+r.length}),C=l.EditorState.acceptSelection(C,p),m=l.Modifier.insertText(C.getCurrentContent(),p," ",C.getCurrentInlineStyle(),void 0)),t(l.EditorState.push(C,m,"insert-characters"))}(n,i,o,a,c)},r}return Lr(n,[{key:"componentDidMount",value:function(){var e,n,r,i=t.getWrapperRef().getBoundingClientRect(),o=this.suggestion.getBoundingClientRect(),a=this.dropdown.getBoundingClientRect();i.width<o.left-i.left+a.width?n=15:e=15,i.bottom<a.bottom&&(r=0),this.setState({style:{left:e,right:n,bottom:r}}),g.registerCallBack(this.onEditorKeyDown),v(),t.modalHandler.setSuggestionCallback(this.closeSuggestionDropdown),this.filterSuggestions(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.children!==e.children&&(this.filterSuggestions(e),this.setState({showSuggestions:!0}))}},{key:"componentWillUnmount",value:function(){g.deregisterCallBack(this.onEditorKeyDown),y(),t.modalHandler.removeSuggestionCallback()}},{key:"render",value:function(){var e=this,n=this.props.children,r=this.state,o=r.activeOption,a=r.showSuggestions,l=t.dropdownClassName,s=t.optionClassName;return i.a.createElement("span",{className:"rdw-suggestion-wrapper",ref:this.setSuggestionReference,onClick:t.modalHandler.onSuggestionClick,"aria-haspopup":"true","aria-label":"rdw-suggestion-popup"},i.a.createElement("span",null,n),a&&i.a.createElement("span",{className:d()("rdw-suggestion-dropdown",l),contentEditable:"false",suppressContentEditableWarning:!0,style:this.state.style,ref:this.setDropdownReference},this.filteredSuggestions.map(function(t,n){return i.a.createElement("span",{key:n,spellCheck:!1,onClick:e.addMention,"data-index":n,onMouseEnter:e.onOptionMouseEnter,onMouseLeave:e.onOptionMouseLeave,className:d()("rdw-suggestion-option",s,{"rdw-suggestion-option-active":n===o})},t.text)})))}}]),n}()).propTypes={children:a.a.array},e}.bind(this),this.getSuggestionDecorator=function(){return{strategy:n.findSuggestionEntities,component:n.getSuggestionComponent()}};var o=t.separator,c=t.trigger,u=t.getSuggestions,f=t.onChange,h=t.getEditorState,p=t.getWrapperRef,C=t.caseSensitive,m=t.dropdownClassName,w=t.optionClassName,b=t.modalHandler;this.config={separator:o,trigger:c,getSuggestions:u,onChange:f,getEditorState:h,getWrapperRef:p,caseSensitive:C,dropdownClassName:m,optionClassName:w,modalHandler:b}}),Sr=function(e){return[new wr(e.mentionClassName).getMentionDecorator(),new Hr(e).getSuggestionDecorator()]};function _r(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function Vr(e){var t=e.block,n=e.contentState.getEntity(t.getEntityAt(0)).getData(),r=n.src,o=n.height,a=n.width;return i.a.createElement("iframe",{height:o,width:a,src:r,frameBorder:"0",allowFullScreen:!0,title:"Wysiwyg Embedded Content"})}n(36);var Or=_r(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getHashtagComponent=function(){function e(e){var n=e.children,r=n[0].props.text;return i.a.createElement("a",{href:r,className:d()("rdw-hashtag-link",t)},n)}var t=n.className;return e.propTypes={children:a.a.object},e},this.findHashtagEntities=function(e,t){for(var r=e.getText(),i=0,o=0;0<r.length&&0<=i;)if(r[0]===n.hashCharacter?(o=i=0,r=r.substr(n.hashCharacter.length)):0<=(i=r.indexOf(n.separator+n.hashCharacter))&&(r=r.substr(i+(n.separator+n.hashCharacter).length),o+=i+n.separator.length),0<=i){var a=0<=r.indexOf(n.separator)?r.indexOf(n.separator):r.length,l=r.substr(0,a);l&&0<l.length&&(t(o,o+l.length+n.hashCharacter.length),o+=n.hashCharacter.length)}},this.getHashtagDecorator=function(){return{strategy:n.findHashtagEntities,component:n.getHashtagComponent()}},this.className=t.className,this.hashCharacter=t.hashCharacter||"#",this.separator=t.separator||" "}),zr=function(e){return new Or(e).getHashtagDecorator()};Vr.propTypes={block:a.a.object,contentState:a.a.object};var Nr=Vr;function Tr(e){return(Tr="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 Ir(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)}}function Dr(e,t){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var i=jr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tr(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(37);var Rr=function(e){var t;return(t=function(){!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&&Dr(e,t)}(a,r.Component);var t,n,o=Zr(a);function a(){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=o.call.apply(o,[this].concat(r))).state={hovered:!1},t.setEntityAlignmentLeft=function(){t.setEntityAlignment("left")},t.setEntityAlignmentRight=function(){t.setEntityAlignment("right")},t.setEntityAlignmentCenter=function(){t.setEntityAlignment("none")},t.setEntityAlignment=function(n){var r=t.props,i=r.block,o=r.contentState,a=i.getEntityAt(0);o.mergeEntityData(a,{alignment:n}),e.onChange(l.EditorState.push(e.getEditorState(),o,"change-block-data")),t.setState({dummy:!0})},t.toggleHovered=function(){var e=!t.state.hovered;t.setState({hovered:e})},t}return t=a,(n=[{key:"renderAlignmentOptions",value:function(e){return i.a.createElement("div",{className:d()("rdw-image-alignment-options-popup",{"rdw-image-alignment-options-popup-right":"right"===e})},i.a.createElement(I,{onClick:this.setEntityAlignmentLeft,className:"rdw-image-alignment-option"},"L"),i.a.createElement(I,{onClick:this.setEntityAlignmentCenter,className:"rdw-image-alignment-option"},"C"),i.a.createElement(I,{onClick:this.setEntityAlignmentRight,className:"rdw-image-alignment-option"},"R"))}},{key:"render",value:function(){var t=this.props,n=t.block,r=t.contentState,o=this.state.hovered,a=e.isReadOnly,l=e.isImageAlignmentEnabled,s=r.getEntity(n.getEntityAt(0)).getData(),c=s.src,u=s.alignment,f=s.height,h=s.width,p=s.alt;return i.a.createElement("span",{onMouseEnter:this.toggleHovered,onMouseLeave:this.toggleHovered,className:d()("rdw-image-alignment",{"rdw-image-left":"left"===u,"rdw-image-right":"right"===u,"rdw-image-center":!u||"none"===u})},i.a.createElement("span",{className:"rdw-image-imagewrapper"},i.a.createElement("img",{src:c,alt:p,style:{height:f,width:h}}),!a()&&o&&l()?this.renderAlignmentOptions(u):void 0))}}])&&Ir(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}()).propTypes={block:a.a.object,contentState:a.a.object},t},Br=function(e,t){return function(n){if("function"==typeof t){var r=t(n,e,e.getEditorState);if(r)return r}if("atomic"===n.getType()){var i=e.getEditorState().getCurrentContent().getEntity(n.getEntityAt(0));if(i&&"IMAGE"===i.type)return{component:Rr(e),editable:!1};if(i&&"EMBEDDED_LINK"===i.type)return{component:Nr,editable:!1}}}},Pr={options:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","embedded","emoji","image","remove","history"],inline:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["bold","italic","underline","strikethrough","monospace","superscript","subscript"],bold:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuMjM2IDBjMS42NTIgMCAyLjk0LjI5OCAzLjg2Ni44OTMuOTI1LjU5NSAxLjM4OCAxLjQ4NSAxLjM4OCAyLjY2OSAwIC42MDEtLjE3MyAxLjEzOS0uNTE2IDEuNjEtLjM0My40NzQtLjg0NC44My0xLjQ5OSAxLjA2OC44NDMuMTY3IDEuNDc0LjUyMyAxLjg5NSAxLjA3MS40MTkuNTUuNjMgMS4xODMuNjMgMS45MDMgMCAxLjI0NS0uNDQ0IDIuMTg3LTEuMzMgMi44MjUtLjg4Ni42NDEtMi4xNDQuOTYxLTMuNzY5Ljk2MUgwdi0yLjE2N2gxLjQ5NFYyLjE2N0gwVjBoNi4yMzZ6TTQuMzA4IDUuNDQ2aDIuMDI0Yy43NTIgMCAxLjMzLS4xNDMgMS43MzQtLjQzLjQwNS0uMjg1LjYwOC0uNzAxLjYwOC0xLjI1IDAtLjYtLjIwNC0xLjA0NC0uNjEyLTEuMzMtLjQwOC0uMjg2LTEuMDE2LS40MjctMS44MjYtLjQyN0g0LjMwOHYzLjQzN3ptMCAxLjgwNFYxMWgyLjU5M2MuNzQ3IDAgMS4zMTQtLjE1MiAxLjcwNy0uNDUyLjM5LS4zLjU4OC0uNzQ1LjU4OC0xLjMzNCAwLS42MzYtLjE2OC0xLjEyNC0uNS0xLjQ2LS4zMzYtLjMzNS0uODY0LS41MDQtMS41ODItLjUwNEg0LjMwOHoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},italic:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTcgM1YyaDR2MUg5Ljc1M2wtMyAxMEg4djFINHYtMWgxLjI0N2wzLTEwSDd6Ii8+PC9zdmc+",className:void 0,title:void 0},underline:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTYuMDQ1IDJ2Ljk5Mkw0Ljc4NSAzdjUuMTcyYzAgLjg1OS4yNDMgMS41MTIuNzI3IDEuOTU3czEuMTI0LjY2OCAxLjkxOC42NjhjLjgzNiAwIDEuNTA5LS4yMjEgMi4wMTktLjY2NC41MTEtLjQ0Mi43NjYtMS4wOTYuNzY2LTEuOTYxVjNsLTEuMjYtLjAwOFYySDEzdi45OTJMMTEuNzM5IDN2NS4xNzJjMCAxLjIzNC0uMzk4IDIuMTgxLTEuMTk1IDIuODQtLjc5Ny42NTktMS44MzUuOTg4LTMuMTE0Ljk4OC0xLjI0MiAwLTIuMjQ4LS4zMjktMy4wMTctLjk4OC0uNzY5LS42NTktMS4xNTItMS42MDUtMS4xNTItMi44NFYzTDIgMi45OTJWMmg0LjA0NXpNMiAxM2gxMXYxSDJ6Ii8+PC9zdmc+",className:void 0,title:void 0},strikethrough:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4wNCA1Ljk1NGg2LjIxNWE3LjQxMiA3LjQxMiAwIDAgMC0uNzk1LS40MzggMTEuOTA3IDExLjkwNyAwIDAgMC0xLjQ0Ny0uNTU3Yy0xLjE4OC0uMzQ4LTEuOTY2LS43MTEtMi4zMzQtMS4wODgtLjM2OC0uMzc3LS41NTItLjc3LS41NTItMS4xODEgMC0uNDk1LjE4Ny0uOTA2LjU2LTEuMjMyLjM4LS4zMzEuODg3LS40OTcgMS41MjMtLjQ5Ny42OCAwIDEuMjY2LjI1NSAxLjc1Ny43NjcuMjk1LjMxNS41ODIuODkxLjg2MSAxLjczbC4xMTcuMDE2LjcwMy4wNS4xLS4wMjRjLjAyOC0uMTUyLjA0Mi0uMjc5LjA0Mi0uMzggMC0uMzM3LS4wMzktLjg1Mi0uMTE3LTEuNTQ0YTkuMzc0IDkuMzc0IDAgMCAwLS4xNzYtLjk5NUM5Ljg4LjM3OSA5LjM4NS4yNDQgOS4wMTcuMTc2IDguMzY1LjA3IDcuODk5LjAxNiA3LjYyLjAxNmMtMS40NSAwLTIuNTQ1LjM1Ny0zLjI4NyAxLjA3MS0uNzQ3LjcyLTEuMTIgMS41ODktMS4xMiAyLjYwNyAwIC41MTEuMTMzIDEuMDQuNCAxLjU4Ni4xMjkuMjUzLjI3LjQ3OC40MjcuNjc0ek04LjI4IDguMTE0Yy41NzUuMjM2Ljk1Ny40MzYgMS4xNDcuNTk5LjQ1MS40MS42NzcuODUyLjY3NyAxLjMyNCAwIC4zODMtLjEzLjc0NS0uMzkzIDEuMDg4LS4yNS4zMzgtLjU5LjU4LTEuMDIuNzI2YTMuNDE2IDMuNDE2IDAgMCAxLTEuMTYzLjIyOGMtLjQwNyAwLS43NzUtLjA2Mi0xLjEwNC0uMTg2YTIuNjk2IDIuNjk2IDAgMCAxLS44NzgtLjQ4IDMuMTMzIDMuMTMzIDAgMCAxLS42Ny0uNzk0IDEuNTI3IDEuNTI3IDAgMCAxLS4xMDQtLjIyNyA1Ny41MjMgNTcuNTIzIDAgMCAwLS4xODgtLjQ3MyAyMS4zNzEgMjEuMzcxIDAgMCAwLS4yNTEtLjU5OWwtLjg1My4wMTd2LjM3MWwtLjAxNy4zMTNhOS45MiA5LjkyIDAgMCAwIDAgLjU3M2MuMDExLjI3LjAxNy43MDkuMDE3IDEuMzE2di4xMWMwIC4wNzkuMDIyLjE0LjA2Ny4xODUuMDgzLjA2OC4yODQuMTQ3LjYwMi4yMzdsMS4xNy4zMzdjLjQ1Mi4xMy45OTYuMTk0IDEuNjMyLjE5NC42ODYgMCAxLjI1Mi0uMDU5IDEuNjk4LS4xNzdhNC42OTQgNC42OTQgMCAwIDAgMS4yOC0uNTU3Yy40MDEtLjI1OS43MDUtLjQ4Ni45MTEtLjY4My4yNjgtLjI3Ni40NjYtLjU2OC41OTQtLjg3OGE0Ljc0IDQuNzQgMCAwIDAgLjM0My0xLjc4OGMwLS4yOTgtLjAyLS41NTctLjA1OC0uNzc2SDguMjgxek0xNC45MTQgNi41N2EuMjYuMjYgMCAwIDAtLjE5My0uMDc2SC4yNjhhLjI2LjI2IDAgMCAwLS4xOTMuMDc2LjI2NC4yNjQgMCAwIDAtLjA3NS4xOTR2LjU0YzAgLjA3OS4wMjUuMTQzLjA3NS4xOTRhLjI2LjI2IDAgMCAwIC4xOTMuMDc2SDE0LjcyYS4yNi4yNiAwIDAgMCAuMTkzLS4wNzYuMjY0LjI2NCAwIDAgMCAuMDc1LS4xOTR2LS41NGEuMjY0LjI2NCAwIDAgMC0uMDc1LS4xOTR6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},monospace:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ0NCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS4wMjEgMi45MDZjLjE4NiAxLjIxOS4zNzIgMS41LjM3MiAyLjcxOUMxLjM5MyA2LjM3NSAwIDcuMDMxIDAgNy4wMzF2LjkzOHMxLjM5My42NTYgMS4zOTMgMS40MDZjMCAxLjIxOS0uMTg2IDEuNS0uMzcyIDIuNzE5Qy43NDMgMTQuMDYzIDEuNzY0IDE1IDIuNjkzIDE1aDEuOTV2LTEuODc1cy0xLjY3Mi4xODgtMS42NzItLjkzOGMwLS44NDMuMTg2LS44NDMuMzcyLTIuNzE4LjA5My0uODQ0LS40NjQtMS41LTEuMDIyLTEuOTY5LjU1OC0uNDY5IDEuMTE1LTEuMDMxIDEuMDIyLTEuODc1QzMuMDY0IDMuNzUgMi45NyAzLjc1IDIuOTcgMi45MDZjMC0xLjEyNSAxLjY3Mi0xLjAzMSAxLjY3Mi0xLjAzMVYwaC0xLjk1QzEuNjcgMCAuNzQzLjkzOCAxLjAyIDIuOTA2ek0xMS45NzkgMi45MDZjLS4xODYgMS4yMTktLjM3MiAxLjUtLjM3MiAyLjcxOSAwIC43NSAxLjM5MyAxLjQwNiAxLjM5MyAxLjQwNnYuOTM4cy0xLjM5My42NTYtMS4zOTMgMS40MDZjMCAxLjIxOS4xODYgMS41LjM3MiAyLjcxOS4yNzggMS45NjktLjc0MyAyLjkwNi0xLjY3MiAyLjkwNmgtMS45NXYtMS44NzVzMS42NzIuMTg4IDEuNjcyLS45MzhjMC0uODQzLS4xODYtLjg0My0uMzcyLTIuNzE4LS4wOTMtLjg0NC40NjQtMS41IDEuMDIyLTEuOTY5LS41NTgtLjQ2OS0xLjExNS0xLjAzMS0xLjAyMi0xLjg3NS4xODYtMS44NzUuMzcyLTEuODc1LjM3Mi0yLjcxOSAwLTEuMTI1LTEuNjcyLTEuMDMxLTEuNjcyLTEuMDMxVjBoMS45NWMxLjAyMiAwIDEuOTUuOTM4IDEuNjcyIDIuOTA2eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},superscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMzA1IDEwLjE2NUwxMS44NjUgMTVIOS4wNTdsLTMuMTkyLTMuNTM2TDIuNzQ2IDE1SDBsNC41MjMtNC44MzVMLjIxOCA1LjYwM2gyLjc3TDUuOTg2IDguOTEgOS4wMSA1LjYwM2gyLjY0OWwtNC4zNTQgNC41NjJ6bTYuMjM0LTMuMjY5bDEuODc5LTEuMzA2Yy42NC0uNDE2IDEuMDYyLS44MDEgMS4yNjQtMS4xNTcuMjAxLS4zNTYuMzAyLS43MzguMzAyLTEuMTQ4IDAtLjY2OS0uMjM3LTEuMjEtLjcxLTEuNjItLjQ3NC0uNDExLTEuMDk3LS42MTctMS44NjgtLjYxNy0uNzQ0IDAtMS4zNC4yMDgtMS43ODUuNjI0LS40NDcuNDE2LS42NyAxLjA0My0uNjcgMS44ODFoMS40MzZjMC0uNS4wOTQtLjg0Ni4yODEtMS4wMzguMTg4LS4xOTEuNDQ1LS4yODcuNzcyLS4yODdzLjU4NS4wOTcuNzc3LjI5MmMuMTkuMTk1LjI4Ni40MzcuMjg2LjcyNiAwIC4yOS0uMDg5LjU1LS4yNjYuNzg1cy0uNjcuNjI4LTEuNDc5IDEuMTg0Yy0uNjkxLjQ3Ny0xLjYyNy45MjctMS45MDggMS4zNWwuMDE0IDEuNTY5SDE3VjYuODk2aC0zLjQ2MXoiLz48L3N2Zz4=",className:void 0,title:void 0},subscript:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExLjg2NiAxMS42NDZIOS4wNkw1Ljg2NyA3Ljk0MmwtMy4xMjEgMy43MDRIMGw0LjUyNC01LjA2NEwuMjE4IDEuODA0aDIuNzdsMyAzLjQ2NCAzLjAyMy0zLjQ2NGgyLjY1TDcuMzA2IDYuNTgybDQuNTYgNS4wNjR6bTEuNzI1IDIuMDU4bDEuODI3LTEuMzY4Yy42NC0uNDM1IDEuMDYyLS44NCAxLjI2NC0xLjIxMi4yMDItLjM3Mi4zMDItLjc3My4zMDItMS4yMDIgMC0uNy0uMjM3LTEuMjY2LS43MS0xLjY5Ni0uNDc0LS40MzEtMS4wOTctLjY0Ni0xLjg2OS0uNjQ2LS43NDQgMC0xLjM0LjIxOC0xLjc4NS42NTMtLjQ0Ni40MzYtLjY3IDEuMDkyLS42NyAxLjk3aDEuNDM2YzAtLjUyNC4wOTQtLjg4Ni4yODEtMS4wODcuMTg4LS4yLjQ0NS0uMzAxLjc3Mi0uMzAxcy41ODYuMTAyLjc3Ny4zMDZjLjE5LjIwNC4yODYuNDU4LjI4Ni43NiAwIC4zMDMtLjA4OC41NzctLjI2Ni44MjItLjE3Ny4yNDUtLjY3LjY1OC0xLjQ3OCAxLjI0LS42OTIuNS0xLjYyOC45NzEtMS45MSAxLjQxM0wxMS44NjQgMTVIMTd2LTEuMjk2aC0zLjQxeiIvPjwvc3ZnPg==",className:void 0,title:void 0}},blockType:{inDropdown:!0,options:["Normal","H1","H2","H3","H4","H5","H6","Blockquote","Code"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontSize:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuOTIxIDMuMTE5YS40MjcuNDI3IDAgMCAwIC4zMzUuMTY0aC45N2EuNDI2LjQyNiAwIDAgMCAuMzA0LS4xMy40NDEuNDQxIDAgMCAwIC4xMjUtLjMxbC4wMDItMi40MWEuNDM0LjQzNCAwIDAgMC0uNDMtLjQzMkguNDNBLjQzNC40MzQgMCAwIDAgMCAuNDR2Mi40MDZjMCAuMjQyLjE5Mi40MzguNDMuNDM4aC45N2MuMTMgMCAuMjU0LS4wNi4zMzUtLjE2NWwuNzMtLjkzSDUuNTR2MTEuMzZjMCAuMjQxLjE5Mi40MzcuNDMuNDM3aDEuNzE3Yy4yMzcgMCAuNDMtLjE5Ni40My0uNDM3VjIuMTg4aDMuMDdsLjczNC45MzF6TTEzLjg5OCAxMS4yNjNhLjQyNS40MjUgMCAwIDAtLjQ4Mi0uMTQ2bC0uNTQ3LjE5NFY5LjYxN2EuNDQyLjQ0MiAwIDAgMC0uMTI2LS4zMS40MjYuNDI2IDAgMCAwLS4zMDQtLjEyN2gtLjQyOWEuNDM0LjQzNCAwIDAgMC0uNDMuNDM3djEuNjk0bC0uNTQ3LS4xOTRhLjQyNS40MjUgMCAwIDAtLjQ4MS4xNDYuNDQ0LjQ0NCAwIDAgMC0uMDE2LjUxMmwxLjMzMiAyLjAxN2EuNDI3LjQyNyAwIDAgMCAuNzEzIDBsMS4zMzMtMi4wMTdhLjQ0NC40NDQgMCAwIDAtLjAxNi0uNTEyeiIvPjwvZz48L3N2Zz4=",options:[8,9,10,11,12,14,16,18,24,30,36,48,60,72,96],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},fontFamily:{options:["Arial","Georgia","Impact","Tahoma","Times New Roman","Verdana"],className:void 0,component:void 0,dropdownClassName:void 0,title:void 0},list:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["unordered","ordered","indent","outdent"],unordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMS43MiAzLjQyN2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3LjAxIDEuNzIuMDFDLjc3LjAwOCAwIC43NzUgMCAxLjcxNWMwIC45NC43NzQgMS43MTEgMS43MiAxLjcxMXptMC0yLjYyNWMuNTEgMCAuOTIyLjQxMi45MjIuOTE0YS45Mi45MiAwIDAgMS0xLjg0MiAwIC45Mi45MiAwIDAgMSAuOTItLjkxNHpNMS43MiA4LjcwM2MuOTUxIDAgMS43MjItLjc2OCAxLjcyMi0xLjcwOFMyLjY3IDUuMjg3IDEuNzIgNS4yODdDLjc3IDUuMjg3IDAgNi4wNTIgMCA2Ljk5NXMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjJjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAwIDEtMS44NDIgMGMwLS41MDUuNDE1LS45MTQuOTItLjkxNHpNMS43MiAxMy45ODJjLjk1MSAwIDEuNzIyLS43NjggMS43MjItMS43MDggMC0uOTQzLS43NzQtMS43MDgtMS43MjEtMS43MDgtLjk0NyAwLTEuNzIxLjc2OC0xLjcyMSAxLjcwOHMuNzc0IDEuNzA4IDEuNzIgMS43MDh6bTAtMi42MjVjLjUxIDAgLjkyMi40MTIuOTIyLjkxNGEuOTIuOTIgMCAxIDEtMS44NDIgMCAuOTIuOTIgMCAwIDEgLjkyLS45MTR6TTUuNzQ0IDIuMTE1aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OS40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDcuMzk0aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOThINS43NDRhLjQuNCAwIDAgMC0uNDAyLjM5OC40LjQgMCAwIDAgLjQwMi4zOTl6TTUuNzQ0IDEyLjY3aDkuODQ1YS40LjQgMCAwIDAgLjQwMS0uMzk5LjQuNCAwIDAgMC0uNDAxLS4zOTlINS43NDRhLjQuNCAwIDAgMC0uNDAyLjQuNC40IDAgMCAwIC40MDIuMzk4eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},ordered:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNC4yMDIgMS40NjZoOC4xNWMuMzM4IDAgLjYxMi0uMzIyLjYxMi0uNzIgMC0uMzk3LS4yNzQtLjcyLS42MTItLjcyaC04LjE1Yy0uMzM4IDAtLjYxMS4zMjMtLjYxMS43MiAwIC4zOTguMjczLjcyLjYxLjcyek0xMi4zNTIgNS43ODNoLTguMTVjLS4zMzggMC0uNjExLjMyMi0uNjExLjcyIDAgLjM5Ny4yNzMuNzIuNjEuNzJoOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5OC0uMjc0LS43Mi0uNjEyLS43MnpNMTIuMzUyIDExLjU0aC04LjE1Yy0uMzM4IDAtLjYxMS4zMjItLjYxMS43MiAwIC4zOTYuMjczLjcxOS42MS43MTloOC4xNTFjLjMzOCAwIC42MTItLjMyMy42MTItLjcyIDAtLjM5Ny0uMjc0LS43Mi0uNjEyLS43MnpNLjc2NyAxLjI0OXYxLjgwMmMwIC4xOTUuMTM2LjM0My4zMTUuMzQzLjE3NiAwIC4zMTUtLjE1LjMxNS0uMzQzVi4zNTZjMC0uMTktLjEzMy0uMzM5LS4zMDItLjMzOS0uMTQ4IDAtLjIyMy4xMTgtLjI0Ny4xNTZhLjIyOC4yMjggMCAwIDAtLjAwMy4wMDVMLjU3OS42MjFhLjQ3NC40NzQgMCAwIDAtLjA5OC4yNzNjMCAuMTk0LjEyOC4zNTEuMjg2LjM1NXpNLjM1MiA4LjE5SDEuNTVjLjE1NyAwIC4yODUtLjE2Mi4yODUtLjM2MiAwLS4xOTgtLjEyOC0uMzU5LS4yODUtLjM1OUguNjh2LS4wMDZjMC0uMTA3LjIxLS4yODEuMzc4LS40MjIuMzM2LS4yNzguNzUzLS42MjUuNzUzLTEuMjI2IDAtLjU3LS4zNzYtMS0uODc0LTEtLjQ3NyAwLS44MzYuMzg1LS44MzYuODk3IDAgLjI5Ny4xNjQuNDAyLjMwNS40MDIuMiAwIC4zMjEtLjE3Ni4zMjEtLjM0NiAwLS4xMDYuMDIzLS4yMjguMjA0LS4yMjguMjQzIDAgLjI1LjI1NC4yNS4yODMgMCAuMjI4LS4yNTIuNDQyLS40OTUuNjQ5LS4zMDEuMjU1LS42NDIuNTQ0LS42NDIuOTkydi4zODRjMCAuMjA1LjE1OS4zNDMuMzA4LjM0M3pNMS43NyAxMC41NDNjMC0uNTkyLS4yOTYtLjkzMS0uODE0LS45MzEtLjY4IDAtLjg1OS41Ny0uODU5Ljg3MiAwIC4zNTEuMjIyLjM5LjMxOC4zOS4xODUgMCAuMzEtLjE0OC4zMS0uMzY2IDAtLjA4NC4wMjYtLjE4MS4yMjQtLjE4MS4xNDIgMCAuMi4wMjQuMi4yNjcgMCAuMjM3LS4wNDMuMjYzLS4yMTMuMjYzLS4xNjQgMC0uMjg4LjE1Mi0uMjg4LjM1NCAwIC4yLjEyNS4zNS4yOTEuMzUuMjI1IDAgLjI3LjEwOC4yNy4yODN2LjA3NWMwIC4yOTQtLjA5Ny4zNS0uMjc3LjM1LS4yNDggMC0uMjY3LS4xNS0uMjY3LS4xOTcgMC0uMTc0LS4wOTgtLjM1LS4zMTctLjM1LS4xOTIgMC0uMzA3LjE0MS0uMzA3LjM3OCAwIC40My4zMTMuODg4Ljg5NS44ODguNTY0IDAgLjkwMS0uNC45MDEtMS4wN3YtLjA3NGMwLS4yNzQtLjA3NC0uNTAyLS4yMTQtLjY2Ni4wOTYtLjE2My4xNDgtLjM4LjE0OC0uNjM1eiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},indent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS43MTYgMy4yMTFIMTd2MS4xOTdINS43MTZ6TTAgLjAyaDE3djEuMTk3SDB6TTAgMTIuNzgzaDE3djEuMTk3SDB6TTUuNzE2IDkuNTkzSDE3djEuMTk3SDUuNzE2ek01LjcxNiA2LjQwMkgxN3YxLjE5N0g1LjcxNnpNLjE4NyA5LjQ5MUwyLjUyIDcgLjE4NyA0LjUwOXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},outdent:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNNS4zOTYgMy4xOTNoMTAuNTczVjQuMzlINS4zOTZ6TS4wMzkuMDAzaDE1LjkzVjEuMkguMDM5ek0uMDM5IDEyLjc2NmgxNS45M3YxLjE5N0guMDM5ek01LjM5NiA5LjU3NWgxMC41NzN2MS4xOTdINS4zOTZ6TTUuMzk2IDYuMzg0aDEwLjU3M3YxLjE5N0g1LjM5NnpNMi4xODcgNC40OTFMMCA2Ljk4M2wyLjE4NyAyLjQ5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},title:void 0},textAlign:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["left","center","right","justify"],left:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNOC40OTMgMTQuODg3SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4IDEwLjE2MkguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1M2gxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUzek04LjQ5MyA1LjQzNUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOC43MDlILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTJoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},center:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNTU2IDE0Ljg4N0gzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTggMTAuMTYySC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUzaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6TTExLjU1NiA1LjQzNUgzLjM4OGEuMzI2LjMyNiAwIDAgMSAwLS42NTJoOC4xNjdhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42MTguNzA5SC4zMjZhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDE0LjI5MmEuMzI2LjMyNiAwIDAgMSAwIC42NTJ6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},right:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjE4IDE0Ljg4N0g2LjQ1YS4zMjYuMzI2IDAgMCAxIDAtLjY1Mmg4LjE2N2EuMzI2LjMyNiAwIDAgMSAwIC42NTJ6TTE0LjYxOCAxMC4xNjJILjMyNmEuMzI2LjMyNiAwIDAgMSAwLS42NTNoMTQuMjkyYS4zMjYuMzI2IDAgMCAxIDAgLjY1M3pNMTQuNjE4IDUuNDM1SDYuNDVhLjMyNi4zMjYgMCAwIDEgMC0uNjUyaDguMTY3YS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjE4LjcwOUguMzI2YS4zMjYuMzI2IDAgMCAxIDAtLjY1MmgxNC4yOTJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyeiIvPjwvZz48L3N2Zz4=",className:void 0,title:void 0},justify:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNjIgMTQuODg4SC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgMTAuMTYySC4zMjVhLjMyNi4zMjYgMCAwIDEgMC0uNjUySDE0LjYyYS4zMjYuMzI2IDAgMCAxIDAgLjY1MnpNMTQuNjIgNS40MzZILjMyNWEuMzI2LjMyNiAwIDAgMSAwLS42NTJIMTQuNjJhLjMyNi4zMjYgMCAwIDEgMCAuNjUyek0xNC42Mi43MUguMzI1YS4zMjYuMzI2IDAgMCAxIDAtLjY1M0gxNC42MmEuMzI2LjMyNiAwIDAgMSAwIC42NTN6Ii8+PC9nPjwvc3ZnPg==",className:void 0,title:void 0},title:void 0},colorPicker:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNDA2LjU4NWExLjk5OCAxLjk5OCAwIDAgMC0yLjgyNSAwbC0uNTQuNTRhLjc0MS43NDEgMCAxIDAtMS4wNDggMS4wNDhsLjE3NS4xNzUtNS44MjYgNS44MjUtMi4wMjIgMi4wMjNhLjkxLjkxIDAgMCAwLS4yNjYuNjAybC0uMDA1LjEwOHYuMDAybC0uMDgxIDEuODI5YS4zMDIuMzAyIDAgMCAwIC4zMDIuMzE2aC4wMTNsLjk3LS4wNDQuNTkyLS4wMjYuMjY4LS4wMTJjLjI5Ny0uMDEzLjU3OS0uMTM3Ljc5LS4zNDdsNy43Ny03Ljc3LjE0Ni4xNDRhLjc0Ljc0IDAgMCAwIDEuMDQ4IDBjLjI5LS4yOS4yOS0uNzU5IDAtMS4wNDhsLjU0LS41NGMuNzgtLjc4Ljc4LTIuMDQ0IDAtMi44MjV6TTguNzk1IDcuMzMzbC0yLjczLjUxNSA0LjQ1Mi00LjQ1MiAxLjEwOCAxLjEwNy0yLjgzIDIuODN6TTIuMDggMTMuNjczYy0xLjE0OCAwLTIuMDguMjk1LTIuMDguNjYgMCAuMzYzLjkzMi42NTggMi4wOC42NTggMS4xNSAwIDIuMDgtLjI5NCAyLjA4LS42NTkgMC0uMzY0LS45My0uNjU5LTIuMDgtLjY1OXoiLz48L2c+PC9zdmc+",className:void 0,component:void 0,popupClassName:void 0,colors:["rgb(97,189,109)","rgb(26,188,156)","rgb(84,172,210)","rgb(44,130,201)","rgb(147,101,184)","rgb(71,85,119)","rgb(204,204,204)","rgb(65,168,95)","rgb(0,168,133)","rgb(61,142,185)","rgb(41,105,176)","rgb(85,57,130)","rgb(40,50,78)","rgb(0,0,0)","rgb(247,218,100)","rgb(251,160,38)","rgb(235,107,86)","rgb(226,80,65)","rgb(163,143,132)","rgb(239,239,239)","rgb(255,255,255)","rgb(250,197,28)","rgb(243,121,52)","rgb(209,72,65)","rgb(184,49,47)","rgb(124,112,107)","rgb(209,213,216)"],title:void 0},link:{inDropdown:!1,className:void 0,component:void 0,popupClassName:void 0,dropdownClassName:void 0,showOpenOptionOnHover:!0,defaultTargetOption:"_self",options:["link","unlink"],link:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzLjk2Ny45NUEzLjIyNiAzLjIyNiAwIDAgMCAxMS42Ny4wMDJjLS44NyAwLTEuNjg2LjMzNy0yLjI5Ny45NDhMNy4xMDUgMy4yMThBMy4yNDcgMy4yNDcgMCAwIDAgNi4yNCA2LjI0YTMuMjI1IDMuMjI1IDAgMCAwLTMuMDIyLjg2NUwuOTUgOS4zNzNhMy4yNTMgMy4yNTMgMCAwIDAgMCA0LjU5NCAzLjIyNiAzLjIyNiAwIDAgMCAyLjI5Ny45NDhjLjg3IDAgMS42ODYtLjMzNiAyLjI5OC0uOTQ4TDcuODEyIDExLjdhMy4yNDcgMy4yNDcgMCAwIDAgLjg2NS0zLjAyMyAzLjIyNSAzLjIyNSAwIDAgMCAzLjAyMi0uODY1bDIuMjY4LTIuMjY3YTMuMjUyIDMuMjUyIDAgMCAwIDAtNC41OTV6TTcuMTA1IDEwLjk5M0w0LjgzNyAxMy4yNmEyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NSAyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LS42NTUgMi4yNTIgMi4yNTIgMCAwIDEgMC0zLjE4bDIuMjY4LTIuMjY4YTIuMjMyIDIuMjMyIDAgMCAxIDEuNTktLjY1NWMuNDMgMCAuODQxLjEyIDEuMTk1LjM0M0w0Ljc3MiA5LjQzOGEuNS41IDAgMSAwIC43MDcuNzA3bDEuOTM5LTEuOTM4Yy41NDUuODY4LjQ0MiAyLjAzLS4zMTMgMi43ODV6bTYuMTU1LTYuMTU1bC0yLjI2OCAyLjI2N2EyLjIzMyAyLjIzMyAwIDAgMS0xLjU5LjY1NWMtLjQzMSAwLS44NDEtLjEyLTEuMTk1LS4zNDNsMS45MzgtMS45MzhhLjUuNSAwIDEgMC0uNzA3LS43MDdMNy40OTkgNi43MWEyLjI1MiAyLjI1MiAwIDAgMSAuMzEzLTIuNzg1bDIuMjY3LTIuMjY4YTIuMjMzIDIuMjMzIDAgMCAxIDEuNTktLjY1NSAyLjIzMyAyLjIzMyAwIDAgMSAyLjI0NiAyLjI0NWMwIC42MDMtLjIzMiAxLjE2OC0uNjU1IDEuNTl6IiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",className:void 0,title:void 0},unlink:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTMuOTU2IDEuMDM3YTMuNTUgMy41NSAwIDAgMC01LjAxNCAwTDYuNDM2IDMuNTQ0YS41NDUuNTQ1IDAgMSAwIC43Ny43N2wyLjUwOC0yLjUwNmEyLjQzOCAyLjQzOCAwIDAgMSAxLjczNS0uNzE1Yy42NTggMCAxLjI3NS4yNTQgMS43MzYuNzE1LjQ2LjQ2MS43MTUgMS4wNzguNzE1IDEuNzM2IDAgLjY1OC0uMjU0IDEuMjc0LS43MTUgMS43MzVMOS45MDcgOC41NThhMi40NTggMi40NTggMCAwIDEtMy40NzIgMCAuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3MSAzLjUzNCAzLjUzNCAwIDAgMCAyLjUwNyAxLjAzN2MuOTA4IDAgMS44MTYtLjM0NiAyLjUwNy0xLjAzN2wzLjI3OC0zLjI3OGEzLjUyIDMuNTIgMCAwIDAgMS4wMzUtMi41MDdjMC0uOTUtLjM2Ny0xLjg0LTEuMDM1LTIuNTA3eiIvPjxwYXRoIGQ9Ik03LjQgMTEuMDY1bC0yLjEyMiAyLjEyYTIuNDM3IDIuNDM3IDAgMCAxLTEuNzM1LjcxNiAyLjQzNyAyLjQzNyAwIDAgMS0xLjczNi0uNzE1IDIuNDU3IDIuNDU3IDAgMCAxIDAtMy40NzFsMy4wODYtMy4wODZhMi40MzggMi40MzggMCAwIDEgMS43MzUtLjcxNWMuNjU4IDAgMS4yNzUuMjU0IDEuNzM2LjcxNWEuNTQ1LjU0NSAwIDEgMCAuNzcxLS43NzEgMy41NSAzLjU1IDAgMCAwLTUuMDE0IDBMMS4wMzYgOC45NDRBMy41MiAzLjUyIDAgMCAwIDAgMTEuNDVjMCAuOTUuMzY3IDEuODQgMS4wMzUgMi41MDdhMy41MiAzLjUyIDAgMCAwIDIuNTA2IDEuMDM1Yy45NSAwIDEuODQtLjM2OCAyLjUwNy0xLjAzNWwyLjEyMi0yLjEyMWEuNTQ1LjU0NSAwIDAgMC0uNzcxLS43NzF6TTkuMjc0IDEyLjAwMmEuNTQ2LjU0NiAwIDAgMC0uNTQ2LjU0NXYxLjYzN2EuNTQ2LjU0NiAwIDAgMCAxLjA5MSAwdi0xLjYzN2EuNTQ1LjU0NSAwIDAgMC0uNTQ1LS41NDV6TTExLjIzIDExLjYxNmEuNTQ1LjU0NSAwIDEgMC0uNzcyLjc3MmwxLjE1NyAxLjE1NmEuNTQzLjU0MyAwIDAgMCAuNzcxIDAgLjU0NS41NDUgMCAwIDAgMC0uNzdsLTEuMTU2LTEuMTU4ek0xMi41MzcgOS44MkgxMC45YS41NDYuNTQ2IDAgMCAwIDAgMS4wOTFoMS42MzdhLjU0Ni41NDYgMCAwIDAgMC0xLjA5ek00LjkxIDMuNTQ3YS41NDYuNTQ2IDAgMCAwIC41NDUtLjU0NVYxLjM2NmEuNTQ2LjU0NiAwIDAgMC0xLjA5IDB2MS42MzZjMCAuMzAxLjI0NC41NDUuNTQ1LjU0NXpNMi44ODggMy45MzNhLjU0My41NDMgMCAwIDAgLjc3MSAwIC41NDUuNTQ1IDAgMCAwIDAtLjc3MUwyLjUwMiAyLjAwNWEuNTQ1LjU0NSAwIDEgMC0uNzcxLjc3bDEuMTU3IDEuMTU4ek0xLjYyOCA1LjczaDEuNjM2YS41NDYuNTQ2IDAgMCAwIDAtMS4wOTJIMS42MjhhLjU0Ni41NDYgMCAwIDAgMCAxLjA5MXoiLz48L2c+PC9zdmc+",className:void 0,title:void 0},linkCallback:void 0},emoji:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjE1LjcyOSAyMi4wODIgMTcgMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTI5LjcwOCAyNS4xMDRjLTMuMDIxLTMuMDIyLTcuOTM3LTMuMDIyLTEwLjk1OCAwLTMuMDIxIDMuMDItMy4wMiA3LjkzNiAwIDEwLjk1OCAzLjAyMSAzLjAyIDcuOTM3IDMuMDIgMTAuOTU4LS4wMDEgMy4wMi0zLjAyMSAzLjAyLTcuOTM2IDAtMTAuOTU3em0tLjg0NSAxMC4xMTJhNi41NiA2LjU2IDAgMCAxLTkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAtOS4yNjcgNi41NiA2LjU2IDAgMCAxIDkuMjY4IDAgNi41NiA2LjU2IDAgMCAxIDAgOS4yNjd6bS03LjUyNC02LjczYS45MDYuOTA2IDAgMSAxIDEuODExIDAgLjkwNi45MDYgMCAwIDEtMS44MTEgMHptNC4xMDYgMGEuOTA2LjkwNiAwIDEgMSAxLjgxMiAwIC45MDYuOTA2IDAgMCAxLTEuODEyIDB6bTIuMTQxIDMuNzA4Yy0uNTYxIDEuMjk4LTEuODc1IDIuMTM3LTMuMzQ4IDIuMTM3LTEuNTA1IDAtMi44MjctLjg0My0zLjM2OS0yLjE0N2EuNDM4LjQzOCAwIDAgMSAuODEtLjMzNmMuNDA1Ljk3NiAxLjQxIDEuNjA3IDIuNTU5IDEuNjA3IDEuMTIzIDAgMi4xMjEtLjYzMSAyLjU0NC0xLjYwOGEuNDM4LjQzOCAwIDAgMSAuODA0LjM0N3oiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,emojis:["😀","😁","😂","😃","😉","😋","😎","😍","😗","🤗","🤔","😣","😫","😴","😌","🤓","😛","😜","😠","😇","😷","😈","👻","😺","😸","😹","😻","😼","😽","🙀","🙈","🙉","🙊","👼","👮","🕵","💂","👳","🎅","👸","👰","👲","🙍","🙇","🚶","🏃","💃","⛷","🏂","🏌","🏄","🚣","🏊","⛹","🏋","🚴","👫","💪","👈","👉","👆","🖕","👇","🖖","🤘","🖐","👌","👍","👎","✊","👊","👏","🙌","🙏","🐵","🐶","🐇","🐥","🐸","🐌","🐛","🐜","🐝","🍉","🍄","🍔","🍤","🍨","🍪","🎂","🍰","🍾","🍷","🍸","🍺","🌍","🚑","⏰","🌙","🌝","🌞","⭐","🌟","🌠","🌨","🌩","⛄","🔥","🎄","🎈","🎉","🎊","🎁","🎗","🏀","🏈","🎲","🔇","🔈","📣","🔔","🎵","🎷","💰","🖊","📅","✅","❎","💯"],title:void 0},embedded:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNzA4IDYuNjE1YS40MzYuNDM2IDAgMCAwLS41NDMuMjkxbC0xLjgzIDYuMDQ1YS40MzYuNDM2IDAgMCAwIC44MzMuMjUyTDcgNy4xNmEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHpNOC45MzEgNi42MTVhLjQzNi40MzYgMCAwIDAtLjU0My4yOTFsLTEuODMgNi4wNDVhLjQzNi40MzYgMCAwIDAgLjgzNC4yNTJsMS44My02LjA0NGEuNDM2LjQzNiAwIDAgMC0uMjktLjU0NHoiLz48cGF0aCBkPSJNMTYuNTY0IDBILjQzNkEuNDM2LjQzNiAwIDAgMCAwIC40MzZ2MTYuMTI4YzAgLjI0LjE5NS40MzYuNDM2LjQzNmgxNi4xMjhjLjI0IDAgLjQzNi0uMTk1LjQzNi0uNDM2Vi40MzZBLjQzNi40MzYgMCAwIDAgMTYuNTY0IDB6TTMuNDg3Ljg3MmgxMC4wMjZ2MS43NDNIMy40ODdWLjg3MnptLTIuNjE1IDBoMS43NDN2MS43NDNILjg3MlYuODcyem0xNS4yNTYgMTUuMjU2SC44NzJWMy40ODhoMTUuMjU2djEyLjY0em0wLTEzLjUxM2gtMS43NDNWLjg3MmgxLjc0M3YxLjc0M3oiLz48Y2lyY2xlIGN4PSI5My44NjciIGN5PSIyNDUuMDY0IiByPSIxMy4xMjgiIHRyYW5zZm9ybT0ibWF0cml4KC4wMzMyIDAgMCAuMDMzMiAwIDApIi8+PGNpcmNsZSBjeD0iOTMuODY3IiBjeT0iMzYwLjU5MiIgcj0iMTMuMTI4IiB0cmFuc2Zvcm09Im1hdHJpeCguMDMzMiAwIDAgLjAzMzIgMCAwKSIvPjxwYXRoIGQ9Ik0xNC4yNTQgMTIuNjQxSDEwLjJhLjQzNi40MzYgMCAwIDAgMCAuODcyaDQuMDU0YS40MzYuNDM2IDAgMCAwIDAtLjg3MnoiLz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,embedCallback:void 0,defaultSize:{height:"auto",width:"auto"},title:void 0},image:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTQuNzQxIDBILjI2Qy4xMTYgMCAwIC4xMzYgMCAuMzA0djEzLjM5MmMwIC4xNjguMTE2LjMwNC4yNTkuMzA0SDE0Ljc0Yy4xNDMgMCAuMjU5LS4xMzYuMjU5LS4zMDRWLjMwNEMxNSAuMTM2IDE0Ljg4NCAwIDE0Ljc0MSAwem0tLjI1OCAxMy4zOTFILjUxN1YuNjFoMTMuOTY2VjEzLjM5eiIvPjxwYXRoIGQ9Ik00LjEzOCA2LjczOGMuNzk0IDAgMS40NC0uNzYgMS40NC0xLjY5NXMtLjY0Ni0xLjY5NS0xLjQ0LTEuNjk1Yy0uNzk0IDAtMS40NC43Ni0xLjQ0IDEuNjk1IDAgLjkzNC42NDYgMS42OTUgMS40NCAxLjY5NXptMC0yLjc4MWMuNTA5IDAgLjkyMy40ODcuOTIzIDEuMDg2IDAgLjU5OC0uNDE0IDEuMDg2LS45MjMgMS4wODYtLjUwOSAwLS45MjMtLjQ4Ny0uOTIzLTEuMDg2IDAtLjU5OS40MTQtMS4wODYuOTIzLTEuMDg2ek0xLjgxIDEyLjE3NGMuMDYgMCAuMTIyLS4wMjUuMTcxLS4wNzZMNi4yIDcuNzI4bDIuNjY0IDMuMTM0YS4yMzIuMjMyIDAgMCAwIC4zNjYgMCAuMzQzLjM0MyAwIDAgMCAwLS40M0w3Ljk4NyA4Ljk2OWwyLjM3NC0zLjA2IDIuOTEyIDMuMTQyYy4xMDYuMTEzLjI3LjEwNS4zNjYtLjAyYS4zNDMuMzQzIDAgMCAwLS4wMTYtLjQzbC0zLjEwNC0zLjM0N2EuMjQ0LjI0NCAwIDAgMC0uMTg2LS4wOC4yNDUuMjQ1IDAgMCAwLS4xOC4xTDcuNjIyIDguNTM3IDYuMzk0IDcuMDk0YS4yMzIuMjMyIDAgMCAwLS4zNTQtLjAxM2wtNC40IDQuNTZhLjM0My4zNDMgMCAwIDAtLjAyNC40My4yNDMuMjQzIDAgMCAwIC4xOTQuMTAzeiIvPjwvZz48L3N2Zz4=",className:void 0,component:void 0,popupClassName:void 0,urlEnabled:!0,uploadEnabled:!0,previewImage:!1,alignmentEnabled:!0,uploadCallback:void 0,inputAccept:"image/gif,image/jpeg,image/jpg,image/png,image/svg",alt:{present:!1,mandatory:!1},defaultSize:{height:"auto",width:"auto"},title:void 0},remove:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBkPSJNOC4xIDE0bDYuNC03LjJjLjYtLjcuNi0xLjgtLjEtMi41bC0yLjctMi43Yy0uMy0uNC0uOC0uNi0xLjMtLjZIOC42Yy0uNSAwLTEgLjItMS40LjZMLjUgOS4yYy0uNi43LS42IDEuOS4xIDIuNWwyLjcgMi43Yy4zLjQuOC42IDEuMy42SDE2di0xSDguMXptLTEuMy0uMXMwLS4xIDAgMGwtMi43LTIuN2MtLjQtLjQtLjQtLjkgMC0xLjNMNy41IDZoLTFsLTMgMy4zYy0uNi43LS42IDEuNy4xIDIuNEw1LjkgMTRINC42Yy0uMiAwLS40LS4xLS42LS4yTDEuMiAxMWMtLjMtLjMtLjMtLjggMC0xLjFMNC43IDZoMS44TDEwIDJoMUw3LjUgNmwzLjEgMy43LTMuNSA0Yy0uMS4xLS4yLjEtLjMuMnoiLz48L3N2Zz4=",className:void 0,component:void 0,title:void 0},history:{inDropdown:!1,className:void 0,component:void 0,dropdownClassName:void 0,options:["undo","redo"],undo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcgMTQuODc1YzIuNjcyIDAgNC44NDYtMi4xNDUgNC44NDYtNC43ODEgMC0yLjYzNy0yLjE3NC00Ljc4MS00Ljg0Ni00Ljc4MVY4LjVMMS42MTUgNC4yNSA3IDB2My4xODhjMy44NiAwIDcgMy4wOTggNyA2LjkwNlMxMC44NiAxNyA3IDE3cy03LTMuMDk4LTctNi45MDZoMi4xNTRjMCAyLjYzNiAyLjE3NCA0Ljc4MSA0Ljg0NiA0Ljc4MXoiIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==",className:void 0,title:void 0},redo:{icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTYuNTA0IDEzLjk3N2E0LjQ5NyA0LjQ5NyAwIDAgMS00LjQ5Mi00LjQ5MiA0LjQ5NyA0LjQ5NyAwIDAgMSA0LjQ5Mi00LjQ5M3YyLjk5NWw0Ljk5LTMuOTkzTDYuNTA0IDB2Mi45OTVhNi40OTYgNi40OTYgMCAwIDAtNi40ODggNi40OWMwIDMuNTc4IDIuOTEgNi40OSA2LjQ4OCA2LjQ5YTYuNDk2IDYuNDk2IDAgMCAwIDYuNDg3LTYuNDloLTEuOTk2YTQuNDk3IDQuNDk3IDAgMCAxLTQuNDkxIDQuNDkyeiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",className:void 0,title:void 0},title:void 0}},Fr={en:{"generic.add":"Add","generic.cancel":"Cancel","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Block Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Color Picker","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Highlight","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Embedded Link","components.controls.embedded.enterlink":"Enter link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Font","components.controls.fontsize.fontsize":"Font Size","components.controls.history.history":"History","components.controls.history.undo":"Undo","components.controls.history.redo":"Redo","components.controls.image.image":"Image","components.controls.image.fileUpload":"File Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop the file or click to upload","components.controls.inline.bold":"Bold","components.controls.inline.italic":"Italic","components.controls.inline.underline":"Underline","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Link Title","components.controls.link.linkTarget":"Link Target","components.controls.link.linkTargetOption":"Open link in new window","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"List","components.controls.list.unordered":"Unordered","components.controls.list.ordered":"Ordered","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Remove","components.controls.textalign.textalign":"Text Align","components.controls.textalign.left":"Left","components.controls.textalign.center":"Center","components.controls.textalign.right":"Right","components.controls.textalign.justify":"Justify"},fr:{"generic.add":"Ok","generic.cancel":"Annuler","components.controls.blocktype.h1":"Titre 1","components.controls.blocktype.h2":"Titre 2","components.controls.blocktype.h3":"Titre 3","components.controls.blocktype.h4":"Titre 4","components.controls.blocktype.h5":"Titre 5","components.controls.blocktype.h6":"Titre 6","components.controls.blocktype.blockquote":"Citation","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Type bloc","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Palette de couleur","components.controls.colorpicker.text":"Texte","components.controls.colorpicker.background":"Fond","components.controls.embedded.embedded":"Embedded","components.controls.embedded.embeddedlink":"Lien iFrame","components.controls.embedded.enterlink":"Entrer le lien","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Police","components.controls.fontsize.fontsize":"Taille de police","components.controls.history.history":"Historique","components.controls.history.undo":"Précédent","components.controls.history.redo":"Suivant","components.controls.image.image":"Image","components.controls.image.fileUpload":"Téléchargement","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Glisser une image ou cliquer pour télécharger","components.controls.inline.bold":"Gras","components.controls.inline.italic":"Italique","components.controls.inline.underline":"Souligner","components.controls.inline.strikethrough":"Barrer","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Exposant","components.controls.inline.subscript":"Indice","components.controls.link.linkTitle":"Titre du lien","components.controls.link.linkTarget":"Cible du lien","components.controls.link.linkTargetOption":"Ouvrir le lien dans une nouvelle fenêtre","components.controls.link.link":"Lier","components.controls.link.unlink":"Délier","components.controls.list.list":"Liste","components.controls.list.unordered":"Désordonnée","components.controls.list.ordered":"Ordonnée","components.controls.list.indent":"Augmenter le retrait","components.controls.list.outdent":"Diminuer le retrait","components.controls.remove.remove":"Supprimer","components.controls.textalign.textalign":"Alignement du texte","components.controls.textalign.left":"Gauche","components.controls.textalign.center":"Centre","components.controls.textalign.right":"Droite","components.controls.textalign.justify":"Justifier"},zh:{"generic.add":"添加","generic.cancel":"取消","components.controls.blocktype.h1":"标题1","components.controls.blocktype.h2":"标题2","components.controls.blocktype.h3":"标题3","components.controls.blocktype.h4":"标题4","components.controls.blocktype.h5":"标题5","components.controls.blocktype.h6":"标题6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"源码","components.controls.blocktype.blocktype":"样式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"选色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"内嵌","components.controls.embedded.embeddedlink":"内嵌网页","components.controls.embedded.enterlink":"输入网页地址","components.controls.emoji.emoji":"表情符号","components.controls.fontfamily.fontfamily":"字体","components.controls.fontsize.fontsize":"字号","components.controls.history.history":"历史","components.controls.history.undo":"撤销","components.controls.history.redo":"恢复","components.controls.image.image":"图片","components.controls.image.fileUpload":"来自文件","components.controls.image.byURL":"在线图片","components.controls.image.dropFileText":"点击或者拖拽文件上传","components.controls.inline.bold":"粗体","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下划线","components.controls.inline.strikethrough":"删除线","components.controls.inline.monospace":"等宽字体","components.controls.inline.superscript":"上标","components.controls.inline.subscript":"下标","components.controls.link.linkTitle":"超链接","components.controls.link.linkTarget":"输入链接地址","components.controls.link.linkTargetOption":"在新窗口中打开链接","components.controls.link.link":"链接","components.controls.link.unlink":"删除链接","components.controls.list.list":"列表","components.controls.list.unordered":"项目符号","components.controls.list.ordered":"编号","components.controls.list.indent":"增加缩进量","components.controls.list.outdent":"减少缩进量","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文本对齐","components.controls.textalign.left":"文本左对齐","components.controls.textalign.center":"居中","components.controls.textalign.right":"文本右对齐","components.controls.textalign.justify":"两端对齐"},ru:{"generic.add":"Добавить","generic.cancel":"Отменить","components.controls.blocktype.h1":"Заголовок 1","components.controls.blocktype.h2":"Заголовок 2","components.controls.blocktype.h3":"Заголовок 3","components.controls.blocktype.h4":"Заголовок 4","components.controls.blocktype.h5":"Заголовок 5","components.controls.blocktype.h6":"Заголовок 6","components.controls.blocktype.blockquote":"Цитата","components.controls.blocktype.code":"Код","components.controls.blocktype.blocktype":"Форматирование","components.controls.blocktype.normal":"Обычный","components.controls.colorpicker.colorpicker":"Выбор цвета","components.controls.colorpicker.text":"Текст","components.controls.colorpicker.background":"Фон","components.controls.embedded.embedded":"Встраивание","components.controls.embedded.embeddedlink":"Ссылка в iFrame","components.controls.embedded.enterlink":"Вставьте ссылку","components.controls.emoji.emoji":"Эмодзи","components.controls.fontfamily.fontfamily":"Шрифт","components.controls.fontsize.fontsize":"Размер шрифта","components.controls.history.history":"История","components.controls.history.undo":"Отменить","components.controls.history.redo":"Вернуть","components.controls.image.image":"Изображение","components.controls.image.fileUpload":"Файлы","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Переместите в эту область файлы или кликните для загрузки","components.controls.inline.bold":"Жирный","components.controls.inline.italic":"Курсив","components.controls.inline.underline":"Подчеркивание","components.controls.inline.strikethrough":"Зачеркивание","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Верхний индекс","components.controls.inline.subscript":"Нижний индекс","components.controls.link.linkTitle":"Текст","components.controls.link.linkTarget":"Адрес ссылки","components.controls.link.linkTargetOption":"Открывать в новом окне","components.controls.link.link":"Ссылка","components.controls.link.unlink":"Убрать ссылку","components.controls.list.list":"Список","components.controls.list.unordered":"Неупорядоченный","components.controls.list.ordered":"Упорядоченный","components.controls.list.indent":"Отступ","components.controls.list.outdent":"Выступ","components.controls.remove.remove":"Удалить","components.controls.textalign.textalign":"Выравнивание текста","components.controls.textalign.left":"Слева","components.controls.textalign.center":"По центру","components.controls.textalign.right":"Справа","components.controls.textalign.justify":"Выравнить"},pt:{"generic.add":"Ok","generic.cancel":"Cancelar","components.controls.blocktype.h1":"Título 1","components.controls.blocktype.h2":"Título 2","components.controls.blocktype.h3":"Título 3","components.controls.blocktype.h4":"Título 4","components.controls.blocktype.h5":"Título 5","components.controls.blocktype.h6":"Título 6","components.controls.blocktype.blockquote":"Citação","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Estilo","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Paleta de cores","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Fundo","components.controls.embedded.embedded":"Embarcado","components.controls.embedded.embeddedlink":"Link embarcado","components.controls.embedded.enterlink":"Coloque o link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonte","components.controls.fontsize.fontsize":"Tamanho da Fonte","components.controls.history.history":"Histórico","components.controls.history.undo":"Desfazer","components.controls.history.redo":"Refazer","components.controls.image.image":"Imagem","components.controls.image.fileUpload":"Carregar arquivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arraste uma imagem aqui ou clique para carregar","components.controls.inline.bold":"Negrito","components.controls.inline.italic":"Itálico","components.controls.inline.underline":"Sublinhado","components.controls.inline.strikethrough":"Strikethrough","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobrescrito","components.controls.inline.subscript":"Subscrito","components.controls.link.linkTitle":"Título do link","components.controls.link.linkTarget":"Alvo do link","components.controls.link.linkTargetOption":"Abrir link em outra janela","components.controls.link.link":"Adicionar Link","components.controls.link.unlink":"Remover link","components.controls.list.list":"Lista","components.controls.list.unordered":"Sem ordenção","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Aumentar recuo","components.controls.list.outdent":"Diminuir recuo","components.controls.remove.remove":"Remover","components.controls.textalign.textalign":"Alinhamento do texto","components.controls.textalign.left":"À Esquerda","components.controls.textalign.center":"Centralizado","components.controls.textalign.right":"À Direita","components.controls.textalign.justify":"Justificado"},ko:{"generic.add":"입력","generic.cancel":"취소","components.controls.blocktype.h1":"제목1","components.controls.blocktype.h2":"제목2","components.controls.blocktype.h3":"제목3","components.controls.blocktype.h4":"제목4","components.controls.blocktype.h5":"제목5","components.controls.blocktype.h6":"제목6","components.controls.blocktype.blockquote":"인용","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"블록","components.controls.blocktype.normal":"표준","components.controls.colorpicker.colorpicker":"색상 선택","components.controls.colorpicker.text":"글꼴색","components.controls.colorpicker.background":"배경색","components.controls.embedded.embedded":"임베드","components.controls.embedded.embeddedlink":"임베드 링크","components.controls.embedded.enterlink":"주소를 입력하세요","components.controls.emoji.emoji":"이모지","components.controls.fontfamily.fontfamily":"글꼴","components.controls.fontsize.fontsize":"글꼴 크기","components.controls.history.history":"히스토리","components.controls.history.undo":"실행 취소","components.controls.history.redo":"다시 실행","components.controls.image.image":"이미지","components.controls.image.fileUpload":"파일 업로드","components.controls.image.byURL":"주소","components.controls.image.dropFileText":"클릭하거나 파일을 드롭하여 업로드하세요","components.controls.inline.bold":"굵게","components.controls.inline.italic":"기울임꼴","components.controls.inline.underline":"밑줄","components.controls.inline.strikethrough":"취소선","components.controls.inline.monospace":"고정 너비","components.controls.inline.superscript":"위 첨자","components.controls.inline.subscript":"아래 첨자","components.controls.link.linkTitle":"링크 제목","components.controls.link.linkTarget":"링크 타겟","components.controls.link.linkTargetOption":"새창으로 열기","components.controls.link.link":"링크","components.controls.link.unlink":"링크 제거","components.controls.list.list":"리스트","components.controls.list.unordered":"일반 리스트","components.controls.list.ordered":"순서 리스트","components.controls.list.indent":"들여쓰기","components.controls.list.outdent":"내어쓰기","components.controls.remove.remove":"삭제","components.controls.textalign.textalign":"텍스트 정렬","components.controls.textalign.left":"왼쪽","components.controls.textalign.center":"중앙","components.controls.textalign.right":"오른쪽","components.controls.textalign.justify":"양쪽"},it:{"generic.add":"Aggiungi","generic.cancel":"Annulla","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Citazione","components.controls.blocktype.code":"Codice","components.controls.blocktype.blocktype":"Stili","components.controls.blocktype.normal":"Normale","components.controls.colorpicker.colorpicker":"Colore testo","components.controls.colorpicker.text":"Testo","components.controls.colorpicker.background":"Evidenziazione","components.controls.embedded.embedded":"Incorpora","components.controls.embedded.embeddedlink":"Incorpora link","components.controls.embedded.enterlink":"Inserisci link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Carattere","components.controls.fontsize.fontsize":"Dimensione carattere","components.controls.history.history":"Modifiche","components.controls.history.undo":"Annulla","components.controls.history.redo":"Ripristina","components.controls.image.image":"Immagine","components.controls.image.fileUpload":"Carica immagine","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Trascina il file o clicca per caricare","components.controls.inline.bold":"Grassetto","components.controls.inline.italic":"Corsivo","components.controls.inline.underline":"Sottolineato","components.controls.inline.strikethrough":"Barrato","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Apice","components.controls.inline.subscript":"Pedice","components.controls.link.linkTitle":"Testo","components.controls.link.linkTarget":"Link","components.controls.link.linkTargetOption":"Apri link in una nuova finestra","components.controls.link.link":"Inserisci link","components.controls.link.unlink":"Rimuovi link","components.controls.list.list":"Lista","components.controls.list.unordered":"Elenco puntato","components.controls.list.ordered":"Elenco numerato","components.controls.list.indent":"Indent","components.controls.list.outdent":"Outdent","components.controls.remove.remove":"Rimuovi formattazione","components.controls.textalign.textalign":"Allineamento del testo","components.controls.textalign.left":"Allinea a sinistra","components.controls.textalign.center":"Allinea al centro","components.controls.textalign.right":"Allinea a destra","components.controls.textalign.justify":"Giustifica"},nl:{"generic.add":"Toevoegen","generic.cancel":"Annuleren","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Code","components.controls.blocktype.blocktype":"Blocktype","components.controls.blocktype.normal":"Normaal","components.controls.colorpicker.colorpicker":"Kleurkiezer","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Achtergrond","components.controls.embedded.embedded":"Ingevoegd","components.controls.embedded.embeddedlink":"Ingevoegde link","components.controls.embedded.enterlink":"Voeg link toe","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Lettertype","components.controls.fontsize.fontsize":"Lettergrootte","components.controls.history.history":"Geschiedenis","components.controls.history.undo":"Ongedaan maken","components.controls.history.redo":"Opnieuw","components.controls.image.image":"Afbeelding","components.controls.image.fileUpload":"Bestand uploaden","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop het bestand hier of klik om te uploaden","components.controls.inline.bold":"Dikgedrukt","components.controls.inline.italic":"Schuingedrukt","components.controls.inline.underline":"Onderstrepen","components.controls.inline.strikethrough":"Doorstrepen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Superscript","components.controls.inline.subscript":"Subscript","components.controls.link.linkTitle":"Linktitel","components.controls.link.linkTarget":"Link bestemming","components.controls.link.linkTargetOption":"Open link in een nieuw venster","components.controls.link.link":"Link","components.controls.link.unlink":"Unlink","components.controls.list.list":"Lijst","components.controls.list.unordered":"Ongeordend","components.controls.list.ordered":"Geordend","components.controls.list.indent":"Inspringen","components.controls.list.outdent":"Inspringen verkleinen","components.controls.remove.remove":"Verwijderen","components.controls.textalign.textalign":"Tekst uitlijnen","components.controls.textalign.left":"Links","components.controls.textalign.center":"Gecentreerd","components.controls.textalign.right":"Rechts","components.controls.textalign.justify":"Uitgelijnd"},de:{"generic.add":"Hinzufügen","generic.cancel":"Abbrechen","components.controls.blocktype.h1":"Überschrift 1","components.controls.blocktype.h2":"Überschrift 2","components.controls.blocktype.h3":"Überschrift 3","components.controls.blocktype.h4":"Überschrift 4","components.controls.blocktype.h5":"Überschrift 5","components.controls.blocktype.h6":"Überschrift 6","components.controls.blocktype.blockquote":"Zitat","components.controls.blocktype.code":"Quellcode","components.controls.blocktype.blocktype":"Blocktyp","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farbauswahl","components.controls.colorpicker.text":"Text","components.controls.colorpicker.background":"Hintergrund","components.controls.embedded.embedded":"Eingebettet","components.controls.embedded.embeddedlink":"Eingebetteter Link","components.controls.embedded.enterlink":"Link eingeben","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Schriftart","components.controls.fontsize.fontsize":"Schriftgröße","components.controls.history.history":"Historie","components.controls.history.undo":"Zurücknehmen","components.controls.history.redo":"Wiederholen","components.controls.image.image":"Bild","components.controls.image.fileUpload":"Datei-Upload","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Dateien ziehen und ablegen, oder klicken zum Hochladen","components.controls.inline.bold":"Fett","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Unterstreichen","components.controls.inline.strikethrough":"Durchstreichen","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hochgestellt","components.controls.inline.subscript":"Tiefgestellt","components.controls.link.linkTitle":"Link-Titel","components.controls.link.linkTarget":"Link-Ziel","components.controls.link.linkTargetOption":"Link in neuem Fenster öffnen","components.controls.link.link":"Link","components.controls.link.unlink":"Aufheben","components.controls.list.list":"Liste","components.controls.list.unordered":"Aufzählung","components.controls.list.ordered":"Nummerierte Liste","components.controls.list.indent":"Einzug vergrößern","components.controls.list.outdent":"Einzug reduzieren","components.controls.remove.remove":"Entfernen","components.controls.textalign.textalign":"Textausrichtung","components.controls.textalign.left":"Linksbündig","components.controls.textalign.center":"Zentrieren","components.controls.textalign.right":"Rechtsbündig","components.controls.textalign.justify":"Blocksatz"},da:{"generic.add":"Tilføj","generic.cancel":"Annuller","components.controls.blocktype.h1":"Overskrift 1","components.controls.blocktype.h2":"Overskrift 2","components.controls.blocktype.h3":"Overskrift 3","components.controls.blocktype.h4":"Overskrift 4","components.controls.blocktype.h5":"Overskrift 5","components.controls.blocktype.h6":"Overskrift 6","components.controls.blocktype.blockquote":"Blokcitat","components.controls.blocktype.code":"Kode","components.controls.blocktype.blocktype":"Blok Type","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Farver","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Baggrund","components.controls.embedded.embedded":"Indlejre","components.controls.embedded.embeddedlink":"Indlejre Link","components.controls.embedded.enterlink":"Indtast link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fonttype","components.controls.fontsize.fontsize":"Fontstørrelser","components.controls.history.history":"Historie","components.controls.history.undo":"Fortryd","components.controls.history.redo":"Gendan","components.controls.image.image":"Billede","components.controls.image.fileUpload":"Filoverførsel","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Drop filen eller klik for at uploade","components.controls.inline.bold":"Fed","components.controls.inline.italic":"Kursiv","components.controls.inline.underline":"Understrege","components.controls.inline.strikethrough":"Gennemstreget","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Hævet","components.controls.inline.subscript":"Sænket","components.controls.link.linkTitle":"Link Titel","components.controls.link.linkTarget":"Link Mål","components.controls.link.linkTargetOption":"Åbn link i nyt vindue","components.controls.link.link":"Link","components.controls.link.unlink":"Fjern link","components.controls.list.list":"Liste","components.controls.list.unordered":"Uordnet","components.controls.list.ordered":"Ordnet","components.controls.list.indent":"Indrykning","components.controls.list.outdent":"Udrykning","components.controls.remove.remove":"Fjern","components.controls.textalign.textalign":"Tekstjustering","components.controls.textalign.left":"Venstre","components.controls.textalign.center":"Center","components.controls.textalign.right":"Højre","components.controls.textalign.justify":"Margener"},zh_tw:{"generic.add":"新增","generic.cancel":"取消","components.controls.blocktype.h1":"標題1","components.controls.blocktype.h2":"標題2","components.controls.blocktype.h3":"標題3","components.controls.blocktype.h4":"標題4","components.controls.blocktype.h5":"標題5","components.controls.blocktype.h6":"標題6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"程式碼","components.controls.blocktype.blocktype":"樣式","components.controls.blocktype.normal":"正文","components.controls.colorpicker.colorpicker":"選色器","components.controls.colorpicker.text":"文字","components.controls.colorpicker.background":"背景","components.controls.embedded.embedded":"內嵌","components.controls.embedded.embeddedlink":"內嵌網頁","components.controls.embedded.enterlink":"輸入網頁地址","components.controls.emoji.emoji":"表情符號","components.controls.fontfamily.fontfamily":"字體","components.controls.fontsize.fontsize":"字體大小","components.controls.history.history":"歷史紀錄","components.controls.history.undo":"復原","components.controls.history.redo":"重做","components.controls.image.image":"圖片","components.controls.image.fileUpload":"檔案上傳","components.controls.image.byURL":"網址","components.controls.image.dropFileText":"點擊或拖曳檔案上傳","components.controls.inline.bold":"粗體","components.controls.inline.italic":"斜體","components.controls.inline.underline":"底線","components.controls.inline.strikethrough":"刪除線","components.controls.inline.monospace":"等寬字體","components.controls.inline.superscript":"上標","components.controls.inline.subscript":"下標","components.controls.link.linkTitle":"超連結","components.controls.link.linkTarget":"輸入連結位址","components.controls.link.linkTargetOption":"在新視窗打開連結","components.controls.link.link":"連結","components.controls.link.unlink":"刪除連結","components.controls.list.list":"列表","components.controls.list.unordered":"項目符號","components.controls.list.ordered":"編號","components.controls.list.indent":"增加縮排","components.controls.list.outdent":"減少縮排","components.controls.remove.remove":"清除格式","components.controls.textalign.textalign":"文字對齊","components.controls.textalign.left":"文字向左對齊","components.controls.textalign.center":"文字置中","components.controls.textalign.right":"文字向右對齊","components.controls.textalign.justify":"兩端對齊"},pl:{"generic.add":"Dodaj","generic.cancel":"Anuluj","components.controls.blocktype.h1":"Nagłówek 1","components.controls.blocktype.h2":"Nagłówek 2","components.controls.blocktype.h3":"Nagłówek 3","components.controls.blocktype.h4":"Nagłówek 4","components.controls.blocktype.h5":"Nagłówek 5","components.controls.blocktype.h6":"Nagłówek 6","components.controls.blocktype.blockquote":"Cytat","components.controls.blocktype.code":"Kod","components.controls.blocktype.blocktype":"Format","components.controls.blocktype.normal":"Normalny","components.controls.colorpicker.colorpicker":"Kolor","components.controls.colorpicker.text":"Tekst","components.controls.colorpicker.background":"Tło","components.controls.embedded.embedded":"Osadź","components.controls.embedded.embeddedlink":"Osadź odnośnik","components.controls.embedded.enterlink":"Wprowadź odnośnik","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Krój czcionki","components.controls.fontsize.fontsize":"Rozmiar czcionki","components.controls.history.history":"Historia","components.controls.history.undo":"Cofnij","components.controls.history.redo":"Ponów","components.controls.image.image":"Obrazek","components.controls.image.fileUpload":"Prześlij plik","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Upuść plik lub kliknij, aby przesłać","components.controls.inline.bold":"Pogrubienie","components.controls.inline.italic":"Kursywa","components.controls.inline.underline":"Podkreślenie","components.controls.inline.strikethrough":"Przekreślenie","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Indeks górny","components.controls.inline.subscript":"Indeks dolny","components.controls.link.linkTitle":"Tytuł odnośnika","components.controls.link.linkTarget":"Adres odnośnika","components.controls.link.linkTargetOption":"Otwórz odnośnik w nowej karcie","components.controls.link.link":"Wstaw odnośnik","components.controls.link.unlink":"Usuń odnośnik","components.controls.list.list":"Lista","components.controls.list.unordered":"Lista nieuporządkowana","components.controls.list.ordered":"Lista uporządkowana","components.controls.list.indent":"Zwiększ wcięcie","components.controls.list.outdent":"Zmniejsz wcięcie","components.controls.remove.remove":"Usuń","components.controls.textalign.textalign":"Wyrównaj tekst","components.controls.textalign.left":"Do lewej","components.controls.textalign.center":"Do środka","components.controls.textalign.right":"Do prawej","components.controls.textalign.justify":"Wyjustuj"},es:{"generic.add":"Añadir","generic.cancel":"Cancelar","components.controls.blocktype.h1":"H1","components.controls.blocktype.h2":"H2","components.controls.blocktype.h3":"H3","components.controls.blocktype.h4":"H4","components.controls.blocktype.h5":"H5","components.controls.blocktype.h6":"H6","components.controls.blocktype.blockquote":"Blockquote","components.controls.blocktype.code":"Código","components.controls.blocktype.blocktype":"Tipo de bloque","components.controls.blocktype.normal":"Normal","components.controls.colorpicker.colorpicker":"Seleccionar color","components.controls.colorpicker.text":"Texto","components.controls.colorpicker.background":"Subrayado","components.controls.embedded.embedded":"Adjuntar","components.controls.embedded.embeddedlink":"Adjuntar Link","components.controls.embedded.enterlink":"Introducir link","components.controls.emoji.emoji":"Emoji","components.controls.fontfamily.fontfamily":"Fuente","components.controls.fontsize.fontsize":"Tamaño de fuente","components.controls.history.history":"Histórico","components.controls.history.undo":"Deshacer","components.controls.history.redo":"Rehacer","components.controls.image.image":"Imagen","components.controls.image.fileUpload":"Subir archivo","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"Arrastra el archivo o haz click para subirlo","components.controls.inline.bold":"Negrita","components.controls.inline.italic":"Cursiva","components.controls.inline.underline":"Subrayado","components.controls.inline.strikethrough":"Tachado","components.controls.inline.monospace":"Monospace","components.controls.inline.superscript":"Sobreíndice","components.controls.inline.subscript":"Subíndice","components.controls.link.linkTitle":"Título del enlace","components.controls.link.linkTarget":"Objetivo del enlace","components.controls.link.linkTargetOption":"Abrir en nueva ventana","components.controls.link.link":"Enlazar","components.controls.link.unlink":"Desenlazar","components.controls.list.list":"Lista","components.controls.list.unordered":"Desordenada","components.controls.list.ordered":"Ordenada","components.controls.list.indent":"Indentada","components.controls.list.outdent":"Dentada","components.controls.remove.remove":"Eliminar","components.controls.textalign.textalign":"Alineación del texto","components.controls.textalign.left":"Izquierda","components.controls.textalign.center":"Centrado","components.controls.textalign.right":"Derecha","components.controls.textalign.justify":"Justificado"},ja:{"generic.add":"追加","generic.cancel":"キャンセル","components.controls.blocktype.h1":"見出し1","components.controls.blocktype.h2":"見出し2","components.controls.blocktype.h3":"見出し3","components.controls.blocktype.h4":"見出し4","components.controls.blocktype.h5":"見出し5","components.controls.blocktype.h6":"見出し6","components.controls.blocktype.blockquote":"引用","components.controls.blocktype.code":"コード","components.controls.blocktype.blocktype":"スタイル","components.controls.blocktype.normal":"標準テキスト","components.controls.colorpicker.colorpicker":"テキストの色","components.controls.colorpicker.text":"テキスト","components.controls.colorpicker.background":"ハイライト","components.controls.embedded.embedded":"埋め込み","components.controls.embedded.embeddedlink":"埋め込みリンク","components.controls.embedded.enterlink":"リンクを入力してください","components.controls.emoji.emoji":"絵文字","components.controls.fontfamily.fontfamily":"フォント","components.controls.fontsize.fontsize":"フォントサイズ","components.controls.history.history":"履歴","components.controls.history.undo":"元に戻す","components.controls.history.redo":"やり直し","components.controls.image.image":"画像","components.controls.image.fileUpload":"ファイルをアップロード","components.controls.image.byURL":"URL","components.controls.image.dropFileText":"ここに画像をドラッグするか、クリックしてください","components.controls.inline.bold":"太字","components.controls.inline.italic":"斜体","components.controls.inline.underline":"下線","components.controls.inline.strikethrough":"取り消し線","components.controls.inline.monospace":"等幅フォント","components.controls.inline.superscript":"上付き文字","components.controls.inline.subscript":"下付き文字","components.controls.link.linkTitle":"リンクタイトル","components.controls.link.linkTarget":"リンク対象","components.controls.link.linkTargetOption":"新しいウィンドウで開く","components.controls.link.link":"リンク","components.controls.link.unlink":"リンクを解除","components.controls.list.list":"リスト","components.controls.list.unordered":"箇条書き","components.controls.list.ordered":"番号付き","components.controls.list.indent":"インデント増","components.controls.list.outdent":"インデント減","components.controls.remove.remove":"書式をクリア","components.controls.textalign.textalign":"整列","components.controls.textalign.left":"左揃え","components.controls.textalign.center":"中央揃え","components.controls.textalign.right":"右揃え","components.controls.textalign.justify":"両端揃え"}};function Ur(e){return(Ur="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 qr(){return(qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wr(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 Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wr(Object(n),!0).forEach(function(t){Gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){return function(e){if(Array.isArray(e))return Yr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yr(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)?Yr(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(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 Xr(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)}}function Jr(e,t){return(Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=ei(e);if(t){var i=ei(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Ur(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)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,n)}}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(38),n(39);var ti=function(){!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&&Jr(e,t)}(o,r.Component);var e,t,n=$r(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=n.call(this,e)).onEditorBlur=function(){t.setState({editorFocused:!1})},t.onEditorFocus=function(e){var n=t.props.onFocus;t.setState({editorFocused:!0});var r=t.focusHandler.isEditorFocused();n&&r&&n(e)},t.onEditorMouseDown=function(){t.focusHandler.onEditorMouseDown()},t.keyBindingFn=function(e){if("Tab"!==e.key)return"ArrowUp"!==e.key&&"ArrowDown"!==e.key||w()&&e.preventDefault(),Object(l.getDefaultKeyBinding)(e);var n=t.props.onTab;if(!n||!n(e)){var r=Object(s.changeDepth)(t.state.editorState,e.shiftKey?-1:1,4);r&&r!==t.state.editorState&&(t.onChange(r),e.preventDefault())}return null},t.onToolbarFocus=function(e){var n=t.props.onFocus;n&&t.focusHandler.isToolbarFocused()&&n(e)},t.onWrapperBlur=function(e){var n=t.props.onBlur;n&&t.focusHandler.isEditorBlur(e)&&n(e,t.getEditorState())},t.onChange=function(e){var n=t.props,r=n.readOnly,i=n.onEditorStateChange;r||"atomic"===Object(s.getSelectedBlocksType)(e)&&e.getSelection().isCollapsed||(i&&i(e,t.props.wrapperId),M(t.props,"editorState")?t.afterChange(e):t.setState({editorState:e},t.afterChange(e)))},t.setWrapperReference=function(e){t.wrapper=e},t.setEditorReference=function(e){t.props.editorRef&&t.props.editorRef(e),t.editor=e},t.getCompositeDecorator=function(e){var n=[].concat(Kr(t.props.customDecorators),[{strategy:mr,component:gr({showOpenOptionOnHover:e.link.showOpenOptionOnHover})}]);return t.props.mention&&n.push.apply(n,Kr(Sr(Qr(Qr({},t.props.mention),{},{onChange:t.onChange,getEditorState:t.getEditorState,getSuggestions:t.getSuggestions,getWrapperRef:t.getWrapperRef,modalHandler:t.modalHandler})))),t.props.hashtag&&n.push(zr(t.props.hashtag)),new l.CompositeDecorator(n)},t.getWrapperRef=function(){return t.wrapper},t.getEditorState=function(){return t.state?t.state.editorState:null},t.getSuggestions=function(){return t.props.mention&&t.props.mention.suggestions},t.afterChange=function(e){setTimeout(function(){var n=t.props,r=n.onChange,i=n.onContentStateChange;r&&r(Object(l.convertToRaw)(e.getCurrentContent())),i&&i(Object(l.convertToRaw)(e.getCurrentContent()))})},t.isReadOnly=function(){return t.props.readOnly},t.isImageAlignmentEnabled=function(){return t.state.toolbar.image.alignmentEnabled},t.createEditorState=function(e){var n;if(M(t.props,"editorState"))t.props.editorState&&(n=l.EditorState.set(t.props.editorState,{decorator:e}));else if(M(t.props,"defaultEditorState"))t.props.defaultEditorState&&(n=l.EditorState.set(t.props.defaultEditorState,{decorator:e}));else if(M(t.props,"contentState")){if(t.props.contentState){var r=Object(l.convertFromRaw)(t.props.contentState);n=l.EditorState.createWithContent(r,e),n=l.EditorState.moveSelectionToEnd(n)}}else if(M(t.props,"defaultContentState")||M(t.props,"initialContentState")){var i=t.props.defaultContentState||t.props.initialContentState;i&&(i=Object(l.convertFromRaw)(i),n=l.EditorState.createWithContent(i,e),n=l.EditorState.moveSelectionToEnd(n))}return n||l.EditorState.createEmpty(e)},t.filterEditorProps=function(e){return t=e,n=["onChange","onEditorStateChange","onContentStateChange","initialContentState","defaultContentState","contentState","editorState","defaultEditorState","locale","localization","toolbarOnFocus","toolbar","toolbarCustomButtons","toolbarClassName","editorClassName","toolbarHidden","wrapperClassName","toolbarStyle","editorStyle","wrapperStyle","uploadCallback","onFocus","onBlur","onTab","mention","hashtag","ariaLabel","customBlockRenderFunc","customDecorators","handlePastedText","customStyleMap"],r=Object.keys(t).filter(function(e){return n.indexOf(e)<0}),i={},r&&0<r.length&&r.forEach(function(e){i[e]=t[e]}),i;var t,n,r,i},t.getStyleMap=function(e){return Qr(Qr({},Object(s.getCustomStyleMap)()),e.customStyleMap)},t.changeEditorState=function(e){var n=Object(l.convertFromRaw)(e),r=t.state.editorState;return r=l.EditorState.push(r,n,"insert-characters"),l.EditorState.moveSelectionToEnd(r)},t.focusEditor=function(){setTimeout(function(){t.editor.focus()})},t.handleKeyCommand=function(e){var n=t.state,r=n.editorState,i=n.toolbar.inline;if(i&&0<=i.options.indexOf(e)){var o=l.RichUtils.handleKeyCommand(r,e);if(o)return t.onChange(o),!0}return!1},t.handleReturn=function(e){if(w())return!0;var n=t.state.editorState,r=Object(s.handleNewLine)(n,e);return!!r&&(t.onChange(r),!0)},t.handlePastedTextFn=function(e,n){var r=t.state.editorState,i=t.props,o=i.handlePastedText,a=i.stripPastedStyles;return o?o(e,n,r,t.onChange):!a&&function(e,t,n,r){var i=Object(s.getSelectedBlock)(n);if(i&&"code"===i.type){var o=l.Modifier.replaceText(n.getCurrentContent(),n.getSelection(),e,n.getCurrentInlineStyle());return r(l.EditorState.push(n,o,"insert-characters")),!0}if(t){var a=H()(t),c=n.getCurrentContent();return a.entityMap.forEach(function(e,t){c=c.mergeEntityData(t,e)}),c=l.Modifier.replaceWithFragment(c,n.getSelection(),new S.List(a.contentBlocks)),r(l.EditorState.push(n,c,"insert-characters")),!0}return!1}(e,n,r,t.onChange)},t.preventDefault=function(e){"INPUT"===e.target.tagName||"LABEL"===e.target.tagName||"TEXTAREA"===e.target.tagName?t.focusHandler.onInputMouseDown():e.preventDefault()};var r=L(Pr,e.toolbar),i=e.wrapperId?e.wrapperId:Math.floor(1e4*Math.random());t.wrapperId="rdw-wrapper-".concat(i),t.modalHandler=new f,t.focusHandler=new C,t.blockRendererFn=Br({isReadOnly:t.isReadOnly,isImageAlignmentEnabled:t.isImageAlignmentEnabled,getEditorState:t.getEditorState,onChange:t.onChange},e.customBlockRenderFunc),t.editorProps=t.filterEditorProps(e),t.customStyleMap=t.getStyleMap(e),t.compositeDecorator=t.getCompositeDecorator(r);var a=t.createEditorState(t.compositeDecorator);return Object(s.extractInlineStyle)(a),t.state={editorState:a,editorFocused:!1,toolbar:r},t}return e=o,(t=[{key:"componentDidMount",value:function(){this.modalHandler.init(this.wrapperId)}},{key:"componentDidUpdate",value:function(e){if(e!==this.props){var t={},n=this.props,r=n.editorState,i=n.contentState;if(!this.state.toolbar){var o=L(Pr,o);t.toolbar=o}if(M(this.props,"editorState")&&r!==e.editorState)t.editorState=r?l.EditorState.set(r,{decorator:this.compositeDecorator}):l.EditorState.createEmpty(this.compositeDecorator);else if(M(this.props,"contentState")&&i!==e.contentState)if(i){var a=this.changeEditorState(i);a&&(t.editorState=a)}else t.editorState=l.EditorState.createEmpty(this.compositeDecorator);e.editorState===r&&e.contentState===i||Object(s.extractInlineStyle)(t.editorState),Object.keys(t).length&&this.setState(t),this.editorProps=this.filterEditorProps(this.props),this.customStyleMap=this.getStyleMap(this.props)}}},{key:"render",value:function(){var e=this.state,t=e.editorState,n=e.editorFocused,r=e.toolbar,o=this.props,a=o.locale,c=o.localization,u=c.locale,f=c.translations,h=o.toolbarCustomButtons,p=o.toolbarOnFocus,C=o.toolbarClassName,m=o.toolbarHidden,v=o.editorClassName,y=o.wrapperClassName,w=o.toolbarStyle,E=o.editorStyle,M=o.wrapperStyle,A=o.uploadCallback,x=o.ariaLabel,L={modalHandler:this.modalHandler,editorState:t,onChange:this.onChange,translations:Qr(Qr({},Fr[a||u]),f)},k=n||this.focusHandler.isInputFocused()||!p;return i.a.createElement("div",{id:this.wrapperId,className:d()(y,"rdw-editor-wrapper"),style:M,onClick:this.modalHandler.onEditorClick,onBlur:this.onWrapperBlur,"aria-label":"rdw-wrapper"},!m&&i.a.createElement("div",{className:d()("rdw-editor-toolbar",C),style:Qr({visibility:k?"visible":"hidden"},w),onMouseDown:this.preventDefault,"aria-label":"rdw-toolbar","aria-hidden":(!n&&p).toString(),onFocus:this.onToolbarFocus},r.options.map(function(e,t){var n=lr[e],o=r[e];return"image"===e&&A&&(o.uploadCallback=A),i.a.createElement(n,qr({key:t},L,{config:o}))}),h&&h.map(function(e,t){return i.a.cloneElement(e,Qr({key:t},L))})),i.a.createElement("div",{ref:this.setWrapperReference,className:d()(v,"rdw-editor-main"),style:E,onClick:this.focusEditor,onFocus:this.onEditorFocus,onBlur:this.onEditorBlur,onKeyDown:g.onKeyDown,onMouseDown:this.onEditorMouseDown},i.a.createElement(l.Editor,qr({ref:this.setEditorReference,keyBindingFn:this.keyBindingFn,editorState:t,onChange:this.onChange,blockStyleFn:b,customStyleMap:this.getStyleMap(this.props),handleReturn:this.handleReturn,handlePastedText:this.handlePastedTextFn,blockRendererFn:this.blockRendererFn,handleKeyCommand:this.handleKeyCommand,ariaLabel:x||"rdw-editor",blockRenderMap:s.blockRenderMap},this.editorProps))))}}])&&Xr(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),o}();ti.propTypes={onChange:a.a.func,onEditorStateChange:a.a.func,onContentStateChange:a.a.func,initialContentState:a.a.object,defaultContentState:a.a.object,contentState:a.a.object,editorState:a.a.object,defaultEditorState:a.a.object,toolbarOnFocus:a.a.bool,spellCheck:a.a.bool,stripPastedStyles:a.a.bool,toolbar:a.a.object,toolbarCustomButtons:a.a.array,toolbarClassName:a.a.string,toolbarHidden:a.a.bool,locale:a.a.string,localization:a.a.object,editorClassName:a.a.string,wrapperClassName:a.a.string,toolbarStyle:a.a.object,editorStyle:a.a.object,wrapperStyle:a.a.object,uploadCallback:a.a.func,onFocus:a.a.func,onBlur:a.a.func,onTab:a.a.func,mention:a.a.object,hashtag:a.a.object,textAlignment:a.a.string,readOnly:a.a.bool,tabIndex:a.a.number,placeholder:a.a.string,ariaLabel:a.a.string,ariaOwneeID:a.a.string,ariaActiveDescendantID:a.a.string,ariaAutoComplete:a.a.string,ariaDescribedBy:a.a.string,ariaExpanded:a.a.string,ariaHasPopup:a.a.string,customBlockRenderFunc:a.a.func,wrapperId:a.a.number,customDecorators:a.a.array,editorRef:a.a.func,handlePastedText:a.a.func},ti.defaultProps={toolbarOnFocus:!1,toolbarHidden:!1,stripPastedStyles:!1,localization:{locale:"en",translations:{}},customDecorators:[]};var ni=ti}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=8);function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var i,o}(i,IB(),tW)),ZB.exports);const rW=t=>{const{contentState:n,entityKey:r,children:i}=t,o=n.getEntity(r),{url:a,target:l}=o.getData();return e("a",{href:a,target:l||"_blank",rel:"noopener noreferrer",onClick:e=>{e.preventDefault(),e.stopPropagation(),a&&("_blank"!==l&&l?window.open(a,l):window.open(a,"_blank","noopener,noreferrer"))},style:{color:"var(--ff-step-element-color)",textDecoration:"underline",cursor:"pointer"},children:i})},iW=({convertedContent:t,setConvertedContent:r,readOnly:i,toolbarHidden:o,toolbarOptions:s,label:d,required:u=!1,onBlur:f,mode:h,helperText:p,analyticsClasses:C=!1,error:m,editableTextEditor:g=!1,onSubmit:v,onFocus:y})=>{const[w,b]=c(null),[E,M]=c(!1),[A,x]=c(!1),[L,k]=c(!1),[H,S]=c(t),_=a(null),V=a(null),O=new DB.CompositeDecorator([{strategy:(e,t,n)=>{e.findEntityRanges(e=>{const t=e.getEntity();return null!==t&&"LINK"===n.getEntity(t).getType()},t)},component:rW}]),z=e=>{if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t&&t.blocks?t:DB.convertToRaw(DB.ContentState.createFromText(e))}catch(t){return DB.convertToRaw(DB.ContentState.createFromText(e))}};l(()=>{let e;try{if(G(t))e="view"===h||g&&!L?DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O):DB.EditorState.createEmpty(O);else{const n=z(t);e=n?DB.EditorState.createWithContent(DB.convertFromRaw(n),O):DB.EditorState.createEmpty(O)}}catch(n){console.error("Error creating editor state:",n),e=DB.EditorState.createWithContent(DB.ContentState.createFromText(t||"Invalid content"),O)}b(e),S(t)},[t,h,L,g]),l(()=>{if(0===t?.length){let e;if("view"===h||g&&!L){const t=DB.ContentState.createFromText("---");e=DB.EditorState.createWithContent(t,O)}else e=DB.EditorState.createEmpty(O);b(e)}},[t,h,L,g]),l(()=>{if(!_.current)return;const e=e=>{const t=e.target.closest("a");if(t&&_.current?.contains(t)){e.preventDefault(),e.stopPropagation();const n=t.getAttribute("href"),r=t.getAttribute("target")||"_blank";n&&("_blank"===r?window.open(n,"_blank","noopener,noreferrer"):window.open(n,r))}},t=_.current;return t.addEventListener("click",e),()=>{t.removeEventListener("click",e)}},[]);Y(_,()=>{if(g&&L&&!A){k(!1),r(H||"");const e=z(H),t=e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O);b(t)}},[V]);const N=nW.Editor;return n("div",{className:"ff-textEditor-container",children:[n("div",{className:"ff-title-button",children:[n("div",{className:"ff-textEditor-label-asterisk-container",children:[u&&e(F,{className:"required-asterisk",children:"* "}),d&&e(F,{lineHeight:"10px",fontWeight:"medium",fontSize:"12px",children:d})]}),g&&L&&n("div",{ref:V,className:"ff-textEditor-buttons",children:[e(K,{title:"Update",placement:"bottom",children:e(P,{name:"update_icon",color:"var(--label-edit-confirm-icon)",height:20,width:20,hoverEffect:!0,onClick:()=>{if(A||!w)return;const e=DB.convertToRaw(w.getCurrentContent());let t=JSON.stringify(e);""===e?.blocks[0]?.text&&(t=JSON.stringify(DB.convertToRaw(DB.ContentState.createFromText("---")))),r(t),v&&v(t),S(t),k(!1)}})}),e(K,{title:"Cancel",placement:"bottom",children:e(P,{name:"close",color:"var(--label-edit-cancel-icon)",height:20,width:20,onClick:()=>{k(!1),r(H||"");const e=z(H),t=e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createWithContent(DB.ContentState.createFromText("---"),O);b(t),x(!1)},hoverEffect:!0})})]})]}),e("div",{ref:_,onDoubleClick:()=>{if(g&&!L){k(!0),S(t);const e=z(t),n="---"===e?.blocks[0]?.text?DB.EditorState.createEmpty(O):e?DB.EditorState.createWithContent(DB.convertFromRaw(e),O):DB.EditorState.createEmpty(O);b(n)}},children:w&&e(N,{editorState:w,onEditorStateChange:e=>{b(e);const t=DB.convertToRaw(e.getCurrentContent());L&&""===t?.blocks[0]?.text&&u?x(!0):""!==t?.blocks[0]?.text&&x(!1)},wrapperClassName:"wrapperClass",editorClassName:"ff-heading-TextEditor-style "+(C?"fontSm":"fontMd"),editorStyle:"view"===h||g&&!L?{border:"none"}:E?{border:"1px solid var(--text-editor-in-focus-border-color)",borderRadius:"4px"}:{border:"1px solid var(--text-editor-out-focus-border-color) ",borderRadius:"4px"},onFocus:()=>{M(!0),y&&y()},onBlur:e=>{if(!g&&w){const e=DB.convertToRaw(w.getCurrentContent());r(JSON.stringify(e)),""===e?.blocks[0]?.text&&x(!0)}f&&f(e)},readOnly:g?!L:i,toolbarHidden:g?!L:o,toolbarClassName:"ff-toolbarClass",handlePastedText:()=>!1,toolbar:{options:Array.isArray(s)&&s?.length>0?s:["inline","blockType","fontSize","fontFamily","list","textAlign","colorPicker","link","emoji","image","remove","history"],fontFamily:{options:["Arial","Georgia","Impact","OpenSans-Regular","Tahoma","Times New Roman","Verdana","poppins"]},link:{defaultTargetOption:"_blank",showOpenOptionOnHover:!1}}})}),u&&A||p&&m?e(F,{fontSize:10,className:"ff-textEditor-error-msg",as:"span",children:p}):null]})},oW=({iconName:t,iconWidth:r=120,iconHeight:i=115,text:o,textFontSize:a="24px",textDirectionRow:l=!1,gap:s="40px"})=>n("div",{className:`no_data_message ${l&&"flex-row"}`,style:{gap:s},children:[e(P,{name:t,width:r,height:i}),e(F,{fontSize:a,lineHeight:"36px",fontWeight:"semi-bold",children:o})]}),aW=({cardProperties:t={width:"200px",height:"200px",background:"white",borderRadius:"16px",boxShadow:"1px 4px 8px var(--plugins-header-bg-color)",padding:"16px",margin:"0",border:"none",className:"",style:{},onClick:()=>{}},headerContent:r,midContent:i,footerContent:o})=>{const{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,className:p="",style:C={}}=t;return n("section",{className:`ff-card ${p}`,style:{width:a,height:l,background:s,borderRadius:c,boxShadow:d,padding:u,margin:f,border:h,...C},onClick:t.onClick,children:[r?.isHeader&&e("div",{className:"ff-card-header",children:r.content}),i?.isMidContent&&e("div",{className:"ff-card-content",children:i.content}),o?.isFooter&&e("div",{className:"ff-card-footer",children:o.content})]})},lW=e=>Lt.test(e)?e:e.toLowerCase().split(/[\s_-]+/).map((e,t)=>0===t?e:e.charAt(0).toUpperCase()+e.slice(1)).join(""),sW=(e,t)=>{let n;if(e.current){const r=e.current;n=new MutationObserver(()=>{const e=r.scrollHeight;r.scrollTop=e+(t||0)}),n.observe(r,{childList:!0,subtree:!0});const i=r.scrollHeight;r.scrollTop=i}return()=>{n&&n.disconnect()}},cW=(e,t,n,r,i=void 0,o=!1)=>{if(!t&&!i)throw new Error("Key is required for individual node expansion/collapse or a valid treeAction for all nodes");const a=new Map,l=new Map,s=new Set;let c=[...e];function d(e,t){if(s.has(e))throw new Error(`Cycle detected at node: ${e}`);s.add(e);(l.get(e)||[]).forEach(e=>{e.expanded=t,e.expandedAll=t,e.hide=!t,d(e.key,t)}),s.delete(e)}if(n&&!G(n)&&(c=[n,...e]),c.forEach(e=>{a.set(e.key,e),e.parentId&&(l.has(e.parentId)||l.set(e.parentId,[]),l.get(e.parentId).push(e))}),"expandAll"!==i&&"collapseAll"!==i||!t)if("expandAll"!==i&&"collapseAll"!==i||t){if(t){const e=a.get(t);if(e)if(e.expanded=r,e.expandedAll=r,e.hide=!1,r){(l.get(t)||[]).forEach(e=>e.hide=!!o),d(t,!0)}else d(t,!1)}}else{const e="expandAll"===i;c.forEach(t=>{t.expanded=e,t.expandedAll=e,t.hide=!e})}else{const e=a.get(t);if(e){const n="expandAll"===i;e.expanded=n,e.expandedAll=n,e.hide=!1,d(t,n)}}return G(n)?{data:c}:{rootNode:c[0],data:c.slice(1)}};function dW(e,t,n){if(!Array.isArray(e))throw new Error("Input data must be an array of TreeNode objects.");const r=n?["script","element","sharedelement","program_element","stepgroup","file","webservice_collection","workbench_request"]:["pre","post"],i=e=>n?!t||!["module"].includes(e.entityType?.toLowerCase()??"")||(e.totalSubContainerCount??0)>0:e.expandable;return e.map(e=>r.includes(e.entityType?.toLowerCase()??"")?{...e,hide:t}:{...e,expandable:i(e)})}function uW(e,t){if(!e)return null;const n=e.querySelector(".table-fn-scrollable, .table-scrollable");if(!n)return null;const r=t.filter(e=>!e.hide);if(0===r.length)return null;const i=n.scrollTop,o=n.querySelector(".ff-table-tree-fn-row, .ff-table-tree-row"),a=o?.offsetHeight||32,l=Math.floor(i/a),s=r[Math.min(l,r.length-1)];return{key:s?.key||null,searchKey:s?.searchKey||null}}const fW=e=>new Promise(t=>setTimeout(t,e)),hW=(e,t,n)=>{const r=(e,t)=>e.filter(e=>e.searchKey&&e.searchKey.startsWith(t+"/")),i=(e,t)=>{const n=e.filter(e=>e.searchKey&&e.searchKey.startsWith(t.searchKey+"/"));if(0===n.length)return t.key;const r=n[n.length-1];return r?.container?i(e,r):r?.key};if("/Root"!==e.path){const n=i(t,e),o=r(t,e?.searchKey),a=((e,t)=>{const n=t.split("/").filter(e=>""!==e),r={};return n.forEach((t,i)=>{const o="/"+n.slice(0,i+1).join("/"),a=e.find(e=>e.searchKey===o);if(a){r[i]={key:a.key,name:a.name??"",type:a.entityType??"",searchKey:a.searchKey??"",hierarchy:a.hierarchy,isContainer:a.container??!1,hasPrePost:!1};const t=e.filter(e=>e?.searchKey?.startsWith(o+"/")&&e?.searchKey?.split("/").length===o?.split("/").length+1);r[i].hasPrePost=t.some(e=>"PRE"===e.entityType||"POST"===e.entityType)}}),r})(t,e?.searchKey),l=Object.values(a).find(t=>t.key===e.key);if(o.length>0){const e=o.filter(e=>"POST"!==e.entityType&&"PRE"!==e.entityType);return e.length>0?{navigateTo:l?.hasPrePost?e[e.length-1]?.key:n}:{navigateTo:o[o.length-1]?.key}}return{navigateTo:e?.key}}{const n=((e,t)=>e.filter(e=>e.parentId===t.key&&"POST"!==e.entityType&&"PRE"!==e.entityType))(t,e);if(n.length>0){const e=n[n.length-1];if(!1===e?.expandedAll||!1===e?.expanded)return{navigateTo:e?.key};if(!0===e?.expandedAll||!0===e?.expanded){const n=r(t,e?.searchKey);return{navigateTo:n[n.length-1]?.key}}}}return{navigateTo:e?.key}},pW=async(e,{requestDeniedMsg:t,notSupportedMsg:n,micAccessDeniedMsg:r})=>{try{const n=await(navigator?.permissions.query({name:"microphone"}));if("granted"===n?.state)e();else if("prompt"===n?.state)try{const t=await(navigator?.mediaDevices?.getUserMedia({audio:!0}));t?.getTracks()?.forEach(e=>e?.stop()),e()}catch(e){Za.error(t),console.error("getUserMedia error:",e)}else"denied"===n?.state&&Za.error(r)}catch(e){Za.error(n),console.error("Permission query error:",e)}},CW=({buttons:t=[],panelContentMap:r={},headerIconsMap:i={},headerLeadingIconMap:o={},panelheight:s="100%",panelwidth:d="485px"})=>{const u=a({}),[f,p]=c(0),[C,m]=c(null);l(()=>{if(C&&u.current[C]){const e=u.current[C],t=e.getBoundingClientRect(),n=e.parentElement.getBoundingClientRect(),r=t.top-n.top+t.height/2-10;p(r)}},[C]);const g=h(()=>C?[{id:C,label:C,icon:o?.[C]}]:[],[C,o]);return n("div",{className:"ff-debug-buttons-container",children:[e("div",{className:"ff-debug_buttons",children:t.map(t=>e("div",{ref:e=>u.current[t]=e,children:e(U,{onClick:()=>(e=>{m(t=>t===e?null:e)})(t),variant:"custom",className:"ff-debug-button "+(C===t?"active":""),children:t})},t))}),C&&n("div",{className:"ff-debug-panel",style:{height:s,width:d},children:[e("div",{className:"ff-dropdown-notch",style:{top:`${f}px`}}),n("div",{className:"ff-debug-panel__header",children:[e("div",{className:"ff-debug-panel__title",children:e(qs,{tabsData:g,activeTabId:C,variant:"default",noPadding:!0,onTabClick:()=>{}})}),e("div",{className:"ff-debug-panel__header-icons",children:i?.[C]??e(P,{name:"close",className:"ff-debug-panel__close-icon",onClick:()=>m(null)})})]}),e("div",{className:"ff-debug-panel__content",children:e(F,{children:r?.[C]})})]})]})};CW.displayName="DebugToolsPanel";const mW=o(({isRotate:t=!1,modal:r=[],onClick:i=()=>{},tooltip:o={},icons:a=["app_actions_icon","screenshot_icon","video_record_icon","test_gallary_icon","session_setting_icon"],className:l="",disabledIcons:s=[],activeIcon:d=""},u)=>{const[f,h]=c(null),[p,C]=c(null),m=()=>{h(null),C(null)};return e("div",{ref:u,className:`ff-session-manager-container ${t?"vertical":"horizontal"} ${l}`,children:a.map((a,l)=>{const c=s.includes(a);return e(K,{title:o?.[a]||"",placement:t?"right":"bottom",children:n("div",{className:"ff-session-manager-container__icon-wrapper "+(d===a?"active":""),onMouseEnter:()=>((e,t)=>{s.includes(t)||(h(e),r.includes(t)&&C(t))})(l,a),onMouseLeave:m,onClick:()=>((e,t)=>{s.includes(t)||(i(e),r.includes(t)&&C(p===t?null:t))})(l,a),id:a,children:[e(P,{className:"ff-session-manager-container__icon",name:a,width:24,height:24,color:f===l||d===a?"var(--session-control-bg)":"var(--base-bg-color)",disabled:c}),!c&&r.includes(a)&&p===a&&e("div",{className:"ff-session-manager-container__modal"})]})},a)})})});mW.displayName="SessionManager";const gW=({gap:t=8,fontSize:r=12,entityType:i,statusValues:o})=>{const a=e=>{if(Number.isInteger(e))return String(e);const[t,n=""]=String(e).split(".");let r="";return r=1===t?.length?n.slice(0,4).padEnd(4,"0"):2===t?.length?n.slice(0,3).padEnd(3,"0"):n.slice(0,2).padEnd(2,"0"),`${t}.${r}`};return e("div",{className:"ff-statusbadge-container",style:{gap:`${t}px`},children:o.map((t,o)=>{return e(K,{title:`${Op(t?.status)}${i?` ${i}`:""} : ${a(t?.value)}`,zIndex:1e3,children:n("div",{className:"ff-statusbadge-item",children:[e(P,{name:(l=t?.status?.toLowerCase(),"passed"===l?"pass_result_icon":"failed"===l?"fail_result_icon":"warning"===l?"warning_result_icon":"skipped_result_icon")}),e(F,{fontSize:r,children:a(t?.value)})]})},`${o}-${t}`);var l})})},vW=({options:t,selected:r,onChange:i,className:o="",width:a=160,height:l=30,iconName:s="purple_tick_icon"})=>e("div",{className:`context_toggle ${o}`,style:{width:a,height:l},children:t.map(t=>{const o=r===t.value;return n("button",{className:"toggle_item "+(o?"active":""),onClick:()=>i(t.value),type:"button",children:[e(F,{children:t.label}),o&&s&&e(P,{name:s})]},t.value)})}),yW=({value:t,min:r=10,max:i=200,step:o=10,onChange:a,className:l=""})=>n("div",{className:`ff-zoom ${l}`,children:[e("input",{type:"range",min:r,max:i,step:o,value:t,onChange:e=>{const t=Number(e.target.value),n=Math.max(r,Math.min(i,t));a(n)},className:"ff-zoom__slider"}),n("div",{className:"ff-zoom__controls",children:[e(P,{onClick:()=>{const e=Math.max(t-o,r);a(e)},disabled:t<=r,name:"window_minimize",className:"ff-zoom-icon",color:"var(--text-color)",width:10,height:24}),e(F,{fontSize:12,fontWeight:"regular",children:"Zoom"}),e(P,{onClick:()=>{const e=Math.min(t+o,i);a(e)},disabled:t>=i,name:"add_file",className:"ff-zoom-icon",color:"var(--text-color)",width:12,height:24})]})]});var wW="top",bW="bottom",EW="right",MW="left",AW="auto",xW=[wW,bW,EW,MW],LW="start",kW="end",HW="viewport",SW="popper",_W=xW.reduce(function(e,t){return e.concat([t+"-"+LW,t+"-"+kW])},[]),VW=[].concat(xW,[AW]).reduce(function(e,t){return e.concat([t,t+"-"+LW,t+"-"+kW])},[]),OW=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function zW(e){return e?(e.nodeName||"").toLowerCase():null}function NW(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function TW(e){return e instanceof NW(e).Element||e instanceof Element}function IW(e){return e instanceof NW(e).HTMLElement||e instanceof HTMLElement}function DW(e){return"undefined"!=typeof ShadowRoot&&(e instanceof NW(e).ShadowRoot||e instanceof ShadowRoot)}var ZW={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];IW(i)&&zW(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});IW(r)&&zW(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function jW(e){return e.split("-")[0]}var RW=Math.max,BW=Math.min,PW=Math.round;function FW(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function UW(){return!/^((?!chrome|android).)*safari/i.test(FW())}function qW(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&IW(e)&&(i=e.offsetWidth>0&&PW(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&PW(r.height)/e.offsetHeight||1);var a=(TW(e)?NW(e):window).visualViewport,l=!UW()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/i,c=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,u=r.height/o;return{width:d,height:u,top:c,right:s+d,bottom:c+u,left:s,x:s,y:c}}function WW(e){var t=qW(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function QW(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&DW(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function GW(e){return NW(e).getComputedStyle(e)}function KW(e){return["table","td","th"].indexOf(zW(e))>=0}function YW(e){return((TW(e)?e.ownerDocument:e.document)||window.document).documentElement}function XW(e){return"html"===zW(e)?e:e.assignedSlot||e.parentNode||(DW(e)?e.host:null)||YW(e)}function JW(e){return IW(e)&&"fixed"!==GW(e).position?e.offsetParent:null}function $W(e){for(var t=NW(e),n=JW(e);n&&KW(n)&&"static"===GW(n).position;)n=JW(n);return n&&("html"===zW(n)||"body"===zW(n)&&"static"===GW(n).position)?t:n||function(e){var t=/firefox/i.test(FW());if(/Trident/i.test(FW())&&IW(e)&&"fixed"===GW(e).position)return null;var n=XW(e);for(DW(n)&&(n=n.host);IW(n)&&["html","body"].indexOf(zW(n))<0;){var r=GW(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function eQ(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tQ(e,t,n){return RW(e,BW(t,n))}function nQ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function rQ(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var iQ={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=jW(n.placement),s=eQ(l),c=[MW,EW].indexOf(l)>=0?"height":"width";if(o&&a){var d=function(e,t){return nQ("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:rQ(e,xW))}(i.padding,n),u=WW(o),f="y"===s?wW:MW,h="y"===s?bW:EW,p=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],C=a[s]-n.rects.reference[s],m=$W(o),g=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,v=p/2-C/2,y=d[f],w=g-u[c]-d[h],b=g/2-u[c]/2+v,E=tQ(y,b,w),M=s;n.modifiersData[r]=((t={})[M]=E,t.centerOffset=E-b,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&QW(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oQ(e){return e.split("-")[1]}var aQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lQ(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=e.isFixed,f=a.x,h=void 0===f?0:f,p=a.y,C=void 0===p?0:p,m="function"==typeof d?d({x:h,y:C}):{x:h,y:C};h=m.x,C=m.y;var g=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),y=MW,w=wW,b=window;if(c){var E=$W(n),M="clientHeight",A="clientWidth";if(E===NW(n)&&"static"!==GW(E=YW(n)).position&&"absolute"===l&&(M="scrollHeight",A="scrollWidth"),i===wW||(i===MW||i===EW)&&o===kW)w=bW,C-=(u&&E===b&&b.visualViewport?b.visualViewport.height:E[M])-r.height,C*=s?1:-1;if(i===MW||(i===wW||i===bW)&&o===kW)y=EW,h-=(u&&E===b&&b.visualViewport?b.visualViewport.width:E[A])-r.width,h*=s?1:-1}var x,L=Object.assign({position:l},c&&aQ),k=!0===d?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:PW(n*i)/i||0,y:PW(r*i)/i||0}}({x:h,y:C},NW(n)):{x:h,y:C};return h=k.x,C=k.y,s?Object.assign({},L,((x={})[w]=v?"0":"",x[y]=g?"0":"",x.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+C+"px)":"translate3d("+h+"px, "+C+"px, 0)",x)):Object.assign({},L,((t={})[w]=v?C+"px":"",t[y]=g?h+"px":"",t.transform="",t))}var sQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,l=n.roundOffsets,s=void 0===l||l,c={placement:jW(t.placement),variation:oQ(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,lQ(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,lQ(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},cQ={passive:!0};var dQ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,l=void 0===a||a,s=NW(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,cQ)}),l&&s.addEventListener("resize",n.update,cQ),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,cQ)}),l&&s.removeEventListener("resize",n.update,cQ)}},data:{}},uQ={left:"right",right:"left",bottom:"top",top:"bottom"};function fQ(e){return e.replace(/left|right|bottom|top/g,function(e){return uQ[e]})}var hQ={start:"end",end:"start"};function pQ(e){return e.replace(/start|end/g,function(e){return hQ[e]})}function CQ(e){var t=NW(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(e){return qW(YW(e)).left+CQ(e).scrollLeft}function gQ(e){var t=GW(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function vQ(e){return["html","body","#document"].indexOf(zW(e))>=0?e.ownerDocument.body:IW(e)&&gQ(e)?e:vQ(XW(e))}function yQ(e,t){var n;void 0===t&&(t=[]);var r=vQ(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=NW(r),a=i?[o].concat(o.visualViewport||[],gQ(r)?r:[]):r,l=t.concat(a);return i?l:l.concat(yQ(XW(a)))}function wQ(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function bQ(e,t,n){return t===HW?wQ(function(e,t){var n=NW(e),r=YW(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;var c=UW();(c||!c&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:l+mQ(e),y:s}}(e,n)):TW(t)?function(e,t){var n=qW(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):wQ(function(e){var t,n=YW(e),r=CQ(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=RW(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=RW(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+mQ(e),s=-r.scrollTop;return"rtl"===GW(i||n).direction&&(l+=RW(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:l,y:s}}(YW(e)))}function EQ(e,t,n,r){var i="clippingParents"===t?function(e){var t=yQ(XW(e)),n=["absolute","fixed"].indexOf(GW(e).position)>=0&&IW(e)?$W(e):e;return TW(n)?t.filter(function(e){return TW(e)&&QW(e,n)&&"body"!==zW(e)}):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],l=o.reduce(function(t,n){var i=bQ(e,n,r);return t.top=RW(i.top,t.top),t.right=BW(i.right,t.right),t.bottom=BW(i.bottom,t.bottom),t.left=RW(i.left,t.left),t},bQ(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function MQ(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?jW(i):null,a=i?oQ(i):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case wW:t={x:l,y:n.y-r.height};break;case bW:t={x:l,y:n.y+n.height};break;case EW:t={x:n.x+n.width,y:s};break;case MW:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=o?eQ(o):null;if(null!=c){var d="y"===c?"height":"width";switch(a){case LW:t[c]=t[c]-(n[d]/2-r[d]/2);break;case kW:t[c]=t[c]+(n[d]/2-r[d]/2)}}return t}function AQ(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,l=n.boundary,s=void 0===l?"clippingParents":l,c=n.rootBoundary,d=void 0===c?HW:c,u=n.elementContext,f=void 0===u?SW:u,h=n.altBoundary,p=void 0!==h&&h,C=n.padding,m=void 0===C?0:C,g=nQ("number"!=typeof m?m:rQ(m,xW)),v=f===SW?"reference":SW,y=e.rects.popper,w=e.elements[p?v:f],b=EQ(TW(w)?w:w.contextElement||YW(e.elements.popper),s,d,a),E=qW(e.elements.reference),M=MQ({reference:E,element:y,placement:i}),A=wQ(Object.assign({},y,M)),x=f===SW?A:E,L={top:b.top-x.top+g.top,bottom:x.bottom-b.bottom+g.bottom,left:b.left-x.left+g.left,right:x.right-b.right+g.right},k=e.modifiersData.offset;if(f===SW&&k){var H=k[i];Object.keys(L).forEach(function(e){var t=[EW,bW].indexOf(e)>=0?1:-1,n=[wW,bW].indexOf(e)>=0?"y":"x";L[e]+=H[n]*t})}return L}function xQ(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?VW:s,d=oQ(r),u=d?l?_W:_W.filter(function(e){return oQ(e)===d}):xW,f=u.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=u);var h=f.reduce(function(t,n){return t[n]=AQ(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[jW(n)],t},{});return Object.keys(h).sort(function(e,t){return h[e]-h[t]})}var LQ={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,l=void 0===a||a,s=n.fallbackPlacements,c=n.padding,d=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,C=n.allowedAutoPlacements,m=t.options.placement,g=jW(m),v=s||(g===m||!p?[fQ(m)]:function(e){if(jW(e)===AW)return[];var t=fQ(e);return[pQ(e),t,pQ(t)]}(m)),y=[m].concat(v).reduce(function(e,n){return e.concat(jW(n)===AW?xQ(t,{placement:n,boundary:d,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:C}):n)},[]),w=t.rects.reference,b=t.rects.popper,E=new Map,M=!0,A=y[0],x=0;x<y.length;x++){var L=y[x],k=jW(L),H=oQ(L)===LW,S=[wW,bW].indexOf(k)>=0,_=S?"width":"height",V=AQ(t,{placement:L,boundary:d,rootBoundary:u,altBoundary:f,padding:c}),O=S?H?EW:MW:H?bW:wW;w[_]>b[_]&&(O=fQ(O));var z=fQ(O),N=[];if(o&&N.push(V[k]<=0),l&&N.push(V[O]<=0,V[z]<=0),N.every(function(e){return e})){A=L,M=!1;break}E.set(L,N)}if(M)for(var T=function(e){var t=y.find(function(t){var n=E.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return A=t,"break"},I=p?3:1;I>0;I--){if("break"===T(I))break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kQ(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HQ(e){return[wW,EW,bW,MW].some(function(t){return e[t]>=0})}var SQ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=VW.reduce(function(e,n){return e[n]=function(e,t,n){var r=jW(e),i=[MW,wW].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*i,[MW,EW].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,o),e},{}),l=a[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var _Q={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,l=void 0!==a&&a,s=n.boundary,c=n.rootBoundary,d=n.altBoundary,u=n.padding,f=n.tether,h=void 0===f||f,p=n.tetherOffset,C=void 0===p?0:p,m=AQ(t,{boundary:s,rootBoundary:c,padding:u,altBoundary:d}),g=jW(t.placement),v=oQ(t.placement),y=!v,w=eQ(g),b="x"===w?"y":"x",E=t.modifiersData.popperOffsets,M=t.rects.reference,A=t.rects.popper,x="function"==typeof C?C(Object.assign({},t.rects,{placement:t.placement})):C,L="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(E){if(o){var S,_="y"===w?wW:MW,V="y"===w?bW:EW,O="y"===w?"height":"width",z=E[w],N=z+m[_],T=z-m[V],I=h?-A[O]/2:0,D=v===LW?M[O]:A[O],Z=v===LW?-A[O]:-M[O],j=t.elements.arrow,R=h&&j?WW(j):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},P=B[_],F=B[V],U=tQ(0,M[O],R[O]),q=y?M[O]/2-I-U-P-L.mainAxis:D-U-P-L.mainAxis,W=y?-M[O]/2+I+U+F+L.mainAxis:Z+U+F+L.mainAxis,Q=t.elements.arrow&&$W(t.elements.arrow),G=Q?"y"===w?Q.clientTop||0:Q.clientLeft||0:0,K=null!=(S=null==k?void 0:k[w])?S:0,Y=z+W-K,X=tQ(h?BW(N,z+q-K-G):N,z,h?RW(T,Y):T);E[w]=X,H[w]=X-z}if(l){var J,$="x"===w?wW:MW,ee="x"===w?bW:EW,te=E[b],ne="y"===b?"height":"width",re=te+m[$],ie=te-m[ee],oe=-1!==[wW,MW].indexOf(g),ae=null!=(J=null==k?void 0:k[b])?J:0,le=oe?re:te-M[ne]-A[ne]-ae+L.altAxis,se=oe?te+M[ne]+A[ne]-ae-L.altAxis:ie,ce=h&&oe?function(e,t,n){var r=tQ(e,t,n);return r>n?n:r}(le,te,se):tQ(h?le:re,te,h?se:ie);E[b]=ce,H[b]=ce-te}t.modifiersData[r]=H}},requiresIfExists:["offset"]};function VQ(e,t,n){void 0===n&&(n=!1);var r,i,o=IW(t),a=IW(t)&&function(e){var t=e.getBoundingClientRect(),n=PW(t.width)/e.offsetWidth||1,r=PW(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=YW(t),s=qW(e,a,n),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(o||!o&&!n)&&(("body"!==zW(t)||gQ(l))&&(c=(r=t)!==NW(r)&&IW(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:CQ(r)),IW(t)?((d=qW(t,!0)).x+=t.clientLeft,d.y+=t.clientTop):l&&(d.x=mQ(l))),{x:s.left+c.scrollLeft-d.x,y:s.top+c.scrollTop-d.y,width:s.width,height:s.height}}function OQ(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}function zQ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var NQ={placement:"bottom",modifiers:[],strategy:"absolute"};function TQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function IQ(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?NQ:i;return function(e,t,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign({},NQ,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],l=!1,s={state:i,setOptions:function(n){var l="function"==typeof n?n(i.options):n;c(),i.options=Object.assign({},o,i.options,l),i.scrollParents={reference:TW(e)?yQ(e):e.contextElement?yQ(e.contextElement):[],popper:yQ(t)};var d,u,f=function(e){var t=OQ(e);return OW.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((d=[].concat(r,i.options.modifiers),u=d.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(u).map(function(e){return u[e]})));return i.orderedModifiers=f.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var l=o({state:i,name:t,instance:s,options:r}),c=function(){};a.push(l||c)}}),s.update()},forceUpdate:function(){if(!l){var e=i.elements,t=e.reference,n=e.popper;if(TQ(t,n)){i.rects={reference:VQ(t,$W(n),"fixed"===i.options.strategy),popper:WW(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],a=o.fn,c=o.options,d=void 0===c?{}:c,u=o.name;"function"==typeof a&&(i=a({state:i,options:d,name:u,instance:s})||i)}else i.reset=!1,r=-1}}},update:zQ(function(){return new Promise(function(e){s.forceUpdate(),e(i)})}),destroy:function(){c(),l=!0}};if(!TQ(e,t))return s;function c(){a.forEach(function(e){return e()}),a=[]}return s.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),s}}var DQ=IQ({defaultModifiers:[dQ,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=MQ({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},sQ,ZW,SQ,LQ,_Q,iQ,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=AQ(t,{elementContext:"reference"}),l=AQ(t,{altBoundary:!0}),s=kQ(a,r),c=kQ(l,i,o),d=HQ(s),u=HQ(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]}),ZQ="tippy-content",jQ="tippy-arrow",RQ="tippy-svg-arrow",BQ={passive:!0,capture:!0},PQ=function(){return document.body};function FQ(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function UQ(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function qQ(e,t){return"function"==typeof e?e.apply(void 0,t):e}function WQ(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)};var n}function QQ(e,t){var n=Object.assign({},e);return t.forEach(function(e){delete n[e]}),n}function GQ(e){return[].concat(e)}function KQ(e,t){-1===e.indexOf(t)&&e.push(t)}function YQ(e){return[].slice.call(e)}function XQ(e){return Object.keys(e).reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})}function JQ(){return document.createElement("div")}function $Q(e){return["Element","Fragment"].some(function(t){return UQ(e,t)})}function eG(e){return $Q(e)?[e]:function(e){return UQ(e,"NodeList")}(e)?YQ(e):Array.isArray(e)?e:YQ(document.querySelectorAll(e))}function tG(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function nG(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function rG(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[r](t,n)})}function iG(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var oG={isTouch:!1},aG=0;function lG(){oG.isTouch||(oG.isTouch=!0,window.performance&&document.addEventListener("mousemove",sG))}function sG(){var e=performance.now();e-aG<20&&(oG.isTouch=!1,document.removeEventListener("mousemove",sG)),aG=e}function cG(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var dG,uG=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function fG(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function hG(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function pG(e){return hG("\n %ctippy.js\n\n %c"+hG(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function CG(e){return[pG(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function mG(e,t){var n;e&&!dG.has(t)&&(dG.add(t),(n=console).warn.apply(n,CG(t)))}function gG(e,t){var n;e&&!dG.has(t)&&(dG.add(t),(n=console).error.apply(n,CG(t)))}"production"!==process.env.NODE_ENV&&(dG=new Set);var vG={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},yG=Object.assign({appendTo:PQ,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},vG,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wG=Object.keys(yG);function bG(e){var t=(e.plugins||[]).reduce(function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=yG[i])?r:o);return t},{});return Object.assign({},e,t)}function EG(e,t){var n=Object.assign({},t,{content:qQ(t.content,[e])},t.ignoreAttributes?{}:function(e,t){var n=(t?Object.keys(bG(Object.assign({},yG,{plugins:t}))):wG).reduce(function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t},{});return n}(e,t.plugins));return n.aria=Object.assign({},yG.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function MG(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach(function(e){var n=!function(e,t){return{}.hasOwnProperty.call(e,t)}(QQ(yG,Object.keys(vG)),e);n&&(n=0===t.filter(function(t){return t.name===e}).length),mG(n,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}function AG(e,t){e.innerHTML=t}function xG(e){var t=JQ();return!0===e?t.className=jQ:(t.className=RQ,$Q(e)?t.appendChild(e):AG(t,e)),t}function LG(e,t){$Q(t.content)?(AG(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?AG(e,t.content):e.textContent=t.content)}function kG(e){var t=e.firstElementChild,n=YQ(t.children);return{box:t,content:n.find(function(e){return e.classList.contains(ZQ)}),arrow:n.find(function(e){return e.classList.contains(jQ)||e.classList.contains(RQ)}),backdrop:n.find(function(e){return e.classList.contains("tippy-backdrop")})}}function HG(e){var t=JQ(),n=JQ();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=JQ();function i(n,r){var i=kG(t),o=i.box,a=i.content,l=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||LG(a,e.props),r.arrow?l?n.arrow!==r.arrow&&(o.removeChild(l),o.appendChild(xG(r.arrow))):o.appendChild(xG(r.arrow)):l&&o.removeChild(l)}return r.className=ZQ,r.setAttribute("data-state","hidden"),LG(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}HG.$$tippy=!0;var SG=1,_G=[],VG=[];function OG(e,t){var n,r,i,o,a,l,s,c,d=EG(e,Object.assign({},yG,bG(XQ(t)))),u=!1,f=!1,h=!1,p=!1,C=[],m=WQ(Q,d.interactiveDebounce),g=SG++,v=(c=d.plugins).filter(function(e,t){return c.indexOf(e)===t}),y={id:g,reference:e,popper:JQ(),popperInstance:null,props:d,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("setProps"));if(y.state.isDestroyed)return;z("onBeforeUpdate",[y,t]),q();var n=y.props,r=EG(e,Object.assign({},n,XQ(t),{ignoreAttributes:!0}));y.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(I(),m=WQ(Q,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?GQ(n.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):r.triggerTarget&&e.removeAttribute("aria-expanded");T(),O(),E&&E(n,r);y.popperInstance&&(X(),$().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));z("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("show"));var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=oG.isTouch&&!y.props.touch,i=FQ(y.props.duration,0,yG.duration);if(e||t||n||r)return;if(H().hasAttribute("disabled"))return;if(z("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,k()&&(b.style.visibility="visible");O(),R(),y.state.isMounted||(b.style.transition="none");if(k()){var o=_();tG([o.box,o.content],0)}l=function(){var e;if(y.state.isVisible&&!p){if(p=!0,b.offsetHeight,b.style.transition=y.props.moveTransition,k()&&y.props.animation){var t=_(),n=t.box,r=t.content;tG([n,r],i),nG([n,r],"visible")}N(),T(),KQ(VG,y),null==(e=y.popperInstance)||e.forceUpdate(),z("onMount",[y]),y.props.animation&&k()&&function(e,t){P(e,t)}(i,function(){y.state.isShown=!0,z("onShown",[y])})}},function(){var e,t=y.props.appendTo,n=H();e=y.props.interactive&&t===PQ||"parent"===t?n.parentNode:qQ(t,[n]);e.contains(b)||e.appendChild(b);y.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&mG(y.props.interactive&&t===yG.appendTo&&n.nextElementSibling!==b,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("hide"));var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=FQ(y.props.duration,1,yG.duration);if(e||t||n)return;if(z("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,u=!1,k()&&(b.style.visibility="hidden");if(I(),B(),O(!0),k()){var i=_(),o=i.box,a=i.content;y.props.animation&&(tG([o,a],r),nG([o,a],"hidden"))}N(),T(),y.props.animation?k()&&function(e,t){P(e,function(){!y.state.isVisible&&b.parentNode&&b.parentNode.contains(b)&&t()})}(r,y.unmount):y.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("hideWithInteractivity"));S().addEventListener("mousemove",m),KQ(_G,m),m(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("unmount"));y.state.isVisible&&y.hide();if(!y.state.isMounted)return;J(),$().forEach(function(e){e._tippy.unmount()}),b.parentNode&&b.parentNode.removeChild(b);VG=VG.filter(function(e){return e!==y}),y.state.isMounted=!1,z("onHidden",[y])},destroy:function(){"production"!==process.env.NODE_ENV&&mG(y.state.isDestroyed,fG("destroy"));if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),q(),delete e._tippy,y.state.isDestroyed=!0,z("onDestroy",[y])}};if(!d.render)return"production"!==process.env.NODE_ENV&&gG(!0,"render() function has not been supplied."),y;var w=d.render(y),b=w.popper,E=w.onUpdate;b.setAttribute("data-tippy-root",""),b.id="tippy-"+y.id,y.popper=b,e._tippy=y,b._tippy=y;var M=v.map(function(e){return e.fn(y)}),A=e.hasAttribute("aria-expanded");return U(),T(),O(),z("onCreate",[y]),d.showOnCreate&&ee(),b.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),b.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",m)}),y;function x(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===x()[0]}function k(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function H(){return s||e}function S(){var e,t,n=H().parentNode;return n?null!=(t=GQ(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function _(){return kG(b)}function V(e){return y.state.isMounted&&!y.state.isVisible||oG.isTouch||o&&"focus"===o.type?0:FQ(y.props.delay,e?0:1,yG.delay)}function O(e){void 0===e&&(e=!1),b.style.pointerEvents=y.props.interactive&&!e?"":"none",b.style.zIndex=""+y.props.zIndex}function z(e,t,n){var r;(void 0===n&&(n=!0),M.forEach(function(n){n[e]&&n[e].apply(n,t)}),n)&&(r=y.props)[e].apply(r,t)}function N(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=b.id;GQ(y.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}})}}function T(){!A&&y.props.aria.expanded&&GQ(y.props.triggerTarget||e).forEach(function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===H()?"true":"false"):e.removeAttribute("aria-expanded")})}function I(){S().removeEventListener("mousemove",m),_G=_G.filter(function(e){return e!==m})}function D(t){if(!oG.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!iG(b,n)){if(GQ(y.props.triggerTarget||e).some(function(e){return iG(e,n)})){if(oG.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else z("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),f=!0,setTimeout(function(){f=!1}),y.state.isMounted||B())}}}function Z(){h=!0}function j(){h=!1}function R(){var e=S();e.addEventListener("mousedown",D,!0),e.addEventListener("touchend",D,BQ),e.addEventListener("touchstart",j,BQ),e.addEventListener("touchmove",Z,BQ)}function B(){var e=S();e.removeEventListener("mousedown",D,!0),e.removeEventListener("touchend",D,BQ),e.removeEventListener("touchstart",j,BQ),e.removeEventListener("touchmove",Z,BQ)}function P(e,t){var n=_().box;function r(e){e.target===n&&(rG(n,"remove",r),t())}if(0===e)return t();rG(n,"remove",a),rG(n,"add",r),a=r}function F(t,n,r){void 0===r&&(r=!1),GQ(y.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,n,r),C.push({node:e,eventType:t,handler:n,options:r})})}function U(){var e;L()&&(F("touchstart",W,{passive:!0}),F("touchend",G,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(F(e,W),e){case"mouseenter":F("mouseleave",G);break;case"focus":F(uG?"focusout":"blur",K);break;case"focusin":F("focusout",K)}})}function q(){C.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),C=[]}function W(e){var t,n=!1;if(y.state.isEnabled&&!Y(e)&&!f){var r="focus"===(null==(t=o)?void 0:t.type);o=e,s=e.currentTarget,T(),!y.state.isVisible&&UQ(e,"MouseEvent")&&_G.forEach(function(t){return t(e)}),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||u)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(u=!n),n&&!r&&te(e)}}function Q(e){var t=e.target,n=H().contains(t)||b.contains(t);if("mousemove"!==e.type||!n){var r=$().concat(b).map(function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:d}:null}).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every(function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=i.placement.split("-")[0],l=i.modifiersData.offset;if(!l)return!0;var s="bottom"===a?l.top.y:0,c="top"===a?l.bottom.y:0,d="right"===a?l.left.x:0,u="left"===a?l.right.x:0,f=t.top-r+s>o,h=r-t.bottom-c>o,p=t.left-n+d>o,C=n-t.right-u>o;return f||h||p||C})})(r,e)&&(I(),te(e))}}function G(e){Y(e)||y.props.trigger.indexOf("click")>=0&&u||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function K(e){y.props.trigger.indexOf("focusin")<0&&e.target!==H()||y.props.interactive&&e.relatedTarget&&b.contains(e.relatedTarget)||te(e)}function Y(e){return!!oG.isTouch&&L()!==e.type.indexOf("touch")>=0}function X(){J();var t=y.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=k()?kG(b).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||H()}:e,d={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=_().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)}),t.attributes.popper={}}}},u=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},d];k()&&s&&u.push({name:"arrow",options:{element:s,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),y.popperInstance=DQ(c,b,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:u}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function $(){return YQ(b.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&z("onTrigger",[y,e]),R();var t=V(!0),r=x(),i=r[0],o=r[1];oG.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout(function(){y.show()},t):y.show()}function te(e){if(y.clearDelayTimeouts(),z("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&u)){var t=V(!1);t?r=setTimeout(function(){y.state.isVisible&&y.hide()},t):i=requestAnimationFrame(function(){y.hide()})}}else B()}}function zG(e,t){void 0===t&&(t={});var n=yG.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;gG(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),gG(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),MG(t,n)),document.addEventListener("touchstart",lG,BQ),window.addEventListener("blur",cG);var r=Object.assign({},t,{plugins:n}),i=eG(e);if("production"!==process.env.NODE_ENV){var o=$Q(r.content),a=i.length>1;mG(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var l=i.reduce(function(e,t){var n=t&&OG(t,r);return n&&e.push(n),e},[]);return $Q(e)?l[0]:l}zG.defaultProps=yG,zG.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&MG(e,[]),Object.keys(e).forEach(function(t){yG[t]=e[t]})},zG.currentInput=oG,Object.assign({},ZW,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});var NG={mouseover:"mouseenter",focusin:"focus",click:"click"};function TG(e,t){"production"!==process.env.NODE_ENV&&gG(!(t&&t.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var n=[],r=[],i=!1,o=t.target,a=QQ(t,["target"]),l=Object.assign({},a,{trigger:"manual",touch:!1}),s=Object.assign({touch:yG.touch},a,{showOnCreate:!0}),c=zG(e,l);function d(e){if(e.target&&!i){var n=e.target.closest(o);if(n){var a=n.getAttribute("data-tippy-trigger")||t.trigger||yG.trigger;if(!n._tippy&&!("touchstart"===e.type&&"boolean"==typeof s.touch||"touchstart"!==e.type&&a.indexOf(NG[e.type])<0)){var l=zG(n,s);l&&(r=r.concat(l))}}}}function u(e,t,r,i){void 0===i&&(i=!1),e.addEventListener(t,r,i),n.push({node:e,eventType:t,handler:r,options:i})}return GQ(c).forEach(function(e){var t=e.destroy,o=e.enable,a=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&r.forEach(function(e){e.destroy()}),r=[],n.forEach(function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)}),n=[],t()},e.enable=function(){o(),r.forEach(function(e){return e.enable()}),i=!1},e.disable=function(){a(),r.forEach(function(e){return e.disable()}),i=!0},function(e){var t=e.reference;u(t,"touchstart",d,BQ),u(t,"mouseover",d),u(t,"focusin",d),u(t,"click",d)}(e)}),c}zG.setDefaultProps({render:HG});const IG=new Set(["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"]),DG=()=>(l(()=>{const e=TG(document.body,{target:"[data-tooltip], [data-tooltip-id]",appendTo:()=>document.body,arrow:!1,placement:"bottom",maxWidth:"90vw",animation:!0,interactive:!0,theme:"ff-global-tooltip",content(e){const t=document.createElement("div"),n=e.getAttribute("data-tooltip-id");if(n){const e=document.getElementById(n);if(e)return t.innerHTML=e.innerHTML,t}const r=e.getAttribute("data-tooltip")||"";return r?(r.startsWith("<")&&r.endsWith(">")?t.innerHTML=r:(t.style.whiteSpace="pre-wrap",t.style.wordBreak="break-word",t.textContent=r),t):""},onShow(e){const{reference:t}=e;if(!t.hasAttribute("data-tooltip")&&!t.hasAttribute("data-tooltip-id"))return!1;const n=e.reference.hasAttribute("data-tooltip-interactive"),r=e.reference.getAttribute("data-tooltip-placement"),i=r?.trim().toLowerCase(),o=i&&IG.has(i)?i:"bottom";e.setProps({interactive:n,placement:o})}});return()=>{Array.isArray(e)?e.forEach(e=>e.destroy()):e.destroy()}},[]),null),ZG=new Map,jG=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e){const e=ZG.get(t.target);e&&e()}})}),RG=e=>{const[t,n]=c(0);return u(()=>{const t=e.current;if(!t)return;const r=((e,t)=>(ZG.set(e,t),jG.observe(e),()=>{jG.unobserve(e),ZG.delete(e)}))(t,()=>n(e=>e+1));return r},[e]),t},BG=g(({children:t,className:n,lines:r=1,interactive:i=!1,placement:o="bottom"})=>{const l=a(null),s=RG(l);return u(()=>{const e=l.current;if(!e)return;const t=o?.toLowerCase(),n=r>1?e.scrollHeight>e.clientHeight+.5:e.scrollWidth>e.clientWidth+.5;if(i&&e.setAttribute("data-tooltip-interactive","true"),t&&e.setAttribute("data-tooltip-placement",t),n){const t=e.textContent?.trim()||"";t&&e.setAttribute("data-tooltip",t)}else e.removeAttribute("data-tooltip")},[s,t,i,r,o]),e("div",{ref:l,className:n?`ff-ellipsis ${n}`:"ff-ellipsis",style:{display:r>1?"-webkit-box":"block",WebkitLineClamp:r>1?r:void 0,WebkitBoxOrient:r>1?"vertical":void 0,whiteSpace:1===r?"nowrap":"normal"},children:t})});BG.displayName="AutoTruncateText";var PG=function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof module&&module.exports)module.exports=e();else if("object"==typeof window)return e()}(function(){t.sessions=new Map,t.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){let e=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),n=33;return window.navigator.userAgent.match("Linux")&&(n=35),e>=26&&e<=n||t.extension.isInstalled()}return!0};var e={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return null!==document.querySelector("#janus-extension-installed")},getScreen:function(e){let t=window.setTimeout(function(){let t=new Error("NavigatorUserMediaError");return t.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',e(t)},1e3);this.cache[t]=e,window.postMessage({type:"janusGetScreen",id:t},"*")},init:function(){let e={};this.cache=e,window.addEventListener("message",function(t){if(t.origin==window.location.origin)if("janusGotScreen"==t.data.type&&e[t.data.id]){let n=e[t.data.id];if(delete e[t.data.id],""===t.data.sourceId){let e=new Error("NavigatorUserMediaError");e.name="You cancelled the request for permission, giving up...",n(e)}else n(null,t.data.sourceId)}else"janusGetScreenPending"==t.data.type&&window.clearTimeout(t.data.id)})}};function t(e){if((e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.destroyed="function"==typeof e.destroyed?e.destroyed:t.noop,!t.initDone)return e.error("Library not initialized"),{};if(!t.isWebrtcSupported())return e.error("WebRTC not supported by this browser"),{};if(t.log("Library initialized: "+t.initDone),!e.server)return e.error("Invalid server url"),{};let n=!1,r=null,i={},o=null,a=null,l=0,s=e.server;t.isArray(s)?(t.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=e.server,t.debug(a)):0===s.indexOf("ws")?(n=!0,t.log("Using WebSockets to contact Janus: "+s)):(n=!1,t.log("Using REST API to contact Janus: "+s));let c=e.iceServers||[{urls:"stun:stun.l.google.com:19302"}],d=e.iceTransportPolicy,u=e.bundlePolicy,f=!1;void 0!==e.withCredentials&&null!==e.withCredentials&&(f=!0===e.withCredentials);let h=10;void 0!==e.max_poll_events&&null!==e.max_poll_events&&(h=e.max_poll_events),h<1&&(h=1);let p=null;void 0!==e.token&&null!==e.token&&(p=e.token);let C=null;void 0!==e.apisecret&&null!==e.apisecret&&(C=e.apisecret),this.destroyOnUnload=!0,void 0!==e.destroyOnUnload&&null!==e.destroyOnUnload&&(this.destroyOnUnload=!0===e.destroyOnUnload);let m=25e3;void 0!==e.keepAlivePeriod&&null!==e.keepAlivePeriod&&(m=e.keepAlivePeriod),isNaN(m)&&(m=25e3);let g=6e4;function v(e){let t={high:9e5,medium:3e5,low:1e5};return null!=e&&(e.high&&(t.high=e.high),e.medium&&(t.medium=e.medium),e.low&&(t.low=e.low)),t}void 0!==e.longPollTimeout&&null!==e.longPollTimeout&&(g=e.longPollTimeout),isNaN(g)&&(g=6e4);let y=!1,w=null,b=new Map,E=this,M=0,A=new Map;function x(){if(null==w)return;if(t.debug("Long poll..."),!y)return void t.warn("Is the server down? (connected=false)");let n=s+"/"+w+"?rid="+(new Date).getTime();h&&(n=n+"&maxev="+h),p&&(n=n+"&token="+encodeURIComponent(p)),C&&(n=n+"&apisecret="+encodeURIComponent(C)),t.httpAPICall(n,{verb:"GET",withCredentials:f,success:L,timeout:g,error:function(n,r){if(t.error(n+":",r),M++,M>3)return y=!1,void e.error("Lost connection to the server (is it down?)");x()}})}function L(e,i){if(M=0,n||null==w||!0===i||x(),n||!t.isArray(e))if("keepalive"!==e.janus){if("server_info"===e.janus){t.debug("Got info on the Janus instance"),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("ack"===e.janus){t.debug("Got an ack on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("success"===e.janus){t.debug("Got a success on session "+w),t.debug(e);const n=e.transaction;if(n){const t=A.get(n);t&&t(e),A.delete(n)}return}if("trickle"===e.janus){const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");let i=e.candidate;t.debug("Got a trickled candidate on session "+w),t.debug(i);let o=r.webrtcStuff;o.pc&&o.remoteSdp?(t.debug("Adding remote candidate:",i),i&&!0!==i.completed?o.pc.addIceCandidate(i):o.pc.addIceCandidate(t.endOfCandidates)):(t.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),o.candidates||(o.candidates=[]),o.candidates.push(i),t.debug(o.candidates))}else{if("webrtcup"===e.janus){t.debug("Got a webrtcup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);return r?void r.webrtcState(!0):void t.debug("This handle is not attached to this session")}if("hangup"===e.janus){t.debug("Got a hangup event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.webrtcState(!1,e.reason),r.hangup()}else if("detached"===e.janus){t.debug("Got a detached event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return;r.ondetached(),r.detach()}else if("media"===e.janus){t.debug("Got a media event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.mediaState(e.type,e.receiving,e.mid)}else if("slowlink"===e.janus){t.debug("Got a slowlink event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");const r=b.get(n);if(!r)return void t.debug("This handle is not attached to this session");r.slowLink(e.uplink,e.lost,e.mid)}else{if("error"===e.janus){t.error("Ooops: "+e.error.code+" "+e.error.reason),t.debug(e);let n=e.transaction;if(n){let t=A.get(n);t&&t(e),A.delete(n)}return}if("event"===e.janus){t.debug("Got a plugin event on session "+w),t.debug(e);const n=e.sender;if(!n)return void t.warn("Missing sender...");let r=e.plugindata;if(!r)return void t.warn("Missing plugindata...");t.debug(" -- Event is coming from "+n+" ("+r.plugin+")");let i=r.data;t.debug(i);const o=b.get(n);if(!o)return void t.warn("This handle is not attached to this session");let a=e.jsep;a&&(t.debug("Handling SDP as well..."),t.debug(a));let l=o.onmessage;l?(t.debug("Notifying application..."),l(i,a)):t.debug("No provided notification callback")}else{if("timeout"===e.janus)return t.error("Timeout on session "+w),t.debug(e),void(n&&r.close(3504,"Gateway timeout"));t.warn("Unknown message/event '"+e.janus+"' on session "+w),t.debug(e)}}}}else t.vdebug("Got a keepalive on session "+w);else for(let t=0;t<e.length;t++)L(e[t],!0)}function k(){if(!s||!n||!y)return;o=setTimeout(k,m);let e={janus:"keepalive",session_id:w,transaction:t.randomString(12)};p&&(e.token=p),C&&(e.apisecret=C),r.send(JSON.stringify(e))}function H(c){let d=t.randomString(12),u={janus:"create",transaction:d};if(c.reconnect&&(y=!1,u.janus="claim",u.session_id=w,r&&(r.onopen=null,r.onerror=null,r.onclose=null,o&&(clearTimeout(o),o=null))),p&&(u.token=p),C&&(u.apisecret=C),!s&&t.isArray(a)&&(s=a[l],0===s.indexOf("ws")?(n=!0,t.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(n=!1,t.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),n){r=t.newWebSocket(s,"janus-protocol"),i={error:function(){if(t.error("Error connecting to the Janus WebSockets server... "+s),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));c.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){A.set(d,function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);o=setTimeout(k,m),y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),c.success()}),r.send(JSON.stringify(u))},message:function(e){L(JSON.parse(e.data))},close:function(){s&&y&&(y=!1,e.error("Lost connection to the server (is it down?)"))}};for(let e in i)r.addEventListener(e,i[e])}else t.httpAPICall(s,{verb:"POST",withCredentials:f,body:u,success:function(e){if(t.debug(e),"success"!==e.janus)return t.error("Ooops: "+e.error.code+" "+e.error.reason),void c.error(e.error.reason);y=!0,w=e.session_id?e.session_id:e.data.id,c.reconnect?t.log("Claimed session: "+w):t.log("Created session: "+w),t.sessions.set(w,E),x(),c.success()},error:function(e,n){if(t.error(e+":",n),t.isArray(a)&&!c.reconnect)return l++,l===a.length?void c.error("Error connecting to any of the provided Janus servers: Is the server down?"):(s=null,void setTimeout(function(){H(c)},200));""===n?c.error(e+": Is the server down?"):n&&n.error?c.error(e+": "+n.error.message):c.error(e+": "+n)}})}function S(e,i){if((i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i.error("Invalid handle");let a=i.message,l=i.jsep,c=t.randomString(12),d={janus:"message",body:a,transaction:c};if(o.token&&(d.token=o.token),C&&(d.apisecret=C),l){d.jsep={type:l.type,sdp:l.sdp},l.e2ee&&(d.jsep.e2ee=!0),"hml"!==l.rid_order&&"lmh"!==l.rid_order||(d.jsep.rid_order=l.rid_order),l.force_relay&&(d.jsep.force_relay=!0);let e=null,t=o.webrtcStuff;if(t.pc){let n=t.pc.getTransceivers();if(n&&n.length>0)for(let t in n){let r=n[t];if(r&&r.sender&&r.sender.track&&"video"===r.sender.track.kind){let n=r.sender.getParameters();n&&n.encodings&&1===n.encodings.length&&n.encodings[0]&&n.encodings[0].scalabilityMode&&(e||(e=[]),e.push({mindex:parseInt(t),mid:r.mid,svc:n.encodings[0].scalabilityMode}))}}}e&&(d.jsep.svc=e)}if(t.debug("Sending message to plugin (handle="+e+"):"),t.debug(d),n)return d.session_id=w,d.handle_id=e,A.set(c,function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))}),void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:d,success:function(e){if(t.debug("Message sent!"),t.debug(e),"success"===e.janus){let n=e.plugindata;if(!n)return t.warn("Request succeeded, but missing plugindata..."),void i.success();t.log("Synchronous transaction successful ("+n.plugin+")");let r=n.data;return t.debug(r),void i.success(r)}"ack"===e.janus?i.success():e.error?(t.error("Ooops: "+e.error.code+" "+e.error.reason),i.error(e.error.code+" "+e.error.reason)):(t.error("Unknown error"),i.error("Unknown error"))},error:function(e,n){t.error(e+":",n),i.error(e+": "+n)}})}function _(e,i){if(!y)return void t.warn("Is the server down? (connected=false)");let o=b.get(e);if(!o||!o.webrtcStuff)return void t.warn("Invalid handle");let a={janus:"trickle",candidate:i,transaction:t.randomString(12)};if(o.token&&(a.token=o.token),C&&(a.apisecret=C),t.vdebug("Sending trickle candidate (handle="+e+"):"),t.vdebug(a),n)return a.session_id=w,a.handle_id=e,void r.send(JSON.stringify(a));t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:a,success:function(e){t.vdebug("Candidate sent!"),t.vdebug(e),"ack"===e.janus||t.error("Ooops: "+e.error.code+" "+e.error.reason)},error:function(e,n){t.error(e+":",n)}})}function V(e,n,r,i,o){let a=b.get(e);if(!a||!a.webrtcStuff)return void t.warn("Invalid handle");let l=a.webrtcStuff;if(!l.pc)return void t.warn("Invalid PeerConnection");let s=function(e){t.log("Received state change on data channel:",e);let n=e.target.label,r=e.target.protocol,i=l.dataChannel[n]?l.dataChannel[n].readyState:"null";if(t.log("State change on <"+n+"> data channel: "+i),"open"===i){if(l.dataChannel[n].pending&&l.dataChannel[n].pending.length>0){t.log("Sending pending messages on <"+n+">:",l.dataChannel[n].pending.length);for(let e of l.dataChannel[n].pending)t.log("Sending data on data channel <"+n+">"),t.debug(e),l.dataChannel[n].send(e);l.dataChannel[n].pending=[]}a.ondataopen(n,r)}};if(i)l.dataChannel[n]=i;else{let e=l.dataChannelOptions;r&&(e.protocol=r),l.dataChannel[n]=l.pc.createDataChannel(n,e)}l.dataChannel[n].onmessage=function(e){t.log("Received message on data channel:",e);let n=e.target.label;a.ondata(e.data,n)},l.dataChannel[n].onopen=s,l.dataChannel[n].onclose=s,l.dataChannel[n].onerror=function(e){t.error("Got error on data channel:",e)},l.dataChannel[n].pending=[],o&&l.dataChannel[n].pending.push(o)}function O(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff,o=n.text||n.data;if(!o)return t.warn("Invalid data"),void n.error("Invalid data");let a=n.label?n.label:t.dataChanDefaultLabel;return i.dataChannel[a]?"open"!==i.dataChannel[a].readyState?(i.dataChannel[a].pending.push(o),void n.success()):(t.log("Sending data on data channel <"+a+">"),t.debug(o),i.dataChannel[a].send(o),void n.success()):(V(e,a,n.protocol,!1,o,n.protocol),void n.success())}function z(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let i=r.webrtcStuff;if(!i.dtmfSender){if(i.pc){let e=i.pc.getSenders().find(function(e){return e.track&&"audio"===e.track.kind});if(!e)return t.warn("Invalid DTMF configuration (no audio track)"),void n.error("Invalid DTMF configuration (no audio track)");i.dtmfSender=e.dtmf,i.dtmfSender&&(t.log("Created DTMF Sender"),i.dtmfSender.ontonechange=function(e){t.debug("Sent DTMF tone: "+e.tone)})}if(!i.dtmfSender)return t.warn("Invalid DTMF configuration"),void n.error("Invalid DTMF configuration")}let o=n.dtmf;if(!o)return t.warn("Invalid DTMF parameters"),void n.error("Invalid DTMF parameters");let a=o.tones;if(!a)return t.warn("Invalid DTMF string"),void n.error("Invalid DTMF string");let l="number"==typeof o.duration?o.duration:500,s="number"==typeof o.gap?o.gap:50;t.debug("Sending DTMF string "+a+" (duration "+l+"ms, gap "+s+"ms)"),i.dtmfSender.insertDTMF(a,l,s),n.success()}function N(e,i){(i=i||{}).success="function"==typeof i.success?i.success:t.noop,i.error="function"==typeof i.error?i.error:t.noop;let o=!0===i.noRequest;t.log("Destroying handle "+e+" (only-locally="+o+")"),G(e);let a=b.get(e);if(!a||a.detached)return b.delete(e),void i.success();if(a.detached=!0,o)return b.delete(e),void i.success();if(!y)return t.warn("Is the server down? (connected=false)"),void i.error("Is the server down? (connected=false)");let l={janus:"detach",transaction:t.randomString(12)};if(a.token&&(l.token=a.token),C&&(l.apisecret=C),n)return l.session_id=w,l.handle_id=e,r.send(JSON.stringify(l)),b.delete(e),void i.success();t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:l,success:function(n){t.log("Destroyed handle:"),t.debug(n),"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),b.delete(e),i.success()},error:function(n,r){t.error(n+":",r),b.delete(e),i.success()}})}function T(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(i.pc)return;let o={iceServers:c,iceTransportPolicy:d,bundlePolicy:u,sdpSemantics:"unified-plan"},a=!1;if(n.tracks)for(let e of n.tracks)if(e.transforms&&(e.transforms.sender||e.transforms.receiver)){a=!0;break}n.externalEncryption&&(a=!0,i.externalEncryption=!0),RTCRtpSender&&(RTCRtpSender.prototype.createEncodedStreams||RTCRtpSender.prototype.createEncodedAudioStreams&&RTCRtpSender.prototype.createEncodedVideoStreams)&&a&&(i.insertableStreams=!0,o.forceEncodedAudioInsertableStreams=!0,o.forceEncodedVideoInsertableStreams=!0,o.encodedInsertableStreams=!0),t.log("Creating PeerConnection"),i.pc=new RTCPeerConnection(o),t.debug(i.pc),i.pc.getStats&&(i.volume={},i.bitrate.value="0 kbits/sec"),t.log("Preparing local SDP and gathering candidates (trickle="+i.trickle+")"),i.pc.onconnectionstatechange=function(){i.pc&&r.connectionState(i.pc.connectionState)},i.pc.oniceconnectionstatechange=function(){i.pc&&r.iceState(i.pc.iceConnectionState)},i.pc.onicecandidate=function(r){if(!r.candidate||r.candidate.candidate&&r.candidate.candidate.indexOf("endOfCandidates")>0)t.log("End of candidates."),i.iceDone=!0,!0===i.trickle?_(e,{completed:!0}):function(e,n){n=n||{},n.success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)return void t.warn("Invalid handle, not sending anything");let i=r.webrtcStuff;if(t.log("Sending offer/answer SDP..."),!i.mySdp)return void t.warn("Local SDP instance is invalid, not sending anything...");i.mySdp={type:i.pc.localDescription.type,sdp:i.pc.localDescription.sdp},!1===i.trickle&&(i.mySdp.trickle=!1);t.debug(n),i.sdpSent=!0,n.success(i.mySdp)}(e,n);else{let t={candidate:r.candidate.candidate,sdpMid:r.candidate.sdpMid,sdpMLineIndex:r.candidate.sdpMLineIndex};!0===i.trickle&&_(e,t)}},i.pc.ontrack=function(e){if(t.log("Handling Remote Track",e),!e.streams)return;if(!e.track)return;let n=e.transceiver?e.transceiver.mid:e.track.id;try{e.transceiver&&e.transceiver.mid&&e.track.id&&(r.mids||(r.mids={}),r.mids[e.track.id]=e.transceiver.mid),r.onremotetrack(e.track,n,!0,{reason:"created"})}catch(e){t.error("Error calling onremotetrack",e)}if(e.track.onended)return;let o=null;t.log("Adding onended callback to track:",e.track),e.track.onended=function(n){t.log("Remote track removed:",n),clearTimeout(o);let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"ended"})}catch(e){t.error("Error calling onremotetrack on removal",e)}delete r.mids[e.track.id]},e.track.onmute=function(n){t.log("Remote track muted:",n),o||(o=setTimeout(function(){t.log("Removing remote track");let a=i.pc?i.pc.getTransceivers():null,l=a?a.find(e=>e.receiver.track===n.target):null,s=l?l.mid:n.target.id;s===n.target.id&&r.mids&&r.mids[e.track.id]&&(s=r.mids[e.track.id]);try{r.onremotetrack(n.target,s,!1,{reason:"mute"})}catch(e){t.error("Error calling onremotetrack on mute",e)}o=null},2520))},e.track.onunmute=function(e){if(t.log("Remote track flowing again:",e),null!=o)clearTimeout(o),o=null;else try{let t=i.pc?i.pc.getTransceivers():null,n=t?t.find(t=>t.receiver.track===e.target):null,o=n?n.mid:e.target.id;r.onremotetrack(e.target,o,!0,{reason:"unmute"})}catch(e){t.error("Error calling onremotetrack on unmute",e)}}}}async function I(e,n,r){(r=r||{}).success="function"==typeof r.success?r.success:t.noop,r.error="function"==typeof r.error?r.error:Q;let i=r.jsep;if(n&&i)return t.error("Provided a JSEP to a createOffer"),void r.error("Provided a JSEP to a createOffer");if(!(n||i&&i.type&&i.sdp))return t.error("A valid JSEP is required for createAnswer"),void r.error("A valid JSEP is required for createAnswer");if(r.media&&!r.tracks){if(r.tracks=t.mediaToTracks(r.media),!0===r.simulcast||!0===r.simulcast2||r.svc)for(let e of r.tracks)if("video"===e.type){!0===r.simulcast||!0===r.simulcast2?e.simulcast=!0:r.svc&&(e.svc=r.svc);break}t.warn("Deprecated media object passed, use tracks instead. Automatically translated to:",r.tracks)}if(r.tracks&&!Array.isArray(r.tracks))return t.error("Tracks must be an array"),void r.error("Tracks must be an array");let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void r.error("Invalid handle");let a=o.webrtcStuff;var l;a.trickle=(l=r.trickle,t.debug("isTrickleEnabled:",l),!1!==l);try{if(T(e,r),n&&await j(e,r),i){if(await a.pc.setRemoteDescription(i),t.log("Remote description accepted!"),a.remoteSdp=i.sdp,a.candidates&&a.candidates.length>0){for(let e=0;e<a.candidates.length;e++){let n=a.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?a.pc.addIceCandidate(n):a.pc.addIceCandidate(t.endOfCandidates)}a.candidates=[]}await j(e,r);let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating answer (iceDone="+i.iceDone+")");let o=await i.pc.createAnswer();t.debug(o);let a={type:"answer",sdp:o.sdp};if(n.customizeSdp(a),o.sdp=a.sdp,t.log("Setting local description"),i.mySdp={type:"answer",sdp:o.sdp},await i.pc.setLocalDescription(o),!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(o.e2ee=!0);return o}(e,r);r.success(n)}else{let n=await async function(e,n){n=n||{},n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;t.log("Creating offer (iceDone="+i.iceDone+")");let o={},a=!0===n.iceRestart;a&&(o.iceRestart=!0);t.debug(o);let l=await i.pc.createOffer(o);t.debug(l);let s={type:"offer",sdp:l.sdp};if(n.customizeSdp(s),l.sdp=s.sdp,t.log("Setting local description"),i.mySdp={type:"offer",sdp:l.sdp},await i.pc.setLocalDescription(l),i.mediaConstraints=o,!i.iceDone&&!i.trickle)return t.log("Waiting for all candidates..."),null;(i.insertableStreams||i.externalEncryption)&&(l.e2ee=!0);return l}(e,r);r.success(n)}}catch(e){t.error(e),r.error(e)}}function D(e,n){(n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:Q,n.customizeSdp="function"==typeof n.customizeSdp?n.customizeSdp:t.noop;let r=n.jsep,i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),void n.error("Invalid handle");let o=i.webrtcStuff;if(r){if(!o.pc)return t.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),void n.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");n.customizeSdp(r),o.pc.setRemoteDescription(r).then(function(){if(t.log("Remote description accepted!"),o.remoteSdp=r.sdp,o.candidates&&o.candidates.length>0){for(let e=0;e<o.candidates.length;e++){let n=o.candidates[e];t.debug("Adding remote candidate:",n),n&&!0!==n.completed?o.pc.addIceCandidate(n):o.pc.addIceCandidate(t.endOfCandidates)}o.candidates=[]}n.success()},n.error)}else n.error("Invalid JSEP")}async function Z(e,n){if((n=n||{}).success="function"==typeof n.success?n.success:t.noop,n.error="function"==typeof n.error?n.error:t.noop,n.tracks&&!Array.isArray(n.tracks))return t.error("Tracks must be an array"),void n.error("Tracks must be an array");for(let e of n.tracks)(e.add||!e.replace&&!e.remove)&&(e.replace=!0);try{await j(e,n),n.success()}catch(e){t.error(e),n.error(e)}}async function j(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)throw t.warn("Invalid handle, not sending anything"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)throw t.warn("Invalid PeerConnection"),"Invalid PeerConnection";let o=n.tracks;if(!o||!Array.isArray(o)||0===o.length)return;let a=!1,l={};for(let e of o){if(delete e.gumGroup,!e.type||!["audio","video"].includes(e.type))continue;if(!e.capture||e.capture instanceof MediaStreamTrack)continue;let t=e.group?e.group:"default";l[t]||(l[t]={}),l[t][e.type]||(e.gumGroup=t,l[t][e.type]=e)}let s=Object.keys(l);for(let e of s){let t=l[e];t.audio&&t.video||(t.audio&&delete t.audio.gumGroup,t.video&&delete t.video.gumGroup,delete l[e])}let c=!!n.jsep;for(let n of o){if(!n.type){t.warn("Missing track type:",n);continue}if("data"===n.type){if(i.pc.ondatachannel){t.warn("Data channel exists already, not creating another one");continue}t.log("Creating default data channel"),V(e,t.dataChanDefaultLabel,null,!1),i.pc.ondatachannel=function(n){t.log("Data channel created by Janus:",n),V(e,n.channel.label,n.channel.protocol,n.channel)};continue}if(void 0!==n.add&&null!==n.add||void 0!==n.remove&&null!==n.remove||void 0!==n.replace&&null!==n.replace||(n.add=!0),n.add&&n.remove||n.add&&n.remove&&n.replace){t.warn("Conflicting actions for track, ignoring:",n);continue}n.add&&n.replace?(t.warn("Both add and replace provided, falling back to replace:",n),delete n.add):n.remove&&n.replace&&(t.warn("Both remove and replace provided, falling back to remove:",n),delete n.replace);let o=n.type;"screen"===n.type&&(o="video");let s=null,d=null;if(n.mid?s=i.pc.getTransceivers().find(e=>e.mid===n.mid&&e.receiver.track.kind===o):n.add||(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o)),n.replace||n.remove){if(!s){t.warn("Couldn't find a transceiver for track:",n);continue}if(!s.sender){t.warn("No sender in the transceiver for track:",n);continue}d=s.sender}if(c&&!s&&(s=i.pc.getTransceivers().find(e=>e.receiver.track.kind===o),!s)){t.warn("Couldn't find a transceiver for track:",n);continue}let u=null,f=null;if((n.remove||n.replace)&&(t.log("Removing track from PeerConnection",n),f=d.track?d.track.id:null,await d.replaceTrack(null),f&&i.myStream)){let e=null;if("audio"===o&&i.myStream.getAudioTracks()&&i.myStream.getAudioTracks().length)for(let n of i.myStream.getAudioTracks())n.id===f&&(e=n,t.log("Removing audio track:",e));else if("video"===o&&i.myStream.getVideoTracks()&&i.myStream.getVideoTracks().length)for(let n of i.myStream.getVideoTracks())n.id===f&&(e=n,t.log("Removing video track:",e));if(e){try{i.myStream.removeTrack(e),r.onlocaltrack(e,!1)}catch(e){t.error("Error calling onlocaltrack on removal for renegotiation",e)}if(!0!==e.dontStop)try{e.stop()}catch(e){}}}if(n.capture){if(n.gumGroup&&l[n.gumGroup]&&l[n.gumGroup].stream){let e=l[n.gumGroup].stream;u="audio"===n.type?e.getAudioTracks()[0]:e.getVideoTracks()[0],delete l[n.gumGroup].stream,delete l[n.gumGroup],delete n.gumGroup}else if(n.capture instanceof MediaStreamTrack)u=n.capture;else{a||(a=!0,r.consentDialog(!0));let e=t.trackConstraints(n),i=null;if("audio"===n.type||"video"===n.type){if(n.gumGroup){let r="audio"===n.type?"video":"audio";if(l[n.gumGroup]&&l[n.gumGroup][r]){let i=l[n.gumGroup][r],o=t.trackConstraints(i);e[r]=o[r]}}i=await navigator.mediaDevices.getUserMedia(e),n.gumGroup&&e.audio&&e.video&&(l[n.gumGroup].stream=i,delete n.gumGroup)}else i=await navigator.mediaDevices.getDisplayMedia(e);u="audio"===n.type?i.getAudioTracks()[0]:i.getVideoTracks()[0]}if(n.replace){await d.replaceTrack(u);let e="sendrecv";!1!==n.recv&&"inactive"!==s.direction&&"sendonly"!==s.direction||(e="sendonly"),s.setDirection?s.setDirection(e):s.direction=e}else{if(i.myStream||(i.myStream=new MediaStream),"audio"===o||!n.simulcast&&!n.svc)d=i.pc.addTrack(u,i.myStream),s=i.pc.getTransceivers().find(e=>e.sender===d);else if(n.simulcast){t.log("Enabling rid-based simulcasting:",u);let e=v(n.simulcastMaxBitrates);s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:n.sendEncodings||[{rid:"h",active:!0,scalabilityMode:"L1T2",maxBitrate:e.high},{rid:"m",active:!0,scalabilityMode:"L1T2",maxBitrate:e.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,scalabilityMode:"L1T2",maxBitrate:e.low,scaleResolutionDownBy:4}]})}else t.log("Enabling SVC ("+n.svc+"):",u),s=i.pc.addTransceiver(u,{direction:"sendrecv",streams:[i.myStream],sendEncodings:[{scalabilityMode:n.svc}]});if(d||(d=s?s.sender:null),n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length){if(s)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(n.bitrate)if(n.simulcast||n.svc)t.warn("Ignoring bitrate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.bitrate)||n.bitrate<0)t.warn("Ignoring invalid bitrate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxBitrate=n.bitrate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring bitrate for track:",n)}if("video"===o&&n.framerate)if(n.simulcast||n.svc)t.warn("Ignoring framerate for simulcast/SVC track, use sendEncodings for that");else if(isNaN(n.framerate)||n.framerate<0)t.warn("Ignoring invalid framerate for track:",n);else if(d){let e=d.getParameters();e&&e.encodings&&0!==e.encodings.length?(e.encodings[0].maxFramerate=n.framerate,await d.setParameters(e)):t.warn("No encodings in the sender parameters, ignoring framerate for track:",n)}if(n.transforms){if(d&&n.transforms.sender){let e=null;RTCRtpSender.prototype.createEncodedStreams?e=d.createEncodedStreams():(RTCRtpSender.prototype.createAudioEncodedStreams||RTCRtpSender.prototype.createEncodedVideoStreams)&&("audio"===o?e=d.createEncodedAudioStreams():"video"===o&&(e=d.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.sender).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.sender).pipeTo(e.writable))}if(s&&s.receiver&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}}u&&!0===n.dontStop&&(u.dontStop=!0)}else if(n.recv&&(s||(s=i.pc.addTransceiver(o)),s)){if(n.codec)if("firefox"===t.webRTCAdapter.browserDetails.browser)t.warn("setCodecPreferences not supported in Firefox, ignoring codec for track:",n);else if("string"!=typeof n.codec)t.warn("Invalid codec value, ignoring for track:",n);else{let e=o+"/"+n.codec.toLowerCase(),r=RTCRtpReceiver.getCapabilities(o).codecs.filter(function(t){return t.mimeType.toLowerCase()===e});if(r&&0!==r.length)try{s.setCodecPreferences(r)}catch(e){t.warn("Failed enforcing codec for this "+o+" track:",e)}else t.warn("Codec not supported in this browser for this track, ignoring:",n)}if(s.receiver&&n.transforms&&n.transforms.receiver){let e=null;RTCRtpReceiver.prototype.createEncodedStreams?e=s.receiver.createEncodedStreams():(RTCRtpReceiver.prototype.createAudioEncodedStreams||RTCRtpReceiver.prototype.createEncodedVideoStreams)&&("audio"===o?e=s.receiver.createEncodedAudioStreams():"video"===o&&(e=s.receiver.createEncodedVideoStreams())),e&&(e.readableStream&&e.writableStream?e.readableStream.pipeThrough(n.transforms.receiver).pipeTo(e.writableStream):e.readable&&e.writable&&e.readable.pipeThrough(n.transforms.receiver).pipeTo(e.writable))}}if(u){i.myStream.addTrack(u),u.onended=function(e){t.log("Local track removed:",e);try{r.onlocaltrack(e.target,!1)}catch(e){t.error("Error calling onlocaltrack following end",e)}};try{r.onlocaltrack(u,!0)}catch(e){t.error("Error calling onlocaltrack for track add",e)}}if(s){let e=s.direction,r=null,i=u&&s.sender.track,o=!1!==n.recv&&s.receiver.track;i&&o?r="sendrecv":i&&!o?r="sendonly":!i&&o?r="recvonly":i||o||(r="inactive"),r&&r!==e&&(t.warn("Changing direction of transceiver to "+r+" (was "+e+")",n),s.setDirection?s.setDirection(r):s.direction=r)}}a&&r.consentDialog(!1)}function R(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.sender&&e.sender.track&&(t={mid:e.mid},t.type=e.sender.track.kind,t.id=e.sender.track.id,t.label=e.sender.track.label),t&&i.push(t)}return i}function B(e){let n=b.get(e);if(!n||!n.webrtcStuff)return t.warn("Invalid handle"),null;let r=n.webrtcStuff;if(!r.pc)return t.warn("Invalid PeerConnection"),null;let i=[],o=r.pc.getTransceivers();for(let e of o){let t=null;e.receiver&&e.receiver.track&&(t={mid:e.mid},t.type=e.receiver.track.kind,t.id=e.receiver.track.id,t.label=e.receiver.track.label),t&&i.push(t)}return i}function P(e,n,r,i){i="function"==typeof i?i:t.noop;let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),void i(0);let a=r?"remote":"local",l=o.webrtcStuff;if(l.volume[a]||(l.volume[a]={value:0}),l.pc&&l.pc.getStats&&("chrome"===t.webRTCAdapter.browserDetails.browser||"safari"===t.webRTCAdapter.browserDetails.browser)){let e=l.pc;if(n){let o=l.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!o)return t.warn("No audio transceiver with mid "+n),void i(0);if(r&&!o.receiver)return t.warn("Remote transceiver track unavailable"),void i(0);if(!r&&!o.sender)return t.warn("Local transceiver track unavailable"),void i(0);e=r?o.receiver:o.sender}return e.getStats().then(function(e){e.forEach(function(e){e&&"audio"===e.kind&&(r&&!e.remoteSource||!r&&"media-source"!==e.type||i(e.audioLevel?e.audioLevel:0))})}),l.volume[a].value}return t.warn("Getting the "+a+" volume unsupported by browser"),void i(0)}function F(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return t.warn("Invalid handle"),!0;let o=i.webrtcStuff;if(!o.pc)return t.warn("Invalid PeerConnection"),!0;if(!o.myStream)return t.warn("Invalid local MediaStream"),!0;if(r){if(!o.myStream.getVideoTracks()||0===o.myStream.getVideoTracks().length)return t.warn("No video track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No video sender with mid "+n),!0):(t.warn("No video transceiver with mid "+n),!0)}return!o.myStream.getVideoTracks()[0].enabled}if(!o.myStream.getAudioTracks()||0===o.myStream.getAudioTracks().length)return t.warn("No audio track"),!0;if(n){let e=o.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);return e?e.sender&&e.sender.track?!e.sender.track.enabled:(t.warn("No audio sender with mid "+n),!0):(t.warn("No audio transceiver with mid "+n),!0)}return!o.myStream.getAudioTracks()[0].enabled}function U(e,n,r,i){let o=b.get(e);if(!o||!o.webrtcStuff)return t.warn("Invalid handle"),!1;let a=o.webrtcStuff;if(!a.pc)return t.warn("Invalid PeerConnection"),!1;if(!a.myStream)return t.warn("Invalid local MediaStream"),!1;if(r){if(!a.myStream.getVideoTracks()||0===a.myStream.getVideoTracks().length)return t.warn("No video track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!e)return t.warn("No video transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No video sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getVideoTracks())e.enabled=!i}else{if(!a.myStream.getAudioTracks()||0===a.myStream.getAudioTracks().length)return t.warn("No audio track"),!1;if(n){let e=a.pc.getTransceivers().find(e=>e.mid===n&&"audio"===e.receiver.track.kind);if(!e)return t.warn("No audio transceiver with mid "+n),!1;if(!e.sender||!e.sender.track)return t.warn("No audio sender with mid "+n),!1;e.sender.track.enabled=!i}else for(const e of a.myStream.getAudioTracks())e.enabled=!i}return!0}function q(e,n){let r=b.get(e);if(!r||!r.webrtcStuff)return t.warn("Invalid handle"),"Invalid handle";let i=r.webrtcStuff;if(!i.pc)return"Invalid PeerConnection";if(i.pc.getStats){let e=i.pc,r=n||"default";if(n){let r=i.pc.getTransceivers().find(e=>e.mid===n&&"video"===e.receiver.track.kind);if(!r)return t.warn("No video transceiver with mid "+n),"No video transceiver with mid "+n;if(!r.receiver)return t.warn("No video receiver with mid "+n),"No video receiver with mid "+n;e=r.receiver}return i.bitrate[r]||(i.bitrate[r]={timer:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,value:"0 kbits/sec"}),i.bitrate[r].timer?i.bitrate[r].value:(t.log("Starting bitrate timer"+(n?" for mid "+n:"")+" (via getStats)"),i.bitrate[r].timer=setInterval(function(){e.getStats().then(function(e){e.forEach(function(e){if(!e)return;let n=!1;if(("video"===e.mediaType||"video"===e.kind||e.id.toLowerCase().indexOf("video")>-1)&&"inbound-rtp"===e.type&&e.id.indexOf("rtcp")<0?n=!0:"ssrc"!=e.type||!e.bytesReceived||"VP8"!==e.googCodecName&&""!==e.googCodecName||(n=!0),n)if(i.bitrate[r].bsnow=e.bytesReceived,i.bitrate[r].tsnow=e.timestamp,null===i.bitrate[r].bsbefore||null===i.bitrate[r].tsbefore)i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow;else{let e=i.bitrate[r].tsnow-i.bitrate[r].tsbefore;"safari"===t.webRTCAdapter.browserDetails.browser&&(e/=1e3);let n=Math.round(8*(i.bitrate[r].bsnow-i.bitrate[r].bsbefore)/e);"safari"===t.webRTCAdapter.browserDetails.browser&&(n=parseInt(n/1e3)),i.bitrate[r].value=n+" kbits/sec",i.bitrate[r].bsbefore=i.bitrate[r].bsnow,i.bitrate[r].tsbefore=i.bitrate[r].tsnow}})})},1e3),"0 kbits/sec")}return t.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser"}function W(e,n,r){let i=b.get(e);if(!i||!i.webrtcStuff)return void t.warn("Invalid handle");let o=i.webrtcStuff;if(!o.pc)return void t.warn("Invalid PeerConnection");let a=o.pc.getTransceivers().find(e=>e.mid===n);if(!a)return void t.warn("No transceiver with mid",n);if(!a.sender)return void t.warn("No sender for transceiver with mid",n);let l=a.sender.getParameters();l&&l.encodings&&0!==l.encodings.length?l.encodings.length>1?t.warn("Ignoring bitrate for simulcast track, use sendEncodings for that"):isNaN(r)||r<0?t.warn("Invalid bitrate (must be a positive integer)"):(l.encodings[0].maxBitrate=r,a.sender.setParameters(l)):t.warn("No parameters encodings")}function Q(e){t.error("WebRTC error:",e)}function G(e,i){t.log("Cleaning WebRTC stuff");let o=b.get(e);if(!o)return;let a=o.webrtcStuff;if(a){if(!0===i){let i={janus:"hangup",transaction:t.randomString(12)};o.token&&(i.token=o.token),C&&(i.apisecret=C),t.debug("Sending hangup request (handle="+e+"):"),t.debug(i),n?(i.session_id=w,i.handle_id=e,r.send(JSON.stringify(i))):t.httpAPICall(s+"/"+w+"/"+e,{verb:"POST",withCredentials:f,body:i})}a.volume&&(a.volume.local&&a.volume.local.timer&&clearInterval(a.volume.local.timer),a.volume.remote&&a.volume.remote.timer&&clearInterval(a.volume.remote.timer));for(let e in a.bitrate)a.bitrate[e].timer&&clearInterval(a.bitrate[e].timer);a.bitrate={},!a.streamExternal&&a.myStream&&(t.log("Stopping local stream tracks"),t.stopAllTracks(a.myStream)),a.streamExternal=!1,a.myStream=null;try{a.pc.close()}catch(e){}a.pc=null,a.candidates=null,a.mySdp=null,a.remoteSdp=null,a.iceDone=!1,a.dataChannel={},a.dtmfSender=null,a.insertableStreams=!1,a.externalEncryption=!1}o.oncleanup()}H(e),this.getServer=function(){return s},this.isConnected=function(){return y},this.reconnect=function(e){(e=e||{}).success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.reconnect=!0,H(e)},this.getSessionId=function(){return w},this.getInfo=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,t.log("Getting info on Janus instance"),!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=t.randomString(12),o={janus:"info",transaction:i};p&&(o.token=p);C&&(o.apisecret=C);if(n)return A.set(i,function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)}),void r.send(JSON.stringify(o));t.httpAPICall(s,{verb:"POST",withCredentials:f,body:o,success:function(n){t.log("Server info:"),t.debug(n),"server_info"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),e.success(n)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)},this.destroy=function(a){!function(a){a=a||{},a.success="function"==typeof a.success?a.success:t.noop,a.error="function"==typeof a.error?a.error:t.noop;let l=!0===a.unload,c=!0;void 0!==a.notifyDestroyed&&null!==a.notifyDestroyed&&(c=!0===a.notifyDestroyed);let d=!0===a.cleanupHandles;if(t.log("Destroying session "+w+" (unload="+l+")"),!w)return t.warn("No session to destroy"),a.success(),void(c&&e.destroyed());if(d)for(const e of b.keys())N(e,{noRequest:!0});if(!y)return t.warn("Is the server down? (connected=false)"),w=null,void a.success();let u={janus:"destroy",transaction:t.randomString(12)};p&&(u.token=p);C&&(u.apisecret=C);if(l)return n?(r.onclose=null,r.close(),r=null):navigator.sendBeacon(s+"/"+w,JSON.stringify(u)),t.log("Destroyed session:"),w=null,y=!1,a.success(),void(c&&e.destroyed());if(n){u.session_id=w;let t=function(){for(let e in i)r.removeEventListener(e,i[e]);r.removeEventListener("message",n),r.removeEventListener("error",l),o&&clearTimeout(o),r.close()},n=function(n){let r=JSON.parse(n.data);r.session_id==u.session_id&&r.transaction==u.transaction&&(t(),a.success(),c&&e.destroyed())},l=function(){t(),a.error("Failed to destroy the server: Is the server down?"),c&&e.destroyed()};return r.addEventListener("message",n),r.addEventListener("error",l),void(1===r.readyState?r.send(JSON.stringify(u)):l())}t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:u,success:function(n){t.log("Destroyed session:"),t.debug(n),w=null,y=!1,"success"!==n.janus&&t.error("Ooops: "+n.error.code+" "+n.error.reason),a.success(),c&&e.destroyed()},error:function(n,r){t.error(n+":",r),w=null,y=!1,a.success(),c&&e.destroyed()}})}(a)},this.attach=function(e){!function(e){if(e=e||{},e.success="function"==typeof e.success?e.success:t.noop,e.error="function"==typeof e.error?e.error:t.noop,e.dataChannelOptions=e.dataChannelOptions||{ordered:!0},e.consentDialog="function"==typeof e.consentDialog?e.consentDialog:t.noop,e.connectionState="function"==typeof e.connectionState?e.connectionState:t.noop,e.iceState="function"==typeof e.iceState?e.iceState:t.noop,e.mediaState="function"==typeof e.mediaState?e.mediaState:t.noop,e.webrtcState="function"==typeof e.webrtcState?e.webrtcState:t.noop,e.slowLink="function"==typeof e.slowLink?e.slowLink:t.noop,e.onmessage="function"==typeof e.onmessage?e.onmessage:t.noop,e.onlocaltrack="function"==typeof e.onlocaltrack?e.onlocaltrack:t.noop,e.onremotetrack="function"==typeof e.onremotetrack?e.onremotetrack:t.noop,e.ondata="function"==typeof e.ondata?e.ondata:t.noop,e.ondataopen="function"==typeof e.ondataopen?e.ondataopen:t.noop,e.oncleanup="function"==typeof e.oncleanup?e.oncleanup:t.noop,e.ondetached="function"==typeof e.ondetached?e.ondetached:t.noop,!y)return t.warn("Is the server down? (connected=false)"),void e.error("Is the server down? (connected=false)");let i=e.plugin;if(!i)return t.error("Invalid plugin"),void e.error("Invalid plugin");let o=e.opaqueId,a=e.loopIndex,l=e.token?e.token:p,c=t.randomString(12),d={janus:"attach",plugin:i,opaque_id:o,loop_index:a,transaction:c};l&&(d.token=l);C&&(d.apisecret=C);if(n)return A.set(c,function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)}),d.session_id=w,void r.send(JSON.stringify(d));t.httpAPICall(s+"/"+w,{verb:"POST",withCredentials:f,body:d,success:function(n){if(t.debug(n),"success"!==n.janus)return t.error("Ooops: "+n.error.code+" "+n.error.reason),void e.error("Ooops: "+n.error.code+" "+n.error.reason);let r=n.data.id;t.log("Created handle: "+r);let o={session:E,plugin:i,id:r,token:l,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,mySdp:null,mediaConstraints:null,pc:null,dataChannelOptions:e.dataChannelOptions,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,bitrate:{}},getId:function(){return r},getPlugin:function(){return i},getVolume:function(e,t){return P(r,e,!0,t)},getRemoteVolume:function(e,t){return P(r,e,!0,t)},getLocalVolume:function(e,t){return P(r,e,!1,t)},isAudioMuted:function(e){return F(r,e,!1)},muteAudio:function(e){return U(r,e,!1,!0)},unmuteAudio:function(e){return U(r,e,!1,!1)},isVideoMuted:function(e){return F(r,e,!0)},muteVideo:function(e){return U(r,e,!0,!0)},unmuteVideo:function(e){return U(r,e,!0,!1)},getBitrate:function(e){return q(r,e)},setMaxBitrate:function(e,t){return W(r,e,t)},send:function(e){S(r,e)},data:function(e){O(r,e)},dtmf:function(e){z(r,e)},consentDialog:e.consentDialog,connectionState:e.connectionState,iceState:e.iceState,mediaState:e.mediaState,webrtcState:e.webrtcState,slowLink:e.slowLink,onmessage:e.onmessage,createOffer:function(e){I(r,!0,e)},createAnswer:function(e){I(r,!1,e)},handleRemoteJsep:function(e){D(r,e)},replaceTracks:function(e){Z(r,e)},getLocalTracks:function(){return R(r)},getRemoteTracks:function(){return B(r)},onlocaltrack:e.onlocaltrack,onremotetrack:e.onremotetrack,ondata:e.ondata,ondataopen:e.ondataopen,oncleanup:e.oncleanup,ondetached:e.ondetached,hangup:function(e){G(r,!0===e)},detach:function(e){N(r,e)}};b.set(r,o),e.success(o)},error:function(n,r){t.error(n+":",r),""===r?e.error(n+": Is the server down?"):e.error(n+": "+r)}})}(e)}}return t.useDefaultDependencies=function(n){let r=n&&n.fetch||fetch,i=n&&n.Promise||Promise,o=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new o(e,t)},extension:n&&n.extension||e,isArray:function(e){return Array.isArray(e)},webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let o={method:n.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};"POST"===n.verb&&(o.headers["Content-Type"]="application/json"),void 0!==n.withCredentials&&(o.credentials=!0===n.withCredentials?"include":n.withCredentials?n.withCredentials:"omit"),n.body&&(o.body=JSON.stringify(n.body));let a=r(e,o).catch(function(e){return i.reject({message:"Probably a network error, is the server down?",error:e})});if(n.timeout){let e=new i(function(e,t){let r=setTimeout(function(){return clearTimeout(r),t({message:"Request timed out",timeout:n.timeout})},n.timeout)});a=i.race([a,e])}return a.then(function(e){return e.ok?typeof n.success==typeof t.noop?e.json().then(function(e){try{n.success(e)}catch(e){t.error("Unhandled httpAPICall success callback error",e)}},function(t){return i.reject({message:"Failed to parse response body",error:t,response:e})}):void 0:i.reject({message:"API call failed",response:e})}).catch(function(e){typeof n.error==typeof t.noop&&n.error(e.message||"<< internal error >>",e)}),a}}},t.useOldDependencies=function(n){let r=n&&n.jQuery||jQuery,i=n&&n.WebSocket||WebSocket;return{newWebSocket:function(e,t){return new i(e,t)},isArray:function(e){return r.isArray(e)},extension:n&&n.extension||e,webRTCAdapter:n&&n.adapter||adapter,httpAPICall:function(e,n){let i=void 0!==n.body?{contentType:"application/json",data:JSON.stringify(n.body)}:{},o=void 0!==n.withCredentials?{xhrFields:{withCredentials:n.withCredentials}}:{};return r.ajax(r.extend(i,o,{url:e,type:n.verb,cache:!1,dataType:"json",async:n.async,timeout:n.timeout,success:function(e){typeof n.success==typeof t.noop&&n.success(e)},error:function(e,r,i){typeof n.error==typeof t.noop&&n.error(r,i)}}))}}},t.mediaToTracks=function(e){let t=[];if(e){if(!e.keepAudio&&!1!==e.audio&&(void 0===e.audio||e.audio||e.audioSend||e.audioRecv||e.addAudio||e.replaceAudio||e.removeAudio)){let n={type:"audio"};e.removeAudio?n.remove=!0:(e.addAudio?n.add=!0:e.replaceAudio&&(n.replace=!0),!1!==e.audioSend&&(n.capture=e.audio||!0),!1!==e.audioRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}if(!e.keepVideo&&!1!==e.video&&(void 0===e.video||e.video||e.videoSend||e.videoRecv||e.addVideo||e.replaceVideo||e.removeVideo)){let n={type:"video"};e.removeVideo?n.remove=!0:(e.addVideo?n.add=!0:e.replaceVideo&&(n.replace=!0),!1!==e.videoSend&&(n.capture=e.video||!0,["screen","window","desktop"].includes(n.capture)&&(n.type="screen",n.capture={video:{}},e.screenshareFrameRate&&(n.capture.frameRate=e.screenshareFrameRate),e.screenshareHeight&&(n.capture.height=e.screenshareHeight),e.screenshareWidth&&(n.capture.width=e.screenshareWidth))),!1!==e.videoRecv&&(n.recv=!0)),(n.remove||n.capture||n.recv)&&t.push(n)}e.data&&t.push({type:"data"})}else t.push({type:"audio",capture:!0,recv:!0}),t.push({type:"video",capture:!0,recv:!0});return t},t.trackConstraints=function(e){let n={};if(!e||!e.capture)return n;if("audio"===e.type)n.audio=e.capture;else if("video"===e.type)if((e.simulcast||e.svc)&&!0===e.capture&&(e.capture="hires"),!0===e.capture||"object"==typeof e.capture)n.video=e.capture;else{let r=0,i=0;"lowres"===e.capture?(r=320,i=240):"lowres-16:9"===e.capture?(r=320,i=180):"hires"===e.capture||"hires-16:9"===e.capture||"hdres"===e.capture?(r=1280,i=720):"fhdres"===e.capture?(r=1920,i=1080):"4kres"===e.capture?(r=3840,i=2160):"stdres"===e.capture?(r=640,i=480):"stdres-16:9"===e.capture?(r=640,i=360):(t.log("Default video setting is stdres 4:3"),r=640,i=480),n.video={width:{ideal:r},height:{ideal:i}}}else"screen"===e.type&&(n.video=e.capture);return n},t.noop=function(){},t.dataChanDefaultLabel="JanusDataChannel",t.endOfCandidates=null,t.stopAllTracks=function(e){try{let n=e.getTracks();for(let e of n)t.log(e),e&&!0!==e.dontStop&&e.stop()}catch(e){}},t.init=function(e){if((e=e||{}).callback="function"==typeof e.callback?e.callback:t.noop,t.initDone)e.callback();else{if(void 0===console.log&&(console.log=function(){}),t.trace=t.noop,t.debug=t.noop,t.vdebug=t.noop,t.log=t.noop,t.warn=t.noop,t.error=t.noop,!0===e.debug||"all"===e.debug)t.trace=console.trace.bind(console),t.debug=console.debug.bind(console),t.vdebug=console.debug.bind(console),t.log=console.log.bind(console),t.warn=console.warn.bind(console),t.error=console.error.bind(console);else if(Array.isArray(e.debug))for(let n of e.debug)switch(n){case"trace":t.trace=console.trace.bind(console);break;case"debug":t.debug=console.debug.bind(console);break;case"vdebug":t.vdebug=console.debug.bind(console);break;case"log":t.log=console.log.bind(console);break;case"warn":t.warn=console.warn.bind(console);break;case"error":t.error=console.error.bind(console)}t.log("Initializing library");let n=e.dependencies||t.useDefaultDependencies();t.isArray=n.isArray,t.webRTCAdapter=n.webRTCAdapter,t.httpAPICall=n.httpAPICall,t.newWebSocket=n.newWebSocket,t.extension=n.extension,t.extension.init(),t.listDevices=function(e,n){e="function"==typeof e?e:t.noop,n||(n={audio:!0,video:!0}),t.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(n).then(function(n){navigator.mediaDevices.enumerateDevices().then(function(r){t.debug(r),e(r),t.stopAllTracks(n)})}).catch(function(n){t.error(n),e([])}):(t.warn("navigator.mediaDevices unavailable"),e([]))},t.attachMediaStream=function(e,n){try{e.srcObject=n}catch(r){try{e.src=URL.createObjectURL(n)}catch(e){t.error("Error attaching stream to element",e)}}},t.reattachMediaStream=function(e,n){try{e.srcObject=n.srcObject}catch(r){try{e.src=n.src}catch(e){t.error("Error reattaching stream to element",e)}}};let r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0?"pagehide":"beforeunload",i=window["on"+r];if(window.addEventListener(r,function(){t.log("Closing window");for(const[e,n]of t.sessions)n&&n.destroyOnUnload&&(t.log("Destroying session "+e),n.destroy({unload:!0,notifyDestroyed:!1}));i&&"function"==typeof i&&i()}),t.safariVp8=!1,t.safariVp9=!1,"safari"===t.webRTCAdapter.browserDetails.browser&&t.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(let e of RTCRtpSender.getCapabilities("video").codecs)e&&e.mimeType&&"video/vp8"===e.mimeType.toLowerCase()?t.safariVp8=!0:e&&e.mimeType&&"video/vp9"===e.mimeType.toLowerCase()&&(t.safariVp9=!0);t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{let e=new RTCPeerConnection({});e.createOffer({offerToReceiveVideo:!0}).then(function(n){t.safariVp8=-1!==n.sdp.indexOf("VP8"),t.safariVp9=-1!==n.sdp.indexOf("VP9"),t.safariVp8?t.log("This version of Safari supports VP8"):t.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),e.close(),e=null})}t.initDone=!0,e.callback()}},t.isWebrtcSupported=function(){return!!window.RTCPeerConnection},t.isGetUserMediaAvailable=function(){return navigator.mediaDevices&&navigator.mediaDevices.getUserMedia},t.randomString=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++){let e=Math.floor(62*Math.random());n+=t.charAt(e)}return n},t});let FG=!0,UG=!0;function qG(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseFloat(r[n],10)}function WG(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function QG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(FG=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function GG(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(UG=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function KG(){if("object"==typeof window){if(FG)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function YG(e,t){UG&&console.warn(e+" is deprecated, please use "+t+" instead.")}function XG(e){return"[object Object]"===Object.prototype.toString.call(e)}function JG(e){return XG(e)?Object.keys(e).reduce(function(t,n){const r=XG(e[n]),i=r?JG(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})},{}):e}function $G(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach(r=>{r.endsWith("Id")?$G(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(t=>{$G(e,e.get(t),n)})}))}function eK(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)}),o.forEach(t=>{e.forEach(n=>{n.type===r&&n.trackId===t.id&&$G(e,n,i)})}),i}const tK=KG;function nK(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach(n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach(e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])})}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"==typeof e.video){let o=e.video.facingMode;o=o&&("object"==typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then(n=>{let a=(n=n.filter(e=>"videoinput"===e.kind)).find(e=>t.some(t=>e.label.toLowerCase().includes(t)));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),tK("chrome: "+JSON.stringify(e)),i(e)})}e.video=r(e.video)}return tK("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,e=>{n.webkitGetUserMedia(e,t,e=>{r&&r(o(e))})})}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,t=>e(t).then(e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(o(e))))}}}function rK(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function iK(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.track.id):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}),t.stream.getTracks().forEach(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===n.id):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else WG(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e))}function oK(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(t(this,e))})};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{const t=this._senders.find(t=>t.track===e);t&&this._senders.splice(this._senders.indexOf(t),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function aK(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>eK(t,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),WG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then(t=>eK(t,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach(n=>{n.track===e&&(t?r=!0:t=n)}),this.getReceivers().forEach(t=>(t.track===e&&(n?r=!0:n=t),t.track===e)),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function lK(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter(e=>-1===t.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]}),i.apply(this,arguments)}}function sK(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return lK(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach(e=>{if(this.getSenders().find(t=>t.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)}),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(e=>e===t))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===t))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find(e=>e.track===t)},["createOffer","createAnswer"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then(e=>o(this,e))}};e.RTCPeerConnection.prototype[t]=r[t]});const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach(n=>{this._streams[n].getTracks().find(t=>e.track===t)&&(t=this._streams[n])}),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function cK(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})}function dK(e,t){WG(e,"negotiationneeded",e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e})}var uK=Object.freeze({__proto__:null,fixNegotiationNeeded:dK,shimAddTrackRemoveTrack:sK,shimAddTrackRemoveTrackWithNative:lK,shimGetSendersWithDtmf:oK,shimGetUserMedia:nK,shimMediaStream:rK,shimOnTrack:iK,shimPeerConnection:cK,shimSenderReceiverGetStats:aK});function fK(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){YG("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function hK(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function pK(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]});const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then(e=>{if(t.version<53&&!i)try{e.forEach(e=>{e.type=n[e.type]||e.type})}catch(t){if("TypeError"!==t.name)throw t;e.forEach((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))})}return e}).then(i,o)}}function CK(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function mK(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach(e=>e._pc=this),e}),WG(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function gK(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){YG("removeStream","removeTrack"),this.getSenders().forEach(t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)})})}function vK(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function yK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach(e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then(()=>{delete t.sendEncodings}).catch(()=>{delete t.sendEncodings})))}return r})}function wK(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function bK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}function EK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>t.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):t.apply(this,arguments)}}var MK=Object.freeze({__proto__:null,shimAddTransceiver:yK,shimCreateAnswer:EK,shimCreateOffer:bK,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})},shimGetParameters:wK,shimGetUserMedia:fK,shimOnTrack:hK,shimPeerConnection:pK,shimRTCDataChannel:vK,shimReceiverGetStats:mK,shimRemoveStream:gK,shimSenderGetStats:CK});function AK(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>t.call(this,n,e)),e.getVideoTracks().forEach(n=>t.call(this,n,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach(e=>{n.includes(e.track)&&this.removeTrack(e)})})}}function xK(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)})})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach(t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)})}),t.apply(e,arguments)}}}function LK(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let l=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=l,l=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=l,l=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=l}function kK(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(HK(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function HK(e){return e&&void 0!==e.video?Object.assign({},e,{video:JG(e.video)}):e}function SK(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(YG("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function _K(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function VK(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function OK(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var zK,NK=Object.freeze({__proto__:null,shimAudioContext:OK,shimCallbacksAPI:LK,shimConstraints:HK,shimCreateOfferLegacy:VK,shimGetUserMedia:kK,shimLocalStreamsAPI:AK,shimRTCIceServerUrls:SK,shimRemoteStreamsAPI:xK,shimTrackEventTransceiver:_K}),TK={exports:{}};var IK=(zK||(zK=1,function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},t.splitSections=function(e){return e.split("\nm=").map((e,t)=>(t>0?"m="+e:e).trim()+"\r\n")},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter(e=>0===e.indexOf(n))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":n.relatedAddress=t[e+1];break;case"rport":n.relatedPort=parseInt(t[e+1],10);break;case"tcptype":n.tcpType=t[e+1];break;case"ufrag":n.ufrag=t[e+1],n.usernameFragment=t[e+1];break;default:void 0===n[t[e]]&&(n[t[e]]=t[e+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<r.length;e++)n=r[e].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach(t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)}),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map(e=>parseInt(e,10))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let i=3;i<r.length;i++){const o=r[i],a=t.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){const r=t.parseRtpMap(a),i=t.matchPrefix(e,"a=fmtp:"+o+" ");switch(r.parameters=i.length?t.parseFmtp(i[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach(e=>{n.headerExtensions.push(t.parseExtmap(e))});const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach(e=>{i.forEach(t=>{e.rtcpFeedback.find(e=>e.type===t.type&&e.parameter===t.parameter)||e.rtcpFeedback.push(t)})}),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)});let i=0;return n.codecs.forEach(e=>{e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach(e=>{r+=t.writeExtmap(e)}),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=a.length>0&&a[0].ssrc;let s;const c=t.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));c.length>0&&c[0].length>1&&c[0][0]===l&&(s=c[0][1]),r.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&s&&(t.rtx={ssrc:s}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:l,mechanism:o?"red+ulpfec":"red"},n.push(t))}}),0===n.length&&l&&n.push({ssrc:l});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,n.forEach(e=>{e.maxBitrate=d})),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map(e=>t.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;return i=e||t.generateSessionId(),"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let e=0;e<r.length;e++)switch(r[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[e].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let e=0;e<n.length;e++)if(n[e].length<2||"="!==n[e].charAt(1))return!1;return!0},e.exports=t}(TK)),TK.exports),DK=H(IK),ZK=L({__proto__:null,default:DK},[IK]);function jK(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=DK.parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,WG(e,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t))}function RK(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||WG(e,"icecandidate",e=>{if(e.candidate){const t=DK.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e})}function BK(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=DK.splitSections(e.sdp);return t.shift(),t.some(e=>{const t=DK.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")})}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=DK.matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function PK(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},WG(e,"datachannel",e=>(t(e.channel,e.target),e))}function FK(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}})}function UK(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t._safariVersion>=13.1)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function qK(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function WK(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>n.apply(this,[e]))})}var QK=Object.freeze({__proto__:null,removeExtmapAllowMixed:UK,shimAddIceCandidateNullOrEmpty:qK,shimConnectionState:FK,shimMaxMessageSize:BK,shimParameterlessSetLocalDescription:WK,shimRTCIceCandidate:jK,shimRTCIceCandidateRelayProtocol:RK,shimSendThrowTypeError:PK});const GK=function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const n=KG,r=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=parseInt(qG(n.userAgent,/Firefox\/(\d+)\./,1));else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=parseInt(qG(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2))||null;else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=parseInt(qG(n.userAgent,/AppleWebKit\/(\d+)\./,1)),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,t._safariVersion=qG(n.userAgent,/Version\/(\d+(\.?\d+))/,1)}return t}(e),i={browserDetails:r,commonShim:QK,extractVersion:qG,disableLog:QG,disableWarnings:GG,sdp:ZK};switch(r.browser){case"chrome":if(!uK||!cK||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),i;if(null===r.version)return n("Chrome shim can not determine version, not shimming."),i;n("adapter.js shimming chrome."),i.browserShim=uK,qK(e,r),WK(e),nK(e,r),rK(e),cK(e,r),iK(e),sK(e,r),oK(e),aK(e),dK(e,r),jK(e),RK(e),FK(e),BK(e,r),PK(e),UK(e,r);break;case"firefox":if(!MK||!pK||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),i;n("adapter.js shimming firefox."),i.browserShim=MK,qK(e,r),WK(e),fK(e,r),pK(e,r),hK(e),gK(e),CK(e),mK(e),vK(e),yK(e),wK(e),bK(e),EK(e),jK(e),FK(e),BK(e,r),PK(e);break;case"safari":if(!NK||!t.shimSafari)return n("Safari shim is not included in this adapter release."),i;n("adapter.js shimming safari."),i.browserShim=NK,qK(e,r),WK(e),SK(e),VK(e),LK(e),AK(e),xK(e),_K(e),kK(e),OK(e),jK(e),RK(e),BK(e,r),PK(e),UK(e,r);break;default:n("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window}),KK=({actions:t=[{text:"Analyzing your application flow...",color:"var(--brand-color)"},{text:"AI agents are on action...",color:"var(--ff-electric-indigo)"},{text:"Thinking like a QA expert… just a few more seconds...",color:"var(--ff-vivid-orange)"},{text:"Hold on, test cases are on the way!",color:"var(--ff-dodger-blue)"}],width:r,height:i,path:o,DynamicHeight:a=500})=>{const[s,d]=c(0),[u,f]=c("");l(()=>{if(s>=t?.length)return;const e=t[s]?.text||" ";let n=0;const r=setInterval(()=>{n<=e?.length?(f(e?.slice(0,n)),n++):(clearInterval(r),setTimeout(()=>{d(e=>e<t?.length-1?e+1:e)},1e3))},80);return()=>clearInterval(r)},[s,t]);const h=t[s]?.color;return n("div",{className:"loader-container",style:{width:`${r}%`,height:`${i}%`},children:[e("div",{className:"ff-moving-sections-container",children:[1,2,3,4]?.map(t=>e("div",{className:`ff-moving-section${t}`,style:{height:""+(a+"px")}},t))}),n("div",{className:"ff-gif-container",children:[e("div",{className:"ff-typing-wrapper",children:e(F,{className:"ff-typing-text",fontSize:16,fontWeight:"medium",style:{color:h},children:u})}),e("img",{height:100,width:100,alt:"generation",src:o})]})]})},YK=()=>{const e=()=>{const e=window.innerWidth;return{isMobile:e<=640,isTab:e>640&&e<=820,isLargeTab:e>820&&e<1025,isWeb:e>=1025}},[t,n]=c(e());return l(()=>{const t=()=>{n(e())};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),t},XK=e=>{const t=document.createElement("textarea");document.body.appendChild(t),t.value=e,t.select();const n=document.execCommand("copy");return document.body.removeChild(t),n},JK=({used:t,total:r,unit:i="GB",showValue:o=!0,width:a="216px"})=>{const l=((e,t)=>t>0?Math.min(e/t*100,100):0)(t,r);return e("div",{className:"ff-storage-bar",style:{width:a},children:e("div",{className:"ff-storage-bar__track",children:e("div",{className:"ff-storage-bar__fill",style:{width:`${l}%`},children:o&&n("span",{className:"ff-storage-bar__value",children:[t,i]})})})})};export{je as AADHAAR_REGEX,ye as ALPHABET_ONLY_REGEX,Bt as ALPHABET_WITH_SPACES_ONLY_REGEX,ht as ALPHANUMERIC_PARENTHESIS_REGEX,be as ALPHANUMERIC_REGEX,jt as ALPHANUMERIC_WITH_DOT_REGEX,Ee as ALPHANUMERIC_WITH_ROUND_BRACES_REGEX,Zt as ALPHA_NUM_EXTENDED_REGEX,Ot as ALPHA_NUM_REGEX,$ as Accordion,RE as AddContentButton,Sa as AddResourceButton,NE as AiToggle,ah as AllProjectsDropdown,TE as AnimatedSetting,hh as AppHeader,kv as AttachMedia,Lp as AttachmentButton,BG as AutoTruncateText,Hp as Avatar,Ye as BASE64_REGEX,ze as BIG_END_WHITESPACE,Xe as BINARY_NUMBER_REGEX,Mt as BODY_TAG_TYPE_VALIDATION,_A as BarChart,aW as Box,Ws as BrowserTabs,U as Button,Ct as CAMEL_CASE_REGEX,bt as CERTIFICATES_NAME_REGEX,Lt as CHECK_CAMEL_CASE,ke as CREDIT_CARD_REGEX,et as CURRENCY_GENERIC_REGEX,VE as ChatModal,OE as ChatModalAi,te as Checkbox,nn as Chip,ZE as ChipWithCount,AE as ChooseFile,en as Col,nk as Comments,sk as ConditionalDropdown,YL as ConnectingBranch,Jt as Container,_p as ContentCard,bE as CreateVariableSlider,Me as DATE_REGEX,We as DECIMAL_NUMBER_REGEX,Ue as DRIVING_LICENSE_REGEX,vt as DYNAMIC_VALUE_PATTERN_REGEX,yt as DYNAMIC_VALUE_TYPE_REGEX,wt as DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX,gt as DYNAMIC_VALUE__PLACEHOLDER_REGEX,wh as DashboardDonutChart,Jf as DatePicker,CW as DebugToolsPanel,za as DonutChart,gE as DownloadClient,ih as DragAndDrop,X as Drawer,Fa as Dropzone,dt as ELEMENTS_TRAILING_SPACE_REGEX,ut as ELEMENTS_WHITE_SPACE_REGEX,qt as EMAIL_FORMAT_REGEX,de as EMAIL_REGEX,It as EMAIL_VALIDATION_REGEX,Rt as EXCEL_SPACING_REGEX,Zs as EditLabel,zp as EditTextField,UL as Editor,jE as ErrorBoundary,Mv as Excel,ln as ExpandableMenu,Pt as FILENAME_VALIDATION_REGEX,xe as FILE_EXTENSION_REGEX,ct as FILE_NAME_REGEX,vE as FieldSet,qa as FileDropzone,Ua as FilePreview,_s as Form,ak as FormatString,De as GSTIN_REGEX,Je as HEXADECIMAL_NUMBER_REGEX,me as HEX_COLOR_REGEX,Ke as HSL_COLOR_REGEX,Qe as HTML_ATTRIBUTE_REGEX,Et as HTML_FILE_TYPE_VALIDATION,_e as HTML_TAG_REGEX,J as HighlightText,zE as HistoryCard,Be as INDIAN_CURRENCY_REGEX,Fe as INDIAN_PASSPORT_REGEX,Te as INDIAN_PHONE_REGEX,Ie as INDIAN_PIN_CODE_REGEX,Pe as INTERNATIONAL_PHONE_REGEX,pe as IPV4_REGEX,Ce as IPV6_REGEX,P as Icon,eh as IconButton,Lv as IconRadialChart,vp as IconRadioGroup,rn as Input,Vs as InputWithDropdown,xt as JAVASCRIPT_FILE_TYPE_VALIDATION,PG as Janus,tt as LINKEDIN_PROFILE_REGEX,Dt as LINK_VALIDATION_REGEX,Vp as LabelEditTextField,nr as LazyLoad,mE as LineChart,Sp as LineLoader,DE as Link,Le as MAC_ADDRESS_REGEX,at as MEMORY_VALIDATION_REGEX,yp as MachineInputField,kE as MediaPreview,qE as MediaViewerModel,hr as MenuOption,_E as MessageBox,Os as MiniModal,HE as MobileSkin,th as Modal,Av as ModuleChip,OA as MultiRadialChart,Yt as MultiSelect,gp as NLPInput,st as NLP_DESCRIPTION_REGEX,Ft as NO_LEADING_TRAILING_SPACE_REGEX,we as NUMBERS_ONLY_REGEX,rt as NUMBER_REGEX,oW as NoDataContent,FE as OsTree,UE as OtpVerification,zs as OverviewModal,Ze as PAN_CARD_REGEX,ft as PARAMETER_ALPHANUMERIC_REGEX,ve as PASSWORD_COMPLEX_REGEX,ge as PASSWORD_SIMPLE_REGEX,fe as PHONE_REGEX,he as POSTAL_CODE_REGEX,ph as Paper,xO as PhoneInputField,sh as PieChart,ik as PopUpModal,UO as PrePostTable,ME as ProgressBar,SE as Prompt,IE as PromptContainer,Ge as RGB_COLOR_REGEX,$e as ROMAN_NUMERALS_REGEX,an as RadialChart,Ra as RadioButton,Ba as RadioGroup,fp as Recaptcha,$t as Row,ot as SCRIPT_REGEX,Ut as SERVER_HOST_REGEX,He as SSN_REGEX,Vt as START_END_WHITESPACE_REGEX,lt as STEP_GROUP_NAME_REGEX,KK as ScriptGenerationLoader,xE as ScriptSwitchButton,Qs as Search,lr as Select,vW as SelectionSwitcher,xp as SequentialConnectingBranch,WE as SessionDropdown,mW as SessionManager,$f as StateDropdown,gW as StatusBadge,dr as StatusButton,Hv as StatusCard,PE as StatusIndicator,oz as StepLandingTable,rz as StepResultStats,JK as StorageUsageBar,LE as SwitchButton,Ae as TIME_REGEX,nt as TWITTER_HANDLE_REGEX,ka as Table,Us as TableTree,rM as TableTreeFn,EE as TableWithAccordion,qs as Tabs,BE as TabsWithSilder,cr as TextArea,iW as TextEditor,Q as ThemeProvider,Xt as Toaster,Da as Toastify,tn as Toggle,kp as ToggleSwitch,K as Tooltip,DG as TooltipService,cn as TruncatedTooltip,F as Typography,it as UNIT_REGEX,ue as URL_REGEX,Ne as USERNAME_REGEX,qe as USERNAME_SPECIAL_REGEX,Oe as US_ZIP_CODE_REGEX,Se as UUID_REGEX,Re as VEHICLE_REGISTRATION_REGEX,CE as VariableDropdown,oh as VariableInput,wE as VariableSuggestionInputDropDown,Ve as WHITESPACE_REGEX,At as XML_FILE_TYPE_VALIDATION,yW as ZoomControl,GK as adapter,IO as addPrePostStepGroup,DO as addStepGroup,sW as autoScrollToTableLastRow,Op as capitalize,G as checkEmpty,pW as checkMicrophoneAccess,fh as clearStore,aM as compareArrays,oM as compareObjects,HO as convertFormDataToObject,HA as convertToBytes,SA as convertToGB,ZO as convertToISO,XK as copyToClipboard,La as debounce,uh as deleteStoreValue,Wt as ffid,iM as findAndInsert,TO as formatDate,kO as formatResponseDate,kA as getEncryptedData,Na as getExtension,Ta as getExtensionWithPeriod,hW as getNavigateToKey,qL as getSequentialPayload,dh as getStoreValue,uW as getTopVisibleNodeKey,SO as getTreeDetails,jO as handleTimeZoneChange,cW as handleTreeExpandAllCollapseAll,NO as handleTreeNodeExpandCollapse,OO as handleTreeNodeSect,zO as handleUnCheckAllTreeNodesWithUpdates,ck as hasDuplicateFile,bp as isEmptyObject,oe as isTextTruncated,fW as nlpInputDelay,LO as rearrangeDragItem,XL as saveFileFromBlob,FO as scrollToView,ch as setStoreValue,wv as throttle,lW as toCamelCase,Za as toast,dW as toggleShowHideEntity,ie as truncateText,_O as updateTreeState,VO as useBeforeUnload,Y as useClickOutside,YK as useDeviceType,ja as useFileDropzone,ce as useKeyboardActions,Wa as useTheme,rk as useTriggerControl};
49
49
  //# sourceMappingURL=index.js.map